summaryrefslogtreecommitdiff
path: root/usr/src/man/man1
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man1')
-rw-r--r--usr/src/man/man1/Intro.1598
-rw-r--r--usr/src/man/man1/Makefile770
-rw-r--r--usr/src/man/man1/acctcom.1401
-rw-r--r--usr/src/man/man1/adb.138
-rw-r--r--usr/src/man/man1/addbib.1342
-rw-r--r--usr/src/man/man1/alias.1455
-rw-r--r--usr/src/man/man1/allocate.1233
-rw-r--r--usr/src/man/man1/amt.1101
-rw-r--r--usr/src/man/man1/appcert.1724
-rw-r--r--usr/src/man/man1/apptrace.1299
-rw-r--r--usr/src/man/man1/apropos.1146
-rw-r--r--usr/src/man/man1/ar.1518
-rw-r--r--usr/src/man/man1/arch.1101
-rw-r--r--usr/src/man/man1/asa.1266
-rw-r--r--usr/src/man/man1/at.1764
-rw-r--r--usr/src/man/man1/atq.173
-rw-r--r--usr/src/man/man1/atrm.1100
-rw-r--r--usr/src/man/man1/audioconvert.1456
-rw-r--r--usr/src/man/man1/audioplay.1197
-rw-r--r--usr/src/man/man1/audiorecord.1251
-rw-r--r--usr/src/man/man1/audiotest.1134
-rw-r--r--usr/src/man/man1/auths.1109
-rw-r--r--usr/src/man/man1/awk.1672
-rw-r--r--usr/src/man/man1/banner.123
-rw-r--r--usr/src/man/man1/basename.1120
-rw-r--r--usr/src/man/man1/bc.1539
-rw-r--r--usr/src/man/man1/bdiff.197
-rw-r--r--usr/src/man/man1/bfs.1369
-rw-r--r--usr/src/man/man1/break.1180
-rw-r--r--usr/src/man/man1/builtin.1179
-rw-r--r--usr/src/man/man1/cal.1136
-rw-r--r--usr/src/man/man1/calendar.1170
-rw-r--r--usr/src/man/man1/cancel.1233
-rw-r--r--usr/src/man/man1/cat.1531
-rw-r--r--usr/src/man/man1/cd.1379
-rw-r--r--usr/src/man/man1/cdrw.1706
-rw-r--r--usr/src/man/man1/checknr.1115
-rw-r--r--usr/src/man/man1/chgrp.1348
-rw-r--r--usr/src/man/man1/chkey.1166
-rw-r--r--usr/src/man/man1/chmod.12824
-rw-r--r--usr/src/man/man1/chown.1618
-rw-r--r--usr/src/man/man1/ckdate.1362
-rw-r--r--usr/src/man/man1/ckgid.1268
-rw-r--r--usr/src/man/man1/ckint.1267
-rw-r--r--usr/src/man/man1/ckitem.1381
-rw-r--r--usr/src/man/man1/ckkeywd.1228
-rw-r--r--usr/src/man/man1/ckpath.1464
-rw-r--r--usr/src/man/man1/ckrange.1358
-rw-r--r--usr/src/man/man1/ckstr.1332
-rw-r--r--usr/src/man/man1/cksum.1178
-rw-r--r--usr/src/man/man1/cktime.1290
-rw-r--r--usr/src/man/man1/ckuid.1293
-rw-r--r--usr/src/man/man1/ckyorn.1261
-rw-r--r--usr/src/man/man1/clear.138
-rw-r--r--usr/src/man/man1/cmp.1181
-rw-r--r--usr/src/man/man1/col.1194
-rw-r--r--usr/src/man/man1/comm.1204
-rw-r--r--usr/src/man/man1/command.1490
-rw-r--r--usr/src/man/man1/compress.1448
-rw-r--r--usr/src/man/man1/cp.1539
-rw-r--r--usr/src/man/man1/cpio.1935
-rw-r--r--usr/src/man/man1/cputrack.1444
-rw-r--r--usr/src/man/man1/crle.11035
-rw-r--r--usr/src/man/man1/crontab.1719
-rw-r--r--usr/src/man/man1/crypt.181
-rw-r--r--usr/src/man/man1/csh.13569
-rw-r--r--usr/src/man/man1/csplit.1307
-rw-r--r--usr/src/man/man1/ctags.1340
-rw-r--r--usr/src/man/man1/ctrun.1457
-rw-r--r--usr/src/man/man1/ctstat.1405
-rw-r--r--usr/src/man/man1/ctwatch.1268
-rw-r--r--usr/src/man/man1/cut.1405
-rw-r--r--usr/src/man/man1/date.1452
-rw-r--r--usr/src/man/man1/dc.1605
-rw-r--r--usr/src/man/man1/deallocate.1230
-rw-r--r--usr/src/man/man1/deroff.188
-rw-r--r--usr/src/man/man1/dhcpinfo.1273
-rw-r--r--usr/src/man/man1/diff.1511
-rw-r--r--usr/src/man/man1/diff3.1269
-rw-r--r--usr/src/man/man1/diffmk.186
-rw-r--r--usr/src/man/man1/digest.1200
-rw-r--r--usr/src/man/man1/dircmp.1130
-rw-r--r--usr/src/man/man1/dis.1286
-rw-r--r--usr/src/man/man1/disown.1180
-rw-r--r--usr/src/man/man1/dispgid.149
-rw-r--r--usr/src/man/man1/dispuid.149
-rw-r--r--usr/src/man/man1/dos2unix.1219
-rw-r--r--usr/src/man/man1/download.1178
-rw-r--r--usr/src/man/man1/dpost.1413
-rw-r--r--usr/src/man/man1/du.1314
-rw-r--r--usr/src/man/man1/dump.1371
-rw-r--r--usr/src/man/man1/dumpcs.1113
-rw-r--r--usr/src/man/man1/echo.1421
-rw-r--r--usr/src/man/man1/ed.11342
-rw-r--r--usr/src/man/man1/egrep.1395
-rw-r--r--usr/src/man/man1/eject.1258
-rw-r--r--usr/src/man/man1/elfdump.1654
-rw-r--r--usr/src/man/man1/elfedit.11142
-rw-r--r--usr/src/man/man1/elfsign.1483
-rw-r--r--usr/src/man/man1/elfwrap.1217
-rw-r--r--usr/src/man/man1/enable.1212
-rw-r--r--usr/src/man/man1/encrypt.1408
-rw-r--r--usr/src/man/man1/enhance.1100
-rw-r--r--usr/src/man/man1/env.1231
-rw-r--r--usr/src/man/man1/eqn.1536
-rw-r--r--usr/src/man/man1/exec.1341
-rw-r--r--usr/src/man/man1/exit.1216
-rw-r--r--usr/src/man/man1/expand.1210
-rw-r--r--usr/src/man/man1/expr.1422
-rw-r--r--usr/src/man/man1/exstr.1404
-rw-r--r--usr/src/man/man1/factor.181
-rw-r--r--usr/src/man/man1/fdformat.1534
-rw-r--r--usr/src/man/man1/fgrep.1339
-rw-r--r--usr/src/man/man1/file.1326
-rw-r--r--usr/src/man/man1/filebench.1186
-rw-r--r--usr/src/man/man1/filesync.1672
-rw-r--r--usr/src/man/man1/find.11075
-rw-r--r--usr/src/man/man1/finger.1337
-rw-r--r--usr/src/man/man1/fmt.1107
-rw-r--r--usr/src/man/man1/fmtmsg.1583
-rw-r--r--usr/src/man/man1/fold.1220
-rw-r--r--usr/src/man/man1/ftp.11399
-rw-r--r--usr/src/man/man1/ftpcount.1110
-rw-r--r--usr/src/man/man1/ftpwho.1110
-rw-r--r--usr/src/man/man1/gcore.1179
-rw-r--r--usr/src/man/man1/gencat.1254
-rw-r--r--usr/src/man/man1/genmsg.1664
-rw-r--r--usr/src/man/man1/getconf.1789
-rw-r--r--usr/src/man/man1/getfacl.1317
-rw-r--r--usr/src/man/man1/getlabel.1110
-rw-r--r--usr/src/man/man1/getopt.1148
-rw-r--r--usr/src/man/man1/getoptcvt.1249
-rw-r--r--usr/src/man/man1/getopts.1954
-rw-r--r--usr/src/man/man1/gettext.1185
-rw-r--r--usr/src/man/man1/gettxt.1182
-rw-r--r--usr/src/man/man1/getzonepath.199
-rw-r--r--usr/src/man/man1/glob.126
-rw-r--r--usr/src/man/man1/gprof.1434
-rw-r--r--usr/src/man/man1/grep.1550
-rw-r--r--usr/src/man/man1/groups.165
-rw-r--r--usr/src/man/man1/hash.1199
-rw-r--r--usr/src/man/man1/head.1341
-rw-r--r--usr/src/man/man1/history.11184
-rw-r--r--usr/src/man/man1/hostid.125
-rw-r--r--usr/src/man/man1/hostname.124
-rw-r--r--usr/src/man/man1/iconv.1298
-rw-r--r--usr/src/man/man1/indxbib.1118
-rw-r--r--usr/src/man/man1/ipcrm.1151
-rw-r--r--usr/src/man/man1/ipcs.1726
-rw-r--r--usr/src/man/man1/isainfo.1169
-rw-r--r--usr/src/man/man1/isalist.145
-rw-r--r--usr/src/man/man1/jobs.11045
-rw-r--r--usr/src/man/man1/join.1366
-rw-r--r--usr/src/man/man1/kbd.1705
-rw-r--r--usr/src/man/man1/kdestroy.1122
-rw-r--r--usr/src/man/man1/keylogin.193
-rw-r--r--usr/src/man/man1/keylogout.162
-rw-r--r--usr/src/man/man1/kill.1690
-rw-r--r--usr/src/man/man1/kinit.1670
-rw-r--r--usr/src/man/man1/klist.1380
-rw-r--r--usr/src/man/man1/kmdb.1501
-rw-r--r--usr/src/man/man1/kmfcfg.1897
-rw-r--r--usr/src/man/man1/kpasswd.184
-rw-r--r--usr/src/man/man1/krb5-config.1208
-rw-r--r--usr/src/man/man1/ksh93.17812
-rw-r--r--usr/src/man/man1/ktutil.1224
-rw-r--r--usr/src/man/man1/lari.1738
-rw-r--r--usr/src/man/man1/last.1117
-rw-r--r--usr/src/man/man1/lastcomm.1196
-rw-r--r--usr/src/man/man1/ld.11820
-rw-r--r--usr/src/man/man1/ld.so.1.1787
-rw-r--r--usr/src/man/man1/ldap.1340
-rw-r--r--usr/src/man/man1/ldapdelete.1597
-rw-r--r--usr/src/man/man1/ldaplist.1540
-rw-r--r--usr/src/man/man1/ldapmodify.1827
-rw-r--r--usr/src/man/man1/ldapmodrdn.1580
-rw-r--r--usr/src/man/man1/ldapsearch.1975
-rw-r--r--usr/src/man/man1/ldd.1527
-rw-r--r--usr/src/man/man1/let.195
-rw-r--r--usr/src/man/man1/lex.11045
-rw-r--r--usr/src/man/man1/lgrpinfo.1619
-rw-r--r--usr/src/man/man1/limit.1934
-rw-r--r--usr/src/man/man1/line.155
-rw-r--r--usr/src/man/man1/list_devices.1409
-rw-r--r--usr/src/man/man1/listusers.160
-rw-r--r--usr/src/man/man1/ln.1307
-rw-r--r--usr/src/man/man1/loadkeys.171
-rw-r--r--usr/src/man/man1/locale.1274
-rw-r--r--usr/src/man/man1/localedef.1529
-rw-r--r--usr/src/man/man1/logger.1189
-rw-r--r--usr/src/man/man1/login.1940
-rw-r--r--usr/src/man/man1/logname.1120
-rw-r--r--usr/src/man/man1/logout.124
-rw-r--r--usr/src/man/man1/look.179
-rw-r--r--usr/src/man/man1/lookbib.196
-rw-r--r--usr/src/man/man1/lorder.184
-rw-r--r--usr/src/man/man1/lp.1783
-rw-r--r--usr/src/man/man1/lpstat.1477
-rw-r--r--usr/src/man/man1/ls.12981
-rw-r--r--usr/src/man/man1/m4.1809
-rw-r--r--usr/src/man/man1/mac.1257
-rw-r--r--usr/src/man/man1/mach.130
-rw-r--r--usr/src/man/man1/machid.1208
-rw-r--r--usr/src/man/man1/madv.so.1.1332
-rw-r--r--usr/src/man/man1/mail.1893
-rw-r--r--usr/src/man/man1/mailcompat.188
-rw-r--r--usr/src/man/man1/mailq.1207
-rw-r--r--usr/src/man/man1/mailstats.1283
-rw-r--r--usr/src/man/man1/mailx.13206
-rw-r--r--usr/src/man/man1/makekey.153
-rw-r--r--usr/src/man/man1/man.1720
-rw-r--r--usr/src/man/man1/mconnect.190
-rw-r--r--usr/src/man/man1/mcs.1238
-rw-r--r--usr/src/man/man1/mdb.15107
-rw-r--r--usr/src/man/man1/mesg.1143
-rw-r--r--usr/src/man/man1/mkdir.1264
-rw-r--r--usr/src/man/man1/mkmsgs.1159
-rw-r--r--usr/src/man/man1/mktemp.1304
-rw-r--r--usr/src/man/man1/moe.1218
-rw-r--r--usr/src/man/man1/more.11019
-rw-r--r--usr/src/man/man1/mpss.so.1.1265
-rw-r--r--usr/src/man/man1/msgcc.1249
-rw-r--r--usr/src/man/man1/msgcpp.1931
-rw-r--r--usr/src/man/man1/msgcvt.1138
-rw-r--r--usr/src/man/man1/msgfmt.1519
-rw-r--r--usr/src/man/man1/msggen.1407
-rw-r--r--usr/src/man/man1/msgget.1145
-rw-r--r--usr/src/man/man1/mt.1454
-rw-r--r--usr/src/man/man1/mv.1286
-rw-r--r--usr/src/man/man1/nawk.11889
-rw-r--r--usr/src/man/man1/nc.1910
-rw-r--r--usr/src/man/man1/nca.1173
-rw-r--r--usr/src/man/man1/ncab2clf.1229
-rw-r--r--usr/src/man/man1/ncakmod.1123
-rw-r--r--usr/src/man/man1/newform.1323
-rw-r--r--usr/src/man/man1/newgrp.1283
-rw-r--r--usr/src/man/man1/news.1119
-rw-r--r--usr/src/man/man1/newtask.1255
-rw-r--r--usr/src/man/man1/nice.1198
-rw-r--r--usr/src/man/man1/nl.1431
-rw-r--r--usr/src/man/man1/nm.11007
-rw-r--r--usr/src/man/man1/nohup.1455
-rw-r--r--usr/src/man/man1/nroff.1409
-rw-r--r--usr/src/man/man1/od.1715
-rw-r--r--usr/src/man/man1/on.1156
-rw-r--r--usr/src/man/man1/optisa.160
-rw-r--r--usr/src/man/man1/pack.1330
-rw-r--r--usr/src/man/man1/pagesize.141
-rw-r--r--usr/src/man/man1/pargs.1206
-rw-r--r--usr/src/man/man1/passwd.11208
-rw-r--r--usr/src/man/man1/paste.1304
-rw-r--r--usr/src/man/man1/pathchk.1346
-rw-r--r--usr/src/man/man1/pax.13024
-rw-r--r--usr/src/man/man1/pfexec.1111
-rw-r--r--usr/src/man/man1/pg.1583
-rw-r--r--usr/src/man/man1/pgrep.1463
-rw-r--r--usr/src/man/man1/pkginfo.1244
-rw-r--r--usr/src/man/man1/pkgmk.1312
-rw-r--r--usr/src/man/man1/pkgparam.1172
-rw-r--r--usr/src/man/man1/pkgproto.1175
-rw-r--r--usr/src/man/man1/pkgtrans.1404
-rw-r--r--usr/src/man/man1/pktool.11406
-rw-r--r--usr/src/man/man1/plabel.1121
-rw-r--r--usr/src/man/man1/plgrp.1375
-rw-r--r--usr/src/man/man1/plimit.1234
-rw-r--r--usr/src/man/man1/pmadvise.1303
-rw-r--r--usr/src/man/man1/pmap.11084
-rw-r--r--usr/src/man/man1/postdaisy.1239
-rw-r--r--usr/src/man/man1/postdmd.1208
-rw-r--r--usr/src/man/man1/postio.1323
-rw-r--r--usr/src/man/man1/postmd.1347
-rw-r--r--usr/src/man/man1/postplot.1220
-rw-r--r--usr/src/man/man1/postprint.1277
-rw-r--r--usr/src/man/man1/postreverse.1150
-rw-r--r--usr/src/man/man1/posttek.1207
-rw-r--r--usr/src/man/man1/ppgsz.1298
-rw-r--r--usr/src/man/man1/ppriv.1411
-rw-r--r--usr/src/man/man1/pr.1492
-rw-r--r--usr/src/man/man1/praliases.1162
-rw-r--r--usr/src/man/man1/prctl.1606
-rw-r--r--usr/src/man/man1/preap.1135
-rw-r--r--usr/src/man/man1/prex.11043
-rw-r--r--usr/src/man/man1/print.1347
-rw-r--r--usr/src/man/man1/printf.1992
-rw-r--r--usr/src/man/man1/priocntl.11111
-rw-r--r--usr/src/man/man1/proc.1648
-rw-r--r--usr/src/man/man1/prof.1374
-rw-r--r--usr/src/man/man1/profiles.1141
-rw-r--r--usr/src/man/man1/projects.1179
-rw-r--r--usr/src/man/man1/ps.11523
-rw-r--r--usr/src/man/man1/ptree.1182
-rw-r--r--usr/src/man/man1/pvs.1446
-rw-r--r--usr/src/man/man1/pwd.1105
-rw-r--r--usr/src/man/man1/ranlib.134
-rw-r--r--usr/src/man/man1/rcapstat.1423
-rw-r--r--usr/src/man/man1/rcp.1362
-rw-r--r--usr/src/man/man1/rdist.1649
-rw-r--r--usr/src/man/man1/read.1433
-rw-r--r--usr/src/man/man1/readonly.1212
-rw-r--r--usr/src/man/man1/refer.1187
-rw-r--r--usr/src/man/man1/regcmp.1144
-rw-r--r--usr/src/man/man1/renice.1356
-rw-r--r--usr/src/man/man1/rev.1111
-rw-r--r--usr/src/man/man1/rlogin.1450
-rw-r--r--usr/src/man/man1/rm.1532
-rw-r--r--usr/src/man/man1/rmformat.1563
-rw-r--r--usr/src/man/man1/rmmount.1224
-rw-r--r--usr/src/man/man1/roffbib.1191
-rw-r--r--usr/src/man/man1/roles.1109
-rw-r--r--usr/src/man/man1/rpcgen.1663
-rw-r--r--usr/src/man/man1/rsh.1510
-rw-r--r--usr/src/man/man1/runat.1345
-rw-r--r--usr/src/man/man1/rup.185
-rw-r--r--usr/src/man/man1/ruptime.1118
-rw-r--r--usr/src/man/man1/rusers.1107
-rw-r--r--usr/src/man/man1/rwho.173
-rw-r--r--usr/src/man/man1/sar.1796
-rw-r--r--usr/src/man/man1/scp.1278
-rw-r--r--usr/src/man/man1/script.173
-rw-r--r--usr/src/man/man1/sdiff.1246
-rw-r--r--usr/src/man/man1/sed.1545
-rw-r--r--usr/src/man/man1/set.11681
-rw-r--r--usr/src/man/man1/setfacl.1400
-rw-r--r--usr/src/man/man1/setlabel.1198
-rw-r--r--usr/src/man/man1/setpgrp.171
-rw-r--r--usr/src/man/man1/sftp.1671
-rw-r--r--usr/src/man/man1/shcomp.1167
-rw-r--r--usr/src/man/man1/shell_builtins.1337
-rw-r--r--usr/src/man/man1/shift.1157
-rw-r--r--usr/src/man/man1/size.1172
-rw-r--r--usr/src/man/man1/sleep.1235
-rw-r--r--usr/src/man/man1/smbutil.1478
-rw-r--r--usr/src/man/man1/soelim.170
-rw-r--r--usr/src/man/man1/sort.1745
-rw-r--r--usr/src/man/man1/sortbib.1326
-rw-r--r--usr/src/man/man1/sotruss.1115
-rw-r--r--usr/src/man/man1/spell.1291
-rw-r--r--usr/src/man/man1/split.1193
-rw-r--r--usr/src/man/man1/srchtxt.1252
-rw-r--r--usr/src/man/man1/ssh-add.1289
-rw-r--r--usr/src/man/man1/ssh-agent.1211
-rw-r--r--usr/src/man/man1/ssh-http-proxy-connect.1239
-rw-r--r--usr/src/man/man1/ssh-keygen.1466
-rw-r--r--usr/src/man/man1/ssh-keyscan.1279
-rw-r--r--usr/src/man/man1/ssh-socks5-proxy-connect.1231
-rw-r--r--usr/src/man/man1/ssh.11056
-rw-r--r--usr/src/man/man1/strchg.1275
-rw-r--r--usr/src/man/man1/strings.1224
-rw-r--r--usr/src/man/man1/strip.1193
-rw-r--r--usr/src/man/man1/stty.11593
-rw-r--r--usr/src/man/man1/sum.1776
-rw-r--r--usr/src/man/man1/suspend.146
-rw-r--r--usr/src/man/man1/svcprop.1429
-rw-r--r--usr/src/man/man1/svcs.1884
-rw-r--r--usr/src/man/man1/symorder.132
-rw-r--r--usr/src/man/man1/sys-suspend.1134
-rw-r--r--usr/src/man/man1/tabs.1434
-rw-r--r--usr/src/man/man1/tail.1324
-rw-r--r--usr/src/man/man1/talk.1269
-rw-r--r--usr/src/man/man1/tar.11297
-rw-r--r--usr/src/man/man1/tbl.1150
-rw-r--r--usr/src/man/man1/tcopy.149
-rw-r--r--usr/src/man/man1/tee.1256
-rw-r--r--usr/src/man/man1/telnet.11682
-rw-r--r--usr/src/man/man1/test.11184
-rw-r--r--usr/src/man/man1/tftp.1322
-rw-r--r--usr/src/man/man1/time.1263
-rw-r--r--usr/src/man/man1/times.163
-rw-r--r--usr/src/man/man1/timex.1180
-rw-r--r--usr/src/man/man1/tip.11064
-rw-r--r--usr/src/man/man1/tnfdump.1358
-rw-r--r--usr/src/man/man1/tnfxtract.1147
-rw-r--r--usr/src/man/man1/touch.1517
-rw-r--r--usr/src/man/man1/tplot.1158
-rw-r--r--usr/src/man/man1/tput.1568
-rw-r--r--usr/src/man/man1/tr.1561
-rw-r--r--usr/src/man/man1/trap.1277
-rw-r--r--usr/src/man/man1/troff.1323
-rw-r--r--usr/src/man/man1/true.169
-rw-r--r--usr/src/man/man1/truss.1698
-rw-r--r--usr/src/man/man1/tsort.1139
-rw-r--r--usr/src/man/man1/tty.1201
-rw-r--r--usr/src/man/man1/type.1108
-rw-r--r--usr/src/man/man1/typeset.1823
-rw-r--r--usr/src/man/man1/ul.179
-rw-r--r--usr/src/man/man1/umask.1396
-rw-r--r--usr/src/man/man1/uname.1379
-rw-r--r--usr/src/man/man1/unifdef.1170
-rw-r--r--usr/src/man/man1/uniq.1530
-rw-r--r--usr/src/man/man1/units.1158
-rw-r--r--usr/src/man/man1/unix2dos.1218
-rw-r--r--usr/src/man/man1/uptime.141
-rw-r--r--usr/src/man/man1/vacation.1334
-rw-r--r--usr/src/man/man1/vgrind.1439
-rw-r--r--usr/src/man/man1/volcheck.1139
-rw-r--r--usr/src/man/man1/volrmmount.1196
-rw-r--r--usr/src/man/man1/w.1173
-rw-r--r--usr/src/man/man1/wait.1359
-rw-r--r--usr/src/man/man1/wc.1322
-rw-r--r--usr/src/man/man1/whatis.164
-rw-r--r--usr/src/man/man1/which.198
-rw-r--r--usr/src/man/man1/who.1540
-rw-r--r--usr/src/man/man1/whocalls.180
-rw-r--r--usr/src/man/man1/whois.190
-rw-r--r--usr/src/man/man1/write.1301
-rw-r--r--usr/src/man/man1/xargs.1495
-rw-r--r--usr/src/man/man1/xgettext.1219
-rw-r--r--usr/src/man/man1/xstr.1236
-rw-r--r--usr/src/man/man1/yacc.1409
-rw-r--r--usr/src/man/man1/yes.130
-rw-r--r--usr/src/man/man1/ypcat.163
-rw-r--r--usr/src/man/man1/ypmatch.1131
-rw-r--r--usr/src/man/man1/yppasswd.168
-rw-r--r--usr/src/man/man1/ypwhich.191
-rw-r--r--usr/src/man/man1/zlogin.1283
-rw-r--r--usr/src/man/man1/zonename.166
416 files changed, 180653 insertions, 0 deletions
diff --git a/usr/src/man/man1/Intro.1 b/usr/src/man/man1/Intro.1
new file mode 100644
index 0000000000..a252f24c0e
--- /dev/null
+++ b/usr/src/man/man1/Intro.1
@@ -0,0 +1,598 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH Intro 1 "18 Nov 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+Intro, intro \- introduction to commands and application programs
+.SH DESCRIPTION
+.sp
+.LP
+This section describes, in alphabetical order, commands available with this
+operating system.
+.sp
+.LP
+Pages of special interest are categorized as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB1B\fR
+.ad
+.RS 6n
+.rt
+Commands found only in the \fISunOS/BSD Compatibility Package\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB1C\fR
+.ad
+.RS 6n
+.rt
+Commands for communicating with other systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB1F\fR
+.ad
+.RS 6n
+.rt
+Commands associated with \fIForm and Menu Language Interpreter\fR (FMLI).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB1S\fR
+.ad
+.RS 6n
+.rt
+Commands specific to SunOS.
+.RE
+
+.SS "OTHER SECTIONS"
+.sp
+.LP
+See the following sections of the SunOS Reference Manual for more information.
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Section 1M for system maintenance commands.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Section 4 for information on file formats.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Section 5 for descriptions of publicly available files and miscellaneous
+information pages.
+.RE
+.sp
+.LP
+For tutorial information about these commands and procedures, see \fISolaris
+Advanced User\&'s Guide\fR.
+.SS "Manual Page Command Syntax"
+.sp
+.LP
+Unless otherwise noted, commands described in the SYNOPSIS section of a manual
+page accept options and other arguments according to the following syntax and
+should be interpreted as explained below.
+.sp
+.LP
+\fIname\fR [\fB-\fR\fIoption\fR...] [\fIcmdarg\fR...] where:
+.sp
+.ne 2
+.mk
+.na
+\fB[ ]\fR
+.ad
+.RS 15n
+.rt
+Surround an \fIoption\fR or \fIcmdarg\fR that is not required.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fI\&...\fR\fR
+.ad
+.RS 15n
+.rt
+Indicates multiple occurrences of the \fIoption\fR or \fIcmdarg\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 15n
+.rt
+The name of an executable file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB{ }\fR
+.ad
+.RS 15n
+.rt
+The options and/or arguments enclosed within braces are interdependent, such
+that everything enclosed must be treated as a unit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoption\fR\fR
+.ad
+.RS 15n
+.rt
+(Always preceded by a "\(mi".) \fInoargletter\fR... or, \fIargletter\fR
+\fIoptarg\fR[\fB,\fR...]
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fInoargletter\fR\fR
+.ad
+.RS 15n
+.rt
+A single letter representing an option without an option-argument. Notice that
+more than one \fInoargletter\fR option can be grouped after one "\(mi"
+(Guideline 5, below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargletter\fR\fR
+.ad
+.RS 15n
+.rt
+A single letter representing an option requiring an option-argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoptarg\fR\fR
+.ad
+.RS 15n
+.rt
+An option-argument (character string) satisfying a preceding \fIargletter\fR.
+Notice that groups of \fIoptargs\fR following an \fIargletter\fR must be
+separated by commas, or separated by a tab or space character and quoted
+(Guideline 8, below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcmdarg\fR\fR
+.ad
+.RS 15n
+.rt
+Path name (or other command argument) \fInot\fR beginning with "\(mi", or
+"\(mi" by itself indicating the standard input.
+.RE
+
+.sp
+.LP
+Unless otherwise specified, whenever an operand or option-argument is, or
+contains, a numeric value:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The number is interpreted as a decimal integer.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Numerals in the range 0 to 2147483647 are syntactically recognized as numeric
+values.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When the utility description states that it accepts negative numbers as
+operands or option-arguments, numerals in the range -2147483647 to 2147483647
+are syntactically recognized as numeric values.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Ranges greater than those listed here are allowed.
+.RE
+.SS "Command Syntax Standard: Guidelines"
+.sp
+.LP
+These command syntax guidelines are not followed by all current commands, but
+new commands are likely to obey them. \fBgetopts\fR(1) should be used by all
+shell procedures to parse positional parameters and to check for legal options.
+It supports Guidelines 3-10 below. The enforcement of the other guidelines must
+be done by the command itself.
+.RS +4
+.TP
+1.
+Command names (\fIname\fR above) should be between two and nine characters
+long.
+.RE
+.RS +4
+.TP
+2.
+Command names should include only lower-case letters and digits.
+.RE
+.RS +4
+.TP
+3.
+Option names (\fIoption\fR above) must be one character long.
+.RE
+.RS +4
+.TP
+4.
+All options must be preceded by "\(mi".
+.RE
+.RS +4
+.TP
+5.
+Options with no arguments can be grouped after a single "\(mi".
+.RE
+.RS +4
+.TP
+6.
+The first option-argument (\fIoptarg\fR above) following an option must be
+preceded by a tab or space character.
+.RE
+.RS +4
+.TP
+7.
+Option-arguments cannot be optional.
+.RE
+.RS +4
+.TP
+8.
+Groups of option-arguments following an option must either be separated by
+commas or separated by tab or space character and quoted (\fB-o\fR xxx,z,yy or
+\fB-o\fR"xxx z yy").
+.RE
+.RS +4
+.TP
+9.
+All options must precede operands (\fIcmdarg\fR above) on the command line.
+.RE
+.RS +4
+.TP
+10.
+"\(mi\|\(mi" can be used to indicate the end of the options.
+.RE
+.RS +4
+.TP
+11.
+The order of the options relative to one another should not matter.
+.RE
+.RS +4
+.TP
+12.
+The relative order of the operands (\fIcmdarg\fR above) can affect their
+significance in ways determined by the command with which they appear.
+.RE
+.RS +4
+.TP
+13.
+"\(mi" preceded and followed by a white space character should only be used
+to mean standard input.
+.RE
+.sp
+.LP
+An expanded set of guidelines referred to as CLIP for Command Line Interface
+Paradigm has been developed for Solaris and other Sun products. Its intent is
+to provide a command line syntax more closely aligned with the GNU command line
+syntax popular on Linux systems.There is no intent to retrofit existing
+utilities or even to apply this to all new utilities. It is only intended to be
+applied to sets of utilities being developed when appropriate.
+.sp
+.LP
+CLIP is a full superset of the guidelines discussed above which are closely
+aligned with IEEE Std. 1003.1-2001 (SUSv3). It does not include all the GNU
+syntax. The GNU syntax allows constructs that either conflict with the IEEE
+rules or are ambiguous. These constructs are not allowed.
+.sp
+.LP
+The expanded CLIP command line syntax is:
+.sp
+.in +2
+.nf
+utility_name -a --longopt1 -c option_argument \e
+ -f option_argument --longopt2=option_argument \e
+ --longopt3 option_argument operand
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The utility in the example is named \fButility_name\fR. It is followed by
+options, option-arguments, and operands, collectively referred to as arguments.
+The arguments that consist of a hyphen followed a single letter or digit, such
+as \fB-a\fR, are known as short-options \&. The arguments that consist of two
+hyphens followed by a series of letters, digits and hyphens, such as
+\fB--longopt1\fR, are known as long-options . Collectively, short-options and
+long-options are referred to as options (or historically, flags ). Certain
+options are followed by an option-argument, as shown with \fB-c\fR
+option_argument . The arguments following the last options and option-arguments
+are named operands. Once the first operand is encountered, all subsequent
+arguments are interpreted to be operands.
+.sp
+.LP
+Option-arguments are sometimes shown separated from their short-options by
+BLANKSs, sometimes directly adjacent. This reflects the situation that in some
+cases an option-argument is included within the same argument string as the
+option; in most cases it is the next argument. This specification requires that
+the option be a separate argument from its option-argument, but there are some
+exceptions to ensure continued operation of historical applications:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the \fBSYNOPSIS\fR of a utility shows a SPACE between a short-option and
+option-argument (as with \fB-c\fR option_argument in the example), the
+application uses separate arguments for that option and its option-argument.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If a SPACE is not shown (as with \fB-f\fR option_argument in the example), the
+application expects an option and its option-argument directly adjacent in the
+same argument string, without intervening BLANKs.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Notwithstanding the preceding requirements, an application should accept
+short-options and option-arguments as a single argument or as separate
+arguments whether or not a SPACE is shown on the synopsis line.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Long-options with option-arguments are always documented as using an equals
+sign as the separator between the option name and the option-argument. If the
+\fBOPTIONS\fR section of a utility shows an equals sign (\fB=\fR) between a
+long-option and its option-argument (as with \fB--longopt2= option_argument\fR
+in the example), a application shall also permit the use of separate arguments
+for that option and its option-argument (as with \fB--longopt1
+option_argument\fR in the example).
+.RE
+.sp
+.LP
+CLIP expands the guidelines discussed with the following additional guidelines:
+.sp
+.ne 2
+.mk
+.na
+\fB14.\fR
+.ad
+.RS 7n
+.rt
+The form \fBcommand subcommand [options] [operands]\fR is appropriate for
+grouping similar operations. Subcommand names should follow the same
+conventions as command names as specified in guidelines 1 and 2.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB15.\fR
+.ad
+.RS 7n
+.rt
+Long-options should be preceded by \fB--\fR and should include only
+alphanumeric characters and hyphens from the portable character set. Option
+names are typically one to three words long, with hyphens to separate words.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB16.\fR
+.ad
+.RS 7n
+.rt
+\fB--name=argument\fR should be used to specify an option-argument for a
+long-option. The form \fB--name argument\fR is also accepted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB17.\fR
+.ad
+.RS 7n
+.rt
+All utilities should support two standard long-options: \fB--version\fR (with
+the short-option synonym \fB-V\fR ) and \fB--help\fR (with the short-option
+synonym \fB-?\fR ). The short option synonyms for \fB--\fRversion can vary if
+the preferred synonym is already in use (but a synonym shall be provided).
+Both of these options stop further argument processing when encountered and
+after displaying the appropriate output, the utility successfully exits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB18.\fR
+.ad
+.RS 7n
+.rt
+Every short-option should have exactly one corresponding long-option and every
+long-option should have exactly one corresponding short-option. Synonymous
+options can be allowed in the interest of compatibility with historical
+practice or community versions of equivalent utilities.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB19.\fR
+.ad
+.RS 7n
+.rt
+The short-option name should get its name from the long-option name according
+to these rules:
+.RS +4
+.TP
+1.
+Use the first letter of the long-option name for the short-option name.
+.RE
+.RS +4
+.TP
+2.
+If the first letter conflicts with other short-option names, choose a
+prominent consonant.
+.RE
+.RS +4
+.TP
+3.
+If the first letter and the prominent consonant conflict with other
+shortoption names, choose a prominent vowel.
+.RE
+.RS +4
+.TP
+4.
+If none of the letters of the long-option name are usable, select an
+arbitrary character.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB20.\fR
+.ad
+.RS 7n
+.rt
+If a long-option name consists of a single character, it must use the same
+character as the short-option name. Single character long-options should be
+avoided. They are only allowed for the exceptionally rare case that a single
+character is the most descriptive name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB21.\fR
+.ad
+.RS 7n
+.rt
+The subcommand in the form described in guideline 1 of the additional CLIP
+guidelines is generally required. In the case where it is omitted, the command
+shall take no operands and only options which are defined to stop further
+argument processing when encountered are allowed. Invoking a command of this
+form without a subcommand and no arguments is an error. This guideline is
+provided to allow the common forms command \fB--help\fR, command \fB-?\fR,
+command \fB--version\fR, and command \fB-V\fR to be accepted in the
+command-subcommand construct.
+.RE
+
+.sp
+.LP
+Several of these guidelines are only of interest to the authors of utilities.
+They are provided here for the use of anyone wanting to author utilities
+following this syntax.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for a discussion of the attributes listed in this
+section.
+.SH ACKNOWLEDGMENTS
+.sp
+.LP
+Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to
+reproduce portions of its copyrighted documentation. Original documentation
+from The Open Group can be obtained online at
+http://www.opengroup.org/bookstore/\&.
+.sp
+.LP
+The Institute of Electrical and Electronics Engineers and The Open Group, have
+given us permission to reprint portions of their documentation.
+.sp
+.LP
+In the following statement, the phrase ``this text'' refers to portions of the
+system documentation.
+.sp
+.LP
+Portions of this text are reprinted and reproduced in electronic form in the
+SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for
+Information Technology -- Portable Operating System Interface (POSIX), The Open
+Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the event of
+any discrepancy between these versions and the original IEEE and The Open Group
+Standard, the original IEEE and The Open Group Standard is the referee
+document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html\&.
+.sp
+.LP
+This notice shall appear on any product containing this material.
+.SH SEE ALSO
+.sp
+.LP
+\fBgetopts\fR(1), \fBwait\fR(1), \fBexit\fR(2), \fBgetopt\fR(3C),
+\fBwait\fR(3UCB), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+Upon termination, each command returns two bytes of status, one supplied by the
+system and giving the cause for termination, and (in the case of "normal"
+termination) one supplied by the program [see \fBwait\fR(3UCB) and
+\fBexit\fR(2)]. The former byte is \fB0\fR for normal termination. The latter
+byte is customarily \fB0\fR for successful execution and non-zero to indicate
+troubles such as erroneous parameters, or bad or inaccessible data. It is
+called variously "exit code", "exit status", or "return code", and is described
+only where special conventions are involved.
+.SH WARNINGS
+.sp
+.LP
+Some commands produce unexpected results when processing files containing null
+characters. These commands often treat text input lines as strings and
+therefore become confused upon encountering a null character (the string
+terminator) within a line.
diff --git a/usr/src/man/man1/Makefile b/usr/src/man/man1/Makefile
new file mode 100644
index 0000000000..53c33b678a
--- /dev/null
+++ b/usr/src/man/man1/Makefile
@@ -0,0 +1,770 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+# Copyright 2011, Richard Lowe
+
+include ../../Makefile.master
+
+MANSECT = 1
+
+MANFILES= acctcom.1 \
+ adb.1 \
+ addbib.1 \
+ alias.1 \
+ allocate.1 \
+ amt.1 \
+ appcert.1 \
+ apptrace.1 \
+ apropos.1 \
+ ar.1 \
+ arch.1 \
+ asa.1 \
+ at.1 \
+ atq.1 \
+ atrm.1 \
+ audioconvert.1 \
+ audioplay.1 \
+ audiorecord.1 \
+ audiotest.1 \
+ auths.1 \
+ awk.1 \
+ banner.1 \
+ basename.1 \
+ bc.1 \
+ bdiff.1 \
+ bfs.1 \
+ break.1 \
+ builtin.1 \
+ cal.1 \
+ calendar.1 \
+ cancel.1 \
+ cat.1 \
+ cd.1 \
+ cdrw.1 \
+ checknr.1 \
+ chgrp.1 \
+ chkey.1 \
+ chmod.1 \
+ chown.1 \
+ ckdate.1 \
+ ckgid.1 \
+ ckint.1 \
+ ckitem.1 \
+ ckkeywd.1 \
+ ckpath.1 \
+ ckrange.1 \
+ ckstr.1 \
+ cksum.1 \
+ cktime.1 \
+ ckuid.1 \
+ ckyorn.1 \
+ clear.1 \
+ cmp.1 \
+ col.1 \
+ comm.1 \
+ command.1 \
+ compress.1 \
+ cp.1 \
+ cpio.1 \
+ cputrack.1 \
+ crle.1 \
+ crontab.1 \
+ crypt.1 \
+ csh.1 \
+ csplit.1 \
+ ctags.1 \
+ ctrun.1 \
+ ctstat.1 \
+ ctwatch.1 \
+ cut.1 \
+ date.1 \
+ dc.1 \
+ deallocate.1 \
+ deroff.1 \
+ dhcpinfo.1 \
+ diff.1 \
+ diff3.1 \
+ diffmk.1 \
+ digest.1 \
+ dircmp.1 \
+ dis.1 \
+ disown.1 \
+ dispgid.1 \
+ dispuid.1 \
+ dos2unix.1 \
+ download.1 \
+ dpost.1 \
+ du.1 \
+ dump.1 \
+ dumpcs.1 \
+ echo.1 \
+ ed.1 \
+ edit.1 \
+ egrep.1 \
+ eject.1 \
+ elfdump.1 \
+ elfedit.1 \
+ elfsign.1 \
+ elfwrap.1 \
+ enable.1 \
+ encrypt.1 \
+ enhance.1 \
+ env.1 \
+ eqn.1 \
+ exec.1 \
+ exit.1 \
+ expand.1 \
+ expr.1 \
+ exstr.1 \
+ factor.1 \
+ fdformat.1 \
+ fgrep.1 \
+ file.1 \
+ filebench.1 \
+ filesync.1 \
+ find.1 \
+ finger.1 \
+ fmt.1 \
+ fmtmsg.1 \
+ fold.1 \
+ ftp.1 \
+ ftpcount.1 \
+ ftpwho.1 \
+ gcore.1 \
+ gencat.1 \
+ genmsg.1 \
+ getconf.1 \
+ getfacl.1 \
+ getlabel.1 \
+ getopt.1 \
+ getoptcvt.1 \
+ getopts.1 \
+ gettext.1 \
+ gettxt.1 \
+ getzonepath.1 \
+ glob.1 \
+ gprof.1 \
+ grep.1 \
+ groups.1 \
+ hash.1 \
+ head.1 \
+ history.1 \
+ hostid.1 \
+ hostname.1 \
+ iconv.1 \
+ indxbib.1 \
+ Intro.1 \
+ ipcrm.1 \
+ ipcs.1 \
+ isainfo.1 \
+ isalist.1 \
+ jobs.1 \
+ join.1 \
+ kbd.1 \
+ kdestroy.1 \
+ keylogin.1 \
+ keylogout.1 \
+ kill.1 \
+ kinit.1 \
+ klist.1 \
+ kmdb.1 \
+ kmfcfg.1 \
+ kpasswd.1 \
+ krb5-config.1 \
+ ksh93.1 \
+ ktutil.1 \
+ lari.1 \
+ last.1 \
+ lastcomm.1 \
+ ld.1 \
+ ldap.1 \
+ ldapdelete.1 \
+ ldaplist.1 \
+ ldapmodify.1 \
+ ldapmodrdn.1 \
+ ldapsearch.1 \
+ ldd.1 \
+ ld.so.1.1 \
+ let.1 \
+ lex.1 \
+ lgrpinfo.1 \
+ limit.1 \
+ line.1 \
+ list_devices.1 \
+ listusers.1 \
+ ln.1 \
+ loadkeys.1 \
+ locale.1 \
+ localedef.1 \
+ logger.1 \
+ login.1 \
+ logname.1 \
+ logout.1 \
+ look.1 \
+ lookbib.1 \
+ lorder.1 \
+ lp.1 \
+ lpstat.1 \
+ ls.1 \
+ m4.1 \
+ mac.1 \
+ mach.1 \
+ machid.1 \
+ madv.so.1.1 \
+ mail.1 \
+ mailcompat.1 \
+ mailq.1 \
+ mailstats.1 \
+ mailx.1 \
+ makekey.1 \
+ man.1 \
+ mconnect.1 \
+ mcs.1 \
+ mdb.1 \
+ mesg.1 \
+ mkdir.1 \
+ mkmsgs.1 \
+ mktemp.1 \
+ moe.1 \
+ more.1 \
+ mpss.so.1.1 \
+ msgcc.1 \
+ msgcpp.1 \
+ msgcvt.1 \
+ msgfmt.1 \
+ msggen.1 \
+ msgget.1 \
+ mt.1 \
+ mv.1 \
+ nawk.1 \
+ nc.1 \
+ nca.1 \
+ ncab2clf.1 \
+ ncakmod.1 \
+ newform.1 \
+ newgrp.1 \
+ news.1 \
+ newtask.1 \
+ nice.1 \
+ nl.1 \
+ nm.1 \
+ nohup.1 \
+ nroff.1 \
+ od.1 \
+ on.1 \
+ optisa.1 \
+ pack.1 \
+ pagesize.1 \
+ pargs.1 \
+ passwd.1 \
+ paste.1 \
+ pathchk.1 \
+ pax.1 \
+ pfexec.1 \
+ pg.1 \
+ pgrep.1 \
+ pkginfo.1 \
+ pkgmk.1 \
+ pkgparam.1 \
+ pkgproto.1 \
+ pkgtrans.1 \
+ pktool.1 \
+ plabel.1 \
+ plgrp.1 \
+ plimit.1 \
+ pmadvise.1 \
+ pmap.1 \
+ postdaisy.1 \
+ postdmd.1 \
+ postio.1 \
+ postmd.1 \
+ postplot.1 \
+ postprint.1 \
+ postreverse.1 \
+ posttek.1 \
+ ppgsz.1 \
+ ppriv.1 \
+ pr.1 \
+ praliases.1 \
+ prctl.1 \
+ preap.1 \
+ prex.1 \
+ print.1 \
+ printf.1 \
+ priocntl.1 \
+ proc.1 \
+ prof.1 \
+ profiles.1 \
+ projects.1 \
+ ps.1 \
+ ptree.1 \
+ pvs.1 \
+ pwd.1 \
+ ranlib.1 \
+ rcapstat.1 \
+ rcp.1 \
+ rdist.1 \
+ read.1 \
+ readonly.1 \
+ refer.1 \
+ regcmp.1 \
+ renice.1 \
+ rev.1 \
+ rlogin.1 \
+ rm.1 \
+ rmformat.1 \
+ rmmount.1 \
+ roffbib.1 \
+ roles.1 \
+ rpcgen.1 \
+ rsh.1 \
+ runat.1 \
+ rup.1 \
+ ruptime.1 \
+ rusers.1 \
+ rwho.1 \
+ sar.1 \
+ scp.1 \
+ script.1 \
+ sdiff.1 \
+ sed.1 \
+ set.1 \
+ setfacl.1 \
+ setlabel.1 \
+ setpgrp.1 \
+ sftp.1 \
+ sh.1 \
+ shcomp.1 \
+ shell_builtins.1 \
+ shift.1 \
+ size.1 \
+ sleep.1 \
+ smbutil.1 \
+ soelim.1 \
+ sort.1 \
+ sortbib.1 \
+ sotruss.1 \
+ spell.1 \
+ split.1 \
+ srchtxt.1 \
+ ssh.1 \
+ ssh-add.1 \
+ ssh-agent.1 \
+ ssh-http-proxy-connect.1 \
+ ssh-keygen.1 \
+ ssh-keyscan.1 \
+ ssh-socks5-proxy-connect.1 \
+ strchg.1 \
+ strings.1 \
+ strip.1 \
+ stty.1 \
+ sum.1 \
+ suspend.1 \
+ svcprop.1 \
+ svcs.1 \
+ symorder.1 \
+ sys-suspend.1 \
+ tabs.1 \
+ tail.1 \
+ talk.1 \
+ tar.1 \
+ tbl.1 \
+ tcopy.1 \
+ tee.1 \
+ telnet.1 \
+ test.1 \
+ tftp.1 \
+ time.1 \
+ times.1 \
+ timex.1 \
+ tip.1 \
+ tnfdump.1 \
+ tnfxtract.1 \
+ touch.1 \
+ tplot.1 \
+ tput.1 \
+ tr.1 \
+ trap.1 \
+ troff.1 \
+ true.1 \
+ truss.1 \
+ tsort.1 \
+ tty.1 \
+ type.1 \
+ typeset.1 \
+ ul.1 \
+ umask.1 \
+ uname.1 \
+ unifdef.1 \
+ uniq.1 \
+ units.1 \
+ unix2dos.1 \
+ uptime.1 \
+ vacation.1 \
+ vgrind.1 \
+ volcheck.1 \
+ volrmmount.1 \
+ w.1 \
+ wait.1 \
+ wc.1 \
+ whatis.1 \
+ which.1 \
+ who.1 \
+ whocalls.1 \
+ whois.1 \
+ write.1 \
+ xargs.1 \
+ xgettext.1 \
+ xstr.1 \
+ yacc.1 \
+ yes.1 \
+ ypcat.1 \
+ ypmatch.1 \
+ yppasswd.1 \
+ ypwhich.1 \
+ zlogin.1 \
+ zonename.1
+
+MANSOFILES = batch.1 \
+ bg.1 \
+ case.1 \
+ chdir.1 \
+ checkeq.1 \
+ continue.1 \
+ decrypt.1 \
+ dirname.1 \
+ dirs.1 \
+ disable.1 \
+ dumpkeys.1 \
+ edit.1 \
+ errange.1 \
+ errdate.1 \
+ errgid.1 \
+ errint.1 \
+ erritem.1 \
+ errpath.1 \
+ errstr.1 \
+ errtime.1 \
+ erruid.1 \
+ erryorn.1 \
+ eval.1 \
+ export.1 \
+ false.1 \
+ fc.1 \
+ fg.1 \
+ for.1 \
+ foreach.1 \
+ function.1 \
+ goto.1 \
+ hashcheck.1 \
+ hashmake.1 \
+ hashstat.1 \
+ helpdate.1 \
+ helpgid.1 \
+ helpint.1 \
+ helpitem.1 \
+ helppath.1 \
+ helprange.1 \
+ helpstr.1 \
+ helptime.1 \
+ helpuid.1 \
+ helpyorn.1 \
+ hist.1 \
+ i286.1 \
+ i386.1 \
+ i486.1 \
+ i860.1 \
+ iAPX286.1 \
+ if.1 \
+ intro.1 \
+ jsh.1 \
+ ksh.1 \
+ ldapadd.1 \
+ neqn.1 \
+ notify.1 \
+ onintr.1 \
+ page.1 \
+ pcat.1 \
+ pcred.1 \
+ pdp11.1 \
+ pfcsh.1 \
+ pfiles.1 \
+ pfksh.1 \
+ pflags.1 \
+ pfsh.1 \
+ pkill.1 \
+ pldd.1 \
+ popd.1 \
+ prun.1 \
+ psig.1 \
+ pstack.1 \
+ pstop.1 \
+ ptime.1 \
+ pushd.1 \
+ pwait.1 \
+ pwdx.1 \
+ red.1 \
+ rehash.1 \
+ remote_shell.1 \
+ remsh.1 \
+ repeat.1 \
+ return.1 \
+ rksh.1 \
+ rksh93.1 \
+ rmail.1 \
+ rmdir.1 \
+ rmumount.1 \
+ select.1 \
+ setenv.1 \
+ settime.1 \
+ sh.1 \
+ snca.1 \
+ source.1 \
+ sparc.1 \
+ spellin.1 \
+ stop.1 \
+ strconf.1 \
+ sun.1 \
+ switch.1 \
+ t300.1 \
+ t300s.1 \
+ t4014.1 \
+ t450.1 \
+ tek.1 \
+ u370.1 \
+ u3b.1 \
+ u3b15.1 \
+ u3b2.1 \
+ u3b5.1 \
+ ulimit.1 \
+ unalias.1 \
+ uncompress.1 \
+ unexpand.1 \
+ unhash.1 \
+ unlimit.1 \
+ unpack.1 \
+ unset.1 \
+ unsetenv.1 \
+ until.1 \
+ valdate.1 \
+ valgid.1 \
+ valint.1 \
+ valpath.1 \
+ valrange.1 \
+ valstr.1 \
+ valtime.1 \
+ valuid.1 \
+ valyorn.1 \
+ vax.1 \
+ vedit.1 \
+ ver.1 \
+ whence.1 \
+ while.1 \
+ zcat.1
+
+MANFILES += $(MANSOFILES)
+
+intro.1 := SOSRC = man1/Intro.1
+
+unalias.1 := SOSRC = man1/alias.1
+
+batch.1 := SOSRC = man1/at.1
+
+dirname.1 := SOSRC = man1/basename.1
+
+continue.1 := SOSRC = man1/break.1
+
+chdir.1 := SOSRC = man1/cd.1
+dirs.1 := SOSRC = man1/cd.1
+popd.1 := SOSRC = man1/cd.1
+pushd.1 := SOSRC = man1/cd.1
+
+errdate.1 := SOSRC = man1/ckdate.1
+helpdate.1 := SOSRC = man1/ckdate.1
+valdate.1 := SOSRC = man1/ckdate.1
+
+errgid.1 := SOSRC = man1/ckgid.1
+helpgid.1 := SOSRC = man1/ckgid.1
+valgid.1 := SOSRC = man1/ckgid.1
+
+errint.1 := SOSRC = man1/ckint.1
+helpint.1 := SOSRC = man1/ckint.1
+valint.1 := SOSRC = man1/ckint.1
+
+erritem.1 := SOSRC = man1/ckitem.1
+helpitem.1 := SOSRC = man1/ckitem.1
+
+errpath.1 := SOSRC = man1/ckpath.1
+helppath.1 := SOSRC = man1/ckpath.1
+valpath.1 := SOSRC = man1/ckpath.1
+
+errange.1 := SOSRC = man1/ckrange.1
+helprange.1 := SOSRC = man1/ckrange.1
+valrange.1 := SOSRC = man1/ckrange.1
+
+errstr.1 := SOSRC = man1/ckstr.1
+helpstr.1 := SOSRC = man1/ckstr.1
+valstr.1 := SOSRC = man1/ckstr.1
+
+errtime.1 := SOSRC = man1/cktime.1
+helptime.1 := SOSRC = man1/cktime.1
+valtime.1 := SOSRC = man1/cktime.1
+
+erruid.1 := SOSRC = man1/ckuid.1
+helpuid.1 := SOSRC = man1/ckuid.1
+valuid.1 := SOSRC = man1/ckuid.1
+
+erryorn.1 := SOSRC = man1/ckyorn.1
+helpyorn.1 := SOSRC = man1/ckyorn.1
+valyorn.1 := SOSRC = man1/ckyorn.1
+
+uncompress.1 := SOSRC = man1/compress.1
+zcat.1 := SOSRC = man1/compress.1
+
+red.1 := SOSRC = man1/ed.1
+
+disable.1 := SOSRC = man1/enable.1
+
+decrypt.1 := SOSRC = man1/encrypt.1
+
+checkeq.1 := SOSRC = man1/eqn.1
+neqn.1 := SOSRC = man1/eqn.1
+
+eval.1 := SOSRC = man1/exec.1
+source.1 := SOSRC = man1/exec.1
+
+goto.1 := SOSRC = man1/exit.1
+return.1 := SOSRC = man1/exit.1
+
+unexpand.1 := SOSRC = man1/expand.1
+
+hashstat.1 := SOSRC = man1/hash.1
+rehash.1 := SOSRC = man1/hash.1
+unhash.1 := SOSRC = man1/hash.1
+
+fc.1 := SOSRC = man1/history.1
+hist.1 := SOSRC = man1/history.1
+
+bg.1 := SOSRC = man1/jobs.1
+fg.1 := SOSRC = man1/jobs.1
+notify.1 := SOSRC = man1/jobs.1
+stop.1 := SOSRC = man1/jobs.1
+
+rksh.1 := SOSRC = man1/ksh.1
+
+rksh93.1 := SOSRC = man1/ksh93.1
+ksh.1 := SOSRC = man1/ksh93.1
+
+ldapadd.1 := SOSRC = man1/ldapmodify.1
+
+ulimit.1 := SOSRC = man1/limit.1
+unlimit.1 := SOSRC = man1/limit.1
+
+dumpkeys.1 := SOSRC = man1/loadkeys.1
+
+i286.1 := SOSRC = man1/machid.1
+i386.1 := SOSRC = man1/machid.1
+i486.1 := SOSRC = man1/machid.1
+i860.1 := SOSRC = man1/machid.1
+iAPX286.1 := SOSRC = man1/machid.1
+pdp11.1 := SOSRC = man1/machid.1
+sparc.1 := SOSRC = man1/machid.1
+sun.1 := SOSRC = man1/machid.1
+u370.1 := SOSRC = man1/machid.1
+u3b.1 := SOSRC = man1/machid.1
+u3b15.1 := SOSRC = man1/machid.1
+u3b2.1 := SOSRC = man1/machid.1
+u3b5.1 := SOSRC = man1/machid.1
+vax.1 := SOSRC = man1/machid.1
+
+rmail.1 := SOSRC = man1/mail.1
+
+page.1 := SOSRC = man1/more.1
+
+snca.1 := SOSRC = man1/nca.1
+
+pcat.1 := SOSRC = man1/pack.1
+unpack.1 := SOSRC = man1/pack.1
+
+pfcsh.1 := SOSRC = man1/pfexec.1
+pfksh.1 := SOSRC = man1/pfexec.1
+pfsh.1 := SOSRC = man1/pfexec.1
+
+pkill.1 := SOSRC = man1/pgrep.1
+
+pcred.1 := SOSRC = man1/proc.1
+pfiles.1 := SOSRC = man1/proc.1
+pflags.1 := SOSRC = man1/proc.1
+pldd.1 := SOSRC = man1/proc.1
+prun.1 := SOSRC = man1/proc.1
+psig.1 := SOSRC = man1/proc.1
+pstack.1 := SOSRC = man1/proc.1
+pstop.1 := SOSRC = man1/proc.1
+ptime.1 := SOSRC = man1/proc.1
+pwait.1 := SOSRC = man1/proc.1
+pwdx.1 := SOSRC = man1/proc.1
+
+rmdir.1 := SOSRC = man1/rm.1
+
+rmumount.1 := SOSRC = man1/rmmount.1
+
+remote_shell.1 := SOSRC = man1/rsh.1
+remsh.1 := SOSRC = man1/rsh.1
+
+export.1 := SOSRC = man1/set.1
+setenv.1 := SOSRC = man1/set.1
+unset.1 := SOSRC = man1/set.1
+unsetenv.1 := SOSRC = man1/set.1
+
+jsh.1 := SOSRC = man1/sh.1
+sh.1 := SOSRC = man1/sh.1
+
+case.1 := SOSRC = man1/shell_builtins.1
+for.1 := SOSRC = man1/shell_builtins.1
+foreach.1 := SOSRC = man1/shell_builtins.1
+function.1 := SOSRC = man1/shell_builtins.1
+if.1 := SOSRC = man1/shell_builtins.1
+repeat.1 := SOSRC = man1/shell_builtins.1
+select.1 := SOSRC = man1/shell_builtins.1
+switch.1 := SOSRC = man1/shell_builtins.1
+until.1 := SOSRC = man1/shell_builtins.1
+while.1 := SOSRC = man1/shell_builtins.1
+
+hashcheck.1 := SOSRC = man1/spell.1
+hashmake.1 := SOSRC = man1/spell.1
+spellin.1 := SOSRC = man1/spell.1
+
+strconf.1 := SOSRC = man1/strchg.1
+
+settime.1 := SOSRC = man1/touch.1
+
+t300.1 := SOSRC = man1/tplot.1
+t300s.1 := SOSRC = man1/tplot.1
+t4014.1 := SOSRC = man1/tplot.1
+t450.1 := SOSRC = man1/tplot.1
+tek.1 := SOSRC = man1/tplot.1
+ver.1 := SOSRC = man1/tplot.1
+
+onintr.1 := SOSRC = man1/trap.1
+
+false.1 := SOSRC = man1/true.1
+
+whence.1 := SOSRC = man1/typeset.1
+
+vedit.1 := SOSRC = man1/vi.1
+
+edit.1 := SOSRC = man1has/edit.1
+
+.KEEP_STATE:
+
+include ../Makefile.man
+
+install: $(ROOTMANFILES)
diff --git a/usr/src/man/man1/acctcom.1 b/usr/src/man/man1/acctcom.1
new file mode 100644
index 0000000000..9f24e556c5
--- /dev/null
+++ b/usr/src/man/man1/acctcom.1
@@ -0,0 +1,401 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH acctcom 1 "11 Jan 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+acctcom \- search and print process accounting files
+.SH SYNOPSIS
+.LP
+.nf
+\fBacctcom\fR [\fB-abfhikmqrtv\fR] [\fB-C\fR \fIsec\fR] [\fB-e\fR \fItime\fR] [\fB-E\fR \fItime\fR]
+ [\fB-g\fR \fIgroup\fR] [\fB-H\fR \fIfactor\fR] [\fB-I\fR \fIchars\fR] [\fB-l\fR \fIline\fR]
+ [\fB-n\fR \fIpattern\fR] [\fB-o\fR \fIoutput-file\fR] [\fB-O\fR \fIsec\fR] [\fB-s\fR \fItime\fR]
+ [\fB-S\fR \fItime\fR] [\fB-u\fR \fIuser\fR] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBacctcom\fR utility reads \fIfilename\fRs, the standard input, or
+\fB/var/adm/pacct\fR, in the form described by \fBacct.h\fR(3HEAD) and writes
+selected records to standard output. Each record represents the execution of
+one process. The output shows the \fBCOMMAND NAME\fR, \fBUSER\fR,
+\fBTTYNAME\fR, \fBSTART TIME\fR, \fBEND TIME\fR, \fBREAL (SEC)\fR, \fBCPU
+(SEC)\fR, \fBMEAN SIZE (K)\fR, and optionally, \fBF\fR (the
+\fBfork()\fR/\fBexec()\fR flag: \fB1\fR for \fBfork()\fR without \fBexec()\fR),
+\fBSTAT\fR (the system exit status), \fBHOG FACTOR\fR, \fBKCORE MIN\fR, \fBCPU
+FACTOR\fR, \fBCHARS TRNSFD\fR, and \fBBLOCKS\fR \fBREAD\fR (total blocks read
+and written).
+.sp
+.LP
+A `\fB#\fR' is prepended to the command name if the command was executed with
+super-user privileges. If a process is not associated with a known terminal, a
+`\fB?\fR' is printed in the \fBTTYNAME\fR field.
+.sp
+.LP
+If no \fIfilename\fR is specified, and if the standard input is associated
+with a terminal or \fB/dev/null\fR (as is the case when using `\fB&\fR\&' in
+the shell), \fB/var/adm/pacct\fR is read; otherwise, the standard input is
+read.
+.sp
+.LP
+If any \fIfilename\fR arguments are given, they are read in their respective
+order. Each file is normally read forward, that is, in chronological order by
+process completion time. The file \fB/var/adm/pacct\fR is usually the current
+file to be examined; a busy system may need several such files of which all but
+the current file are found in \fB/var/adm/pacct\fIincr\fR\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 18n
+.rt
+Show some average statistics about the processes selected. The statistics will
+be printed after the output records.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 18n
+.rt
+Read backwards, showing latest commands first. This option has no effect when
+standard input is read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 18n
+.rt
+Print the \fBfork()\fR/\fBexec()\fR flag and system exit status columns in the
+output. The numeric output for this option will be in octal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 18n
+.rt
+Instead of mean memory size, show the fraction of total available \fBCPU\fR
+time consumed by the process during its execution. This "hog factor" is
+computed as (total \fBCPU\fR time)/(elapsed time).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 18n
+.rt
+Print columns containing the \fBI/O\fR counts in the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 18n
+.rt
+Instead of memory size, show total kcore-minutes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 18n
+.rt
+Show mean core size (the default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 18n
+.rt
+Do not print any output records, just print the average statistics as with the
+\fB-a\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 18n
+.rt
+Show \fBCPU\fR factor (user-time/(system-time + user-time)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 18n
+.rt
+Show separate system and user \fBCPU\fR times.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Exclude column headings from the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIsec\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes with total \fBCPU\fR time (system-time + user-time)
+exceeding \fIsec\fR seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fItime\fR\fR
+.ad
+.RS 18n
+.rt
+Select processes existing at or before \fItime\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR \fItime\fR\fR
+.ad
+.RS 18n
+.rt
+Select processes ending at or before \fItime\fR. Using the same \fItime\fR for
+both \fB-S\fR and \fB-E\fR shows the processes that existed at \fItime\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIgroup\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes belonging to \fIgroup\fR. The \fIgroup\fR may be designated
+by either the group \fBID\fR or group name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR \fIfactor\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes that exceed \fBfactor\fR, where factor is the "hog factor"
+as explained in option \fB-h\fR above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIchars\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes transferring more characters than the cutoff number given
+by \fIchars\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIline\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes belonging to terminal \fB/dev/term/line\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIpattern\fR\fR
+.ad
+.RS 18n
+.rt
+Show only commands matching \fIpattern\fR that may be a regular expression as
+in \fBregcmp\fR(3C), except \fB+\fR means one or more occurrences.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutput-file\fR\fR
+.ad
+.RS 18n
+.rt
+Copy selected process records in the input data format to \fIoutput-file\fR;
+suppress printing to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIsec\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes with \fBCPU\fR system time exceeding \fIsec\fR seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fItime\fR\fR
+.ad
+.RS 18n
+.rt
+Select processes existing at or after \fItime\fR, given in the format
+\fIhr\fR\|[\|:\fImin\fR\|[\|:\fIsec\fR\|]\|].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fItime\fR\fR
+.ad
+.RS 18n
+.rt
+Select processes starting at or after \fItime\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIuser\fR\fR
+.ad
+.RS 18n
+.rt
+Show only processes belonging to \fIuser\fR. The user may be specified by a
+user \fBID\fR, a login name that is then converted to a user \fBID\fR,
+`\fB#\fR' (which designates only those processes executed with superuser
+privileges), or `\fB?\fR' (which designates only those processes associated
+with unknown user \fBID\fRs).
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 22n
+.rt
+system group file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 22n
+.rt
+system password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/pacct\fIincr\fR\fR\fR
+.ad
+.RS 22n
+.rt
+active processes accounting file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBps\fR(1), \fBacct\fR(1M), \fBacctcms\fR(1M), \fBacctcon\fR(1M),
+\fBacctmerg\fR(1M), \fBacctprc\fR(1M), \fBacctsh\fR(1M), \fBfwtmp\fR(1M),
+\fBrunacct\fR(1M), \fBsu\fR(1M), \fBacct\fR(2), \fBregcmp\fR(3C),
+\fBacct.h\fR(3HEAD), \fButmp\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Basic Administration\fR
+.SH NOTES
+.sp
+.LP
+\fBacctcom\fR reports only on processes that have terminated; use \fBps\fR(1)
+for active processes.
diff --git a/usr/src/man/man1/adb.1 b/usr/src/man/man1/adb.1
new file mode 100644
index 0000000000..b74e7031ef
--- /dev/null
+++ b/usr/src/man/man1/adb.1
@@ -0,0 +1,38 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH adb 1 "29 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+adb \- general-purpose debugger
+.SH SYNOPSIS
+.LP
+.nf
+\fBadb\fR [\fB-kw\fR] [\fB-I\fR \fIdir\fR] [\fB-P\fR \fIprompt\fR] [\fB-V\fR \fImode\fR] [\fIobject\fR [\fIcore\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBadb\fR utility is an interactive, general-purpose debugger. It can be
+used to examine files and provides a controlled environment for the execution
+of programs.
+.sp
+.LP
+The \fBadb\fR utility is now implemented as a link to the \fBmdb\fR(1) utility.
+\fBmdb\fR(1) is a low-level debugging utility that can be used to examine user
+processes as well as the live operating system or operating system crash dumps.
+The new \fBmdb\fR(1) utility provides complete backwards compatibility with the
+existing syntax and features of \fBadb\fR, including support for processing
+\fBadb\fR macro files. The \fISolaris Modular Debugger Guide\fR and
+\fBmdb\fR(1) man page describes the features of \fBmdb\fR, including its
+\fBadb\fR compatibility mode. This mode will be activated by default when the
+\fBadb\fR link is executed.
+.SH SEE ALSO
+.sp
+.LP
+\fBmdb\fR(1), \fBattributes\fR(5)
+.sp
+.LP
+\fISolaris Modular Debugger Guide\fR
diff --git a/usr/src/man/man1/addbib.1 b/usr/src/man/man1/addbib.1
new file mode 100644
index 0000000000..54ec130f97
--- /dev/null
+++ b/usr/src/man/man1/addbib.1
@@ -0,0 +1,342 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH addbib 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+addbib \- create or extend a bibliographic database
+.SH SYNOPSIS
+.LP
+.nf
+\fBaddbib\fR [\fB-a\fR] [\fB-p\fR \fIpromptfile\fR] \fIdatabase\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+When \fBaddbib\fR starts up, answering \fBy\fR to the initial
+\fBInstructions?\fR prompt yields directions. Typing \fBn\fR (or RETURN) skips
+the directions. \fBaddbib\fR then prompts for various bibliographic fields,
+reads responses from the terminal, and sends output records to \fIdatabase.\fR
+A null response (just RETURN) means to leave out that field. A `\fB\(mi\fR\&'
+(minus sign) means to go back to the previous field. A trailing backslash
+allows a field to be continued on the next line. The repeating \fBContinue?\fR
+prompt allows the user either to resume by typing \fBy\fR (or RETURN), to quit
+the current session by typing \fBn\fR or \fBq\fR, or to edit \fIdatabase\fR
+with any system editor (see \fBvi\fR(1), \fBex\fR(1), \fBed\fR(1)).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 17n
+.rt
+Suppresses prompting for an abstract. Asking for an abstract is the default.
+Abstracts are ended with a Control\(miD.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpromptfile\fR\fR
+.ad
+.RS 17n
+.rt
+Uses a new prompting skeleton, defined in \fIpromptfile\fR. This file should
+contain prompt strings, a TAB, and the key-letters to be written to the
+\fIdatabase\fR.
+.RE
+
+.SH USAGE
+.SS "Bibliography Key Letters"
+.sp
+.LP
+The most common key-letters and their meanings are given below. \fBaddbib\fR
+insulates you from these key-letters, since it gives you prompts in English,
+but if you edit the bibliography file later on, you will need to know this
+information.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%A\fR\fR
+.ad
+.RS 8n
+.rt
+Author's name
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%B\fR\fR
+.ad
+.RS 8n
+.rt
+Book containing article referenced
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%C\fR\fR
+.ad
+.RS 8n
+.rt
+City (place of publication)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%D\fR\fR
+.ad
+.RS 8n
+.rt
+Date of publication
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%E\fR\fR
+.ad
+.RS 8n
+.rt
+Editor of book containing article referenced
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%F\fR\fR
+.ad
+.RS 8n
+.rt
+Footnote number or label (supplied by \fBrefer\fR)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%G\fR\fR
+.ad
+.RS 8n
+.rt
+Government order number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%H\fR\fR
+.ad
+.RS 8n
+.rt
+Header commentary, printed before reference
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%I\fR\fR
+.ad
+.RS 8n
+.rt
+Issuer (publisher)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%J\fR\fR
+.ad
+.RS 8n
+.rt
+Journal containing article
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%K\fR\fR
+.ad
+.RS 8n
+.rt
+Keywords to use in locating reference
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%L\fR\fR
+.ad
+.RS 8n
+.rt
+Label field used by \fB-k\fR option of \fBrefer\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%M\fR\fR
+.ad
+.RS 8n
+.rt
+Bell Labs Memorandum (undefined)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%N\fR\fR
+.ad
+.RS 8n
+.rt
+Number within volume
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%O\fR\fR
+.ad
+.RS 8n
+.rt
+Other commentary, printed at end of reference
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%P\fR\fR
+.ad
+.RS 8n
+.rt
+Page number(s)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%Q\fR\fR
+.ad
+.RS 8n
+.rt
+Corporate or Foreign Author (unreversed)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%R\fR\fR
+.ad
+.RS 8n
+.rt
+Report, paper, or thesis (unpublished)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%S\fR\fR
+.ad
+.RS 8n
+.rt
+Series title
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%T\fR\fR
+.ad
+.RS 8n
+.rt
+Title of article or book
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%V\fR\fR
+.ad
+.RS 8n
+.rt
+Volume number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%X\fR\fR
+.ad
+.RS 8n
+.rt
+Abstract \(em used by \fBroffbib\fR, not by \fBrefer\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%Y,Z\fR\fR
+.ad
+.RS 8n
+.rt
+Ignored by \fBrefer\fR
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fREditing the bibliography file
+.sp
+.LP
+Except for \fBA\fR, each field should be given just once. Only relevant fields
+should be supplied.
+
+.sp
+.in +2
+.nf
+\fB%A Mark Twain
+%T Life on the Mississippi
+%I Penguin Books
+%C New York
+%D 1978\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBed\fR(1), \fBex\fR(1), \fBindxbib\fR(1), \fBlookbib\fR(1), \fBrefer\fR(1),
+\fBroffbib\fR(1), \fBsortbib\fR(1), \fBvi\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/alias.1 b/usr/src/man/man1/alias.1
new file mode 100644
index 0000000000..60b94d7e50
--- /dev/null
+++ b/usr/src/man/man1/alias.1
@@ -0,0 +1,455 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH alias 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+alias, unalias \- create or remove a pseudonym or shorthand for a command or
+series of commands
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/alias\fR [\fIalias-name\fR[= \fIstring\fR...]]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/unalias\fR \fIalias-name\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/unalias\fR \fB-a\fR
+.fi
+
+.SS "\fBcsh\fR"
+.LP
+.nf
+\fBalias\fR [\fIname\fR [\fIdef\fR]]
+.fi
+
+.LP
+.nf
+\fBunalias\fR \fIpattern\fR
+.fi
+
+.SS "\fBksh\fR"
+.LP
+.nf
+\fBalias\fR [\fB-tx\fR] [\fIname\fR[= \fIvalue\fR]...]
+.fi
+
+.LP
+.nf
+\fBunalias\fR \fIname\fR...
+.fi
+
+.LP
+.nf
+\fBunalias\fR [\fB-a\fR]
+.fi
+
+.SS "\fBksh93\fR"
+.LP
+.nf
+\fBalias\fR [\fB-ptx\fR] [\fIname\fR[= \fIvalue\fR]...]
+.fi
+
+.LP
+.nf
+\fBunalias\fR [\fB-a\fR] [\fIname\fR...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBalias\fR and \fBunalias\fR utilities create or remove a pseudonym or
+shorthand term for a command or series of commands, with different
+functionality in the C-shell and Korn shell environments.
+.SS "\fB/usr/bin/alias\fR"
+.sp
+.LP
+The \fBalias\fR utility creates or redefines alias definitions or writes the
+values of existing alias definitions to standard output. An alias definition
+provides a string value that replaces a command name when it is encountered.
+.sp
+.LP
+An alias definition affects the current shell execution environment and the
+execution environments of the subshells of the current shell. When used as
+specified by this document, the alias definition does not affect the parent
+process of the current shell nor any utility environment invoked by the shell.
+.SS "\fB/usr/bin/unalias\fR"
+.sp
+.LP
+The \fBunalias\fR utility removes the definition for each alias name specified.
+The aliases are removed from the current shell execution environment. The
+\fB-a\fR option removes all alias definitions from the current execution
+environment.
+.SS "\fBcsh\fR"
+.sp
+.LP
+\fBalias\fR assigns \fIdef\fR to the alias \fIname\fR. The assigned \fIdef\fR
+is a list of words that can contain escaped history-substitution metasyntax.
+\fIname\fR is not allowed to be \fBalias\fR or \fBunalias\fR. If \fIdef\fR is
+omitted, the alias \fIname\fR is displayed along with its current definition.
+If both \fIname\fR and \fIdef\fR are omitted, all aliases are displayed.
+.sp
+.LP
+Because of implementation restrictions, an alias definition must have been
+entered on a previous command line before it can be used.
+.sp
+.LP
+\fBunalias\fR discards aliases that match (filename substitution)
+\fIpattern\fR. All aliases can be removed by `\fBunalias *\fR'.
+.SS "\fBksh\fR"
+.sp
+.LP
+\fBalias\fR with no arguments prints the list of aliases in the form
+\fIname=value\fR on standard output. An \fBalias\fR is defined for each name
+whose \fIvalue\fR is specified. A trailing space in \fIvalue\fR causes the next
+word to be checked for alias substitution. The \fB-t\fR flag is used to set and
+list tracked aliases. The value of a tracked alias is the full pathname
+corresponding to the specified \fIname\fR. The value becomes undefined when the
+value of \fBPATH\fR is reset but the aliases remained tracked. Without the
+\fB-t\fR flag, for each \fIname\fR in the argument list for which no
+\fIvalue\fR is specified, the name and value of the alias is printed. The
+\fB-x\fR flag is used to set or print \fIexported alias\fRes. An exported alias
+is defined for scripts invoked by \fIname\fR. The exit status is non-zero if a
+\fIname\fR is specified, but no value, and no alias has been defined for the
+\fIname\fR.
+.sp
+.LP
+The \fBalias\fRs specified by the list of \fIname\fRs can be removed from the
+\fBalias\fR list with \fBunalias\fR.
+.SS "\fBksh93\fR"
+.sp
+.LP
+\fBalias\fR creates or redefines alias definitions or writes the existing alias
+definitions to standard output.
+.sp
+.LP
+An alias definition provides a string value that replaces a command name when
+the command is read. Alias names can contain any printable character that is
+not special to the shell. If an alias value ends in a SPACE or TAB, the word
+following the command name the alias replaces is also checked to see whether it
+is an alias.
+.sp
+.LP
+If no names are specified, the names and values of all aliases are written to
+standard output. Otherwise, for each name that is specified, and
+\fB=\fR\fIvalue\fR is not specified, the current value of the alias
+corresponding to name is written to standard output. If \fB=\fR\fIvalue\fR is
+specified, the alias name is created or redefined.
+.sp
+.LP
+\fBalias\fR is built-in to the shell as a declaration command so that field
+splitting and pathname expansion are not performed on the arguments. Tilde
+expansion occurs on \fIvalue\fR. An alias definition only affects scripts read
+by the current shell environment. It does not affect scripts run by this shell.
+.sp
+.LP
+\fBunalias\fR removes the definition of each named alias from the current shell
+execution environment, or all aliases if \fB-a\fR is specified. It does not
+affect any commands that have already been read and subsequently executed.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported by \fBunalias\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Removes all alias definitions from the current shell execution environment.
+.RE
+
+.SS "\fBksh\fR"
+.sp
+.LP
+The following option is supported by \fBalias\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Sets and lists tracked aliases.
+.RE
+
+.SS "\fBksh93\fR"
+.sp
+.LP
+The following options are supported by \fBalias\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the output to be in the form of \fBalias\fR commands that can be used as
+input to the shell to recreate the current aliases.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies tracked aliases.
+.sp
+Tracked aliases connect a command name to the command's pathname, and are reset
+when the \fBPATH\fR variable is unset. The tracked aliases feature is now
+obsolete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Ignored, this option is obsolete.
+.RE
+
+.sp
+.LP
+The following option is supported by \fBunalias\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Causes all alias definitions to be removed. \fIname\fR operands are optional
+and ignored if specified.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.SS "\fBalias\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIalias-name\fR\fR
+.ad
+.RS 14n
+.rt
+Write the alias definition to standard output.
+.RE
+
+.SS "\fBunalias\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIalias-name\fR\fR
+.ad
+.RS 21n
+.rt
+The name of an alias to be removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIalias-name\fR\fB=\fR\fIstring\fR\fR
+.ad
+.RS 21n
+.rt
+Assign the value of \fIstring\fR to the alias \fIalias-name\fR.
+.RE
+
+.sp
+.LP
+If no operands are specified, all alias definitions are written to standard
+output.
+.SH OUTPUT
+.sp
+.LP
+The format for displaying aliases (when no operands or only \fIname\fR operands
+are specified) is:
+.sp
+.in +2
+.nf
+"%s=%s\en" \fIname\fR, \fIvalue\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fIvalue\fR string is written with appropriate quoting so that it is
+suitable for reinput to the shell.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRModifying a Command's Output
+.sp
+.LP
+This example specifies that the output of the \fBls\fR utility is columnated
+and more annotated:
+
+.sp
+.in +2
+.nf
+example% \fBalias ls="ls \(miCF"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRRepeating Previous Entries in the Command History File
+.sp
+.LP
+This example creates a simple "redo" command to repeat previous entries in the
+command history file:
+
+.sp
+.in +2
+.nf
+example% \fBalias r='fc \(mis'\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSpecifying a Command's Output Options
+.sp
+.LP
+This example provides that the \fBdu\fR utility summarize disk output in units
+of 1024 bytes:
+
+.sp
+.in +2
+.nf
+example% \fBalias du=du \(mik\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRDealing with an Argument That is an Alias Name
+.sp
+.LP
+This example sets up the \fBnohup\fR utility so that it can deal with an
+argument that is an alias name:
+
+.sp
+.in +2
+.nf
+example% \fBalias nohup="nohup "\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBalias\fR and \fBunalias\fR: \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.SS "\fBalias\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One of the \fIalias-name\fR operands specified did not have an alias
+definition, or an error occurred.
+.RE
+
+.SS "\fBunalias\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One of the \fIalias-name\fR operands specified did not represent a valid alias
+definition, or an error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "\fBcsh, ksh\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "\fBksh93\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBshell_builtins\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/allocate.1 b/usr/src/man/man1/allocate.1
new file mode 100644
index 0000000000..95da6dcaf8
--- /dev/null
+++ b/usr/src/man/man1/allocate.1
@@ -0,0 +1,233 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH allocate 1 "30 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+allocate \- device allocation
+.SH SYNOPSIS
+.LP
+.nf
+\fBallocate\fR [\fB-s\fR] [\fB-w\fR] [\fB-F\fR] [\fB-U\fR \fIuname\fR] [\fB-z\fR \fIzonename\fR] \fIdevice\fR
+.fi
+
+.LP
+.nf
+\fBallocate\fR [\fB-s\fR] [\fB-w\fR] [\fB-F\fR] [\fB-U\fR \fIuname\fR] [\fB-z\fR \fIzonename\fR] \fB-g\fR \fIdev-type\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBallocate\fR utility manages the ownership of devices through its
+allocation mechanism. It ensures that each device is used by only one qualified
+user at a time.
+.sp
+.LP
+The \fIdevice\fR argument specifies the device to be manipulated. To preserve
+the integrity of the device's owner, the allocate operation is executed on all
+the device special files associated with that device.
+.sp
+.LP
+The default allocate operation allocates the device special files associated
+with \fIdevice\fR to the \fBuid\fR of the current process.
+.sp
+.LP
+Only authorized users may allocate a device. The required authorizations are
+specified in \fBdevice_allocate\fR(4).
+.sp
+.LP
+When the system is configured with Trusted Extensions, \fBallocate\fR runs the
+clean program for the device before it grants access to the caller to that
+device. For devices with removable media that have a mountable file system,
+\fBallocate\fR mounts the media if the caller chooses.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIdevice\fR\fR
+.ad
+.RS 18n
+.rt
+Force allocates either free or pre-allocated devices. This option is often used
+with the \fB-U\fR option to allocate/reallocate devices to a specific user.
+Only those users that have \fBsolaris.device.revoke\fR authorization are
+allowed to use this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIdev\(mitype\fR\fR
+.ad
+.RS 18n
+.rt
+Allocates devices with a device\(mitype matching \fIdev\(mitype\fR. The
+\fIdev\(mitype\fR argument specifies the device type to be operated on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 18n
+.rt
+Silent. Suppresses any diagnostic output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR \fIuname\fR\fR
+.ad
+.RS 18n
+.rt
+Uses the user ID \fIuname\fR instead of the user ID of the current process when
+performing the allocate operation. Only a user with the
+\fBsolaris.device.revoke\fR authorization is permitted to use this option.
+.RE
+
+.sp
+.LP
+The following options are supported with Trusted Extensions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 15n
+.rt
+Runs the device cleaning program in a windowing environment. If a windowing
+version of the program exists, it is used. Otherwise, the standard version is
+run in a terminal window.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzonename\fR\fR
+.ad
+.RS 15n
+.rt
+Allocates device to the zone specified by \fIzonename\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevice\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the name of the device to be allocated.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 15n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB20\fR\fR
+.ad
+.RS 15n
+.rt
+No entry for the specified device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIother value\fR\fR
+.ad
+.RS 15n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/security/device_allocate\fR
+.sp
+.LP
+\fB/etc/security/device_maps\fR
+.sp
+.LP
+\fB/etc/security/dev/*\fR
+.sp
+.LP
+\fB/etc/security/lib/*\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The invocation is Uncommitted. The options are Uncommitted. The output is
+Not-an-Interface.
+.SH SEE ALSO
+.sp
+.LP
+\fBdeallocate\fR(1), \fBlist_devices\fR(1), \fBbsmconv\fR(1M),
+\fBdminfo\fR(1M), \fBmkdevalloc\fR(1M), \fBmkdevmaps\fR(1M),
+\fBdevice_allocate\fR(4), \fBdevice_maps\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fIControlling Access to Devices\fR
+.SH NOTES
+.sp
+.LP
+The functionality described in this man page is available only if Solaris
+Auditing has been enabled. See \fBbsmconv\fR(1M) for more information.
+.sp
+.LP
+On systems configured with Trusted Extensions, the functionality is enabled by
+default.
+.sp
+.LP
+\fB/etc/security/dev\fR, \fBmkdevalloc\fR(1M), and \fBmkdevmaps\fR(1M) might
+not be supported in a future release of the Solaris Operating Environment.
diff --git a/usr/src/man/man1/amt.1 b/usr/src/man/man1/amt.1
new file mode 100644
index 0000000000..0a485e1d1b
--- /dev/null
+++ b/usr/src/man/man1/amt.1
@@ -0,0 +1,101 @@
+'\" te
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH amt 1 "19 Aug 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+amt \- run abstract machine test
+.SH SYNOPSIS
+.LP
+.nf
+\fBamt\fR [\fB-s\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBamt\fR command is for use in a Common Criteria security certified
+system. The command is used to verify that the low level functions necessary to
+enforce the object reuse requirements of the Controlled Access Protection
+Profile are working correctly. \fB/usr/bin/amt\fR is a shell script that
+executes tests specific to your system. For a 32-bit system, the tests run as a
+32-bit application. For a 64-bit system, the tests run twice; once as a 32-bit
+application and once as a 64-bit application.
+.sp
+.LP
+\fBamt\fR lists test results with a \fBpass\fR or \fBfail\fR for each test it
+performs, unless output is suppressed with the \fB-s\fR option.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses output.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following error values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All tests passed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+Count of the number of tests that failed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<0\fR\fR
+.ad
+.RS 6n
+.rt
+Incorrect command line argument.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/appcert.1 b/usr/src/man/man1/appcert.1
new file mode 100644
index 0000000000..01a63280c3
--- /dev/null
+++ b/usr/src/man/man1/appcert.1
@@ -0,0 +1,724 @@
+'\" te
+.\" Copyright 2007, Sun Microsystems Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH appcert 1 "29 Jan 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+appcert \- examine application-level products for unstable use of Solaris
+interfaces
+.SH SYNOPSIS
+.LP
+.nf
+\fBappcert\fR [\fB-h\fR] [\fB-n\fR] [\fB-f\fR \fIinfile\fR] [\fB-w\fR \fIworking_dir\fR] [\fB-B\fR] [\fB-L\fR]
+ [\fB-S\fR] {\fIobj\fR | \fIdir\fR}...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBappcert\fR utility examines an application's conformance to the Solaris
+Application Binary Interface (\fBABI\fR). The Solaris \fBABI\fR defines the
+runtime library interfaces in Solaris that are safe and stable for application
+use. More specifically, \fBappcert\fR identifies any dependencies on unstable
+runtime interfaces, as well as certain other risks that could cause the product
+to fail to work on a subsequent release of Solaris.
+.sp
+.LP
+\fBappcert\fR checks for:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIPrivate symbol usage in Solaris libraries.\fR These are private symbols,
+that is, functions or data, that are not intended for developer consumption.
+They are interfaces that Solaris libraries use to call one another. These
+symbols might change their semantic behavior or even disappear altogether
+(so-called \fBdemoted\fR symbols), so it is a good practice to make sure your
+application does not depend upon any of them.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIStatic linking.\fR In particular, this refers to static linking of archives
+\fBlibc.a\fR, \fBlibsocket.a\fR, and \fBlibnsl.a\fR, that is, instead of
+dynamically linking the corresponding shared object \fB\&.so\fR's. Because the
+semantics of private symbol calls from one Solaris library to another can
+change from one release to another, it is not a good practice to hardwire
+library code into your binary objects.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIUnbound symbols.\fR These are library symbols (that is, functions or data)
+that the dynamic linker could not resolve when \fBappcert\fR was run. This
+might be an environment problem (for example, \fBLD_LIBRARY_PATH\fR) or a build
+problem (for example, not specifying \fB-l\fR\fIlib\fR and/or \fB-z\fR
+\fBdefs\fR with compiling). They are flagged to point these problems out and in
+case a more serious problem is indicated.
+.RE
+.sp
+.LP
+An entire product can be readily examined by \fBappcert\fR (that is, if the
+product is a collection of many programs and supporting shared objects) by
+referring \fBappcert\fR to the directories where the product is installed.
+.sp
+.LP
+To perform its task, \fBappcert\fR constructs a profile of interface
+dependencies for each object file within the product (whether an executable
+object or shared object), to determine all the Solaris system interfaces that
+are depended upon. (Notice that \fBappcert\fR uses the Solaris runtime linker
+to make this determination.) These dependency profiles are then compared to a
+definition of the Solaris \fBABI\fR to identify any interfaces that are Private
+(unsafe and unstable for application-level use).
+.sp
+.LP
+\fBappcert\fR generates a simple roll-up report that indicates which of the
+product's components, if any, had liabilities and what those liabilities were.
+The report aids developers who are examining their product's release-to-release
+stability.
+.sp
+.LP
+Notice that \fBappcert\fR produces complete interface dependency information,
+both the Public (safe and stable) Solaris interfaces and the Private (non-ABI)
+interfaces. This information can also be examined for each product component,
+if you want.
+.sp
+.LP
+IMPORTANT: \fBappcert\fR must run in the same environment in which the
+application being checked runs. See NOTES.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 18n
+.rt
+If \fBappcert\fR is run in batch mode, the output report will contain one line
+per binary, beginning with \fBPASS\fR if no problems were detected for the
+binary, \fBFAIL\fR if any problems were found, or \fBINC\fR if the binary could
+not be completely checked. Do not interpret these labels too literally. For
+example, \fBPASS\fR just means that none of the \fBappcert\fR warnings were
+triggered. These strings are flush left and so can be selected via \fBgrep\fR
+\fB^FAIL\fR \fB\&...\fR, and so forth.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIinfile\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the file \fIinfile\fR that contains a list of files (one per line) to
+check. This list is appended to the list determined from the command line
+operands (see OPERANDS below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 18n
+.rt
+Prints out the usage information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 18n
+.rt
+\fBappcert\fR examines your product for the presence of shared objects. If it
+finds some, it appends the directories they reside in to \fBLD_LIBRARY_PATH\fR.
+Use this flag to prevent \fBappcert\fR from doing this.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 18n
+.rt
+When searching directories for binaries to check, this option does not follow
+symbolic links. See \fBfind\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 18n
+.rt
+Appends Solaris library directories (that is,
+\fB/usr/openwin/lib:/usr/dt/lib\fR) to \fBLD_LIBRARY_PATH\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIworking_dir\fR\fR
+.ad
+.RS 18n
+.rt
+Identifies the directory in which to run the library components and create
+temporary files (default is \fB/tmp\fR).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB{\fIobj\fR | \fIdir\fR} ...\fR
+.ad
+.RS 20n
+.rt
+A complete list of objects and/or directories that contain the objects
+constituting the product to be checked. \fBappcert\fR recursively searches
+directories looking for object files; non-object files are ignored.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+\fBappcert\fR ran successfully and found no potential binary stability
+problems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBappcert\fR failed to run successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Some of the objects checked have potential binary stability problems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+No binary objects were located that could be checked.
+.RE
+
+.SH LIMITATIONS
+.sp
+.LP
+If the object file to be examined depends on libraries, those dependencies must
+be recorded in it (by using the compiler's \fB-l\fR switch).
+.sp
+.LP
+If the object file to be examined depends on other shared libraries, those
+libraries must be accessible via \fBLD_LIBRARY_PATH\fR or \fBRUNPATH\fR when
+\fBappcert\fR is run.
+.sp
+.LP
+To check 64-bit applications, the machine must be running the 64-bit Solaris
+kernel. See \fBisalist\fR(1). Also, the checks for static linking are currently
+not done on 64-bit applications.
+.sp
+.LP
+\fBappcert\fR cannot examine:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Object files that are completely or partially statically linked.
+.br
+.in +2
+Completely statically linked objects are reported as unstable.
+.in -2
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Executable files that do not have execute permission set.
+.br
+.in +2
+These are skipped. Shared objects without execute permission are not skipped.
+.in -2
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Object files that are setuid root.
+.br
+.in +2
+Due to limitations in \fBldd\fR(1), these are skipped. Copy and/or change the
+permissions to check them.
+.in -2
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Non-\fBELF\fR file executables such as shell scripts.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Non-C language interfaces to Solaris; for example, C++ and Java.
+.br
+.in +2
+The code itself need not be in C as long as the calls to Solaris libaries are
+in C.
+.in -2
+.RE
+.SH OUTPUT FILES
+.sp
+.LP
+\fBappcert\fR records its findings in the following files in the working
+directory (\fB/tmp/appcert.\fI?????\fR\fR by default):
+.sp
+.ne 2
+.mk
+.na
+\fB\fBIndex\fR\fR
+.ad
+.RS 11n
+.rt
+A mapping between checked binaries and the subdirectory in the working
+directory in which the output specific to that binary can be found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBReport\fR\fR
+.ad
+.RS 11n
+.rt
+A copy of the rollup report that was displayed on stdout when \fBappcert\fR was
+run.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSkipped\fR\fR
+.ad
+.RS 11n
+.rt
+A list of binaries that \fBappcert\fR was asked to check but had to skip, along
+with a brief reason why each was skipped.
+.RE
+
+.sp
+.LP
+In addition, there is per-object information in the subdirectories under
+\fBappcert.\fI?????\fR/objects/\fR, in the following files:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcheck.demoted_symbols\fR\fR
+.ad
+.RS 25n
+.rt
+A list of symbols suspected to be demoted Solaris symbols.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcheck.dynamic.private\fR\fR
+.ad
+.RS 25n
+.rt
+A list of private Solaris symbols to which the object makes direct bindings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcheck.dynamic.public\fR\fR
+.ad
+.RS 25n
+.rt
+A list of public Solaris symbols to which the object makes direct bindings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcheck.dynamic.unbound\fR\fR
+.ad
+.RS 25n
+.rt
+A list of symbols not bound by the dynamic linker when \fBldd\fR \fB-r\fR was
+run. For convenience, \fBldd\fR output lines containing \fBfile not found\fR
+are also included.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsummary.dynamic\fR\fR
+.ad
+.RS 25n
+.rt
+A pretty-printed summary of dynamic bindings for the objects examined,
+including tables of Public and Private symbols used from each Solaris library.
+.RE
+
+.sp
+.LP
+Other files are temporary files used internally by \fBappcert\fR.
+.SH OUTPUT MESSAGES
+.SS "Private Symbol Use"
+.sp
+.LP
+Private symbols are functions or data variables in a Solaris library that are
+not intended for developer or external use. These symbols are interfaces that
+the Solaris libraries use to call and communicate with one another. They are
+marked in \fBpvs\fR(1) output with the symbol version name \fBSUNWprivate\fR.
+.sp
+.LP
+Private symbols can change their semantic behavior or even disappear altogether
+(\fBdemoted\fR or \fBdeprecated\fR symbols), so your application should not
+depend upon any of them.
+.SS "Demoted Symbols"
+.sp
+.LP
+Demoted symbols are functions or data variables in a Solaris library that were
+once private to that library and have been removed (or possibly scoped local to
+the library) in a later Solaris release. If your application directly calls one
+of these demoted symbols, it will fail to run (relocation error) on the release
+in which the symbol was removed and releases thereafter.
+.sp
+.LP
+In some rare cases, a demoted symbol will return in a later release, but
+nevertheless there are still some releases on which the application will not
+run.
+.sp
+.LP
+Sun Microsystems Inc. performed most of the library scoping in the transition
+from Solaris 2.5.1 to 2.6. This action was done to increase binary stability.
+By making these completely internal interfaces invisible (that is, they cannot
+be dynamically linked against), a developer cannot accidentally or
+intentionally call these interfaces. For more information, see the \fILinker
+and Libraries Guide\fR, in particular the chapter on versioning. This document
+may be found online at \fBhttp://docs.sun.com\fR.
+.SS "Unbound Symbols"
+.sp
+.LP
+Unbound symbols are library symbols (that is, functions or data) referenced by
+the application that the dynamic linker could not resolve when \fBappcert\fR
+was run. \fBNote:\fR \fBappcert\fR does not actually run your application, so
+some aspect of the environment that affects dynamic linking might not be set
+properly.
+.sp
+.LP
+Unbound symbols do not necessarily indicate a potential binary stability
+problem. They only mean that when \fBappcert\fR was run, the runtime dynamic
+linker could not resolve these symbols.
+.sp
+.LP
+Unbound symbols might be due to \fBLD_LIBRARY_PATH\fR not being correctly set.
+Make sure it is set, so that all of your binary objects can find all of the
+libraries they depend on (either your product's own libraries, Solaris
+libraries, or those of a third party). Then re-run \fBappcert\fR.
+.sp
+.LP
+You might find it useful to write a shell script that sets up the environment
+correctly and then runs \fBappcert\fR on the binaries you want to check.
+.sp
+.LP
+Another common cause for unbound symbols is when a shared object under test has
+not recorded its dynamic dependencies, that is, at build time the \fB-l\fR
+switch was \fBnot\fR supplied to the compiler and \fBld\fR(1). So the shared
+object requires that the \fBexecutables\fR that link against it have the
+correct dependencies recorded.
+.sp
+.LP
+Notice that such a shared object can either be linked in the standard way (that
+is, specified at an executable's build time) or dynamically opened (for
+example, an executable calls \fBdlopen\fR(3C) on the shared object sometimes
+when running). Either case can give rise to unbound symbols when \fBappcert\fR
+is run. The former can usually be resolved by setting \fBLD_LIBRARY_PATH\fR
+appropriately before running \fBappcert\fR. The latter (\fBdlopen\fR) is
+usually difficult to resolve. Under some circumstances, you might be able to
+set \fBLD_PRELOAD\fR appropriately to preload the needed libraries, but this
+procedure does not always work.
+.sp
+.LP
+How do you know if the environment has been set up correctly so that there will
+be no unbound symbols? It must be set up so that running \fBldd\fR \fB-r\fR on
+the binary yields no "\fBfile not found\fR" or "\fBsymbol not found\fR" errors.
+See \fBld.so.1\fR(1) and \fBldd\fR(1) for more information on dynamic linking.
+.sp
+.LP
+In any event, \fBappcert\fR flags unbound symbols as a warning in case they
+might indicate a more serious problem. Unbound symbols can be an indicator of
+dependencies on demoted symbols (symbols that have been removed from a library
+or scoped local to it). Dependencies on demoted symbols will lead to serious
+binary stability problems.
+.sp
+.LP
+However, setting up the environment properly should remove most unbound
+symbols. In general, it is good practice to record library dependencies at
+build time whenever possible because it helps make the binary object better
+defined and self-contained. Also recommended is using the \fB-z\fR \fBdefs\fR
+flag when building shared objects, to force the resolution of all symbols
+during compilation. See \fBld\fR(1) for more information.
+.SS "No Bindings Found"
+.sp
+.LP
+\fBappcert\fR runs \fB/bin/ldd\fR \fB-r\fR on each binary object to be tested.
+It sets the environment variable \fBLD_DEBUG\fR="\fBfiles,bindings\fR". (See
+\fBldd\fR(1) and \fBld.so.1\fR(1) for more information). If that command fails
+for some reason, \fBappcert\fR will have no dynamic symbol binding information
+and will find "\fBno bindings\fR".
+.sp
+.LP
+\fBappcert\fR can fail if any of the following is true:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The binary object does not have read permission.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The binary object is SUID or SGID and the user does not have sufficient
+privileges.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The binary object is an executable without the execute permission bit set.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The binary object is completely statically linked.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The binary object has no library dependency information recorded.
+.RE
+.sp
+.LP
+Other cases exist as well (for example, out of memory). In general, this flag
+means that \fBappcert\fR could not completely examine the object due to
+permissions or environment. Try to modify the permissions or environment so
+that the dynamic bindings can be recorded.
+.SS "Obsolete Library"
+.sp
+.LP
+An obsolete library is one whose use is deprecated and that might, in some
+future release, be removed from Solaris altogether. \fBappcert\fR flags these
+because applications depending on them might not run in future releases of
+Solaris. All interfaces, including Private ones, in an obsolete library are
+frozen and will not change.
+.SS "Use of sys_errlist/sys_nerr"
+.sp
+.LP
+Direct use of the symbols \fBsys_errlist\fR or \fBsys_nerr\fR presents a risk
+in which reference might be made past the end of the \fBsys_errlist\fR array.
+These symbols are deprecated in 32-bit versions of Solaris and are absent
+altogether in 64-bit versions. Use \fBstrerror\fR(3C) instead.
+.SS "Use of Strong vs. Weak Symbols"
+.sp
+.LP
+The "strong" symbols (for example, \fB_socket\fR) associated with "weak"
+symbols (for example, \fBsocket\fR ) are reserved as private (their behavior
+could change in the future). Your application should only directly reference
+the weak symbol (usually the strong symbols begin with "\fB_\fR").
+.sp
+.LP
+\fBNote:\fR Under certain build environments, the strong/private symbol
+dependency gets recorded into your binary instead of the weak/public one, even
+though the source code doesn't appear to reference the private symbol.
+Nevertheless, steps should be taken to trace down why this is occurring and fix
+the dependency.
+.SH NOTES
+.sp
+.LP
+\fBappcert\fR needs to run in the same environment in which the application
+being checked runs. Otherwise it might not be able to resolve references
+correctly to interfaces in the Solaris libraries. Take the following steps:
+.RS +4
+.TP
+1.
+Make sure that \fBLD_LIBRARY_PATH\fR and any other aspects of the
+environment are set to whatever settings are used when the application is run.
+Also make sure that it contains the directories containing any non-Solaris
+shared objects that are part of the product, so that they can be found when
+referenced.
+.RE
+.RS +4
+.TP
+2.
+Make sure that all the binaries to be checked:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Are dynamically linked \fBELF\fR objects
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Have execute permission set on executables (this is not necessary for shared
+objects)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Are not \fBSUID\fR root (otherwise you will have to be root to check them; make
+non-\fBSUID\fR copies and check those if necessary).
+.RE
+.RE
+.sp
+.LP
+You might find it useful to write a shell script that sets up the environment
+correctly and then runs \fBappcert\fR.
+.sp
+.LP
+Some potential problems that can be encountered are:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBappcert\fR reports unbound symbols that appear to be part of Solaris
+libraries.
+.sp
+This is probably caused when the application uses \fBdlopen\fR(3C) to access a
+shared object that does not have its Solaris dependencies recorded.
+\fBappcert\fR cannot resolve symbol use in such cases, since the dynamic linker
+is never invoked on the shared object, and there is no other dependency
+information that could be used to resolve the Solaris symbol bindings. This can
+also occur with non-Solaris symbols.
+.sp
+To avoid this problem, make sure that when a shared object is built, its
+dependencies on Solaris libraries are explicitly recorded by using the
+\fB-l\fR\fIlib\fR option on the compile line (see \fBcc\fR(1) and \fBld\fR(1)).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBappcert\fR reports that the application uses a Solaris private symbol that
+is not referenced in the application's source code.
+.sp
+This problem is most likely due to static linking of a Solaris library that
+references that symbol. Since \fBappcert\fR uses the dynamic linker to resolve
+symbols, statically linked libraries appear to \fBappcert\fR to be part of the
+application code (which, in a sense, they are). This can also sometimes happen
+as a result of macro substitution in a Solaris header file.
+.sp
+To avoid this problem, whenever possible do not statically link Solaris library
+archives into your application.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBappcert\fR does not recognize a library as part of Solaris.
+.sp
+Some obsolete Solaris libraries are so old that they were obsoleted before
+their symbols could be versioned. Consequently, \fBappcert\fR cannot recognize
+them as being part of Solaris.
+.RE
+.SH BUGS
+.sp
+.LP
+The use of the terms "\fBpublic\fR" and "\fBprivate\fR" as equivalent to
+"\fBstable\fR" and "\fBunstable\fR" is unfortunately somewhat confusing. In
+particular, experimental or evolving interfaces are public in the sense that
+they are documented and their use is encouraged. But they are unstable, because
+an application built with them might not run on subsequent releases. Thus, they
+are classified as private for \fBappcert\fR's purposes until they are no longer
+evolving. Conversely, obsolete interfaces will eventually disappear, and so are
+unstable, even though they have been public and stable in the past and are
+still treated as public by \fBappcert\fR. Fortunately, these two situations are
+rare.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface stabilityStable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcc\fR(1), \fBfind\fR(1), \fBisalist\fR(1), \fBld\fR(1), \fBldd\fR(1),
+\fBld.so.1\fR(1), \fBpvs\fR(1), \fBdlopen\fR(3C), \fBstrerror\fR(3C),
+\fBIntro\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/apptrace.1 b/usr/src/man/man1/apptrace.1
new file mode 100644
index 0000000000..d0e5df1200
--- /dev/null
+++ b/usr/src/man/man1/apptrace.1
@@ -0,0 +1,299 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH apptrace 1 "29 Nov 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+apptrace \- trace application function calls to Solaris shared libraries
+.SH SYNOPSIS
+.LP
+.nf
+\fBapptrace\fR [\fB-f\fR] [\fB-F\fR [!] \fItracefromlist\fR] [\fB-T\fR [!] \fItracetolist\fR]
+ [\fB-o\fR \fIoutputfile\fR] [ [\fB-tv\fR] [!] \fIcall\fR ,...] \fIcommand\fR
+ [\fIcommand\fR \fIarguments\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBapptrace\fR utility runs the executable program specified by
+\fIcommand\fR and traces all function calls that the program\fIcommand\fR makes
+to the Solaris shared libraries. For each function call that is traceable,
+\fBapptrace\fR reports the name of the library interface called, the values of
+the arguments passed, and the return value.
+.sp
+.LP
+By default, \fBapptrace\fR traces calls directly from the executable object to
+any of the shared objects it depends on. Indirect calls (that is, calls made
+between shared objects that the executable depends upon) are not reported by
+default.
+.sp
+.LP
+Calls from or to additional shared objects may be traced using the \fB-F\fR or
+\fB-T\fR options (see below).
+.sp
+.LP
+The default reporting format is a single line per call, with no formatted
+printing of arguments passed by reference or of data structures.
+.sp
+.LP
+Formatted printing providing additional argument details is obtained using the
+\fB-v\fR option (see below).
+.sp
+.LP
+By default, every interface provided by a shared object is traced if called.
+However, the set of interfaces to be traced can be restricted, using the
+\fB-t\fR and/or \fB-v\fR options.
+.sp
+.LP
+Since it is generally possible to trace calls between any of the dynamic
+objects linked at runtime (the executable object and any of the shared objects
+depended upon), the report of each traced call gives the name of the object
+from which the call was made.
+.sp
+.LP
+\fBapptrace\fR traces all of the procedure calls that occur between dynamic
+objects via the procedure linkage table, so only those procedure calls which
+are bound via the table will be traced. See the \fILinker and Libraries
+Guide\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 24n
+.rt
+Follows all children created by \fBfork\fR(2). This option will also cause the
+process id to be printed at the beginning of each line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fB[!]\fR\fItracefromlist\fR \fR
+.ad
+.RS 24n
+.rt
+Traces calls from a comma-separated list of shared objects. Only calls from
+these shared objects will be traced. The default is to trace calls from the
+main executable only. Only the basename of the shared object is required. For
+example, \fIlibc\fR will match \fI/usr/lib/libc.so.1\fR. Additionally, shell
+style wildcard characters are supported as described in \fBfnmatch\fR(5). A
+list preceded by a ``!'' defines a list of objects from which calls should not
+be traced. If the tracing of calls from \fIcommand\fR is required, then
+\fIcommand\fR must be a member of \fItracefromlist\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutputfile\fR \fR
+.ad
+.RS 24n
+.rt
+\fBapptrace\fR output will be directed to the \fIoutputfile\fR. By default,
+\fBapptrace\fR output is placed on the stderr stream of the process being
+traced.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR [\fB!\fR]\fIcall,\|.\|.\|.\fR\fR
+.ad
+.RS 24n
+.rt
+Traces or excludes function calls. Those calls specified in the comma-separated
+list \fIcall\fR are traced. If the list begins with a !, the specified function
+calls are excluded from the trace output. The default is \fB-t\fR \fB*\fR. The
+use of shell style wildcards is allowed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fB[!]\fR\fItracetolist\fR \fR
+.ad
+.RS 24n
+.rt
+Traces calls to a comma-separated list of shared objects. The default is to
+trace calls to all shared objects. As above, the basename is all that is
+required and wildcarding is allowed. A list preceded by a ``!'' denotes a list
+of objects to which calls should not be traced.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR [\fB!\fR]\fIcall,\|.\|.\|.\fR\fR
+.ad
+.RS 24n
+.rt
+Provides verbose, formatted output of the arguments and return values of the
+function calls specified (as above in the \fB-t\fR option). Unlike
+\fBtruss\fR(1), calls named by the \fB-v\fR option do not have to be named by
+the \fB-t\fR option. For example, \fBapptrace\fR \fB-v\fR \fBopen\fR is
+equivalent to \fBtruss\fR \fB-t\fR \fBopen\fR \fB-v\fR \fBopen\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRTracing the date command
+.sp
+.in +2
+.nf
+% \fBapptrace date\fR
+-> date -> libc.so.1:atexit(0xff3bf9ac, 0x22000, 0x0) ** NR
+-> date -> libc.so.1:atexit(0x11550, 0xfefeef80, 0xab268) ** NR
+-> date -> libc.so.1:setlocale(0x6, 0x11560, 0x0) ** NR
+-> date -> libc.so.1:textdomain(0x11564, 0xfefce156, 0xff160200) ** NR
+-> date -> libc.so.1:int getopt(int = 0x1,
+ const char * * = 0xffbffa5c,
+ const char * = 0x11574 "a:u")
+<- date -> libc.so.1:getopt() = 0xffffffff
+-> date -> libc.so.1:time_t time(time_t * = 0x225c0)
+<- date -> libc.so.1:time() = 0x41ab6e82
+-> date -> libc.so.1:char * nl_langinfo(nl_item = 0x3a)
+<- date -> libc.so.1:nl_langinfo() = 0xfefd3e10
+-> date -> libc.so.1:struct tm * localtime(const time_t * = 0x225c0)
+<- date -> libc.so.1:localtime() = 0xff160240
+-> date -> libc_psr.so.1:memcpy(0xffbff9cc, 0xff160240, 0x24) ** NR
+-> date -> libc.so.1:size_t strftime(char * = 0x225c4 "",
+ size_t = 0x400,
+ const char * = 0xfefd3e10 "%a %b %e %T %Z %Y",
+ const struct tm * = 0xffbff9cc)
+<- date -> libc.so.1:strftime() = 0x1c
+-> date -> libc.so.1:int puts(const char * = 0x225c4
+ "Mon Nov 29 10:46:26 PST 2004")
+ Mon Nov 29 10:46:26 PST 2004
+<- date -> libc.so.1:puts() = 0x1d
+-> date -> libc.so.1:exit(0x0, 0x22400, 0x0) ** NR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRTracing a specific set of interfaces with verbosity set
+.sp
+.in +2
+.nf
+% \fBapptrace -v localtime,strftime,puts date\fR
+-> date -> libc.so.1:struct tm * localtime(const time_t * = 0x225c0)
+ arg0 = (const time_t *) 0x225c0
+ return = (struct tm *) 0xff160280 (struct tm) {
+ tm_sec: (int) 0x4
+ tm_min: (int) 0x34
+ tm_hour: (int) 0xa
+ tm_mday: (int) 0x1d
+ tm_mon: (int) 0xa
+ tm_year: (int) 0x68
+ tm_wday: (int) 0x1
+ tm_yday: (int) 0x14d
+ tm_isdst: (int) 0
+ }
+<- date -> libc.so.1:localtime() = 0xff160280
+-> date -> libc.so.1:size_t strftime(char * = 0x225c4 "",
+ size_t = 0x400,
+ const char * = 0xfefd3e10 "%a %b %e %T %Z %Y",
+ const struct tm * = 0xffbff99c)
+ arg0 = (char *) 0x225c4 ""
+ arg1 = (size_t) 0x400
+ arg2 = (const char *) 0xfefd3e10 "%a %b %e %T %Z %Y"
+ arg3 = (const struct tm *) 0xffbff99c (struct tm) {
+ tm_sec: (int) 0x4
+ tm_min: (int) 0x34
+ tm_hour: (int) 0xa
+ tm_mday: (int) 0x1d
+ tm_mon: (int) 0xa
+ tm_year: (int) 0x68
+ tm_wday: (int) 0x1
+ tm_yday: (int) 0x14d
+ tm_isdst: (int) 0
+ }
+ return = (size_t) 0x1c
+<- date -> libc.so.1:strftime() = 0x1c
+-> date -> libc.so.1:int puts(const char * = 0x225c4
+ "Mon Nov 29 10:52:04 PST 2004")
+ arg0 = (const char *) 0x225c4 "Mon Nov 29 10:52:04 PST 2004"
+ Mon Nov 29 10:52:04 PST 2004
+ return = (int) 0x1d
+<- date -> libc.so.1:puts() = 0x1d
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+** NR - The return value of a function call will not be traced.
+.SH FILES
+.sp
+.LP
+Basic runtime support for \fBapptrace\fR is provided by the link auditing
+feature of the Solaris runtime linker (\fBld.so.1\fR(1)) and the \fBapptrace\fR
+command's use of this facility relies on an auditing object
+(\fBapptrace.so.1\fR) kept in \fB/usr/lib/abi\fR.
+.SH LIMITATIONS
+.sp
+.LP
+In general, \fBapptrace\fR cannot trace calls to functions accepting variable
+argument lists. There has been some clever coding in several specific cases to
+work around this limitation, most notably in the \fBprintf\fR and \fBscanf\fR
+families.
+.sp
+.LP
+The \fBapptrace\fR utility can not trace the return value of a function call
+whose return type is a \fBstruct\fR or \fBunion\fR.
+.sp
+.LP
+Functions that attempt to probe the stack or otherwise extract information
+about the caller cannot be traced. Some examples are \fB[gs]etcontext()\fR,
+\fB[sig]longjmp()\fR, \fB[sig]setjmp()\fR, and \fBvfork()\fR.
+.sp
+.LP
+Functions such as \fBexit\fR(2) that do not return will not be traced for their
+return values.
+.sp
+.LP
+For security reasons, only those processes with appropriate privileges can use
+\fBapptrace\fR to trace \fBsetuid\fR/\fBsetgid\fR programs.
+.sp
+.LP
+Tracing functions whose usage requires the inclusion of <\fBvarargs.h\fR>, such
+as \fBvwprintw\fR(3XCURSES) and \fBvwscanw\fR(3XCURSES), will not provide
+formatted printing of arguments.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUnstable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBld.so.1\fR(1), \fBtruss\fR(1), \fBvwprintw\fR(3XCURSES),
+\fBvwscanw\fR(3XCURSES), \fBattributes\fR(5), \fBfnmatch\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/apropos.1 b/usr/src/man/man1/apropos.1
new file mode 100644
index 0000000000..1430f61f92
--- /dev/null
+++ b/usr/src/man/man1/apropos.1
@@ -0,0 +1,146 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH apropos 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+apropos \- locate commands by keyword lookup
+.SH SYNOPSIS
+.LP
+.nf
+\fBapropos\fR \fIkeyword\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBapropos\fR utility displays the man page name, section number, and a
+short description for each man page whose \fBNAME\fR line contains
+\fIkeyword\fR. This information is contained in the \fB/usr/share/man/windex\fR
+database created by \fBcatman\fR(1M). If \fBcatman\fR(1M) was not run, or was
+run with the \fB-n\fR option, \fBapropos\fR fails. Each word is considered
+separately and the case of letters is ignored. Words which are part of other
+words are considered; for example, when looking for `compile', \fBapropos\fR
+finds all instances of `compiler' also.
+.sp
+.LP
+\fBapropos\fR is actually just the \fB-k\fR option to the \fBman\fR(1) command.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRTo find a man page whose NAME line contains a keyword
+.sp
+.LP
+Try
+
+.sp
+.in +2
+.nf
+example% \fBapropos password\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and
+
+.sp
+.in +2
+.nf
+example% \fBapropos editor\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the line starts `\fIfilename\fR(\fIsection\fR) .\|.\|.' you can run
+
+.sp
+.in +2
+.nf
+man -s \fIsection filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+to display the man page for \fIfilename\fR.
+
+.LP
+\fBExample 2 \fRTo find the man page for the subroutine \fBprintf()\fR
+.sp
+.LP
+Try
+
+.sp
+.in +2
+.nf
+example% \fBapropos format\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and then
+
+.sp
+.in +2
+.nf
+example% \fBman -s 3s printf\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+to get the manual page on the subroutine \fBprintf()\fR.
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/windex\fR \fR
+.ad
+.RS 26n
+.rt
+table of contents and keyword database
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBman\fR(1), \fBwhatis\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\f(CW/usr/share/man/windex: No such file or directory\fR\fR
+.ad
+.sp .6
+.RS 4n
+This database does not exist. \fBcatman\fR(1M) must be run to create it.
+.RE
+
diff --git a/usr/src/man/man1/ar.1 b/usr/src/man/man1/ar.1
new file mode 100644
index 0000000000..54e192e21e
--- /dev/null
+++ b/usr/src/man/man1/ar.1
@@ -0,0 +1,518 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ar 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ar \- maintain portable archive or library
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-d\fR [\fB-Vv\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-m\fR [\fB-abiVv\fR] [\fIposname\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-p\fR [\fB-sVv\fR] \fIarchive\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-q\fR [\fB-cVv\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-r\fR [\fB-abciuVv\fR] [\fIposname\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-t\fR [\fB-sVv\fR] \fIarchive\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ar\fR \fB-x\fR [\fB-CsTVv\fR] \fIarchive\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-d\fR [\fB-Vv\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-m\fR [\fB-abiVv\fR] [\fIposname\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-p\fR [\fB-sVv\fR] \fIarchive\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-q\fR [\fB-cVv\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-r\fR [\fB-abciuVv\fR] [\fIposname\fR] \fIarchive\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-t\fR [\fB-sVv\fR] \fIarchive\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ar\fR \fB-x\fR [\fB-CsTVv\fR] \fIarchive\fR [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBar\fR utility maintains groups of files combined into a single archive
+file. Its main use is to create and update library files. However, it can be
+used for any similar purpose. The magic string and the file headers used by
+\fBar\fR consist of printable \fBASCII\fR characters. If an archive is composed
+of printable files, the entire archive is printable.
+.sp
+.LP
+When \fBar\fR creates an archive, it creates headers in a format that is
+portable across all machines. The portable archive format and structure are
+described in detail in \fBar.h\fR(3HEAD). The archive symbol table described
+there is used by the link editor \fBld\fR(1) to effect multiple passes over
+libraries of object files in an efficient manner. An archive symbol table is
+only created and maintained by \fBar\fR when there is at least one object file
+in the archive. The archive symbol table is in a specially named file that is
+always the first file in the archive. This file is never mentioned or
+accessible to the user. Whenever the \fBar\fR command is used to create or
+update the contents of such an archive, the symbol table is rebuilt. The
+\fB-s\fR option described below forces the symbol table to be rebuilt.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Positions new \fIfile\fRs in \fIarchive\fR after the file named by the
+\fIposname\fR operand.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Positions new \fIfile\fRs in \fIarchive\fR before the file named by the
+\fIposname\fR operand.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses the diagnostic message that is written to standard error by default
+when \fIarchive\fR is created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 6n
+.rt
+Prevents extracted files from replacing like-named files in the file system.
+This option is useful when \fB-T\fR is also used to prevent truncated file
+names from replacing files with the same prefix.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Deletes one or more \fIfile\fRs from \fIarchive\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Positions new \fIfile\fRs in \fIarchive\fR before the file named by the
+\fIposname\fR operand. This option is quivalent to \fB-b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Moves \fIfile\fRs. If \fB-a\fR, \fB-b\fR, or \fB-i\fR with the \fIposname\fR
+operand are specified, the \fB-m\fR option moves \fIfile\fRs to the new
+position. Otherwise, \fB-m\fR moves \fIfile\fRs to the end of \fIarchive\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the contents of \fIfile\fRs in \fIarchive\fR to standard output. If no
+\fIfile\fRs are specified, the contents of all files in \fIarchive\fR are
+written in the order of the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 6n
+.rt
+Quickly appends \fIfile\fRs to the end of \fIarchive\fR. Positioning options
+\fB-a\fR, \fB-b\fR, and \fB-i\fR are invalid. The command does not check
+whether the added \fIfile\fRs are already in \fIarchive\fR. This option is
+useful to avoid quadratic behavior when creating a large archive
+piece-by-piece.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Replaces or adds \fIfile\fRs in \fIarchive\fR. If \fIarchive\fR does not exist,
+a new archive file is created and a diagnostic message is written to standard
+error, unless the \fB-c\fR option is specified. If no \fIfile\fRs are specified
+and the \fIarchive\fR exists, the results are undefined. Files that replace
+existing files do not change the order of the archive. If the \fB-u\fR option
+is used with the \fB-r\fR option, only those files with dates of modification
+later than the archive files are replaced. If the \fB-a\fR, \fB-b\fR, or
+\fB-i\fR option is used, the \fIposname\fR argument must be present and
+specifies that new files are to be placed after (\fB-a\fR) or before (\fB-b\fR
+or \fB-i\fR) \fIposname\fR. Otherwise, the new files are placed at the end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Forces the regeneration of the archive symbol table even if \fBar\fR is not
+invoked with an option that will modify the archive contents. This command is
+useful to restore the archive symbol table after the \fBstrip\fR(1) command has
+been used on the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Prints a table of contents of \fIarchive\fR. The files specified by the
+\fIfile\fR operands are included in the written list. If no \fIfile\fR operands
+are specified, all files in \fIarchive\fR are included in the order of the
+archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 6n
+.rt
+Allows file name truncation of extracted files whose archive names are longer
+than the file system can support. By default, extracting a file with a name
+that is too long is an error. In that case, a diagnostic message is written and
+the file is not extracted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Updates older files. When used with the \fB-r\fR option, files within
+\fIarchive\fR are replaced only if the corresponding \fIfile\fR has a
+modification time that is at least as new as the modification time of the file
+within \fIarchive\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Gives verbose output. When used with options \fB-d\fR, \fB-r\fR, or \fB-x\fR,
+the \fB-v\fR option writes a detailed file-by-file description of the archive
+creation and the constituent \fIfile\fRs, and maintenance activity. When used
+with \fB-p\fR, \fB-v\fR writes the name of the file to the standard output
+before writing the file itself to the standard output. When used with \fB-t\fR,
+\fB-v\fR includes a long listing of information about the files within the
+archive. When used with \fB-x\fR, \fB-v\fR prints the filename preceding each
+extraction. When writing to an archive, \fB-v\fR writes a message to the
+standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Prints its version number on standard error.
+.RE
+
+.SS "\fB/usr/xpg4/bin/ar\fR"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/ar\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Same as the \fB/usr/bin/ar\fR version, except when writing to an archive, no
+message is written to the standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Extracts the files named by the \fIfile\fR operands from \fIarchive\fR. The
+contents of \fIarchive\fR are not changed. If no \fIfile\fR operands are given,
+all files in \fIarchive\fR are extracted. If the file name of a file extracted
+from \fIarchive\fR is longer than that supported in the directory to which it
+is being extracted, the results are undefined. The modification time of each
+\fIfile\fR extracted is set to the time \fIfile\fR is extracted from
+\fIarchive\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIarchive\fR\fR
+.ad
+.RS 11n
+.rt
+A path name of the archive file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+A path name. Only the last component is used when comparing against the names
+of files in the archive. If two or more \fIfile\fR operands have the same last
+path name component (see \fBbasename\fR(1)), the results are unspecified. The
+implementation's archive format will not truncate valid file names of files
+added to or replaced in the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIposname\fR\fR
+.ad
+.RS 11n
+.rt
+The name of a file in the archive file, used for relative positioning. See
+options \fB-m\fR and \fB-r\fR.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBar\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMPDIR\fR\fR
+.ad
+.RS 10n
+.rt
+Determine the pathname that overrides the default directory for temporary
+files, if any.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.RS 10n
+.rt
+Determine the timezone used to calculate date and time strings written by
+\fBar\fR \fB-tv\fR. If \fBTZ\fR is unset or null, an unspecified default
+timezone is used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "\fB/usr/bin/ar\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SS "\fB/usr/xpg4/bin/ar\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbasename\fR(1), \fBcpio\fR(1), \fBld\fR(1), \fBlorder\fR(1), \fBstrip\fR(1),
+\fBtar\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+If the same file is mentioned twice in an argument list, it may be put in the
+archive twice.
+.sp
+.LP
+By convention, archives are suffixed with "\fB\&.a\fR".
+.sp
+.LP
+When inserting \fBELF\fR objects into an archive file, \fBar\fR might add
+"\fB\n\fR" characters to pad these objects to an 8-byte boundary. Such padding
+improves the efficiency with which \fBld\fR(1) can access the archive. Only
+\fBELF\fR object files are padded in this way. Other archive members are not
+altered. When an object with such padding is extracted from an archive, the
+padding is not included in the resulting output.
diff --git a/usr/src/man/man1/arch.1 b/usr/src/man/man1/arch.1
new file mode 100644
index 0000000000..c7df0f0a4f
--- /dev/null
+++ b/usr/src/man/man1/arch.1
@@ -0,0 +1,101 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH arch 1 "21 Oct 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+arch \- display the architecture of the current host
+.SH SYNOPSIS
+.LP
+.nf
+\fBarch\fR [\fB-k\fR | \fIarchname\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBarch\fR utility displays the application architecture of the current
+host system. Due to extensive historical use of this command without any
+options, all SunOS 5.\fIx\fR SPARC based systems will return "sun4" as their
+application architecture. Use of this command is discouraged. See NOTES section
+below.
+.sp
+.LP
+Systems can be broadly classified by their \fBarchitectures\fR, which define
+what executables will run on which machines. A distinction can be made between
+\fBkernel\fR architecture and \fBapplication\fR architecture (or, commonly,
+just "architecture"). Machines that run different kernels due to underlying
+hardware differences may be able to run the same application programs.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the kernel architecture, such as \fBsun4u\fR. This defines which
+specific SunOS kernel will run on the machine, and has implications only for
+programs that depend on the kernel explicitly (for example, \fBps\fR(1)).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIarchname\fR\fR
+.ad
+.RS 12n
+.rt
+Use \fIarchname\fR to determine whether the application binaries for this
+application architecture can run on the current host system. The
+\fIarchname\fR must be a valid application architecture, such as
+\fBsun4\fR,\fB i86pc\fR, and so forth.
+.sp
+If \fBapplication\fR binaries for \fIarchname\fR can run on the current host
+system, \fBTRUE\fR (\fB0\fR) is returned. Otherwise, \fBFALSE\fR (\fB1\fR) is
+returned.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmach\fR(1), \fBps\fR(1), \fBuname\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+This command is provided for compatibility with previous releases and its use
+is discouraged. Instead, the \fBuname\fR command is recommended. See
+\fBuname\fR(1) for usage information.
diff --git a/usr/src/man/man1/asa.1 b/usr/src/man/man1/asa.1
new file mode 100644
index 0000000000..a1b85084cd
--- /dev/null
+++ b/usr/src/man/man1/asa.1
@@ -0,0 +1,266 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1995, Sun Microsystems, All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH asa 1 "18 Apr 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+asa \- convert FORTRAN carriage-control output to printable form
+.SH SYNOPSIS
+.LP
+.nf
+\fBasa\fR [\fB-f\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBasa\fR utility will write its input files to standard output, mapping
+carriage-control characters from the text files to line-printer control
+sequences.
+.sp
+.LP
+The first character of every line will be removed from the input, and the
+following actions will be performed.
+.sp
+.LP
+If the character removed is:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSPACE\fR\fR
+.ad
+.RS 9n
+.rt
+The rest of the line will be output without change.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 9n
+.rt
+It is replaced by a newline control sequence followed by the rest of the input
+line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 9n
+.rt
+It is replaced by a newpage control sequence followed by the rest of the input
+line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 9n
+.rt
+It is replaced by a control sequence that causes printing to return to the
+first column of the previous line, where the rest of the input line is
+printed.
+.RE
+
+.sp
+.LP
+For any other character in the first column of an input line, \fBasa\fR skips
+the character and prints the rest of the line unchanged.
+.sp
+.LP
+If \fBasa\fR is called without providing a \fIfilename\fR, the standard input
+is used.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Start each file on a new page.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfile\fR\fR
+.ad
+.RS 8n
+.rt
+A pathname of a text file used for input. If no \fBfile\fR operands are
+specified, or `\fB\|\(mi\|\fR\&' is specified, then the standard input will be
+used.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBa.out | asa | lp\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+converts output from \fBa.out\fR to conform with conventional printers and
+directs it through a pipe to the printer.
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBasa \fI output\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+shows the contents of file \fIoutput\fR on a terminal as it would appear on a
+printer.
+.sp
+.LP
+The following program is used in the next two examples:
+.sp
+.in +2
+.nf
+write(*,'(" Blank")')
+write(*,'("0Zero ")')
+write(*,'("+ Plus ")')
+write(*,'("1One ")')
+end
+.fi
+.in -2
+
+.sp
+.LP
+Both of the following examples produce two pages of output:
+.sp
+.LP
+Page 1:
+.sp
+.in +2
+.nf
+Blank
+
+ZeroPlus
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Page 2:
+.sp
+.in +2
+.nf
+One
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 1 \fRUsing actual files
+.sp
+.in +2
+.nf
+\fBa.out > MyOutputFile
+asa < MyOutputFile | lp\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing only pipes
+.sp
+.in +2
+.nf
+\fBa.out | asa | lp\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBasa\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input files were output successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlp\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/at.1 b/usr/src/man/man1/at.1
new file mode 100644
index 0000000000..088d3d5ab7
--- /dev/null
+++ b/usr/src/man/man1/at.1
@@ -0,0 +1,764 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH at 1 "13 Apr 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+at, batch \- execute commands at a later time
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/at\fR [\fB-c\fR | \fB-k\fR | \fB-s\fR] [\fB-m\fR] [\fB-f\fR \fIfile\fR] [\fB-p\fR \fIproject\fR]
+ [\fB-q\fR \fIqueuename\fR] \fB-t\fR \fItime\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/at\fR [\fB-c\fR | \fB-k\fR | \fB-s\fR] [\fB-m\fR] [\fB-f\fR \fIfile\fR] [\fB-p\fR \fIproject\fR]
+ [\fB-q\fR \fIqueuename\fR] \fItimespec\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/at\fR \fB-l\fR [\fB-p\fR \fIproject\fR] [\fB-q\fR \fIqueuename\fR] [\fIat_job_id.\fR \fI\&..\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/at\fR \fB-r\fR \fIat_job_id.\fR \fI\&..\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/batch\fR [\fB-p\fR \fIproject\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/at\fR [\fB-c\fR | \fB-k\fR | \fB-s\fR] [\fB-m\fR] [\fB-f\fR \fIfile\fR] [\fB-p\fR \fIproject\fR]
+ [\fB-q\fR \fIqueuename\fR] \fB-t\fR \fItime\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/at\fR [\fB-c\fR | \fB-k\fR | \fB-s\fR] [\fB-m\fR] [\fB-f\fR \fIfile\fR] [\fB-p\fR \fIproject\fR]
+ [\fB-q\fR \fIqueuename\fR] \fItimespec\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/at\fR \fB-l\fR [\fB-p\fR \fIproject\fR] [\fB-q\fR \fIqueuename\fR]
+ [\fIat_job_id.\fR \fI\&..\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/at\fR \fB-r\fR \fIat_job_id.\fR \fI\&..\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/batch\fR [\fB-p\fR \fIproject\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "at"
+.sp
+.LP
+The \fBat\fR utility reads commands from standard input and groups them
+together as an \fIat-job\fR, to be executed at a later time.
+.sp
+.LP
+The at-job is executed in a separate invocation of the shell, running in a
+separate process group with no controlling terminal, except that the
+environment variables, current working directory, file creation mask (see
+\fBumask\fR(1)), and system resource limits (for \fBsh\fR and \fBksh\fR only,
+see \fBulimit\fR(1)) in effect when the \fBat\fR utility is executed is
+retained and used when the at-job is executed.
+.sp
+.LP
+When the at-job is submitted, the \fIat_job_id\fR and scheduled time are
+written to standard error. The \fIat_job_id\fR is an identifier that is a
+string consisting solely of alphanumeric characters and the period character.
+The \fIat_job_id\fR is assigned by the system when the job is scheduled such
+that it uniquely identifies a particular job.
+.sp
+.LP
+User notification and the processing of the job's standard output and standard
+error are described under the \fB-m\fR option.
+.sp
+.LP
+Users are permitted to use \fBat\fR and \fBbatch\fR (see below) if their name
+appears in the file \fB/usr/lib/cron/at.allow\fR. If that file does not exist,
+the file \fB/usr/lib/cron/at.deny\fR is checked to determine if the user should
+be denied access to \fBat\fR. If neither file exists, only a user with the
+\fBsolaris.jobs.user\fR authorization is allowed to submit a job. If only
+\fBat.deny\fR exists and is empty, global usage is permitted. The
+\fBat.allow\fR and \fBat.deny\fR files consist of one user name per line.
+.sp
+.LP
+\fBcron\fR and \fBat\fR jobs are not be executed if the user's account is
+locked. Only accounts which are not locked as defined in \fBshadow\fR(4) will
+have their job or process executed.
+.SS "batch"
+.sp
+.LP
+The \fBbatch\fR utility reads commands to be executed at a later time.
+.sp
+.LP
+Commands of the forms:
+.sp
+.in +2
+.nf
+/usr/bin/batch [-p project]
+/usr/xpg4/bin/batch [-p project]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+are respectively equivalent to:
+.sp
+.in +2
+.nf
+/usr/bin/at -q b [-p project] now
+/usr/xpg4/bin/at -q b -m [-p project] now
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where queue \fBb\fR is a special \fBat\fR queue, specifically for batch jobs.
+Batch jobs are submitted to the batch queue for immediate execution. Execution
+of submitted jobs can be delayed by limits on the number of jobs allowed to run
+concurrently. See \fBqueuedefs\fR(4).
+.SH OPTIONS
+.sp
+.LP
+If the \fB-c\fR, \fB-k\fR, or \fB-s\fR options are not specified, the
+\fBSHELL\fR environment variable by default determines which shell to use.
+.sp
+.LP
+For \fB/usr/xpg4/bin/at\fR and \fB/usr/xpg4/bin/batch\fR, if \fBSHELL\fR is
+unset or \fBNULL\fR, \fB/usr/xpg4/bin/sh\fR is used.
+.sp
+.LP
+For \fBusr/bin/at\fR and \fB/usr/bin/batch\fR, if \fBSHELL\fR is unset or
+\fBNULL\fR, \fB/bin/sh\fR is used.
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 17n
+.rt
+C shell. \fBcsh\fR(1) is used to execute the at-job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fR
+.ad
+.RS 17n
+.rt
+Korn shell. \fBksh\fR(1) is used to execute the at-job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 17n
+.rt
+Bourne shell. \fBsh\fR(1) is used to execute the at-job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR \fR
+.ad
+.RS 17n
+.rt
+Specifies the path of a file to be used as the source of the at-job, instead of
+standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fR
+.ad
+.RS 17n
+.rt
+(The letter ell.) Reports all jobs scheduled for the invoking user if no
+\fIat_job_id\fR operands are specified. If \fIat_job_id\fRs are specified,
+reports only information for these jobs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fR
+.ad
+.RS 17n
+.rt
+Sends mail to the invoking user after the at-job has run, announcing its
+completion. Standard output and standard error produced by the at-job are
+mailed to the user as well, unless redirected elsewhere. Mail is sent even if
+the job produces no output.
+.sp
+If \fB-m\fR is not used, the job's standard output and standard error is
+provided to the user by means of mail, unless they are redirected elsewhere; if
+there is no such output to provide, the user is not notified of the job's
+completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIproject\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies under which project the \fBat\fR or \fBbatch\fR job is run. When used
+with the \fB-l\fR option, limits the search to that particular project. Values
+for \fIproject\fR is interpreted first as a project name, and then as a
+possible project \fBID\fR, if entirely numeric. By default, the user's current
+project is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR \fIqueuename\fR \fR
+.ad
+.RS 17n
+.rt
+Specifies in which queue to schedule a job for submission. When used with the
+\fB-l\fR option, limits the search to that particular queue. Values for
+\fIqueuename\fR are limited to the lower case letters \fBa\fR through \fBz\fR.
+By default, at-jobs are scheduled in queue \fBa\fR. In contrast, queue \fBb\fR
+is reserved for batch jobs. Since queue \fBc\fR is reserved for cron jobs, it
+can not be used with the \fB-q\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIat_job_id\fR \fR
+.ad
+.RS 17n
+.rt
+Removes the jobs with the specified \fIat_job_id\fR operands that were
+previously scheduled by the \fBat\fR utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItime\fR \fR
+.ad
+.RS 17n
+.rt
+Submits the job to be run at the time specified by the \fItime\fR
+option-argument, which must have the format as specified by the \fBtouch\fR(1)
+utility.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIat_job_id\fR \fR
+.ad
+.RS 14n
+.rt
+The name reported by a previous invocation of the \fBat\fR utility at the time
+the job was scheduled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItimespec\fR \fR
+.ad
+.RS 14n
+.rt
+Submit the job to be run at the date and time specified. All of the
+\fItimespec\fR operands are interpreted as if they were separated by space
+characters and concatenated. The date and time are interpreted as being in the
+timezone of the user (as determined by the \fBTZ\fR variable), unless a
+timezone name appears as part of \fItime\fR below.
+.sp
+In the "C" locale, the following describes the three parts of the time
+specification string. All of the values from the \fBLC_TIME\fR categories in
+the "C" locale are recognized in a case-insensitive manner.
+.sp
+.ne 2
+.mk
+.na
+\fB\fItime\fR \fR
+.ad
+.RS 14n
+.rt
+The \fItime\fR can be specified as one, two or four digits. One- and two-digit
+numbers are taken to be hours, four-digit numbers to be hours and minutes. The
+time can alternatively be specified as two numbers separated by a colon,
+meaning \fIhour\fR\fB:\fR\fIminute\fR. An AM/PM indication (one of the values
+from the \fBam_pm\fR keywords in the \fBLC_TIME\fR locale category) can follow
+the time; otherwise, a 24-hour clock time is understood. A timezone name of
+\fBGMT\fR, \fBUCT\fR, or \fBZULU \fR(case insensitive) can follow to specify
+that the time is in Coordinated Universal Time. Other timezones can be
+specified using the \fBTZ\fR environment variable. The \fItime\fR field can
+also be one of the following tokens in the "C" locale:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmidnight\fR \fR
+.ad
+.RS 13n
+.rt
+Indicates the time 12:00 am (00:00).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoon\fR \fR
+.ad
+.RS 13n
+.rt
+Indicates the time 12:00 pm.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnow\fR \fR
+.ad
+.RS 13n
+.rt
+Indicate the current day and time. Invoking \fBat\fR \fBnow\fR submits an
+at-job for potentially immediate execution (that is, subject only to
+unspecified scheduling delays).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdate\fR \fR
+.ad
+.RS 14n
+.rt
+An optional \fIdate\fR can be specified as either a month name (one of the
+values from the \fBmon\fR or \fBabmon\fR keywords in the \fBLC_TIME\fR locale
+category) followed by a day number (and possibly year number preceded by a
+comma) or a day of the week (one of the values from the \fBday\fR or
+\fBabday\fR keywords in the \fBLC_TIME\fR locale category). Two special days
+are recognized in the "C" locale:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtoday\fR \fR
+.ad
+.RS 13n
+.rt
+Indicates the current day.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtomorrow\fR \fR
+.ad
+.RS 13n
+.rt
+Indicates the day following the current day.
+.RE
+
+If no \fIdate\fR is given, \fBtoday\fR is assumed if the given time is greater
+than the current time, and \fBtomorrow\fR is assumed if it is less. If the
+given month is less than the current month (and no year is given), next year is
+assumed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIincrement\fR \fR
+.ad
+.RS 14n
+.rt
+The optional \fIincrement\fR is a number preceded by a plus sign (\fB+\fR) and
+suffixed by one of the following: \fBminutes\fR, \fBhours\fR, \fBdays\fR,
+\fBweeks\fR, \fBmonths\fR, or \fByears\fR. (The singular forms are also
+accepted.) The keyword \fBnext\fR is equivalent to an increment number of \fB+
+1\fR. For example, the following are equivalent commands:
+.sp
+.in +2
+.nf
+\fBat 2pm + 1 week
+at 2pm next week\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.RE
+
+.SH USAGE
+.sp
+.LP
+The format of the \fBat\fR command line shown here is guaranteed only for the
+"C" locale. Other locales are not supported for \fBmidnight\fR, \fBnoon\fR,
+\fBnow\fR, \fBmon\fR, \fBabmon\fR, \fBday\fR, \fBabday\fR, \fBtoday\fR,
+\fBtomorrow\fR, \fBminutes\fR, \fBhours\fR, \fBdays\fR, \fBweeks\fR,
+\fBmonths\fR, \fByears\fR, and \fBnext\fR.
+.sp
+.LP
+Since the commands run in a separate shell invocation, running in a separate
+process group with no controlling terminal, open file descriptors, traps and
+priority inherited from the invoking environment are lost.
+.SH EXAMPLES
+.SS "at"
+.LP
+\fBExample 1 \fRTypical Sequence at a Terminal
+.sp
+.LP
+This sequence can be used at a terminal:
+
+.sp
+.in +2
+.nf
+$ at \(mim 0730 tomorrow
+sort < file >outfile
+<EOT>
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRRedirecting Output
+.sp
+.LP
+This sequence, which demonstrates redirecting standard error to a pipe, is
+useful in a command procedure (the sequence of output redirection
+specifications is significant):
+
+.sp
+.in +2
+.nf
+$ at now + 1 hour <<!
+diff file1 file2 2>&1 >outfile | mailx mygroup
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSelf-rescheduling a Job
+.sp
+.LP
+To have a job reschedule itself, \fBat\fR can be invoked from within the
+at-job. For example, this "daily-processing" script named \fBmy.daily\fR runs
+every day (although \fBcrontab\fR is a more appropriate vehicle for such work):
+
+.sp
+.in +2
+.nf
+# my.daily runs every day
+at now tomorrow < my.daily
+daily-processing
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRVarious Time and Operand Presentations
+.sp
+.LP
+The spacing of the three portions of the "C" locale \fItimespec\fR is quite
+flexible as long as there are no ambiguities. Examples of various times and
+operand presentations include:
+
+.sp
+.in +2
+.nf
+at 0815am Jan 24
+at 8 :15amjan24
+at now "+ 1day"
+at 5 pm FRIday
+at '17
+ utc+
+ 30minutes'
+.fi
+.in -2
+.sp
+
+.SS "batch"
+.LP
+\fBExample 5 \fRTypical Sequence at a Terminal
+.sp
+.LP
+This sequence can be used at a terminal:
+
+.sp
+.in +2
+.nf
+$ batch
+sort <file >outfile
+<EOT>
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRRedirecting Output
+.sp
+.LP
+This sequence, which demonstrates redirecting standard error to a pipe, is
+useful in a command procedure (the sequence of output redirection
+specifications is significant):
+
+.sp
+.in +2
+.nf
+$ batch <<!
+diff file1 file2 2>&1 >outfile | mailx mygroup
+!
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBat\fR and \fBbatch\fR: \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
+\fBLC_TIME\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDATEMSK\fR \fR
+.ad
+.RS 12n
+.rt
+If the environment variable \fBDATEMSK\fR is set, \fBat\fR uses its value as
+the full path name of a template file containing format strings. The strings
+consist of format specifiers and text characters that are used to provide a
+richer set of allowable date formats in different languages by appropriate
+settings of the environment variable \fBLANG\fR or \fBLC_TIME\fR. The list of
+allowable format specifiers is located in the \fBgetdate\fR(3C) manual page.
+The formats described in the \fBOPERANDS\fR section for the \fItime\fR and
+\fIdate\fR arguments, the special names \fBnoon\fR, \fBmidnight\fR, \fBnow\fR,
+\fBnext\fR, \fBtoday\fR, \fBtomorrow\fR, and the \fIincrement\fR argument are
+not recognized when \fBDATEMSK\fR is set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR \fR
+.ad
+.RS 12n
+.rt
+Determine a name of a command interpreter to be used to invoke the at-job. If
+the variable is unset or \fINULL\fR, \fBsh\fR is used. If it is set to a value
+other than \fBsh\fR, the implementation uses that shell; a warning diagnostic
+is printed telling which shell will be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR \fR
+.ad
+.RS 12n
+.rt
+Determine the timezone. The job is submitted for execution at the time
+specified by \fItimespec\fR or \fB-t\fR \fItime\fR relative to the timezone
+specified by the \fBTZ\fR variable. If \fItimespec\fR specifies a timezone, it
+overrides \fBTZ\fR. If \fItimespec\fR does not specify a timezone and \fBTZ\fR
+is unset or \fINULL\fR, an unspecified default timezone is used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+The \fBat\fR utility successfully submitted, removed or listed a job or jobs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred, and the job will not be scheduled.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/cron/at.allow\fR \fR
+.ad
+.RS 27n
+.rt
+names of users, one per line, who are authorized access to the \fBat\fR and
+\fBbatch\fR utilities
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/cron/at.deny\fR \fR
+.ad
+.RS 27n
+.rt
+names of users, one per line, who are denied access to the \fBat\fR and
+\fBbatch\fR utilities
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/at"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot enabled
+_
+Interface StabilityStandard
+.TE
+
+.SS "/usr/xpg4/bin/at"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot enabled
+_
+Interface StabilityStandard
+.TE
+
+.SS "/usr/bin/batch"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SS "/usr/xpg4/bin/batch"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBauths\fR(1), \fBcrontab\fR(1), \fBcsh\fR(1), \fBdate\fR(1), \fBksh\fR(1),
+\fBsh\fR(1), \fBtouch\fR(1), \fBulimit\fR(1), \fBumask\fR(1), \fBcron\fR(1M),
+\fBgetdate\fR(3C), \fBauth_attr\fR(4), \fBshadow\fR(4), \fBqueuedefs\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Regardless of queue used, \fBcron\fR(1M) has a limit of 100 jobs in execution
+at any time.
+.sp
+.LP
+There can be delays in \fBcron\fR at job execution. In some cases, these delays
+can compound to the point that \fBcron\fR job processing appears to be hung.
+All jobs are executed eventually. When the delays are excessive, the only
+workaround is to kill and restart \fBcron\fR.
diff --git a/usr/src/man/man1/atq.1 b/usr/src/man/man1/atq.1
new file mode 100644
index 0000000000..46c39a4962
--- /dev/null
+++ b/usr/src/man/man1/atq.1
@@ -0,0 +1,73 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1985 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1999 Sun Microsystems, Inc., All Rights Reserved.
+.TH atq 1 "13 Aug 1999" "SunOS 5.11" "User Commands"
+.SH NAME
+atq \- display the jobs queued to run at specified times
+.SH SYNOPSIS
+.LP
+.nf
+\fBatq\fR [\fB-c\fR] [\fB-n\fR] [\fIusername\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBatq\fR utility displays the \fBat\fR jobs queued up for the current
+user. \fBat\fR(1) is a utility that allows users to execute commands at a later
+date. If invoked by a user with the \fBsolaris.jobs.admin\fR authorization,
+\fBatq\fR will display all jobs in the queue.
+.sp
+.LP
+If no options are given, the jobs are displayed in chronological order of
+execution.
+.sp
+.LP
+When an authorized user invokes \fBatq\fR without specifying \fIusername\fR,
+the entire queue is displayed; when a \fIusername\fR is specified, only those
+jobs belonging to the named user are displayed.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the queued jobs in the order they were created (that is, the time that
+the \fBat\fR command was given).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Displays only the total number of jobs currently in the queue.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/cron/atjobs\fR\fR
+.ad
+.RS 26n
+.rt
+spool area for at jobs.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBat\fR(1), \fBatrm\fR(1), \fBauths\fR(1), \fBcron\fR(1M), \fBauth_attr\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/atrm.1 b/usr/src/man/man1/atrm.1
new file mode 100644
index 0000000000..8b6307c0a9
--- /dev/null
+++ b/usr/src/man/man1/atrm.1
@@ -0,0 +1,100 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1985 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.\" Copyright (c) 2007 Sun Microsystems, Inc., All Rights Reserved.
+.TH atrm 1 "16 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+atrm \- remove jobs spooled by at or batch
+.SH SYNOPSIS
+.LP
+.nf
+\fBatrm\fR [\fB-afi\fR] [ [\fIjob\fR \fI#\fR] [\fIuser\fR]...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBatrm\fR utility removes delayed-execution jobs that were created with
+the \fBat\fR(1) command, but have not yet executed. The list of these jobs and
+associated job numbers can be displayed by using \fBatq\fR(1).
+.sp
+.LP
+\fBatrm\fR removes each job-number you specify, and/or all jobs belonging to
+the user you specify, provided that you own the indicated jobs.
+.sp
+.LP
+You can only remove jobs belonging to other users if you have
+\fBsolaris.jobs.admin\fR privileges.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+All. Removes all unexecuted jobs that were created by the current user. If
+invoked by the privileged user, the entire queue is flushed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Force. All information regarding the removal of the specified jobs is
+suppressed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Interactive. \fBatrm\fR asks if a job should be removed. If the response is
+affirmative, the job is removed.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/cron/atjobs\fR\fR
+.ad
+.RS 26n
+.rt
+Spool area for \fBat\fR jobs
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBatrm\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5)
+.SH SEE ALSO
+.sp
+.LP
+\fBat\fR(1), \fBatq\fR(1), \fBauths\fR(1), \fBcron\fR(1M), \fBauth_attr\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlocale\fR(5)
diff --git a/usr/src/man/man1/audioconvert.1 b/usr/src/man/man1/audioconvert.1
new file mode 100644
index 0000000000..72c8a9c972
--- /dev/null
+++ b/usr/src/man/man1/audioconvert.1
@@ -0,0 +1,456 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH audioconvert 1 "16 Feb 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+audioconvert \- convert audio file formats
+.SH SYNOPSIS
+.LP
+.nf
+\fBaudioconvert\fR [\fB-pF\fR] [\fB-f\fR \fIoutfmt\fR] [\fB-o\fR \fIoutfile\fR]
+ [ [\fB-i\fR \fIinfmt\fR] [\fIfile\fR]...] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBaudioconvert\fR converts audio data between a set of supported audio
+encodings and file formats. It can be used to compress and decompress audio
+data, to add audio file headers to raw audio data files, and to convert between
+standard data encodings, such as -law and linear PCM.
+.sp
+.LP
+If no filenames are present, \fBaudioconvert\fR reads the data from the
+standard input stream and writes an audio file to the standard output.
+Otherwise, input files are processed in order, concatenated, and written to the
+output file.
+.sp
+.LP
+Input files are expected to contain audio file headers that identify the audio
+data format. If the audio data does not contain a recognizable header, the
+format must be specified with the \fB-i\fR option, using the \fBrate\fR,
+\fBencoding\fR, and \fBchannels\fR keywords to identify the input data format.
+.sp
+.LP
+The output file format is derived by updating the format of the first input
+file with the format options in the \fB-f\fR specification. If \fB-p\fR is not
+specified, all subsequent input files are converted to this resulting format
+and concatenated together. The output file will contain an audio file header,
+unless \fBformat\fR=\fIraw\fR is specified in the output format options.
+.sp
+.LP
+Input files may be converted in place by using the \fB-p\fR option. When
+\fB-p\fR is in effect, the format of each input file is modified according to
+the \fB-f\fR option to determine the output format. The existing files are then
+overwritten with the converted data.
+.sp
+.LP
+The \fBfile\fR(1) command decodes and prints the audio data format of Sun audio
+files.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 14n
+.rt
+\fIIn Place\fR: The input files are individually converted to the format
+specified by the \fB-f\fR option and rewritten. If a target file is a symbolic
+link, the underlying file will be rewritten. The \fB-o\fR option may not be
+specified with \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 14n
+.rt
+\fIForce\fR: This option forces \fBaudioconvert\fR to ignore any file header
+for input files whose format is specified by the \fB-i\fR option. If \fB-F\fR
+is not specified, \fBaudioconvert\fR ignores the \fB-i\fR option for input
+files that contain valid audio file headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIoutfmt\fR\fR
+.ad
+.RS 14n
+.rt
+\fIOutput Format\fR: This option is used to specify the file format and data
+encoding of the output file. Defaults for unspecified fields are derived from
+the input file format. Valid keywords and values are listed in the next
+section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutfile\fR\fR
+.ad
+.RS 14n
+.rt
+\fIOutput File\fR: All input files are concatenated, converted to the output
+format, and written to the named output file. If \fB-o\fR and \fB-p\fR are not
+specified, the concatenated output is written to the standard output. The
+\fB-p\fR option may not be specified with \fB-o\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIinfmt\fR\fR
+.ad
+.RS 14n
+.rt
+\fIInput Format\fR: This option is used to specify the data encoding of raw
+input files. Ordinarily, the input data format is derived from the audio file
+header. This option is required when converting audio data that is not preceded
+by a valid audio file header. If \fB-i\fR is specified for an input file that
+contains an audio file header, the input format string will be ignored, unless
+\fB-F\fR is present. The format specification syntax is the same as the
+\fB-f\fR output file format.
+.sp
+Multiple input formats may be specified. An input format describes all input
+files following that specification, until a new input format is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 14n
+.rt
+\fIFile Specification\fR: The named audio files are concatenated, converted to
+the output format, and written out. If no file name is present, or if the
+special file name `\(mi' is specified, audio data is read from the standard
+input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.RS 14n
+.rt
+\fIHelp\fR: Prints a command line usage message.
+.RE
+
+.SS "Format Specification"
+.sp
+.LP
+The syntax for the input and output format specification is:
+.sp
+.LP
+\fIkeyword\fR=\fIvalue\fR[,\fIkeyword\fR=\fIvalue\fR \|.\|.\|.\|]
+.sp
+.LP
+with no intervening whitespace. Unambiguous values may be used without the
+preceding \fIkeyword\fR=.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrate\fR\fR
+.ad
+.RS 12n
+.rt
+The audio sampling rate is specified in samples per second. If a number is
+followed by the letter \fBk\fR, it is multiplied by 1000 (for example, 44.1k =
+44100). Standard of the commonly used sample rates are: 8k, 16k, 32k, 44.1k,
+and 48k.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchannels\fR\fR
+.ad
+.RS 12n
+.rt
+The number of interleaved channels is specified as an integer. The words
+\fBmono\fR and \fBstereo\fR may also be used to specify one and two channel
+data, respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBencoding\fR\fR
+.ad
+.RS 12n
+.rt
+This option specifies the digital audio data representation. Encodings
+determine precision implicitly (\fBulaw\fR implies 8-bit precision) or
+explicitly as part of the name (for example, \fBlinear16\fR). Valid encoding
+values are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBulaw\fR\fR
+.ad
+.RS 13n
+.rt
+\fBCCITT G.711\fR -law encoding. This is an 8-bit format primarily used for
+telephone quality speech.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBalaw\fR\fR
+.ad
+.RS 13n
+.rt
+\fBCCITT G.711\fR A-law encoding. This is an 8-bit format primarily used for
+telephone quality speech in Europe.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlinear8\fR,\fR
+.ad
+.br
+.na
+\fB\fBlinear16\fR,\fR
+.ad
+.br
+.na
+\fB\fBlinear32\fR\fR
+.ad
+.RS 13n
+.rt
+Linear Pulse Code Modulation (PCM) encoding. The name identifies the number of
+bits of precision. \fBlinear16\fR is typically used for high quality audio
+data.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpcm\fR\fR
+.ad
+.RS 13n
+.rt
+Same as \fBlinear16\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg721\fR\fR
+.ad
+.RS 13n
+.rt
+\fBCCITT G.721\fR compression format. This encoding uses Adaptive Delta Pulse
+Code Modulation (ADPCM) with 4-bit precision. It is primarily used for
+compressing -law voice data (achieving a 2:1 compression ratio).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg723\fR\fR
+.ad
+.RS 13n
+.rt
+\fBCCITT G.723\fR compression format. This encoding uses Adaptive Delta Pulse
+Code Modulation (ADPCM) with 3-bit precision. It is primarily used for
+compressing -law voice data (achieving an 8:3 compression ratio). The audio
+quality is similar to \fBG.721,\fR but may result in lower quality when used
+for non-speech data.
+.RE
+
+The following encoding values are also accepted as shorthand to set the sample
+rate, channels, and encoding:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvoice\fR\fR
+.ad
+.RS 9n
+.rt
+Equivalent to \fBencoding=ulaw,rate=8k,channels=mono\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR\fR
+.ad
+.RS 9n
+.rt
+Equivalent to \fBencoding=linear16,rate=44.1k,channels=stereo\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdat\fR\fR
+.ad
+.RS 9n
+.rt
+Equivalent to \fBencoding=linear16,rate=48k,channels=stereo\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBformat\fR\fR
+.ad
+.RS 12n
+.rt
+This option specifies the audio file format. Valid formats are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsun\fR\fR
+.ad
+.RS 7n
+.rt
+Sun compatible file format (the default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBraw\fR\fR
+.ad
+.RS 7n
+.rt
+Use this format when reading or writing raw audio data (with no audio header),
+or in conjunction with an \fBoffset\fR to import a foreign audio file format.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoffset\fR\fR
+.ad
+.RS 12n
+.rt
+(\fB-i\fR \fIonly\fR) Specifies a byte offset to locate the start of the audio
+data. This option may be used to import audio data that contains an
+unrecognized file header.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of
+\fBaudioconvert\fR when encountering files greater than or equal to 2 Gbyte (
+2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRRecording and compressing voice data before storing it
+.sp
+.LP
+Record voice data and compress it before storing it to a file:
+
+.sp
+.in +2
+.nf
+example% \fBaudiorecord | audioconvert -f g721 > mydata.au\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRConcatenating two audio files
+.sp
+.LP
+Concatenate two Sun format audio files, regardless of their data format, and
+output an 8-bit ulaw, 16 kHz, mono file:
+
+.sp
+.in +2
+.nf
+example% \fBaudioconvert -f ulaw,rate=16k,mono -o outfile.au infile1 infile2\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRConverting a directory to Sun format
+.sp
+.LP
+Convert a directory containing raw voice data files, in place, to Sun format
+(adds a file header to each file):
+
+.sp
+.in +2
+.nf
+example% \fBaudioconvert -p -i voice -f sun *.au\fR
+.fi
+.in -2
+.sp
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+ArchitectureSPARC, x86
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaudioplay\fR(1), \fBaudiorecord\fR(1), \fBfile\fR(1), \fBattributes\fR(5),
+\fBlargefile\fR(5)
+.SH NOTES
+.sp
+.LP
+The algorithm used for converting multi-channel data to mono is implemented by
+simply summing the channels together. If the input data is perfectly in phase
+(as would be the case if a mono file is converted to stereo and back to mono),
+the resulting data may contain some distortion.
diff --git a/usr/src/man/man1/audioplay.1 b/usr/src/man/man1/audioplay.1
new file mode 100644
index 0000000000..e9b74b7cba
--- /dev/null
+++ b/usr/src/man/man1/audioplay.1
@@ -0,0 +1,197 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH audioplay 1 "1 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+audioplay \- play audio files
+.SH SYNOPSIS
+.LP
+.nf
+\fBaudioplay\fR [\fB-iV\fR] [\fB-v\fR \fIvol\fR] [\fB-d\fR \fIdev\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBaudioplay\fR utility copies the named audio files (or the standard input
+if no filenames are present) to the audio device. If no input file is specified
+and standard input is a tty, the program exits with an error message.
+.sp
+.LP
+The input files must contain a valid audio file header. The encoding
+information in this header is matched against the capabilities of the audio
+device and, if the data formats are incompatible, an error message is printed
+and the file is skipped. Compressed \fBADPCM\fR (G.721) monaural audio data is
+automatically uncompressed before playing.
+.sp
+.LP
+Minor deviations in sampling frequency (that is, less than 1%) are ordinarily
+ignored. This allows, for instance, data sampled at 8012 Hz to be played on an
+audio device that only supports 8000 Hz. If the \fB-V\fR option is present,
+such deviations are flagged with warning messages.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdev\fR\fR
+.ad
+.RS 11n
+.rt
+\fIDevice\fR: The \fIdev\fR argument specifies an alternate audio device to
+which output should be directed. If the \fB-d\fR option is not specified, the
+\fBAUDIODEV\fR environment variable is consulted (see below). Otherwise,
+\fB/dev/audio\fR is used as the default audio device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 11n
+.rt
+\fIImmediate\fR: If the audio device is unavailable (that is, another process
+currently has write access), \fBaudioplay\fR ordinarily waits until it can
+obtain access to the device. When the \fB-i\fR option is present,
+\fBaudioplay\fR prints an error message and exits immediately if the device is
+busy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIvol\fR\fR
+.ad
+.RS 11n
+.rt
+\fIVolume\fR: The output volume is set to the specified value before playing
+begins, and is reset to its previous level when \fBaudioplay\fR exits. The
+\fIvol\fR argument is an integer value between 0 and 100, inclusive. If this
+argument is not specified, the output volume remains at the level most recently
+set by any process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 11n
+.rt
+\fIVerbose\fR: Prints messages on the standard error when waiting for access to
+the audio device or when sample rate deviations are detected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\e?\fR\fR
+.ad
+.RS 11n
+.rt
+\fIHelp\fR: Prints a command line usage message.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+\fIFile Specification\fR: Audio files named on the command line are played
+sequentially. If no filenames are present, the standard input stream (if it is
+not a tty) is played (it, too, must contain an audio file header). The special
+filename \fB\(mi\fR can be used to read the standard input stream instead of a
+file. If a relative path name is supplied, the \fBAUDIOPATH\fR environment
+variable is consulted (see below).
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBaudioplay\fR
+when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBAUDIODEV\fR\fR
+.ad
+.RS 13n
+.rt
+The full path name of the audio device to write to, if no \fB-d\fR argument is
+supplied. If the \fBAUDIODEV\fR variable is not set, \fB/dev/audio\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBAUDIOPATH\fR\fR
+.ad
+.RS 13n
+.rt
+A colon-separated list of directories in which to search for audio files whose
+names are given by relative pathnames. The current directory (\fB\&.\fR) can be
+specified explicitly in the search path. If the \fBAUDIOPATH\fR variable is not
+set, only the current directory is searched.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+ArchitectureSPARC, x86
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaudioconvert\fR(1), \fBaudiorecord\fR(1), \fBmixerctl\fR(1),
+\fBattributes\fR(5), \fBlargefile\fR(5), \fBaudio\fR(7I)
+.SH BUGS
+.sp
+.LP
+\fBaudioplay\fR currently supports a limited set of audio format conversions.
+If the audio file is not in a format supported by the audio device, it must
+first be converted. For example, to convert to voice format on the fly, use the
+command:
+.sp
+.in +2
+.nf
+example% \fBaudioconvert -f voice myfile | audioplay\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The format conversion is not always be able to keep up with the audio output.
+If this is the case, you should convert to a temporary file before playing the
+data.
diff --git a/usr/src/man/man1/audiorecord.1 b/usr/src/man/man1/audiorecord.1
new file mode 100644
index 0000000000..4db99e4ea8
--- /dev/null
+++ b/usr/src/man/man1/audiorecord.1
@@ -0,0 +1,251 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH audiorecord 1 "5 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+audiorecord \- record an audio file
+.SH SYNOPSIS
+.LP
+.nf
+\fBaudiorecord\fR [\fB-af\fR] [\fB-v\fR \fIvol\fR] [\fB-c\fR \fIchannels\fR] [\fI-s\fR \fIrate\fR]
+ [\fB-e\fR \fIencoding\fR] [\fB-t\fR \fItime\fR] [\fB-i\fR \fIinfo\fR] [\fB-d\fR \fIdev\fR]
+ [\fB-T\fR \fBau\fR | \fBaif\fR[\fBf\fR] | \fBwav\fR] [\fIfile\fR[.\fBau\fR|.\fBaif\fR[\fBf\fR]]|.\fBwav\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBaudiorecord\fR utility copies audio data from the audio device to a
+named audio file, or to the standard output if no filename is present. If no
+output file is specified and standard output is a tty, the program exits with
+an error message.
+.sp
+.LP
+By default, monaural audio data is recorded at 8 kHz and encoded in \fB-law\fR
+format. If the audio device supports additional configurations, the \fB-c\fR,
+\fB-s\fR, and \fB-e\fR options may be used to specify the data format. The
+output file is prefixed by an audio file header that identifies the format of
+the data encoded in the file.
+.sp
+.LP
+Recording begins immediately and continues until a \fBSIGINT\fR signal (for
+example, Control-c) is received. If the \fB-t\fR option is specified,
+\fBaudiorecord\fR stops when the specified quantity of data has been recorded.
+.sp
+.LP
+If the audio device is unavailable, that is, if another process currently has
+read access, \fBaudiorecord\fR prints an error message and exits immediately.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\e?\fR\fR
+.ad
+.RS 24n
+.rt
+\fIHelp\fR: Prints a command line usage message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 24n
+.rt
+\fIAppend\fR: Appends the data on the end of the named audio file. The audio
+device must support the audio data format of the existing file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIchannels\fR\fR
+.ad
+.RS 24n
+.rt
+\fIChannels\fR: Specifies the number of audio channels (1 or 2). The value may
+be specified as an integer or as the string \fBmono\fR or \fBstereo\fR. The
+default value is \fBmono\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdev\fR\fR
+.ad
+.RS 24n
+.rt
+\fIDevice\fR: The \fIdev\fR argument specifies an alternate audio device from
+which input should be taken. If the \fB-d\fR option is not specified, the
+\fBAUDIODEV\fR environment variable is consulted (see below). Otherwise,
+\fB/dev/audio\fR is used as the default audio device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIencoding\fR\fR
+.ad
+.RS 24n
+.rt
+\fIEncoding\fR: Specifies the audio data encoding. This value may be one of
+\fBulaw\fR, \fBalaw\fR, or \fBlinear\fR. The default encoding is \fBulaw\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 24n
+.rt
+\fIForce\fR: When the \fB-a\fR flag is specified, the sample rate of the audio
+device must match the sample rate at which the original file was recorded. If
+the \fB-f\fR flag is also specified, sample rate differences are ignored, with
+a warning message printed on the standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIinfo\fR\fR
+.ad
+.RS 24n
+.rt
+\fIInformation\fR: The `information' field of the output file header is set to
+the string specified by the \fIinfo\fR argument. This option cannot be
+specified in conjunction with the \fB-a\fR argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIrate\fR\fR
+.ad
+.RS 24n
+.rt
+\fISample Rate\fR: Specifies the sample rate, in samples per second. If a
+number is followed by the letter \fBk\fR, it is multiplied by 1000 (for
+example, 44.1k = 44100). The default sample rate is 8 kHz.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItime\fR\fR
+.ad
+.RS 24n
+.rt
+\fITime\fR: The \fItime\fR argument specifies the maximum length of time to
+record. Time can be specified as a floating-point value, indicating the number
+of seconds, or in the form: \fIhh:mm:ss.dd\fR, where the hour and minute
+specifications are optional.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fBau\fR | \fBaif\fR[\fBf\fR] | \fBwav\fR\fR
+.ad
+.RS 24n
+.rt
+Specifies the audio file type to create. If the \fB-a\fR option is used, the
+file type must match the file to which it is being appended. Regardless of the
+file suffix, the type is set as specified in this option. If this option is not
+specified, the file suffix determines the type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIvol\fR\fR
+.ad
+.RS 24n
+.rt
+\fIVolume\fR: The recording gain is set to the specified value before recording
+begins, and is reset to its previous level when \fBaudiorecord\fR exits. The
+\fIvol\fR argument is an integer value between 0 and 100, inclusive. If this
+argument is not specified, the input volume remains at the level most recently
+set by any process.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR[\fB\&.au\fR|\fB\&.aif\fR[\fBf\fR]]|\fB\&.wav\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fIFile Specification\fR: The named audio file is rewritten, or appended. If no
+filename is present, and standard output is not a tty, or if the special
+filename "\fB\(mi\fR" is specified, output is directed to the the standard
+output.
+.sp
+If the \fB-T\fR option is not specified, the file suffix determines the type of
+file. If the suffix is not recognized, the default is \fB\&.au\fR. If the
+\fB-T\fR option \fBis\fR specified, that file type is used regardless of the
+file suffix.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBaudiorecord\fR
+when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBAUDIODEV\fR\fR
+.ad
+.RS 12n
+.rt
+The full path name of the audio device to record from, if no \fB-d\fR argument
+is supplied. If the \fBAUDIODEV\fR variable is not set, \fB/dev/audio\fR is
+used.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+ArchitectureSPARC, x86
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaudioconvert\fR(1), \fBaudioplay\fR(1), \fBmixerctl\fR(1),
+\fBattributes\fR(5), \fBlargefile\fR(5), \fBaudio\fR(7I)
diff --git a/usr/src/man/man1/audiotest.1 b/usr/src/man/man1/audiotest.1
new file mode 100644
index 0000000000..43c7761d3a
--- /dev/null
+++ b/usr/src/man/man1/audiotest.1
@@ -0,0 +1,134 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH audiotest 1 "5 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+audiotest \- test audio device
+.SH SYNOPSIS
+.LP
+.nf
+\fBaudiotest\fR [\fB-24571\fR] [\fIdev\fR] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBaudiotest\fR utility runs a test for the named audio device (or all
+audio devices found on the system if none is given). The test includes playing
+an audio sample over each channel and measuring the rate of playback for clock
+drift.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR\fR
+.ad
+.RS 6n
+.rt
+Loop mode. The test is run in an infinite loop.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-2\fR\fR
+.ad
+.RS 6n
+.rt
+Stereo (2-channel) mode. This is the default mode. Playback assumes 2 channels
+are present.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-4\fR\fR
+.ad
+.RS 6n
+.rt
+Quadraphonic mode (4-channel surround). The test assumes that four surround
+channels are present.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-5\fR\fR
+.ad
+.RS 6n
+.rt
+Surround sound mode (5.1). The test checks the left, right, surround left,
+surround right, and center channels. The low frequency effects channel is not
+tested.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-7\fR\fR
+.ad
+.RS 6n
+.rt
+Surround sound mode (7.1). The test checks the left, right, surround left,
+surround right, back surround left, back surround right, and center channels.
+The low frequency effects channel is not tested.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdev\fR\fR
+.ad
+.RS 7n
+.rt
+The path the device to test, for example, \fB/dev/dsp0\fR.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+ArchitectureSPARC, x86
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaudioconvert\fR(1), \fBaudiorecord\fR(1), \fBmixerctl\fR(1),
+\fBattributes\fR(5), \fBaudio\fR(7I)
+.SH BUGS
+.sp
+.LP
+\fBaudiotest\fR has no way to detect the number of actual audio channels
+supported by the physical device.
+.sp
+.LP
+\fBaudiotest\fR does not test the low-frequency effects (LFE) channel.
+.sp
+.LP
+There is no test for audio capture, volume controls, or other advanced device
+features.
diff --git a/usr/src/man/man1/auths.1 b/usr/src/man/man1/auths.1
new file mode 100644
index 0000000000..77ae765179
--- /dev/null
+++ b/usr/src/man/man1/auths.1
@@ -0,0 +1,109 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH auths 1 "25 Mar 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+auths \- print authorizations granted to a user
+.SH SYNOPSIS
+.LP
+.nf
+\fBauths\fR [ \fIuser\fR ]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBauths\fR command prints on standard output the authorizations that you
+or the optionally-specified user or role have been granted. Authorizations are
+rights that are checked by certain privileged programs to determine whether a
+user may execute restricted functionality.
+.sp
+.LP
+Each user may have zero or more authorizations. Authorizations are represented
+by fully-qualified names, which identify the organization that created the
+authorization and the functionality that it controls. Following the Java
+convention, the hierarchical components of an authorization are separated by
+dots (\fB\&.\fR), starting with the reverse order Internet domain name of the
+creating organization, and ending with the specific function within a class of
+authorizations.
+.sp
+.LP
+An asterisk (\fB*\fR) indicates all authorizations in a class.
+.sp
+.LP
+A user's authorizations are looked up in \fBuser_attr\fR(4) and in the
+\fB/etc/security/policy.conf\fR file (see \fBpolicy.conf\fR(4)). Authorizations
+may be specified directly in \fBuser_attr\fR(4) or indirectly through
+\fBprof_attr\fR(4). Authorizations may also be assigned to every user in the
+system directly as default authorizations or indirectly as default profiles in
+the \fB/etc/security/policy.conf\fR file.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSample output
+.sp
+.LP
+The \fBauths\fR output has the following form:
+
+.sp
+.in +2
+.nf
+example% \fBauths tester01 tester02\fR
+tester01 : solaris.system.date,solaris.jobs.admin
+tester02 : solaris.system.*
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that there is no space after the comma separating the authorization
+names in \fBtester01\fR.
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/user_attr\fR
+.sp
+.LP
+\fB/etc/security/auth_attr\fR
+.sp
+.LP
+\fB/etc/security/policy.conf\fR
+.sp
+.LP
+\fB/etc/security/prof_attr\fR
+.SH SEE ALSO
+.sp
+.LP
+\fBprofiles\fR(1), \fBroles\fR(1), \fBgetauthattr\fR(3SECDB),
+\fBauth_attr\fR(4), \fBpolicy.conf\fR(4), \fBprof_attr\fR(4),
+\fBuser_attr\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/awk.1 b/usr/src/man/man1/awk.1
new file mode 100644
index 0000000000..14d5a145ec
--- /dev/null
+++ b/usr/src/man/man1/awk.1
@@ -0,0 +1,672 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH awk 1 "22 Jun 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+awk \- pattern scanning and processing language
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/awk\fR [\fB-f\fR \fIprogfile\fR] [\fB-F\fIc\fR\fR] [' \fIprog\fR '] [\fIparameters\fR]
+ [\fIfilename\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/awk\fR [\fB-F\fR\fIcERE\fR] [\fB-v\fR \fIassignment\fR]... \fI\&'program'\fR \fB-f\fR \fIprogfile\fR...
+ [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fB/usr/xpg4/bin/awk\fR utility is described on the \fBnawk\fR(1) manual
+page.
+.sp
+.LP
+The \fB/usr/bin/awk\fR utility scans each input \fIfilename\fR for lines that
+match any of a set of patterns specified in \fIprog\fR. The \fIprog\fR string
+must be enclosed in single quotes (\fB a\'\fR) to protect it from the shell.
+For each pattern in \fIprog\fR there can be an associated action performed when
+a line of a \fIfilename\fR matches the pattern. The set of pattern-action
+statements can appear literally as \fIprog\fR or in a file specified with the
+\fB-f\fR\fI progfile\fR option. Input files are read in order; if there are no
+files, the standard input is read. The file name \fB\&'\(mi'\fR means the
+standard input.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI progfile\fR \fR
+.ad
+.RS 16n
+.rt
+\fBawk\fR uses the set of patterns it reads from \fIprogfile\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fIc\fR \fR
+.ad
+.RS 16n
+.rt
+Uses the character \fIc\fR as the field separator (FS) character. See the
+discussion of \fBFS\fR below.
+.RE
+
+.SH USAGE
+.SS "Input Lines"
+.sp
+.LP
+Each input line is matched against the pattern portion of every pattern-action
+statement; the associated action is performed for each matched pattern. Any
+\fIfilename\fR of the form \fIvar=value\fR is treated as an assignment, not a
+filename, and is executed at the time it would have been opened if it were a
+filename. \fIVariables\fR assigned in this manner are not available inside a
+\fBBEGIN\fR rule, and are assigned after previously specified files have been
+read.
+.sp
+.LP
+An input line is normally made up of fields separated by white spaces. (This
+default can be changed by using the \fBFS\fR built-in variable or the
+\fB-F\fR\fIc\fR option.) The default is to ignore leading blanks and to
+separate fields by blanks and/or tab characters. However, if \fBFS\fR is
+assigned a value that does not include any of the white spaces, then leading
+blanks are not ignored. The fields are denoted \fB$1\fR, \fB$2\fR,
+\fB\&.\|.\|.\fR\|; \fB$0\fR refers to the entire line.
+.SS "Pattern-action Statements"
+.sp
+.LP
+A pattern-action statement has the form:
+.sp
+.in +2
+.nf
+\fIpattern\fR\fB { \fR\fIaction\fR\fB } \fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Either pattern or action can be omitted. If there is no action, the matching
+line is printed. If there is no pattern, the action is performed on every input
+line. Pattern-action statements are separated by newlines or semicolons.
+.sp
+.LP
+Patterns are arbitrary Boolean combinations ( \fB!\fR, ||, \fB&&\fR, and
+parentheses) of relational expressions and regular expressions. A relational
+expression is one of the following:
+.sp
+.in +2
+.nf
+\fIexpression relop expression
+expression matchop regular_expression\fR
+.fi
+.in -2
+
+.sp
+.LP
+where a \fIrelop\fR is any of the six relational operators in C, and a
+\fImatchop\fR is either \fB~\fR (contains) or \fB!~\fR (does not contain). An
+\fIexpression\fR is an arithmetic expression, a relational expression, the
+special expression
+.sp
+.in +2
+.nf
+\fIvar \fRin \fIarray\fR
+.fi
+.in -2
+
+.sp
+.LP
+or a Boolean combination of these.
+.sp
+.LP
+Regular expressions are as in \fBegrep\fR(1). In patterns they must be
+surrounded by slashes. Isolated regular expressions in a pattern apply to the
+entire line. Regular expressions can also occur in relational expressions. A
+pattern can consist of two patterns separated by a comma; in this case, the
+action is performed for all lines between the occurrence of the first pattern
+to the occurrence of the second pattern.
+.sp
+.LP
+The special patterns \fBBEGIN\fR and \fBEND\fR can be used to capture control
+before the first input line has been read and after the last input line has
+been read respectively. These keywords do not combine with any other patterns.
+.SS "Built-in Variables"
+.sp
+.LP
+Built-in variables include:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFILENAME\fR \fR
+.ad
+.RS 13n
+.rt
+name of the current input file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFS\fR \fR
+.ad
+.RS 13n
+.rt
+input field separator regular expression (default blank and tab)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNF\fR \fR
+.ad
+.RS 13n
+.rt
+number of fields in the current record
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNR\fR \fR
+.ad
+.RS 13n
+.rt
+ordinal number of the current record
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOFMT\fR \fR
+.ad
+.RS 13n
+.rt
+output format for numbers (default \fB%.6g\fR)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOFS\fR \fR
+.ad
+.RS 13n
+.rt
+output field separator (default blank)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBORS\fR \fR
+.ad
+.RS 13n
+.rt
+output record separator (default new-line)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRS\fR \fR
+.ad
+.RS 13n
+.rt
+input record separator (default new-line)
+.RE
+
+.sp
+.LP
+An action is a sequence of statements. A statement can be one of the following:
+.sp
+.in +2
+.nf
+if ( \fIexpression\fR ) \fIstatement\fR [ else \fIstatement\fR ]
+while ( \fIexpression\fR ) \fIstatement\fR
+do \fIstatement\fR while ( \fIexpression\fR )
+for ( \fIexpression\fR ; \fIexpression\fR ; \fIexpression\fR ) \fIstatement\fR
+for ( \fIvar\fR in \fIarray\fR ) \fIstatement\fR
+break
+continue
+{ [ \fIstatement\fR ] .\|.\|. }
+\fIexpression\fR # commonly variable = expression
+print [ \fIexpression-list\fR ] [ >\fIexpression\fR ]
+printf format [ ,\fIexpression-list\fR ] [ >\fIexpression\fR ]
+next # skip remaining patterns on this input line
+exit [expr] # skip the rest of the input; exit status is expr
+.fi
+.in -2
+
+.sp
+.LP
+Statements are terminated by semicolons, newlines, 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 \fB+\fR,
+\fB\(mi\fR, \fB*\fR, \fB/\fR, \fB%\fR, \fB^\fR and concatenation (indicated by
+a blank). The operators \fB++\fR, \fB\(mi\(mi\fR, \fB+=\fR, \fB\(mi=\fR,
+\fB*=\fR, \fB/=\fR, \fB%=\fR, \fB^=\fR, \fB>\fR, \fB>=\fR, \fB<\fR, \fB<=\fR,
+\fB==\fR, \fB!=\fR, and \fB?:\fR are also available in expressions. Variables
+can be scalars, array elements (denoted x[i]), or fields. Variables are
+initialized to the null string or zero. Array subscripts can be any string, not
+necessarily numeric; this allows for a form of associative memory. String
+constants are quoted (\fB""\fR), with the usual C escapes recognized within.
+.sp
+.LP
+The \fBprint\fR statement prints its arguments on the standard output, or on a
+file if \fB>\fR\fIexpression\fR is present, or on a pipe if '\fB|\fR\fIcmd\fR'
+is present. The output resulted from the print statement is terminated by the
+output record separator with each argument separated by the current output
+field separator. The \fBprintf\fR statement formats its expression list
+according to the format (see \fBprintf\fR(3C)).
+.SS "Built-in Functions"
+.sp
+.LP
+The arithmetic functions are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcos\fR(\fIx\fR)\fR
+.ad
+.RS 11n
+.rt
+Return cosine of \fIx\fR, where \fIx\fR is in radians. (In
+\fB/usr/xpg4/bin/awk\fR only. See \fBnawk\fR(1).)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsin\fR(\fIx\fR)\fR
+.ad
+.RS 11n
+.rt
+Return sine of \fIx\fR, where \fIx\fR is in radians. (In
+\fB/usr/xpg4/bin/awk\fR only. See \fBnawk\fR(1).)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexp\fR(\fIx\fR)\fR
+.ad
+.RS 11n
+.rt
+Return the exponential function of \fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlog\fR(\fIx\fR)\fR
+.ad
+.RS 11n
+.rt
+Return the natural logarithm of \fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsqrt\fR(\fIx\fR)\fR
+.ad
+.RS 11n
+.rt
+Return the square root of \fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR(\fIx\fR)\fR
+.ad
+.RS 11n
+.rt
+Truncate its argument to an integer. It is truncated toward \fB0\fR when
+\fIx\fR >\fB 0\fR.
+.RE
+
+.sp
+.LP
+The string functions are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindex(\fR\fIs\fR\fB, \fR\fIt\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+Return the position in string \fIs\fR where string \fIt\fR first occurs, or
+\fB0\fR if it does not occur at all.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint(\fR\fIs\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+truncates \fIs\fR to an integer value. If \fIs\fR is not specified, $0 is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlength(\fR\fIs\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+Return the length of its argument taken as a string, or of the whole line if
+there is no argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsplit(\fR\fIs\fR, \fIa\fR, \fIfs\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+Split the string \fIs\fR into array elements \fIa\fR[\fI1\fR],
+\fIa\fR[\fI2\fR], \|.\|.\|. \fIa\fR[\fIn\fR], and returns \fIn\fR. The
+separation is done with the regular expression \fIfs\fR or with the field
+separator \fBFS\fR if \fIfs\fR is not given.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsprintf(\fR\fIfmt\fR, \fIexpr\fR, \fIexpr\fR,\|.\|.\|.\|\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+Format the expressions according to the \fBprintf\fR(3C) format given by
+\fIfmt\fR and returns the resulting string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsubstr(\fR\fIs\fR, \fIm\fR, \fIn\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+returns the \fIn\fR-character substring of \fIs\fR that begins at position
+\fIm\fR.
+.RE
+
+.sp
+.LP
+The input/output function is as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetline\fR\fR
+.ad
+.RS 11n
+.rt
+Set \fB$0\fR to the next input record from the current input file.
+\fBgetline\fR returns \fB1\fR for successful input, \fB0\fR for end of file,
+and \fB\(mi1\fR for an error.
+.RE
+
+.SS "Large File Behavior"
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBawk\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting Lines Longer Than 72 Characters
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints lines longer than seventy two
+characters:
+
+.sp
+.in +2
+.nf
+\fBlength > 72\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRPrinting Fields in Opposite Order
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints the first two fields in opposite
+order:
+
+.sp
+.in +2
+.nf
+\fB{ print $2, $1 }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrinting Fields in Opposite Order with the Input Fields
+Separated
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints the first two input fields in
+opposite order, separated by a comma, blanks or tabs:
+
+.sp
+.in +2
+.nf
+\fBBEGIN { FS = ",[ \et]*|[ \et]+" }
+ { print $2, $1 }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRAdding Up the First Column, Printing the Sum and Average
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It adds up the first column, and prints the
+sum and average:
+
+.sp
+.in +2
+.nf
+\fB{ s += $1 }
+END { print "sum is", s, " average is", s/NR }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRPrinting Fields in Reverse Order
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints fields in reverse order:
+
+.sp
+.in +2
+.nf
+\fB{ for (i = NF; i > 0; \(mi\(mii) print $i }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRPrinting All lines Between \fBstart/stop\fR Pairs
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints all lines between start/stop
+pairs.
+
+.sp
+.in +2
+.nf
+\fB/start/, /stop/\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRPrinting All Lines Whose First Field is Different from the
+Previous One
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints all lines whose first field is
+different from the previous one.
+
+.sp
+.in +2
+.nf
+\fB$1 != prev { print; prev = $1 }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRPrinting a File and Filling in Page numbers
+.sp
+.LP
+The following example is an \fBawk\fR script that can be executed by an \fBawk
+-f examplescript\fR style command. It prints a file and fills in page numbers
+starting at 5:
+
+.sp
+.in +2
+.nf
+\fB/Page/ { $2 = n++; }
+ { print }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRPrinting a File and Numbering Its Pages
+.sp
+.LP
+Assuming this program is in a file named \fBprog\fR, the following example
+prints the file \fBinput\fR numbering its pages starting at \fB5\fR:
+
+.sp
+.in +2
+.nf
+example% \fBawk -f prog n=5 input\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBawk\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
+\fBPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_NUMERIC\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the radix character used when interpreting numeric input, performing
+conversions between numeric and string values and formatting numeric output.
+Regardless of locale, the period character (the decimal-point character of the
+POSIX locale) is the decimal-point character recognized in processing \fBawk\fR
+programs (including assignments in command-line arguments).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/awk"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot Enabled
+.TE
+
+.SS "/usr/xpg4/bin/awk"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBegrep\fR(1), \fBgrep\fR(1), \fBnawk\fR(1), \fBsed\fR(1), \fBprintf\fR(3C),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Input white space is not preserved on output if fields are involved.
+.sp
+.LP
+There are no explicit conversions between numbers and strings. To force an
+expression to be treated as a number, add \fB0\fR to it. To force an expression
+to be treated as a string, concatenate the null string (\fB""\fR) to it.
diff --git a/usr/src/man/man1/banner.1 b/usr/src/man/man1/banner.1
new file mode 100644
index 0000000000..d5cbccea9f
--- /dev/null
+++ b/usr/src/man/man1/banner.1
@@ -0,0 +1,23 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH banner 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+banner \- make posters
+.SH SYNOPSIS
+.LP
+.nf
+\fBbanner\fR \fIstrings\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBbanner\fR prints its arguments (each up to 10 characters long) in large
+letters on the standard output.
+.SH SEE ALSO
+.sp
+.LP
+\fBecho\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/basename.1 b/usr/src/man/man1/basename.1
new file mode 100644
index 0000000000..3b10233463
--- /dev/null
+++ b/usr/src/man/man1/basename.1
@@ -0,0 +1,120 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH basename 1 "18 Mar 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+basename, dirname \- deliver portions of path names
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/basename\fR \fIstring\fR [\fIsuffix\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/basename\fR \fIstring\fR [\fIsuffix\fR]
+.fi
+
+.LP
+.nf
+\fBdirname\fR \fIstring\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBbasename\fR utility deletes any prefix ending in \fB/\fR and the
+\fIsuffix\fR (if present in \fIstring\fR) from \fIstring\fR, and prints the
+result on the standard output. It is normally used inside substitution marks
+(\fB`\|`\fR) within shell procedures.
+.SS "/usr/bin"
+.sp
+.LP
+The \fIsuffix\fR is a pattern defined on the \fBexpr\fR(1) manual page.
+.SS "/usr/xpg4/bin"
+.sp
+.LP
+The \fIsuffix\fR is a string with no special significance attached to any of
+the characters it contains.
+.sp
+.LP
+The \fBdirname\fR utility delivers all but the last level of the path name in
+\fIstring\fR.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSetting environment variables
+.sp
+.LP
+The following example, invoked with the argument \fB/home/sms/personal/mail\fR
+sets the environment variable \fBNAME\fR to the file named \fBmail\fR and the
+environment variable \fBMYMAILPATH\fR to the string \fB/home/sms/personal\fR:
+
+.sp
+.in +2
+.nf
+example% \fBNAME=`basename \|$HOME/personal/mail`\fR
+example% \fBMYMAILPATH=`dirname \|$HOME/personal/mail`\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCompiling a file and moving the output
+.sp
+.LP
+This shell procedure, invoked with the argument \fB/usr/src/bin/cat.c\fR,
+compiles the named file and moves the output to \fBcat\fR in the current
+directory:
+
+.sp
+.in +2
+.nf
+example% \fBcc $1\fR
+example% \fBmv a.out `basename $1 .c`\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBbasename\fR and \fBdirname\fR: \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBexpr\fR(1), \fBbasename\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/bc.1 b/usr/src/man/man1/bc.1
new file mode 100644
index 0000000000..733d542c85
--- /dev/null
+++ b/usr/src/man/man1/bc.1
@@ -0,0 +1,539 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH bc 1 "29 Aug 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+bc \- arbitrary precision arithmetic language
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/bc\fR [\fB-c\fR] [\fB-l\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/bc\fR [\fB-c\fR] [\fB-l\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBbc\fR utility implements an arbitrary precision calculator. It takes
+input from any files given, then reads from the standard input. If the standard
+input and standard output to \fBbc\fR are attached to a terminal, the
+invocation of \fBbc\fR is \fIinteractive\fR, causing behavioral constraints
+described in the following sections. \fBbc\fR processes a language that
+resembles C and is a preprocessor for the desk calculator program \fBdc\fR,
+which it invokes automatically unless the \fB-c\fR option is specified. In this
+case the \fBdc\fR input is sent to the standard output instead.
+.SH USAGE
+.sp
+.LP
+The syntax for \fBbc\fR programs is as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIL\fR\fR
+.ad
+.RS 5n
+.rt
+Means a letter \fBa\fR\(mi\fBz\fR,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIE\fR\fR
+.ad
+.RS 5n
+.rt
+Means an expression: a (mathematical or logical) value, an operand that takes
+a value, or a combination of operands and operators that evaluates to a value,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIS\fR\fR
+.ad
+.RS 5n
+.rt
+Means a statement.
+.RE
+
+.SS "Comments"
+.sp
+.LP
+Enclosed in \fB/*\fR and \fB*/\fR.
+.SS "Names (Operands)"
+.br
+.in +2
+Simple variables: \fIL\fR.
+.in -2
+.br
+.in +2
+Array elements: \fIL\fR [ \fIE\fR ] (up to \fBBC_DIM_MAX\fR dimensions).
+.in -2
+.br
+.in +2
+The words \fBibase\fR, \fBobase\fR (limited to \fBBC_BASE_MAX\fR), and
+\fBscale\fR (limited to \fBBC_SCALE_MAX\fR).
+.in -2
+.SS "Other Operands"
+.sp
+.LP
+Arbitrarily long numbers with optional sign and decimal point. Strings of fewer
+than \fBBC_STRING_MAX\fR characters, between double quotes ("). \fB(\fR \fIE\fR
+\fB)\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsqrt ( \fR\fIE\fR\fB )\fR\fR
+.ad
+.RS 21n
+.rt
+Square root
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlength ( \fR\fIE\fR\fB )\fR\fR
+.ad
+.RS 21n
+.rt
+Number of significant decimal digits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBscale ( \fR\fIE\fR\fB )\fR\fR
+.ad
+.RS 21n
+.rt
+Number of digits right of decimal point.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIL \fR\fB( \fR\fIE\fR , ... , \fIE\fR\fB )\fR\fR
+.ad
+.RS 21n
+.rt
+
+.RE
+
+.SS "Operators"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ \(mi * / % ^\fR\fR
+.ad
+.sp .6
+.RS 4n
+(\fB%\fR is remainder; \fB^\fR is power)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB++ \(mi\(mi \fR\fR
+.ad
+.sp .6
+.RS 4n
+(prefix and postfix; apply to names)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB== <= >= != < >\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB= =+ =\(mi =* =/ =% =^\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SS "Statements"
+.br
+.in +2
+\fIE\fR
+.in -2
+.br
+.in +2
+\fB{\fR \fIS\fR \fB;\fR.\|.\|. \fB;\fR \fIS\fR \fB}\fR
+.in -2
+.br
+.in +2
+\fBif (\fR \fIE\fR \fB)\fR \fIS\fR
+.in -2
+.br
+.in +2
+\fBwhile (\fR \fIE\fR \fB)\fR \fIS\fR
+.in -2
+.br
+.in +2
+\fBfor (\fR \fIE\fR \fB;\fR \fIE\fR \fB;\fR \fIE\fR \fB)\fR \fIS\fR
+.in -2
+.br
+.in +2
+null statement
+.in -2
+.br
+.in +2
+\fBbreak\fR
+.in -2
+.br
+.in +2
+\fBquit\fR
+.in -2
+.sp
+.LP
+\&.string
+.SS "Function Definitions"
+.br
+.in +2
+\fBdefine\fR \fIL\fR \fB(\fR \fIL\fR \fB,\fR.\|.\|.\|\fB,\fR \fIL\fR \fB) {\fR
+.in -2
+.br
+.in +2
+\fB auto\fR \fIL\fR \fB,\fR.\|.\|.\|\fB,\fR \fIL\fR
+.in -2
+.br
+.in +2
+\fI S\fR \fB;\fR.\|.\|.\| \fIS\fR
+.in -2
+.br
+.in +2
+\fB return (\fR \fIE\fR \fB)\fR
+.in -2
+.br
+.in +2
+\fB}\fR
+.in -2
+.SS "Functions in \fB-l\fR Math Library"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs(\fR\fIx\fR\fB)\fR\fR
+.ad
+.RS 10n
+.rt
+sine
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc(\fR\fIx\fR\fB)\fR\fR
+.ad
+.RS 10n
+.rt
+cosine
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe(\fR\fIx\fR\fB)\fR\fR
+.ad
+.RS 10n
+.rt
+exponential
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl(\fR\fIx\fR\fB)\fR\fR
+.ad
+.RS 10n
+.rt
+log
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa(\fR\fIx\fR\fB)\fR\fR
+.ad
+.RS 10n
+.rt
+arctangent
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBj(\fR\fIn\fR\fB,\fR\fIx)\fR\fR
+.ad
+.RS 10n
+.rt
+Bessel function
+.RE
+
+.sp
+.LP
+All function arguments are passed by value.
+.sp
+.LP
+The value of a statement that is an expression is printed unless the main
+operator is an assignment. Either semicolons or new-lines may separate
+statements. Assignment to \fBscale\fR influences the number of digits to be
+retained on arithmetic operations in the manner of \fBdc\fR. Assignments to
+\fBibase\fR or \fBobase\fR set the input and output number radix respectively.
+.sp
+.LP
+The same letter may be used as an array, a function, and a simple variable
+simultaneously. All variables are global to the program. \fBauto\fR variables
+are stacked during function calls. When using arrays as function arguments or
+defining them as automatic variables, empty square brackets must follow the
+array name.
+.SH OPTIONS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Compiles only. The output is \fBdc\fR commands that are sent to the standard
+output.
+.RE
+
+.SS "/usr/bin/bc"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Defines the math functions and initializes \fBscale\fR to \fB20\fR, instead of
+the default zero.
+.RE
+
+.SS "/usr/xpg6/bin/bc"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Defines the math functions and initializes \fBscale\fR to \fB20\fR, instead of
+the default zero. All math results have the scale of \fB20\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A pathname of a text file containing \fBbc\fR program statements. After all
+cases of \fIfile\fR have been read, \fBbc\fR reads the standard input.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSetting the precision of a variable
+.sp
+.LP
+In the shell, the following assigns an approximation of the first ten digits of
+\fBn\fR to the variable \fIx\fR:
+
+.sp
+.in +2
+.nf
+\fBx=$(printf "%s\en" 'scale = 10; 104348/33215' | bc)\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDefining a computing function
+.sp
+.LP
+Defines a function to compute an approximate value of the exponential function:
+
+.sp
+.in +2
+.nf
+\fBscale = 20
+define e(x){
+ auto a, b, c, i, s
+ a = 1
+ b = 1
+ s = 1
+ for(i=1; 1==1; i++){
+ a = a*x
+ b = b*i
+ c = a/b
+ if(c == 0) return(s)
+ s = s+c
+ }
+}\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrinting the approximate values of the function
+.sp
+.LP
+Prints approximate values of the exponential function of the first ten
+integers:
+
+.sp
+.in +2
+.nf
+\fBfor(i=1; i<=10; i++) e(i)\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+\fBfor (i = 1; i <= 10; ++i) { e(i) }\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBbc\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 15n
+.rt
+All input files were processed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunspecified\fR\fR
+.ad
+.RS 15n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lib.b\fR\fR
+.ad
+.RS 25n
+.rt
+mathematical library
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/include/limits.h\fR\fR
+.ad
+.RS 25n
+.rt
+to define BC_ parameters
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdc\fR(1), \fBawk\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBbc\fR command does not recognize the logical operators \fB&&\fR and
+\fB|\||\fR.
+.sp
+.LP
+The \fBfor\fR statement must have all three expressions (\fIE\fR's).
diff --git a/usr/src/man/man1/bdiff.1 b/usr/src/man/man1/bdiff.1
new file mode 100644
index 0000000000..71b8d44488
--- /dev/null
+++ b/usr/src/man/man1/bdiff.1
@@ -0,0 +1,97 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH bdiff 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+bdiff \- big diff
+.SH SYNOPSIS
+.LP
+.nf
+\fBbdiff\fR \fIfilename1\fR \fIfilename2\fR [\fIn\fR] [\fB-s\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBbdiff\fR is used in a manner analogous to \fBdiff\fR to find which lines in
+\fIfilename1\fR and \fIfilename2\fR must be changed to bring the files into
+agreement. Its purpose is to allow processing of files too large for
+\fBdiff\fR. If \fIfilename1 (filename2)\fR is \fB\(mi\fR, the standard input is
+read.
+.sp
+.LP
+\fBbdiff\fR ignores lines common to the beginning of both files, splits the
+remainder of each file into \fIn\fR-line segments, and invokes \fBdiff\fR on
+corresponding segments. If both optional arguments are specified, they must
+appear in the order indicated above.
+.sp
+.LP
+The output of \fBbdiff\fR is exactly that of \fBdiff\fR, with line numbers
+adjusted to account for the segmenting of the files (that is, to make it look
+as if the files had been processed whole). Note: Because of the segmenting of
+the files, \fBbdiff\fR does not necessarily find a smallest sufficient set of
+file differences.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR \fR
+.ad
+.RS 7n
+.rt
+The number of line segments. The value of \fIn\fR is 3500 by default. If the
+optional third argument is given and it is numeric, it is used as the value for
+\fIn\fR. This is useful in those cases in which 3500-line segments are too
+large for \fBdiff\fR, causing it to fail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 7n
+.rt
+Specifies that no diagnostics are to be printed by \fBbdiff\fR (silent option).
+Note: However, this does not suppress possible diagnostic messages from
+\fBdiff\fR, which \fBbdiff\fR calls.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBbdiff\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH FILES
+.sp
+.LP
+\fB/tmp/bd\fI?????\fR\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdiff\fR(1), \fBattributes\fR(5), \fBlargefile\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+Use \fBhelp\fR for explanations.
diff --git a/usr/src/man/man1/bfs.1 b/usr/src/man/man1/bfs.1
new file mode 100644
index 0000000000..ddfece0fc0
--- /dev/null
+++ b/usr/src/man/man1/bfs.1
@@ -0,0 +1,369 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH bfs 1 "20 May 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+bfs \- big file scanner
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/bfs\fR [\fB-\fR] \fIfilename\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBbfs\fR command is (almost) like \fBed\fR(1) except that it is read-only
+and processes much larger files. Files can be up to 1024K bytes and 32K lines,
+with up to 512 characters, including new-line, per line (255 for 16-bit
+machines). \fBbfs\fR is usually more efficient than \fBed\fR(1) 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 \fBcsplit\fR(1) can be used to
+divide it into more manageable pieces for editing.
+.sp
+.LP
+Normally, the size of the file being scanned is printed, as is the size of any
+file written with the \fBw\fR (write) command. The optional \fB\(mi\fR
+suppresses printing of sizes. Input is prompted with \fB*\fR if \fBP\fR and a
+carriage return are typed, as in \fBed\fR(1). Prompting can be turned off again
+by inputting another \fBP\fR and carriage return. Note that messages are given
+in response to errors if prompting is turned on.
+.sp
+.LP
+All address expressions described under \fBed\fR(1) are supported. In addition,
+regular expressions may be surrounded with two symbols besides \fB/\fR and
+\fB?\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>\fR\fR
+.ad
+.RS 5n
+.rt
+indicates downward search without wrap-around, and
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<\fR\fR
+.ad
+.RS 5n
+.rt
+indicates upward search without wrap-around.
+.RE
+
+.sp
+.LP
+There is a slight difference in mark names; that is, only the letters \fBa\fR
+through \fBz\fR may be used, and all 26 marks are remembered.
+.SS "bfs Commands"
+.sp
+.LP
+The \fBe\fR, \fBg\fR, \fBv\fR, \fBk\fR, \fBp\fR, \fBq\fR, \fBw\fR, \fB=\fR,
+\fB!\fR, and null commands operate as described under \fBed\fR(1). Commands
+such as \fB\(mi\(mi\(mi\fR, \fB+++\(mi\fR, \fB+++=\fR, \fB\(mi12\fR, and
+\fB+4p\fR are accepted. Note that \fB1,10p\fR and \fB1,10\fR will both print
+the first ten lines. The \fBf\fR command only prints the name of the file being
+scanned; there is no \fIremembered\fR file name. The \fB w\fR command is
+independent of output diversion, truncation, or crunching (see the \fBxo\fR,\fB
+xt\fR, and\fB xc\fR commands, below). The following additional commands are
+available:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxf\fR\fI file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Further commands are taken from the named \fBfile\fR. When an end-of-file is
+reached, an interrupt signal is received or an error occurs, reading resumes
+with the file containing the \fBxf\fR. The \fBxf\fR commands may be nested to a
+depth of 10.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxn\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the marks currently in use (marks are set by the \fBk\fR command).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxo\fR\fI [\|file\|]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Further output from the \fBp\fR and null commands is diverted to the named
+\fBfile\fR, which, if necessary, is created mode 666 (readable and writable by
+everyone), unless your \fBumask\fR setting (see \fBumask\fR(1)) dictates
+otherwise. If \fBfile\fR is missing, output is diverted to the standard output.
+Note that each diversion causes truncation or creation of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:\fR\fI label\fR\fR
+.ad
+.sp .6
+.RS 4n
+This positions a \fIlabel\fR in a command file. The \fIlabel\fR is terminated
+by new-line, and blanks between the \fB:\fR (colon) and the start of the
+\fIlabel\fR are ignored. This command may also be used to insert comments into
+a command file, since labels need not be referenced.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB( \fB\&. \fR, \fB\&. \fR)\fBxb\fR/\fIregular expression\fR/\fIlabel\fR\fR
+.ad
+.sp .6
+.RS 4n
+A jump (either upward or downward) is made to \fIlabel\fR if the command
+succeeds. It fails under any of the following conditions:
+.RS +4
+.TP
+1.
+Either address is not between \fB1\fR and \fB$\fR.
+.RE
+.RS +4
+.TP
+2.
+The second address is less than the first.
+.RE
+.RS +4
+.TP
+3.
+The regular expression does not match at least one line in the specified
+range, including the first and last lines.
+.RE
+On success, \fB\&.\fR (dot) is set to the line matched and a jump is made to
+\fIlabel\fR. This command is the only one that does not 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, \fBxb/^/ label\fR, is an
+unconditional jump.
+.sp
+The \fBxb\fR command is allowed only if it is read from someplace other than a
+terminal. If it is read from a pipe, only a downward jump is possible.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxt\fR\fI number\fR\fR
+.ad
+.sp .6
+.RS 4n
+Output from the \fBp\fR and null commands is truncated to, at most,
+\fInumber\fR characters. The initial number is \fB255\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxv\fR[\fIdigit\fR]\|[\fIspaces\fR]\|[\fIvalue\fR]\fR
+.ad
+.sp .6
+.RS 4n
+The variable name is the specified \fIdigit\fR following the \fBxv\fR. The
+commands \fBxv5100\fR or \fBxv5 100\fR both assign the value \fB100\fR to the
+variable \fB5\fR. The command \fBxv61,100p\fR assigns the value \fB1,100p\fR to
+the variable \fB6\fR. To reference a variable, put a \fB%\fR in front of the
+variable name. For example, using the above assignments for variables \fB5\fR
+and \fB6\fR:
+.sp
+.in +2
+.nf
+1,%5p
+1,%5
+%6
+.fi
+.in -2
+.sp
+
+will all print the first 100 lines.
+.sp
+\fBg/%5/p\fR
+.sp
+would globally search for the characters \fB100\fR and print each line
+containing a match. To escape the special meaning of \fB%\fR, a \fB\e\fR must
+precede it.
+.sp
+\fBg/".*\e%\fR[cds]\fB/p\fR
+.sp
+could be used to match and list %c, %d, or %s formats (for example,
+"printf"-like statements) of characters, decimal integers, or strings. Another
+feature of the \fBxv\fR command is that the first line of output from a
+\fBUNIX\fR system command can be stored into a variable. The only requirement
+is that the first character of \fIvalue\fR be an \fB!\fR. For example:
+.sp
+.in +2
+.nf
+\fB\&.w junk
+xv5!cat junk
+!rm junk
+!echo "%5"
+xv6!expr %6 + 1\fR
+.fi
+.in -2
+.sp
+
+would put the current line into variable \fB35\fR, print it, and increment the
+variable \fB36\fR by one. To escape the special meaning of \fB!\fR as the first
+character of \fIvalue\fR, precede it with a \fB\e\fR\&.
+.sp
+\fBxv7\e!date\fR
+.sp
+stores the value \fB!date\fR into variable \fB7\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxbz\fR\fI label\fR\fR
+.ad
+.br
+.na
+\fB\fBxbn\fR\fI label\fR\fR
+.ad
+.sp .6
+.RS 4n
+These two commands will test the last saved \fIreturn code\fR from the
+execution of a \fBUNIX\fR system command (\fB!\fR\fBcommand\fR) or nonzero
+value, respectively, to the specified label. The two examples below both
+search for the next five lines containing the string \fBsize\fR:
+.sp
+.ne 2
+.mk
+.na
+\fBExample 1:\fR
+.ad
+.RS 14n
+.rt
+.sp
+.in +2
+.nf
+\fBxv55
+: l
+/size/
+xv5!expr %5 \(mi 1
+!if 0%5 != 0 exit 2
+xbn l\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBExample 2:\fR
+.ad
+.RS 14n
+.rt
+.sp
+.in +2
+.nf
+\fBxv45
+: l
+/size/
+xv4!expr %4 \(mi 1
+!if 0%4 = 0 exit 2
+xbz l\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxc\fR [\fBswitch\fR]\fR
+.ad
+.sp .6
+.RS 4n
+If \fBswitch\fR is \fB1\fR, output from the \fBp\fR and null commands is
+crunched; if \fBswitch\fR is \fB0\fR, it is not. Without an argument, \fBxc\fR
+reverses \fBswitch\fR. Initially, \fBswitch\fR is set for no crunching.
+Crunched output has strings of tabs and blanks reduced to one blank and blank
+lines suppressed.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+Any file up to 1024K bytes and 32K lines, with up to 512 characters, including
+new-line, per line (255 for 16-bit machines). \fIfilename\fR can be a section
+of a larger file which has been divided into more manageable sections for
+editing by the use of \fBcsplit\fR(1).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion without any file or command errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsplit\fR(1), \fBed\fR(1), \fBumask\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+Message is \fB?\fR for errors in commands, if prompting is turned off.
+Self-explanatory error messages are displayed when prompting is on.
diff --git a/usr/src/man/man1/break.1 b/usr/src/man/man1/break.1
new file mode 100644
index 0000000000..15949c8bc5
--- /dev/null
+++ b/usr/src/man/man1/break.1
@@ -0,0 +1,180 @@
+'\" te
+.\" Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH break 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+break, continue \- shell built-in functions to escape from or advance within a
+controlling while, for, foreach, or until loop
+.SH SYNOPSIS
+.SS "\fBsh\fR"
+.LP
+.nf
+\fBbreak\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fBcontinue\fR [\fIn\fR]
+.fi
+
+.SS "\fBcsh\fR"
+.LP
+.nf
+\fBbreak\fR
+.fi
+
+.LP
+.nf
+\fBcontinue\fR
+.fi
+
+.SS "\fBksh\fR"
+.LP
+.nf
+\fB*break\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fB*continue\fR [\fIn\fR]
+.fi
+
+.SS "\fBksh93\fR"
+.LP
+.nf
+\fB+break\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fB+continue\fR [\fIn\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "\fBsh\fR"
+.sp
+.LP
+The \fBbreak\fR utility exits from the enclosing \fBfor\fR or \fBwhile\fR loop,
+if any. If \fIn\fR is specified, break \fIn\fR levels.
+.sp
+.LP
+The \fBcontinue\fR utility resumes the next iteration of the enclosing
+\fBfor\fR or \fBwhile\fR loop. If \fIn\fR is specified, resume at the
+\fIn\fR-th enclosing loop.
+.SS "\fBcsh\fR"
+.sp
+.LP
+The \fBbreak\fR utility resumes execution after the \fBend\fR of the nearest
+enclosing \fBforeach\fR or \fBwhile\fR loop. The remaining commands on the
+current line are executed. This allows multilevel breaks to be written as a
+list of \fBbreak\fR commands, all on one line.
+.sp
+.LP
+The \fBcontinue\fR utility continues execution of the next iteration of the
+nearest enclosing \fBwhile\fR or \fBforeach\fR loop.
+.SS "\fBksh\fR"
+.sp
+.LP
+The \fBbreak\fR utility exits from the enclosed \fBfor\fR, \fBwhile\fR,
+\fBuntil\fR, or \fBselect\fR loop, if any. If \fIn\fR is specified, then
+\fBbreak\fR \fIn\fR levels. If \fIn\fR is greater than the number of enclosing
+loops, the outermost enclosing loop shall be exited.
+.sp
+.LP
+The \fBcontinue\fR utility resumes the next iteration of the enclosed
+\fBfor\fR, \fBwhile\fR, \fBuntil\fR, or \fBselect\fR loop. If \fIn\fR is
+specified then resume at the \fIn\fR-th enclosed loop. If \fIn\fR is greater
+than the number of enclosing loops, the outermost enclosing loop shall be used.
+.sp
+.LP
+On this manual page, \fBksh\fR(1) commands that are preceded by one or two *
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words that follow a command preceded by \fB**\fR that are in the format of a
+variable assignment are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign, and
+also that word splitting and file name generation are not performed.
+.RE
+.SS "\fBksh93\fR"
+.sp
+.LP
+\fBbreak\fR is a shell special built-in that exits the smallest enclosing
+\fBfor\fR, \fBselect\fR, \fBwhile\fR, or \fBuntil\fR loop. It also exits the
+\fIn\fRth enclosing loop if \fIn\fR is specified. Execution continues at the
+command following the loop or loops.
+.sp
+.LP
+If \fIn\fR is specified, it must be a positive integer \fB\(>=1\fR\&. If
+\fIn\fR is larger than the number of enclosing loops, the last enclosing loop
+is exited.
+.sp
+.LP
+\fBcontinue\fR is a shell special built-in that continues execution at the top
+of the smallest enclosing \fBfor\fR, \fBselect\fR, \fBwhile\fR, or \fBuntil\fR
+loop, if any; or of the top of the \fIn\fRth enclosing loop if n is specified.
+.sp
+.LP
+If \fIn\fR is specified, it must be a positive integer \fB\(>=1\fR\&. If
+\fIn\fR is larger than the number of enclosing loops, the last enclosing loop
+is used.
+.sp
+.LP
+On this manual page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR symbols are special built-in commands and are treated the following
+ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Built-in commands are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words following a command preceded by \fB++\fR that are in the format of a
+variable assignment are expanded with rules as a variable assignment. This
+means that tilde substitution is performed after the \fB=\fR sign and field
+splitting and file name generation are not performed.
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBexit\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/builtin.1 b/usr/src/man/man1/builtin.1
new file mode 100644
index 0000000000..fdf651aa9e
--- /dev/null
+++ b/usr/src/man/man1/builtin.1
@@ -0,0 +1,179 @@
+'\" te
+.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH builtin 1 "1 May 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+builtin \- ksh93 built-in function to add, delete, or display shell built-ins
+.SH SYNOPSIS
+.LP
+.nf
+\fBbuiltin\fR [\fB-ds\fR] [\fB-f\fR \fIlib\fR] [\fIpathname\fR ...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBksh93\fR \fBbuiltin\fR command adds, deletes, or displays built-in
+commands in the current shell environment. A built-in command executes in the
+current shell process and can have side effects in the current shell. On most
+systems, the invocation time for built-in commands is one or two orders of
+magnitude less than commands that create a separate process.
+.sp
+.LP
+For each \fIpathname\fR specified, the basename of the pathname determines the
+name of the built-in. For each basename, the shell looks for a C level function
+in the current shell whose name is determined by pre-pending \fBb_\fR to the
+built-in name. If \fIpathname\fR contains a forward slash (\fB/\fR), the
+built-in is bound to \fIpathname\fR. A built-in bound to a pathname is only
+executed if \fIpathname\fR is the first executable found during a path search.
+Otherwise, built-ins are found prior to performing the path search.
+.sp
+.LP
+If \fIpathname\fR is not specified, \fBbuiltin\fR displays the current list of
+built-ins, or just the special built-ins if the \fB-s\fR option is specified,
+on standard output. The full pathname for built-ins that are bound to pathnames
+are displayed.
+.sp
+.LP
+Libraries containing built-ins can be specified with the \fB-f\fR option. If
+the library contains a function named \fBlib_init()\fR, this function is
+invoked with argument \fB0\fR when the library is loaded. The \fBlib_init()\fR
+function can load built-ins by invoking an appropriate C level function. In
+this case there is no restriction on the C level function name.
+.sp
+.LP
+The C level function is invoked with three arguments. The first two are the
+same as \fBmain()\fR and the third one is a pointer.
+.sp
+.LP
+The \fBksh93\fR \fBbuiltin\fR command cannot be invoked from a restricted
+shell.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 10n
+.rt
+Delete each of the specified built-ins. Special built-ins cannot be deleted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIlib\fR\fR
+.ad
+.RS 10n
+.rt
+On systems with dynamic linking, load and search for built-ins in the shared
+library, \fIlib\fR.
+.sp
+Libraries are searched for in \fB$PATH\fR and system dependent library
+directories. The system dependent shared library prefix or suffix can be
+omitted. Once a library is loaded, its symbols become available for the current
+and subsequent invocations of \fBbuiltin\fR. Multiple libraries can be
+specified with separate invocations of \fBbuiltin\fR. Libraries are searched in
+the reverse order in which they are specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 10n
+.rt
+Display only the special built-ins.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpathname\fR\fR
+.ad
+.RS 12n
+.rt
+Specifies the \fIpathname\fR. The basename of the pathname determines the name
+of the built-in.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRLoading a \fBbuiltin\fR Command
+.sp
+.LP
+The following example loads a \fBbuiltin\fR command \fBmycmd\fR from the
+library \fBlibfoo.so\fR:
+
+.sp
+.in +2
+.nf
+example% builtin -f foo mycmd
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+David Korn, \fBdgk@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBwhence\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/cal.1 b/usr/src/man/man1/cal.1
new file mode 100644
index 0000000000..7581b7da42
--- /dev/null
+++ b/usr/src/man/man1/cal.1
@@ -0,0 +1,136 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cal 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+cal \- display a calendar
+.SH SYNOPSIS
+.LP
+.nf
+\fBcal\fR [ [\fImonth\fR] \fIyear\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcal\fR utility writes a Gregorian calendar to standard output. If the
+\fIyear\fR operand is specified, a calendar for that year is written. If no
+operands are specified, a calendar for the current month is written.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fImonth\fR\fR
+.ad
+.RS 9n
+.rt
+Specify the month to be displayed, represented as a decimal integer from
+\fB1\fR (January) to \fB12\fR (December). The default is the current month.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIyear\fR\fR
+.ad
+.RS 9n
+.rt
+Specify the year for which the calendar is displayed, represented as a decimal
+integer from \fB1\fR to \fB9999\fR. The default is the current year.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcal\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.RS 6n
+.rt
+Determine the timezone used to calculate the value of the current month.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcalendar\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+An unusual calendar is printed for September 1752. That is the month 11 days
+were skipped to make up for lack of leap year adjustments. To see this
+calendar, type:
+.sp
+.in +2
+.nf
+cal 9 1752
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command \fBcal 83\fR refers to the year 83, not 1983.
+.sp
+.LP
+The year is always considered to start in January.
diff --git a/usr/src/man/man1/calendar.1 b/usr/src/man/man1/calendar.1
new file mode 100644
index 0000000000..be55d5f852
--- /dev/null
+++ b/usr/src/man/man1/calendar.1
@@ -0,0 +1,170 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH calendar 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+calendar \- reminder service
+.SH SYNOPSIS
+.LP
+.nf
+\fBcalendar\fR [\fB-\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcalendar\fR utility consults the file \fBcalendar\fR in the current
+directory and writes lines that contain today's or tomorrow's date anywhere in
+the line to standard output. Most reasonable month-day dates such as \fBAug.
+24\fR, \fBaugust 24\fR, \fB8/24\fR, and so forth, are recognized, but not \fB24
+August\fR or \fB24/8\fR. On Fridays and weekends "tomorrow" extends through
+Monday. \fBcalendar\fR can be invoked regularly by using the \fBcrontab\fR(1)
+or \fBat\fR(1) commands.
+.sp
+.LP
+When the optional argument \fB-\fR is present, \fBcalendar\fR does its job for
+every user who has a file \fBcalendar\fR in his or her login directory and
+sends them any positive results by \fBmail\fR(1). Normally this is done daily
+by facilities in the UNIX operating system (see\fBcron\fR(1M)).
+.sp
+.LP
+If the environment variable \fBDATEMSK\fR is set, \fBcalendar\fR will use its
+value as the full path name of a template file containing format strings. The
+strings consist of conversion specifications and text characters and are used
+to provide a richer set of allowable date formats in different languages by
+appropriate settings of the environment variable \fBLANG\fR or \fBLC_TIME\fR;
+see \fBenviron\fR(5). See\fBstrftime\fR(3C) for the list of allowable
+conversion specifications.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPossible contents of a template
+.sp
+.LP
+The following example shows the possible contents of a template:
+
+.sp
+.in +2
+.nf
+%B %eth of the year %Y
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fB%B\fR represents the full month name, \fB%e\fR the day of month and \fB%Y\fR
+the year (4 digits).
+
+.sp
+.LP
+If \fBDATEMSK\fR is set to this template, the following \fBcalendar\fR file
+would be valid:
+
+.sp
+.in +2
+.nf
+March 7th of the year 1989 <Reminder>
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcalendar\fR: \fBLC_CTYPE\fR, \fBLC_TIME\fR,
+\fBLC_MESSAGES\fR, \fBNLSPATH\fR, and \fBTZ\fR.
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR \fR
+.ad
+.RS 21n
+.rt
+system password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/cal*\fR \fR
+.ad
+.RS 21n
+.rt
+temporary files used by \fBcalendar\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/calprog\fR \fR
+.ad
+.RS 21n
+.rt
+program used to determine dates for today and tomorrow
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBat\fR(1), \fBcrontab\fR(1), \fBmail\fR(1), \fBcron\fR(1M), \fBypbind\fR(1M),
+\fBstrftime\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+Appropriate lines beginning with white space will not be printed.
+.sp
+.LP
+Your calendar must be public information for you to get reminder service.
+.sp
+.LP
+\fBcalendar\fR's extended idea of ``tomorrow'' does not account for holidays.
+.sp
+.LP
+The \fB-\fR argument works only on calendar files that are local to the
+machine; \fBcalendar\fR is intended not to work on calendar files that are
+mounted remotely with \fBNFS.\fR Thus, `\fBcalendar \fR\fB-\fR' should be run
+only on diskful machines where home directories exist; running it on a
+diskless client has no effect.
+.sp
+.LP
+\fBcalendar\fR is no longer in the default root crontab. Because of the network
+burden `\fBcalendar \fR\fB-\fR' can induce, it is inadvisable in an environment
+running \fBypbind\fR(1M) with a large passwd.byname map. If, however, the
+usefulness of \fBcalendar\fR outweighs the network impact, the super-user may
+run `\fBcrontab\fR \fB-e\fR' to edit the root crontab. Otherwise, individual
+users may wish to use `\fBcrontab\fR \fB-e\fR' to edit their own crontabs to
+have \fBcron\fR invoke \fBcalendar\fR without the \fB-\fR argument, piping
+output to mail addressed to themselves.
diff --git a/usr/src/man/man1/cancel.1 b/usr/src/man/man1/cancel.1
new file mode 100644
index 0000000000..1f286366ec
--- /dev/null
+++ b/usr/src/man/man1/cancel.1
@@ -0,0 +1,233 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2005, 2006 Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cancel 1 "26 May 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+cancel \- cancel print request
+.SH SYNOPSIS
+.LP
+.nf
+\fBcancel\fR [\fIrequest-ID\fR...] [\fIdestination\fR]...
+.fi
+
+.LP
+.nf
+\fBcancel\fR \fB-u\fR \fIuser\fR... [\fIdestination\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcancel\fR utility cancels print requests. There are two forms of the
+\fBcancel\fR command.
+.sp
+.LP
+The first form of \fBcancel\fR has two optional arguments: print requests
+(\fIrequest-ID\fR) and destinations (\fIdestination\fR). Specifying
+\fIrequest-ID\fR with \fIdestination\fR cancels \fIrequest-ID\fR on
+\fIdestination\fR. Specifying only the destination cancels the current print
+request on \fIdestination\fR. If \fIdestination\fR is not specified,
+\fBcancel\fR cancels the requested print request on all destinations.
+.sp
+.LP
+The second form of \fBcancel\fR cancels a user's print requests on specific
+destinations.
+.sp
+.LP
+Users can only cancel print requests associated with their username. By
+default, users can only cancel print requests on the host from which the print
+request was submitted. If a super-user has set \fBuser-equivalence=true\fR in
+\fB/etc/printers.conf\fR on the print server, users can cancel print requests
+associated with their username on any host. Super-users can cancel print
+requests on the host from which the print request was submitted. Superusers can
+also cancel print requests from the print server.
+.sp
+.LP
+The print client commands locate destination information using the
+\fBprinters\fR database in the name service switch. See \fBnsswitch.conf\fR(4),
+\fBprinters\fR(4), and \fBprinters.conf\fR(4) for details.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIuser\fR\fR
+.ad
+.RS 11n
+.rt
+The name of the user for which print requests are to be cancelled. Specify
+\fIuser\fR as a username.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdestination\fR\fR
+.ad
+.RS 15n
+.rt
+The destination on which the print requests are to be canceled.
+\fIdestination\fR is the name of a printer or class of printers (see
+\fBlpadmin\fR(1M)). If \fIdestination\fR is not specified, \fBcancel\fR cancels
+the requested print request on all destinations. Specify \fIdestination\fR
+using atomic, URI-style (\fIscheme\fR\fB://\fR\fIendpoint\fR), or POSIX-style
+(\fIserver\fR\fB:\fR\fIdestination\fR), names. See Notes for information
+regarding using URI-style or POSIX-style destination names with \fBcancel\fR.
+See \fBprinters.conf\fR(4) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIrequest-ID\fR\fR
+.ad
+.RS 15n
+.rt
+The print request to be canceled. Specify \fIrequest-ID\fR using \fBLP-style\fR
+request \fBIDs\fR (\fIdestination\fR-\fInumber\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuser\fR\fR
+.ad
+.RS 15n
+.rt
+The name of the user for which the print requests are to be cancelled. Specify
+\fIuser\fR as a username.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/printers.conf\fR\fR
+.ad
+.RS 24n
+.rt
+System printer configuration database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.printers\fR\fR
+.ad
+.RS 24n
+.rt
+User-configurable printer database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBou=printers\fR\fR
+.ad
+.RS 24n
+.rt
+LDAP version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.conf.byname\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.org_dir\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS+\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityObsolete
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlp\fR(1), \fBlpq\fR(1B), \fBlpr\fR(1B), \fBlprm\fR(1B), \fBlpstat\fR(1),
+\fBlpadmin\fR(1M), \fBnsswitch.conf\fR(4), \fBprinters\fR(4),
+\fBprinters.conf\fR(4), \fBattributes\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+URI-style and POSIX-style destination names (\fIserver\fR:\fIdestination\fR)
+are treated as print requests if \fIdestination\fR has the same format as an
+\fBLP-style\fR \fIrequest-ID\fR. See \fBstandards\fR(5).
+.sp
+.LP
+Some print servers send cancelation notification to job owners when their print
+jobs have been cancelled. This notification usually comes in the form of an
+email message. Cancelation notices cannot be disabled on a Solaris server.
+.sp
+.LP
+When IPP is in use, the user is prompted for a passphsrase if the remote print
+service is configured to require authentication.
diff --git a/usr/src/man/man1/cat.1 b/usr/src/man/man1/cat.1
new file mode 100644
index 0000000000..c374aa9108
--- /dev/null
+++ b/usr/src/man/man1/cat.1
@@ -0,0 +1,531 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c)
+.\" 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cat 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+cat \- concatenate and display files
+.SH SYNOPSIS
+.SS "\fB/usr/bin/cat\fR"
+.LP
+.nf
+\fB/usr/bin/cat\fR [\fB-nbsuvet\fR] [\fIfile\fR...]
+.fi
+
+.SS "\fBksh93\fR"
+.LP
+.nf
+\fBcat\fR [\fB-bdenstuvABDEST\fR] [\fIfile\fR...]
+.fi
+
+.SH DESCRIPTION
+.SS "\fB/usr/bin/cat\fR"
+.sp
+.LP
+The \fBcat\fR utility reads each \fIfile\fR in sequence and writes it on the
+standard output. Thus:
+.sp
+.in +2
+.nf
+example% \fBcat file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints \fIfile\fR on your terminal, and:
+.sp
+.in +2
+.nf
+example% \fBcat file1 file2 >file3\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+concatenates \fIfile1\fR and \fIfile2\fR, and writes the results in
+\fIfile3\fR. If no input file is given, \fBcat\fR reads from the standard input
+file.
+.SS "\fBksh93\fR"
+.sp
+.LP
+The \fBcat\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBcat\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/cat\fR or
+\fB/usr/bin/cat\fR executable. \fBcat\fR copies each file in sequence to the
+standard output. If no file is specified, or if the file is \fB-\fR, \fBcat\fR
+copies from standard input starting at the current location.
+.SH OPTIONS
+.SS "\fB/usr/bin/cat\fR"
+.sp
+.LP
+The following options are supported by \fB/usr/bin/cat\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Number the lines, as \fB-n\fR, but omit the line numbers from blank lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Precede each line output with its line number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+\fBcat\fR is silent about non-existent files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+The output is not buffered.
+.sp
+Buffered output is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Non-printing characters, with the exception of tabs, NEWLINEs and form feeds,
+are printed visibly. ASCII control characters (octal \fB000\fR \(mi \fB037\fR)
+are printed as \fB^\fR\fIn,\fR where \fIn\fR is the corresponding ASCII
+character in the range octal 100 \(mi 137 (@, A, B, C, . . ., X, Y, Z, [, \e,
+], ^, and _); the \fBDEL\fR character (octal \fB0177\fR) is printed \fB^?\fR.
+Other non-printable characters are printed as \fBM-\fR\fIx,\fR where \fIx\fR is
+the ASCII character specified by the low-order seven bits.
+.RE
+
+.sp
+.LP
+When used with the \fB-v\fR option, the following options can be used:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+A \fB$\fR character is printed at the end of each line, prior to the NEWLINE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Tabs are printed as \fB^I\fRs and form feeds to be printed as \fB^L\fRs.
+.RE
+
+.sp
+.LP
+The \fB-e\fR and \fB-t\fR options are ignored if the \fB-v\fR option is not
+specified.
+.SS "\fBksh93\fR"
+.sp
+.LP
+\fBksh93\fR \fBcat\fR supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fB--number-nonblank\fR\fR
+.ad
+.RS 25n
+.rt
+Number lines as with \fB-n\fR but omit line numbers from blank lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fB--dos-input\fR\fR
+.ad
+.RS 25n
+.rt
+Open input files in text mode. Removes RETURNs in front of NEWLINEs on some
+systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 25n
+.rt
+Equivalent to \fB-vE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fB--number\fR\fR
+.ad
+.RS 25n
+.rt
+Insert a line number at the beginning of each line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 25n
+.rt
+Equivalent to \fB-S\fR for \fBatt universe\fR and \fB-B\fR otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 25n
+.rt
+Equivalent to \fB-vT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fB--unbuffer\fR\fR
+.ad
+.RS 25n
+.rt
+Do not delay the output by buffering.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fB--show-nonprinting\fR\fR
+.ad
+.RS 25n
+.rt
+Cause non-printing characters (with the exception of TABs, NEWLINEs, and form
+feeds) to be output as printable character sequences. \fBASCII\fR control
+characters are printed as \fB^n\fR, where \fIn\fR is the corresponding
+\fBASCII\fR character in the range octal \fB100\fR-\fB137\fR. The DEL character
+(octal \fB0177\fR) is copied as \fB^?\fR. Other non-printable characters are
+copied as \fBM-\fR\fIx\fR where \fIx\fR is the \fBASCII\fR character specified
+by the low-order seven bits. Multi-byte characters in the current locale are
+treated as printable characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fB--show-all\fR\fR
+.ad
+.RS 25n
+.rt
+Equivalent to \fB-vET\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fB--squeeze-blank\fR\fR
+.ad
+.RS 25n
+.rt
+Replace multiple adjacent NEWLINE characters with one NEWLINE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fB--dos-output\fR\fR
+.ad
+.RS 25n
+.rt
+Open output files in text mode. Insert RETURNs in front of NEWLINEs on some
+systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR \fB--show-ends\fR\fR
+.ad
+.RS 25n
+.rt
+Insert a \fB$\fR before each NEWLINE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fB--silent\fR\fR
+.ad
+.RS 25n
+.rt
+\fBcat\fR is silent about non-existent files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fB--show-blank\fR\fR
+.ad
+.RS 25n
+.rt
+Copies TABs as \fB^I\fR and form feeds as \fB^L\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of an input file. If no \fIfile\fR is specified, the standard input
+is used. If \fIfile\fR is \fB\|\(mi\|\fR, \fBcat\fR reads from the standard
+input at that point in the sequence. \fBcat\fR does not close and reopen
+standard input when it is referenced in this way, but accepts multiple
+occurrences of \fB\|\(mi\|\fR as \fIfile\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcat\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRConcatenating a File
+.sp
+.LP
+The following command writes the contents of the file \fBmyfile\fR to standard
+output:
+
+.sp
+.in +2
+.nf
+example% \fBcat myfile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRConcatenating Two files into One
+.sp
+.LP
+The following command concatenates the files \fBdoc1\fR and \fBdoc2\fR and
+writes the result to \fBdoc.all\fR.
+
+.sp
+.in +2
+.nf
+example% \fBcat doc1 doc2 > doc.all\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRConcatenating Two Arbitrary Pieces of Input with a Single
+Invocation
+.sp
+.LP
+When standard input is a terminal, the following command gets two arbitrary
+pieces of input from the terminal with a single invocation of \fBcat\fR:
+
+.sp
+.in +2
+.nf
+example% \fBcat start - middle - end > file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+when standard input is a terminal, gets two arbitrary pieces of input from the
+terminal with a single invocation of \fBcat\fR.
+
+.sp
+.LP
+If standard input is a regular file,
+
+.sp
+.in +2
+.nf
+example% \fBcat start - middle - end > file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would be equivalent to the following command:
+
+.sp
+.in +2
+.nf
+\fBcat start - middle /dev/null end > file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+because the entire contents of the file would be consumed by \fBcat\fR the
+first time \fB\|\(mi\|\fR was used as a \fIfile\fR operand and an end-of-file
+condition would be detected immediately when \fB\|\(mi\|\fRwas referenced the
+second time.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcat\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input files were output successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "\fB/usr/bin/cat\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "\fBksh93\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBtouch\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Redirecting the output of \fBcat\fR onto one of the files being read causes the
+loss of the data originally in the file being read. For example,
+.sp
+.in +2
+.nf
+example% \fBcat filename1 filename2 > filename1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+causes the original data in \fBfilename1\fR to be lost.
diff --git a/usr/src/man/man1/cd.1 b/usr/src/man/man1/cd.1
new file mode 100644
index 0000000000..59236a8de6
--- /dev/null
+++ b/usr/src/man/man1/cd.1
@@ -0,0 +1,379 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cd 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+cd, chdir, pushd, popd, dirs \- change working directory
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/cd\fR [\fIdirectory\fR]
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBcd\fR [\fIargument\fR]
+.fi
+
+.LP
+.nf
+\fBchdir\fR [\fIargument\fR]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBcd\fR [\fIdir\fR]
+.fi
+
+.LP
+.nf
+\fBchdir\fR [\fIdir\fR]
+.fi
+
+.LP
+.nf
+\fBpushd\fR [\fB+\fR\fIn\fR | \fIdir\fR]
+.fi
+
+.LP
+.nf
+\fBpopd\fR [\fB+\fR\fIn\fR]
+.fi
+
+.LP
+.nf
+\fBdirs\fR [\fB-l\fR]
+.fi
+
+.SS "ksh, ksh93"
+.LP
+.nf
+\fBcd\fR [\fB-L\fR] [\fB-P\fR] [\fIarg\fR]
+.fi
+
+.LP
+.nf
+\fBcd\fR \fIold\fR \fInew\fR
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/cd"
+.sp
+.LP
+The \fB/usr/bin/cd\fR utility changes the current directory in the context of
+the \fBcd\fR utility only. This is in contrast to the version built into the
+shell. \fB/usr/bin/cd\fR has no effect on the invoking process but can be used
+to determine whether or not a given directory can be set as the current
+directory.
+.SS "sh"
+.sp
+.LP
+The Bourne shell built-in \fBcd\fR changes the current directory to
+\fIargument\fR. The shell parameter \fBHOME\fR is the default \fIargument\fR.
+The shell parameter \fBCDPATH\fR defines the search path for the directory
+containing \fIargument\fR. Alternative directory names are separated by a colon
+(\fB:\fR). The default path is \fB<null>\fR (specifying the current directory).
+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 \fIargument\fR begins with `\fB/\fR', `\fB\&.\fR', or
+`\fB\&.\|.\fR', the search path is not used. Otherwise, each directory in the
+path is searched for \fIargument\fR. \fBcd\fR must have execute (search)
+permission in \fIargument\fR. Because a new process is created to execute each
+command, \fBcd\fR would be ineffective if it were written as a normal command;
+therefore, it is recognized by and is internal to the shell. (See \fBpwd\fR(1),
+\fBsh\fR(1), and \fBchdir\fR(2)).
+.sp
+.LP
+\fBchdir\fR is just another way to call \fBcd\fR.
+.SS "csh"
+.sp
+.LP
+If \fIdir\fR is not specified, the C shell built-in \fBcd\fR uses the value of
+shell parameter \fBHOME\fR as the new working directory. If \fIdir\fR specifies
+a complete path starting with `\fB/\fR', `\fB\&.\fR', or `\fB\&.\|.\fR',
+\fIdir\fR becomes the new working directory. If neither case applies, \fBcd\fR
+tries to find the designated directory relative to one of the paths specified
+by the \fBCDPATH\fR shell variable. \fBCDPATH\fR has the same syntax as, and
+similar semantics to, the \fBPATH\fR shell variable. \fBcd\fR must have execute
+(search) permission in \fIdir\fR. Because a new process is created to execute
+each command, \fBcd\fR would be ineffective if it were written as a normal
+command; therefore, it is recognized by and is internal to the C-shell. (See
+\fBpwd\fR(1), \fBsh\fR(1), and \fBchdir\fR(2)).
+.sp
+.LP
+\fBchdir\fR changes the shell's working directory to directory \fIdir\fR. If no
+argument is given, change to the home directory of the user. If \fIdir\fR is a
+relative pathname not found in the current directory, check for it in those
+directories listed in the \fBcdpath\fR variable. If \fIdir\fR is the name of a
+shell variable whose value starts with a \fB/\fR, change to the directory named
+by that value.
+.sp
+.LP
+\fBpushd\fR pushes a directory onto the directory stack. With no arguments,
+exchange the top two elements.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIn\fR\fR
+.ad
+.RS 7n
+.rt
+Rotate the \fIn\fR'th entry to the top of the stack and \fBcd\fR to it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdir\fR\fR
+.ad
+.RS 7n
+.rt
+Push the current working directory onto the stack and change to \fIdir\fR.
+.RE
+
+.sp
+.LP
+\fBpopd\fR pops the directory stack and \fBcd\fR to the new top directory. The
+elements of the directory stack are numbered from 0 starting at the top.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+Discard the \fIn\fR'th entry in the stack.
+.RE
+
+.sp
+.LP
+\fBdirs\fR prints the directory stack, most recent to the left; the first
+directory shown is the current directory. With the \fB-l\fR argument, produce
+an unabbreviated printout; use of the \fB~\fR notation is suppressed.
+.SS "ksh, ksh93"
+.sp
+.LP
+The Korn shell built-in \fBcd\fR command can be in either of two forms. In the
+first form it changes the current directory to \fIarg\fR. If \fIarg\fR is
+\fB\(mi\fR the directory is changed to the previous directory. The shell
+variable \fBHOME\fR is the default \fIarg\fR. The environment variable
+\fBPWD\fR is set to the current directory. If the \fBPWD\fR is changed, the
+\fBOLDPWD\fR environment variable shall also be changed to the value of the old
+working directory, that is, the current working directory immediately prior to
+the call to change directory (\fBcd\fR). The shell variable \fBCDPATH\fR
+defines the search path for the directory containing \fIarg\fR. Alternative
+directory names are separated by a colon (\fB:\fR). The default path is
+\fBnull\fR (specifying the current directory). 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
+\fIarg\fR begins with a `\fB/\fR', `\fB\&.\fR', or `\fB\&.\|.\fR', then the
+search path is not used. Otherwise, each directory in the path is searched for
+\fIarg\fR. If unsuccessful, \fBcd\fR attempts to change directories to the
+pathname formed by the concatenation of the value of PWD, a slash character,
+and arg.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Handles the operation dot-dot (\fB\&..\fR) logically. Symbolic link components
+are \fBnot\fR resolved before dot-dot components are processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 6n
+.rt
+Handles the operand dot-dot physically. Symbolic link components \fBare\fR
+resolved before dot-dot components are processed.
+.RE
+
+.sp
+.LP
+If both \fB-L\fR and \fB-P\fR options are specified, the last option to be
+invoked is used and the other is ignored. If neither \fB-L\fR nor \fB-P\fR is
+specified, the operand is handled dot-dot logically.
+.sp
+.LP
+The second form of \fBcd\fR substitutes the string \fInew\fR for the string
+\fIold\fR in the current directory name, \fBPWD\fR and tries to change to this
+new directory.
+.sp
+.LP
+The \fBcd\fR command cannot be executed by \fBrksh\fR. Because a new process is
+created to execute each command, \fBcd\fR would be ineffective if it were
+written as a normal command; therefore, it is recognized by and is internal to
+the Korn shell. (See \fBpwd\fR(1), \fBsh\fR(1), and \fBchdir\fR(2)).
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdirectory\fR\fR
+.ad
+.RS 13n
+.rt
+An absolute or relative pathname of the directory that becomes the new working
+directory. The interpretation of a relative pathname by \fBcd\fR depends on the
+\fBCDPATH\fR environment variable.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+If a non-empty directory name from \fBCDPATH\fR is used, an absolute pathname
+of the new working directory is written to the standard output as follows:
+.sp
+.LP
+\fB"%s\en"\fR, <\fInew directory\fR>
+.sp
+.LP
+Otherwise, there is no output.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcd\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCDPATH\fR\fR
+.ad
+.RS 10n
+.rt
+A colon-separated list of pathnames that refer to directories. If the
+\fIdirectory\fR operand does not begin with a slash \fB(\fR \fB/\fR \fB)\fR
+character, and the first component is not dot or dot-dot, \fBcd\fR searches for
+\fIdirectory\fR relative to each directory named in the \fBCDPATH\fR variable,
+in the order listed. The new working directory sets to the first matching
+directory found. An empty string in place of a directory pathname represents
+the current directory. If \fBCDPATH\fR is not set, it is treated as if it were
+an empty string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.RS 10n
+.rt
+The name of the home directory, used when no \fIdirectory\fR operand is
+specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOLDPWD\fR\fR
+.ad
+.RS 10n
+.rt
+A pathname of the previous working directory, used by \fBcd-\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPWD\fR\fR
+.ad
+.RS 10n
+.rt
+A pathname of the current working directory, set by \fBcd\fR after it has
+changed to that directory.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned by \fBcd\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The directory was successfully changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "csh, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBpwd\fR(1), \fBsh\fR(1),
+\fBchdir\fR(2), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/cdrw.1 b/usr/src/man/man1/cdrw.1
new file mode 100644
index 0000000000..b6767938b5
--- /dev/null
+++ b/usr/src/man/man1/cdrw.1
@@ -0,0 +1,706 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All rights reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cdrw 1 "10 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+cdrw \- CD read and write
+.SH SYNOPSIS
+.LP
+.nf
+\fBcdrw\fR \fB-i\fR [\fB-vSCO\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fIimage-file\fR]
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-a\fR [\fB-vSCO\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fB-T\fR \fIaudio-type\fR] \fIaudio-file1\fR
+ [\fIaudio-file2\fR]...
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-x\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] [\fB-T\fR \fIaudio-type\fR] \fItrack-number\fR \fIout-file\fR
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-c\fR [\fB-vSC\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fB-m\fR \fItmp-dir\fR]
+ [\fB-s\fR \fIsrc-device\fR]
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-b\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] all | session | fast
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-L\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR]
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-M\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR]
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-l\fR [\fB-v\fR]
+.fi
+
+.LP
+.nf
+\fBcdrw\fR \fB-h\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcdrw\fR command provides the ability to create data and audio CDs. This
+command also provides the ability to extract audio tracks from an audio CD and
+to create data DVDs. The CD or DVD device must be MMC-compliant to create a CD
+or DVD with the \fBcdrw\fR command.
+.sp
+.LP
+\fBcdrw\fR searches for a CD or DVD writer connected to the system, unless you
+specify a device with the \fB-d\fR option. If \fBcdrw\fR finds a single such
+device, it uses that device as the default CD or DVD writer for the command.
+.sp
+.LP
+When more than one CD or DVD writer is connected to the system, use the
+\fB-d\fR option to indicate which device is desired. The device name can be
+specified in one of the following ways: /dev/rdsk/cNtNdNsN, cNtNdNsN, cNtNdN,
+or a name used by volume manager, such as \fBcdrom\fR or \fBcdrom1\fR. Using
+the \fB-l\fR option provides a list of CD or DVD writers.
+.sp
+.LP
+For instructions on adding a USB-mass-storage-class-compliant CD-RW or DVD-RW
+device to your system, see \fBscsa2usb\fR(7D).
+.SS "Creating Data CDs"
+.sp
+.LP
+When creating data CDs, \fBcdrw\fR uses the Track-At-Once mode of writing. Use
+the \fB-i\fR option to specify a file that contains the data to write on CD
+media. If you don't specify this option, \fBcdrw\fR reads data from standard
+input.
+.sp
+.LP
+In either case, the data is typically prepared by using the \fBmkisofs\fR
+command to convert the file and file information into the High Sierra format
+used on CDs. See the examples that include use of this command.
+.SS "Creating Data DVDs"
+.sp
+.LP
+\fBcdrw\fR can create single-session data DVDs on DVD+RW or DVD-RW devices
+using images generated from \fBmkisofs\fR. These disks can be mounted as HSFS
+file systems. When making data DVDs, \fBcdrw\fR uses Disk-At-Once (DAO) mode of
+writing, which closes the media when writing is completed and prevents any
+further sessions from being added. The image should be prepared in advance when
+writing an image to the DVD media since DAO mode requires that the size of the
+image be known in advance.
+.SS "Creating Audio CDs"
+.sp
+.LP
+Use the \fB-a\fR option to create an audio CD. Single or multiple audio files
+can be specified with this option. All of the audio files should be in a
+supported audio format. Currently approved formats are:
+.sp
+.ne 2
+.mk
+.na
+\fBsun\fR
+.ad
+.RS 7n
+.rt
+Sun .au files with data in Red Book CDDA form
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwav\fR
+.ad
+.RS 7n
+.rt
+RIFF (.wav) files with data in Red Book CDDA form
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBcda\fR
+.ad
+.RS 7n
+.rt
+\&.cda files having raw CD audio data (that is, 16 bit PCM stereo at 44.1 KHz
+sample rate in little-endian byte order)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBaur\fR
+.ad
+.RS 7n
+.rt
+\&.aur files having raw CD data in big-endian byte order
+.RE
+
+.sp
+.LP
+If no audio format is specified, \fBcdrw\fR tries to identify the audio file
+format based on the file extension. The case of the characters in the extension
+is ignored. If a format is specified using the \fB-T\fR option, it is assumed
+to be the audio file type for all the files specified. Also, using the \fB-c\fR
+option closes the session after writing the audio tracks. Therefore, the tracks
+to be written should be specified in a single command line.
+.SS "Extracting Audio"
+.sp
+.LP
+\fBcdrw\fR can also be used for extracting audio data from an audio CD with the
+\fB-x\fR option. The CD should have tracks in Red Book CDDA form. By default,
+the output format is based on the file extension. A user can specify a
+\fBsun\fR, \fBwav\fR, \fBcda\fR, or \fBaur\fR output format with the \fB-T\fR
+option.
+.SS "Copying CDs"
+.sp
+.LP
+\fBcdrw\fR can be used to copy single session data CD-ROMs and Red Book audio
+CDs. When copying a CD, \fBcdrw\fR looks for a specified source device. If no
+source device is specified when using the \fB-c\fR option, the current CD
+writer is assumed to be the source. \fBcdrw\fR extracts the track or tracks
+into a temporary file and looks for a blank writable CD-R/RW media in the
+current CD writer. If no media is found, insert a blank writable CD media in
+the current CD writer. If the default temporary directory does not have enough
+space, an alternate directory can be specified by using the \fB-m\fR option.
+.SS "Erasing CD-RW or DVD-RW Media"
+.sp
+.LP
+Users have to erase the CD-RW media before it can be rewritten. With the
+\fB-b\fR option, the following flavors of erasing are currently supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsession\fR\fR
+.ad
+.RS 11n
+.rt
+Erases the last session.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfast\fR\fR
+.ad
+.RS 11n
+.rt
+Minimally erases the media.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBall\fR\fR
+.ad
+.RS 11n
+.rt
+Erases the entire media.
+.RE
+
+.sp
+.LP
+If the session erasing type is used, \fBcdrw\fR erases the last session. If
+there is only one session recorded on the CD-RW (for example, a data or audio
+CD-RW created by this tool), then session erasing only erases the portion that
+is recorded, leaving behind a blank disk. This is faster than erasing the
+entire media. For DVD media, using the \fB-b session\fR erases the whole media.
+.sp
+.LP
+The \fBfast\fR erasing type minimally erases the entire media by removing the
+\fBPMA\fR and \fBTOC\fR of the first session. It does not erase the user data
+and subsequent tracks on the media, but the media is treated as if it were a
+blank disk. If a complete erase is of the media is necessary, use the \fBall\fR
+option.
+.sp
+.LP
+The \fBall\fR erasing type should be used if it is a multisession disk, the
+last session is not closed, or disk status is unknown, and you want to erase
+the disk. With this type of erasing, \fBcdrw\fR erases the entire disk.
+.sp
+.LP
+DVD+RW media does not support erasing. To re-use DVD+RW media, simply write a
+new image onto the media. \fBcdrw\fR formats and overwrites the existing media
+automatically.
+.SS "Checking device-list or media-status"
+.sp
+.LP
+You can list a system's CD or DVD writers by using the \fB-l\fR option. Also,
+for a particular media, you can get the blanking status and table of contents
+by using the \fB-M\fR option. The \fB-M\fR option also prints information about
+the last session's start address and the next writable address. This
+information, along with the \fB-O\fR option, can be used to create multisession
+CDs. Refer to the \fBmkisofs\fR(8) man page,
+(\fB/usr/share/man/man8/mkisofs.8\fR), in the SUNWfsman package for more
+information.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Creates an audio disk. At least one \fIaudio-file\fR name must be specified. A
+CD can not have more than 99 audio tracks, so no more than 99 audio files can
+be specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Blanks CD-RW or DVD-RW media. The type of erasing must be specified by the
+\fBall\fR, \fBfast\fR, or \fBsession\fR argument. DVD+RW media does not support
+blanking, but can be rewritten without the need for blanking.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Copies a CD. If no other argument is specified, the default CD writing device
+is assumed to be the source device as well. In this case, the copy operation
+reads the source media into a temporary directory and prompts you to place a
+blank media into the drive for the copy operation to proceed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 6n
+.rt
+This option is obsolete.
+.sp
+This option used to cause\fBcdrw\fR to query the drive to determine media
+capacity. This is now the default behavior.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies the CD or DVD writing device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Help. Prints usage message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies the image file for creating data CDs or DVDs. The file size should be
+less than what can be written on the media. Also, consider having the file
+locally available instead of having the file on an NFS-mounted file system. The
+CD writing process expects data to be available continuously without
+interruptions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Lists all the CD or DVD writers available on the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Closes the disk. If the media was left in an open state after the last write
+operation, it is closed to prevent any further writing. This operation can only
+be done on re-writable CD-RW media.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Uses an alternate temporary directory instead of the default temporary
+directory for storing track data while copying a CD or DVD. An alternate
+temporary directory might be required because the amount of data on a CD can be
+huge. For example, the amount of data can be as much as 800 Mbytes for an 80
+minute audio CD and 4.7 Gbytes for a DVD. The default temporary directory might
+not have that much space available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.RS 6n
+.rt
+Reports media status. \fBcdrw\fR reports if the media is blank or not, its
+table of contents, the last session's start address, and the next writable
+address if the disk is open. DVD+RW does not support erasing and always has
+some content on the media.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR\fR
+.ad
+.RS 6n
+.rt
+Keeps the disk open. \fBcdrw\fR closes the session, but it keeps the disk open
+so that another session can be added later on to create a multisession disk.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the CD writing speed. For example, \fB-p\fR \fB4\fR sets the speed to 4X.
+If this option is not specified, \fBcdrw\fR uses the default speed of the CD
+writer. If this option is specified, \fBcdrw\fR tries to set the drive write
+speed to this value, but there is no guarantee of the actual speed that is used
+by the drive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies the source device for copying a CD or DVD.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Simulation mode. In this mode, \fBcdrw\fR operates with the drive laser turned
+off, so nothing is written to the media. Use this option to verify if the
+system can provide data at a rate good enough for CD writing.
+.sp
+CD-R, CD-RW (not MRW formatted), DVD-R, and DVD-RW media support simulation
+mode (\fB-S\fR). DVD-RAM, DVD+R, DVD+RW, any MRW-formatted media, and some
+others do not support simulation mode (\fB-S\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 6n
+.rt
+Audio format to use for extracting audio files or for reading audio files for
+audio CD creation. The \fIaudio-type\fR can be \fBsun\fR, \fBwav\fR, \fBcda\fR,
+or \fBaur\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Verbose mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Extracts audio data from an audio track.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating a Data CD or DVD
+.sp
+.in +2
+.nf
+example% \fBcdrw -i /local/iso_image\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCreating a CD or DVD from a Directory
+.sp
+.LP
+This example shows how to create a CD or DVD from the directory tree
+\fB/home/foo\fR.
+
+.sp
+.in +2
+.nf
+example% \fBmkisofs -r /home/foo 2>/dev/null | cdrw -i -p 1\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRExtracting an Audio Track Number
+.sp
+.LP
+This example shows how to extract audio track number \fB1\fR to
+\fB/home/foo/song1.wav\fR.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -x -T wav 1 /home/foo/song1.wav\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRUsing \fBwav\fR Files
+.sp
+.LP
+This example shows how to create an audio CD from \fBwav\fR files on disk.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -a song1.wav song2.wav song3.wav song4.wav\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRErasing CD-RW or DVD-RW Media
+.sp
+.LP
+This example shows how to erase rewritable media.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -b all\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRCreating a Data CD or DVD with Multiple Drives
+.sp
+.LP
+This example shows how to create a data CD or DVD on a system with multiple CD,
+DVD-R, or DVD-RW drives.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -d c1t6d0s2 -i /home/foo/iso-image\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRChecking Data Delivery Rate
+.sp
+.LP
+This example shows how to verify that the system can provide data to a CD-RW or
+a DVD drive at a rate sufficient for the write operation.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -S -i /home/foo/iso-image\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRRunning at a Higher Priority
+.sp
+.LP
+This example shows how to run \fBcdrw\fR at a higher priority (for root user
+only).
+
+.sp
+.in +2
+.nf
+example# \fBpriocntl -e -p 60 cdrw -i /home/foo/iso-image\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRCreating a Multi-session Disk
+.sp
+.LP
+This examples shows how to create the first session image by using
+\fBmkisofs\fR and recording it onto the disk without closing the disk.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -O -i /home/foo/iso-image\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Additional sessions can be added to an open disk by creating an image with
+\fBmkisofs\fR using the session start and next writable address reported by
+\fBcdrw\fR.
+
+.sp
+.in +2
+.nf
+example% \fBcdrw -M\fR
+
+Track No. |Type |Start address
+----------+--------+-------------
+ 1 |Data | 0
+Leadout |Data | 166564
+
+Last session start address: 162140
+Next writable address: 173464
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+example% \fBmkisofs -o /tmp/image2 -r -C 0,173464 -M \e
+ /dev/rdsk/c0t2d0s2 /home/foo\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaudioconvert\fR(1), \fBpriocntl\fR(1), \fBpolicy.conf\fR(4),
+\fBattributes\fR(5), \fBrbac\fR(5), \fBscsa2usb\fR(7D), \fBsd\fR(7D)
+.sp
+.LP
+\fBmkisofs\fR(8), (\fB/usr/share/man/man8/mkisofs.8\fR), in the SUNWfsman
+package
+.sp
+.LP
+\fISystem Administration Guide: Devices and File Systems\fR
+.SH NOTES
+.sp
+.LP
+The CD writing process requires data to be supplied at a constant rate to the
+drive. Keep I/O activity to a minimum and shut down any related I/O
+applications while writing CDs.
+.sp
+.LP
+When making copies or extracting audio tracks, use an MMC compliant source
+CD-ROM drive. The CD writer can be used for this purpose.
+.sp
+.LP
+Before writing a CD, ensure that the media is blank by using the \fB-M\fR
+option. You can use the \fB-S\fR simulation mode to test the system to make
+sure it can provide data at the required rate. \fBcdrw\fR turns on buffer
+underrun protection for drives that support it and recovers from most stalls.
+If the system is not able to provide data at a constant rate or frequent
+stalling occurs, you can lower the speed by using the \fB-p\fR option. You can
+also try to run \fBcdrw\fR at a higher priority by using the \fBpriocntl\fR(1)
+command.
+.sp
+.LP
+If you know that the CD-R/RW drive can operate at different write speeds, use
+the \fB-p\fR option. Some commercially available drives handle the drive speed
+setting command differently, so use this option judiciously.
+.sp
+.LP
+The \fBcdrw\fR command uses \fBrbac\fR(5) to control user access to the
+devices. By default, \fBcdrw\fR is accessible to all users but can be
+restricted to individual users. Refer to the \fISystem Administration Guide:
+Devices and File Systems\fR for more information.
+.sp
+.LP
+To burn CDs as a non-root user \fBhal\fR must be enabled and the user must be
+on the console. \fBhal\fR, that is the \fBsvc:/system/hal\fR SMF service, is
+enabled by default, therefore, typically this requires no special action.
+.sp
+.LP
+The user must be logged onto the console. \fB/dev/console\fR is also correct.
+Previously, users could log in remotely, for example, by using \fBtelnet\fR or
+\fBssh\fR, and be able to burn CDs. This would work unless the administrator
+had changed the default configuration to deny \fBsolaris.device.cdrw\fR
+authorization. See \fBpolicy.conf\fR(4).
diff --git a/usr/src/man/man1/checknr.1 b/usr/src/man/man1/checknr.1
new file mode 100644
index 0000000000..561415c1f8
--- /dev/null
+++ b/usr/src/man/man1/checknr.1
@@ -0,0 +1,115 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH checknr 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+checknr \- check nroff and troff input files; report possible errors
+.SH SYNOPSIS
+.LP
+.nf
+\fBchecknr\fR [\fB-fs\fR] [\fB-a\fR . \fIx1\fR . \fIy1\fR . \fIx2\fR . \fIy2\fR ... .\fIxn\fR .\fIyn\fR]
+ [\fB-c\fR . \fIx1\fR . \fIx2\fR . \fIx3\fR ... .\fIxn\fR] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBchecknr\fR checks a list of \fBnroff\fR(1) or \fBtroff\fR(1) input files for
+certain kinds of errors involving mismatched opening and closing delimiters and
+unknown commands. If no files are specified, \fBchecknr\fR checks the standard
+input. Delimiters checked are:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Font changes using \fB\ef\fR\fIx \fR.\|.\|. \fB\efP\fR\&.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Size changes using \fB\es\fR\fIx \fR.\|.\|. \fB\es0\fR\&.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Macros that come in open .\|.\|. close forms, for example, the \fB\&.TS\fR and
+\fB\&.TE\fR macros which must always come in pairs.
+.RE
+.sp
+.LP
+\fBchecknr\fR knows about the \fBms\fR(5) and \fBme\fR(5) macro packages.
+.sp
+.LP
+\fBchecknr\fR is intended to be used on documents that are prepared with
+\fBchecknr\fR in mind. It expects a certain document writing style for
+\fB\ef\fR and \fB\es\fR commands, in that each \fB\ef\fR\fIx\fR must be
+terminated with \fB\efP\fR and each \fB\es\fR\fIx\fR must be terminated with
+\fB\es0\fR\&. While it will work to directly go into the next font or
+explicitly specify the original font or point size, and many existing documents
+actually do this, such a practice will produce complaints from \fBchecknr\fR.
+Since it is probably better to use the \fB\efP\fR and \fB\es0\fR forms anyway,
+you should think of this as a contribution to your document preparation style.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 24n
+.rt
+Ignore \fB\ef\fR font changes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 24n
+.rt
+Ignore \fB\es\fR size changes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-a\fR\fB .\fR\fIx1 \fR\fB\&.\fR\fIy1.\|.\|.\fR \fR
+.ad
+.RS 24n
+.rt
+Add pairs of macros to the list. The pairs of macros are assumed to be those
+(such as \fB\&.DS\fR and \fB\&.DE\fR) that should be checked for balance. The
+\fB-a\fR option must be followed by groups of six characters, each group
+defining a pair of macros. The six characters are a period, the first macro
+name, another period, and the second macro name. For example, to define a pair
+\fB\&.BS\fR and \fB\&.ES\fR, use `\fB-a.BS.ES\fR'
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-c\fR\fB .\fR\fIx1\|.\|.\|.\fR \fR
+.ad
+.RS 24n
+.rt
+Define commands which \fBchecknr\fR would otherwise complain about as
+undefined.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBeqn\fR(1), \fBnroff\fR(1), \fBtroff\fR(1), \fBattributes\fR(5), \fBme\fR(5),
+\fBms\fR(5)
+.SH BUGS
+.sp
+.LP
+There is no way to define a one-character macro name using the \fB-a\fR option.
diff --git a/usr/src/man/man1/chgrp.1 b/usr/src/man/man1/chgrp.1
new file mode 100644
index 0000000000..3d2ead95f5
--- /dev/null
+++ b/usr/src/man/man1/chgrp.1
@@ -0,0 +1,348 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH chgrp 1 "11 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+chgrp \- change file group ownership
+.SH SYNOPSIS
+.LP
+.nf
+\fBchgrp\fR [\fB-fhR\fR] \fIgroup\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBchgrp\fR \fB-s\fR [\fB-fhR\fR] \fIgroupsid\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBchgrp\fR \fB-R\fR [f] [\fB-H\fR | \fB-L\fR | \fB-P\fR] \fIgroup\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBchgrp\fR \fB-s\fR \fB-R\fR [f] [\fB-H\fR | \fB-L\fR | \fB-P\fR] \fIgroupsid\fR \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBchgrp\fR utility will set the group ID of the file named by each
+\fIfile\fR operand to the group ID specified by the \fIgroup\fR operand.
+.sp
+.LP
+For each \fIfile\fR operand, it will perform actions equivalent to the
+\fBchown\fR(2) function, called with the following arguments:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fIfile\fR operand will be used as the \fIpath\fR argument.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The user ID of the file will be used as the \fIowner\fR argument.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The specified group ID will be used as the \fIgroup\fR argument.
+.RE
+.sp
+.LP
+Unless \fBchgrp\fR is invoked by a process with appropriate privileges, the
+set-user-ID and set-group-ID bits of a regular file will be cleared upon
+successful completion; the set-user-ID and set-group-ID bits of other file
+types may be cleared.
+.sp
+.LP
+The operating system has a configuration option \fB_POSIX_CHOWN_RESTRICTED\fR,
+to restrict ownership changes. When this option is in effect, the owner of the
+file may change the group of the file only to a group to which the owner
+belongs. Only the super-user can arbitrarily change owner IDs, whether or not
+this option is in effect. To set this configuration option, include the
+following line in \fB/etc/system\fR:
+.sp
+.in +2
+.nf
+set rstchown = 1
+.fi
+.in -2
+
+.sp
+.LP
+To disable this option, include the following line in \fB/etc/system\fR:
+.sp
+.in +2
+.nf
+set rstchown = 0
+.fi
+.in -2
+
+.sp
+.LP
+\fB_POSIX_CHOWN_RESTRICTED\fR is enabled by default. See \fBsystem\fR(4) and
+\fBfpathconf\fR(2).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported.
+.SS "/usr/bin/chgrp and /usr/xpg4/bin/chgrp"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Force. Does not report errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+If the file is a symbolic link, this option changes the group of the symbolic
+link. Without this option, the group of the file referenced by the symbolic
+link is changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+If the file specified on the command line is a symbolic link referencing a file
+of type directory, this option changes the group of the directory referenced by
+the symbolic link and all the files in the file hierarchy below it. If a
+symbolic link is encountered when traversing a file hierarchy, the group of the
+target file is changed, but no recursion takes place.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+If the file is a symbolic link, this option changes the group of the file
+referenced by the symbolic link. If the file specified on the command line, or
+encountered during the traversal of the file hierarchy, is a symbolic link
+referencing a file of type directory, then this option changes the group of the
+directory referenced by the symbolic link and all files in the file hierarchy
+below it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 6n
+.rt
+If the file specified on the command line or encountered during the traversal
+of a file hierarchy is a symbolic link, this option changes the group of the
+symbolic link. This option does not follow the symbolic link to any other part
+of the file hierarchy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+The specified group is Windows SID. This option requires a file system that
+supports storing SIDs, such as ZFS.
+.RE
+
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fR, \fB-L\fR,
+or \fB-P\fR is not considered an error. The last option specified determines
+the behavior of \fBchgrp\fR.
+.SS "/usr/bin/chgrp"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Recursive. \fBchgrp\fR descends through the directory, and any subdirectories,
+setting the specified group \fBID\fR as it proceeds. When a symbolic link is
+encountered, the group of the target file is changed, unless the \fB-h\fR or
+\fB-P\fR option is specified. However, no recursion takes place, unless the
+\fB-H\fR or \fB-L\fR option is specified.
+.RE
+
+.SS "/usr/xpg4/bin/chgrp"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Recursive. \fBchgrp\fR descends through the directory, and any subdirectories,
+setting the specified group \fBID\fR as it proceeds. When a symbolic link is
+encountered, the group of the target file is changed, unless the \fB-h\fR or
+\fB-P\fR option is specified. Unless the \fB-H\fR, \fB-L\fR, or \fB-P\fR option
+is specified, the \fB-L\fR option is used as the default mode.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIgroup\fR\fR
+.ad
+.RS 9n
+.rt
+A group name from the group database or a numeric group ID. Either specifies a
+group ID to be given to each file named by one of the \fIfile\fR operands. If a
+numeric \fIgroup\fR operand exists in the group database as a group name, the
+group ID number associated with that group name is used as the group ID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 9n
+.rt
+A path name of a file whose group ID is to be modified.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBchgrp\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBchgrp\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The utility executed successfully and all requested changes were made.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 14n
+.rt
+group file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/chgrp"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled. See NOTES.
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "/usr/xpg4/bin/chgrp"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled. See NOTES.
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBchown\fR(1), \fBid\fR(1M), \fBchown\fR(2),
+\fBfpathconf\fR(2), \fBgroup\fR(4), \fBpasswd\fR(4), \fBsystem\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBchgrp\fR is CSI-enabled except for the \fIgroup\fR name.
diff --git a/usr/src/man/man1/chkey.1 b/usr/src/man/man1/chkey.1
new file mode 100644
index 0000000000..96bd92b118
--- /dev/null
+++ b/usr/src/man/man1/chkey.1
@@ -0,0 +1,166 @@
+'\" te
+.\" Copyright (C) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH chkey 1 "29 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+chkey \- change user's secure RPC key pair
+.SH SYNOPSIS
+.LP
+.nf
+\fBchkey\fR [\fB-p\fR] [\fB-s\fR nisplus | nis | files | ldap]
+ [\fB-m\fR \fI<mechanism>\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBchkey\fR is used to change a user's secure \fBRPC\fR public key and secret
+key pair. \fBchkey\fR prompts for the old secure-rpc password and verifies that
+it is correct by decrypting the secret key. If the user has not already used
+\fBkeylogin\fR(1) to decrypt and store the secret key with \fBkeyserv\fR(1M),
+\fBchkey\fR registers the secret key with the local \fBkeyserv\fR(1M) daemon.
+If the secure-rpc password does not match the login password, \fBchkey\fR
+prompts for the login password. \fBchkey\fR uses the login password to encrypt
+the user's secret Diffie-Hellman (192 bit) cryptographic key. \fBchkey\fR can
+also encrypt other Diffie-Hellman keys for authentication mechanisms configured
+using \fBnisauthconf\fR(1M).
+.sp
+.LP
+\fBchkey\fR ensures that the login password and the secure-rpc password(s) are
+kept the same, thus enabling password shadowing. See \fBshadow\fR(4).
+.sp
+.LP
+The key pair can be stored in the \fB/etc/publickey\fR file (see
+\fBpublickey\fR(4)), the \fBNIS\fR \fBpublickey\fR map, or the \fBNIS+\fR
+\fBcred.org_dir\fR table. If a new secret key is generated, it will be
+registered with the local \fBkeyserv\fR(1M) daemon. However, only \fBNIS+\fR
+can store Diffie-Hellman keys other than 192-bits.
+.sp
+.LP
+Keys for specific mechanisms can be changed or reencrypted using the \fB-m\fR
+option followed by the authentication mechanism name. Multiple \fB-m\fR
+options can be used to change one or more keys. However, only mechanisms
+configured using \fBnisauthconf\fR(1M) can be changed with \fBchkey\fR.
+.sp
+.LP
+If the source of the \fBpublickey\fR is not specified with the \fB-s\fR
+option, \fBchkey\fR consults the \fBpublickey\fR entry in the name service
+switch configuration file. See \fBnsswitch.conf\fR(4). If the \fBpublickey\fR
+entry specifies one and only one source, then \fBchkey\fR will change the key
+in the specified name service. However, if multiple name services are listed,
+\fBchkey\fR can not decide which source to update and will display an error
+message. The user should specify the source explicitly with the \fB-s\fR
+option.
+.sp
+.LP
+Non root users are not allowed to change their key pair in the \fBfiles\fR
+database.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 18n
+.rt
+Re-encrypt the existing secret key with the user's login password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fBnisplus\fR\fR
+.ad
+.RS 18n
+.rt
+Update the \fBNIS+\fR database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fBnis\fR\fR
+.ad
+.RS 18n
+.rt
+Update the \fBNIS\fR database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fBfiles\fR\fR
+.ad
+.RS 18n
+.rt
+Update the \fBfiles\fR database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fBldap\fR\fR
+.ad
+.RS 18n
+.rt
+Update the LDAP database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI <mechanism>\fR\fR
+.ad
+.RS 18n
+.rt
+Changes or re-encrypt the secret key for the specified mechanism.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nsswitch.conf\fR\fR
+.ad
+.RS 22n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/publickey\fR\fR
+.ad
+.RS 22n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkeylogin\fR(1), \fBkeylogout\fR(1), \fBkeyserv\fR(1M), \fBnewkey\fR(1M),
+\fBnisaddcred\fR(1M), \fBnisauthconf\fR(1M), \fBnsswitch.conf\fR(4),
+\fBpublickey\fR(4), \fBshadow\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+NIS+ might not be supported in future releases of the Solaris operating system.
+Tools to aid the migration from NIS+ to LDAP are available in the current
+Solaris release. For more information, visit
+http://www.sun.com/directory/nisplus/transition.html.
diff --git a/usr/src/man/man1/chmod.1 b/usr/src/man/man1/chmod.1
new file mode 100644
index 0000000000..eee0b053c7
--- /dev/null
+++ b/usr/src/man/man1/chmod.1
@@ -0,0 +1,2824 @@
+'\" te
+.\" Copyright 1989 AT&T.
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH chmod 1 "11 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+chmod \- change the permissions mode of a file
+.SH SYNOPSIS
+.LP
+.nf
+\fBchmod\fR [\fB-fR\fR] \fIabsolute-mode\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBchmod\fR [\fB-fR\fR] \fIsymbolic-mode-list\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBchmod\fR [\fB-fR\fR] \fIacl_operation\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBchmod\fR [\fB-fR\fR] [\fB-@\fR \fInamed_attribute\fR]...\fIattribute_specification_list\fR \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBchmod\fR utility changes or assigns the mode of a file.
+.sp
+.LP
+\fBchmod\fR can also be used to modify Access Control Lists (ACLs) on files and
+directories, and to modify boolean read-write system attributes on regular
+files, directories, and opaque extended attribute files.
+.SS "Absolute Mode"
+.sp
+.LP
+An absolute mode command line has the following format:
+.sp
+.LP
+\fBchmod\fR [\fIoptions\fR] \fIabsolute-mode\fR \fIfile\fR . . .
+.sp
+.LP
+where \fIabsolute-mode\fR is specified using octal numbers \fInnnn\fR defined
+as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 5n
+.rt
+a number from \fB0\fR to \fB7\fR. An absolute mode is constructed from the OR
+of any of the following modes:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4000\fR\fR
+.ad
+.RS 12n
+.rt
+Set user \fBID\fR on execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB20\fR\fI\|#\|\fR\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Set group \fBID\fR on execution if \fI#\fR is \fB7\fR, \fB5\fR, \fB3\fR, or
+\fB1\fR.
+.sp
+Enable mandatory locking if \fI#\fR is \fB6\fR, \fB4\fR, \fB2\fR, or \fB0\fR.
+.sp
+For directories, files are created with BSD semantics for propagation of the
+group ID. With this option, files and subdirectories created in the directory
+inherit the group ID of the directory, rather than of the current process. For
+directories, the set-gid bit can only be set or cleared by using symbolic mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1000\fR\fR
+.ad
+.RS 12n
+.rt
+Turn on sticky bit. See \fBchmod\fR(2).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0400\fR\fR
+.ad
+.RS 12n
+.rt
+Allow read by owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0200\fR\fR
+.ad
+.RS 12n
+.rt
+Allow write by owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0100\fR\fR
+.ad
+.RS 12n
+.rt
+Allow execute (search in directory) by owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0700\fR\fR
+.ad
+.RS 12n
+.rt
+Allow read, write, and execute (search) by owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0040\fR\fR
+.ad
+.RS 12n
+.rt
+Allow read by group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0020\fR\fR
+.ad
+.RS 12n
+.rt
+Allow write by group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0010\fR\fR
+.ad
+.RS 12n
+.rt
+Allow execute (search in directory) by group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0070\fR\fR
+.ad
+.RS 12n
+.rt
+Allow read, write, and execute (search) by group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0004\fR\fR
+.ad
+.RS 12n
+.rt
+Allow read by others.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0002\fR\fR
+.ad
+.RS 12n
+.rt
+Allow write by others.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0001\fR\fR
+.ad
+.RS 12n
+.rt
+Allow execute (search in directory) by others.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0007\fR\fR
+.ad
+.RS 12n
+.rt
+Allow read, write, and execute (search) by others.
+.RE
+
+.RE
+
+.sp
+.LP
+For directories, the \fBsetgid\fR bit cannot be set (or cleared) in absolute
+mode; it must be set (or cleared) in symbolic mode using \fBg+s\fR (or
+\fBg-s\fR).
+.SS "Symbolic Mode"
+.sp
+.LP
+A symbolic mode command line has the following format:
+.sp
+.LP
+\fBchmod\fR [\fIoptions\fR] \fIsymbolic-mode-list\fR \fIfile\fR . . .
+.sp
+.LP
+where \fIsymbolic-mode-list\fR is a comma-separated list (with no intervening
+white space) of symbolic mode expressions of the form:
+.sp
+.LP
+[\fBwho\fR] \fIoperator\fR [\fIpermissions\fR]
+.sp
+.LP
+Operations are performed in the order given. Multiple \fIpermissions\fR letters
+following a single operator cause the corresponding operations to be performed
+simultaneously.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwho\fR\fR
+.ad
+.RS 14n
+.rt
+zero or more of the characters \fBu\fR, \fBg\fR, \fBo\fR, and \fBa\fR
+specifying whose permissions are to be changed or assigned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR\fR
+.ad
+.RS 5n
+.rt
+user's permissions
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 5n
+.rt
+group's permissions
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 5n
+.rt
+others' permissions
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.RS 5n
+.rt
+all permissions (user, group, and other)
+.RE
+
+If \fBwho\fR is omitted, it defaults to \fBa\fR, but the setting of the file
+mode creation mask (see \fBumask\fR in \fBsh\fR(1) or \fBcsh\fR(1) for more
+information) is taken into account. When \fBwho\fR is omitted, \fBchmod\fR does
+not override the restrictions of your user mask.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoperator\fR\fR
+.ad
+.RS 14n
+.rt
+either \fB+\fR, \fB\(mi\fR, or \fB=\fR, signifying how permissions are to be
+changed:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 8n
+.rt
+Add permissions.
+.sp
+If \fIpermissions\fR are omitted, nothing is added.
+.sp
+If \fBwho\fR is omitted, add the file mode bits represented by
+\fIpermissions\fR, \fIexcept\fR for the those with corresponding bits in the
+file mode creation mask.
+.sp
+If \fBwho\fR is present, add the file mode bits represented by the
+\fIpermissions\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 8n
+.rt
+Take away permissions.
+.sp
+If \fIpermissions\fR are omitted, do nothing.
+.sp
+If \fBwho\fR is omitted, clear the file mode bits represented by
+\fIpermissions\fR, \fIexcept\fR for those with corresponding bits in the file
+mode creation mask.
+.sp
+If \fBwho\fR is present, clear the file mode bits represented by
+\fIpermissions\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR\fR
+.ad
+.RS 8n
+.rt
+Assign permissions absolutely.
+.sp
+If \fBwho\fR is omitted, clear all file mode bits; if \fBwho\fR is present,
+clear the file mode bits represented by \fBwho\fR.
+.sp
+If \fIpermissions\fR are omitted, do nothing else.
+.sp
+If \fBwho\fR is omitted, add the file mode bits represented by
+\fIpermissions\fR, \fIexcept\fR for the those with corresponding bits in the
+file mode creation mask.
+.sp
+If \fBwho\fR is present, add the file mode bits represented by
+\fIpermissions\fR.
+.RE
+
+Unlike other symbolic operations, \fB=\fR has an absolute effect in that it
+resets all other bits represented by \fBwho\fR. Omitting \fIpermissions\fR is
+useful only with \fB=\fR to take away all permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpermission\fR\fR
+.ad
+.RS 14n
+.rt
+any compatible combination of the following letters:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 9n
+.rt
+mandatory locking
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 9n
+.rt
+read permission
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 9n
+.rt
+user or group set-ID
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 9n
+.rt
+sticky bit
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fR\fR
+.ad
+.RS 9n
+.rt
+write permission
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 9n
+.rt
+execute permission
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX\fR\fR
+.ad
+.RS 9n
+.rt
+execute permission if the file is a directory or if there is execute permission
+for one of the other user classes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR,\fBg\fR,\fBo\fR\fR
+.ad
+.RS 9n
+.rt
+indicate that \fIpermission\fR is to be taken from the current user, group or
+other mode respectively.
+.RE
+
+Permissions to a file can vary depending on your user identification number
+(UID) or group identification number (GID). Permissions are described in three
+sequences each having three characters:
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+UserGroupOther
+rwxrwxrwx
+.TE
+
+This example (user, group, and others all have permission to read, write, and
+execute a given file) demonstrates two categories for granting permissions: the
+access class and the permissions themselves.
+.sp
+The letter \fBs\fR is only meaningful with \fBu\fR or \fBg\fR, and \fBt\fR only
+works with \fBu\fR.
+.sp
+Mandatory file and record locking (\fBl\fR) refers to a file's ability to have
+its reading or writing permissions locked while a program is accessing that
+file.
+.sp
+In a directory which has the set-group-ID bit set (reflected as either
+\fB-----s---\fR or \fB-----l---\fR in the output of \fB\&'ls -ld'\fR), files
+and subdirectories are created with the group-ID of the parent directory\(emnot
+that of current process.
+.sp
+It is not possible to permit group execution and enable a file to be locked on
+execution at the same time. In addition, it is not possible to turn on the
+set-group-ID bit and enable a file to be locked on execution at the same time.
+The following examples, therefore, are invalid and elicit error messages:
+.sp
+.in +2
+.nf
+chmod g+x,+l \fIfile\fR
+chmod g+s,+l \fIfile\fR
+.fi
+.in -2
+.sp
+
+Only the owner of a file or directory (or the super-user) can change that
+file's or directory's mode. Only the super-user can set the sticky bit on a
+non-directory file. If you are not super-user, \fBchmod\fR masks the sticky-bit
+but does not return an error. In order to turn on a file's set-group-ID bit,
+your own group ID must correspond to the file's and group execution must be
+set.
+.RE
+
+.SS "ACL Operation"
+.sp
+.LP
+An ACL Operation command line has the following format:
+.sp
+.in +2
+.nf
+chmod [\fIoptions\fR] A[\fInumber\fR]- \fIfile\fR ...
+chmod [\fIoptions\fR] A-\fIacl_specification\fR \fIfile\fR ...
+chmod [\fIoptions\fR] A[\fIindex\fR]{+|=}\fIacl_specification\fR \fIfile\fR ...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Where \fIacl_specification\fR is a comma-separated list (with no intervening
+white space) of an ACL specification of the form:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA[\fIindex\fR]+\fIacl_specification\fR\fR\fR
+.ad
+.RS 30n
+.rt
+Prepends the access control entries (ACE) specified in \fIacl_specification\fR
+to the beginning of the file's ACL. Depending on the file system, the ACL can
+be reordered when applied to the file. If "optional" number is specified then
+new ACEs are inserted before specified number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA-\fR\fR
+.ad
+.RS 30n
+.rt
+Removes all ACEs for current ACL on file and replaces current ACL with new ACL
+that represents only the current mode of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA\fIindex\fR\fR-\fR
+.ad
+.RS 30n
+.rt
+Removes ACE specified by \fIindex\fR number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA-\fIacl_specification\fR\fR\fR
+.ad
+.br
+.na
+\fB\fR
+.ad
+.RS 30n
+.rt
+Removes ACEs specified by \fIacl_specification\fR, if they exist in current
+file's ACL.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA=\fIacl_specification\fR\fR\fR
+.ad
+.RS 30n
+.rt
+Replaces a files entire ACL with \fIacl_specification\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA[\fIindex\fR]=\fIacl_specification\fR\fR\fR
+.ad
+.RS 30n
+.rt
+Replaces ACEs starting at a specific index number in the current ACL on the
+file. If multiple ACEs are specified, then each subsequent ACE in
+\fIacl_specification\fR replaces the corresponding ACE in the current ACL.
+.RE
+
+.sp
+.LP
+\fBPOSIX-draft ACL Specification (as supported by UFS)\fR
+.sp
+.LP
+POSIX-draft ACLs (as supported by UFS) are specified as colon (\fB:\fR)
+separated fields of the following.
+.sp
+.ne 2
+.mk
+.na
+\fBuser::perms\fR
+.ad
+.sp .6
+.RS 4n
+File owner permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBuser:\fIusername\fR:perms\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroup::perms\fR
+.ad
+.sp .6
+.RS 4n
+File group owner permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroup:\fIgroupname:\fRperms\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBother::perms\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for user other than the file owner or members of file group owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBmask:perms\fR
+.ad
+.sp .6
+.RS 4n
+The ACL mask. The mask entry specifies the maximum permissions allowed for user
+(other than that the owner) and for groups.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdefault:user::perms\fR
+.ad
+.sp .6
+.RS 4n
+Default file owner permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdefault:user:\fIusername\fR:perms\fR
+.ad
+.sp .6
+.RS 4n
+Default permissions for a specific user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdefault:group::perms\fR
+.ad
+.sp .6
+.RS 4n
+Default file group owner permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdefault:group:\fIgroupname\fR:perms\fR
+.ad
+.sp .6
+.RS 4n
+Default permissions for a specific group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdefault:other:perms\fR
+.ad
+.sp .6
+.RS 4n
+Default permissions for user other than the file owner or members of the file
+group owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdefault:mask:perms\fR
+.ad
+.sp .6
+.RS 4n
+Default ACL mask.
+.RE
+
+.sp
+.LP
+The above specification allows for ACLs to be specified such as:
+.sp
+.in +2
+.nf
+user:tom:rw-,mask:rwx,group:staff:r-x
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBNFSv4 ACL Specification (as supported by NFSv4 and ZFS)\fR
+.sp
+.LP
+NFSv4 ACLs provide richer ACL semantics. They provide both allow and deny
+entries, finer grained permissions, and enhanced inheritance control.
+.sp
+.LP
+NFSv4 ACLs are specified as colon (\fB:\fR) separated fields of the following.
+.sp
+.ne 2
+.mk
+.na
+\fBowner@:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for file owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroup@:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for file group owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBeveryone@:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for everyone, including file owner and group owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBuser:<username>:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBusersid:<sid string>:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific user, but user is specified by SID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroup:<groupname>:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroupsid:<sid string>:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific group, but group is specified by SID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsid:<sid string>:<perms>[:inheritance flags]:<allow|deny>\fR
+.ad
+.sp .6
+.RS 4n
+Permissions for a specific SID, but it doesn't matter if it is a user or a
+group.
+.RE
+
+.sp
+.LP
+Permissions can be specified in three different \fBchmod\fR ACL formats:
+verbose, compact, or positional. The verbose format uses words to indicate that
+the permissions are separated with a forward slash (\fB/\fR) character. Compact
+format uses the permission letters and positional format uses the permission
+letters or the hyphen (\fB-\fR) to identify no permissions.
+.sp
+.LP
+The permissions for verbose mode and their abbreviated form in parentheses for
+compact and positional mode are described as follows:
+.sp
+.ne 2
+.mk
+.na
+\fBread_data (\fBr\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to read the data of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBlist_directory (\fBr\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to list the contents of a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_data (\fBw\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to modify a file's data. anywhere in the file's offset range.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBadd_file (\fBw\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to add a new file to a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBappend_data (\fBp\fR)\fR
+.ad
+.RS 24n
+.rt
+The ability to modify a file's data, but only starting at EOF.
+.sp
+Currently, this permission is not supported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBadd_subdirectory (\fBp\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to create a subdirectory to a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread_xattr (\fBR\fR)\fR
+.ad
+.RS 24n
+.rt
+Ability to read the extended attributes of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_xattr (\fBW\fR)\fR
+.ad
+.RS 24n
+.rt
+Ability to create extended attributes or write to the extended attribute
+directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBexecute (\fBx\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to execute a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread_attributes (\fBa\fR)\fR
+.ad
+.RS 24n
+.rt
+The ability to read basic attributes (non-ACLs) of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_attributes (\fBA\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to change the times associated with a file or directory to an
+arbitrary value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdelete (\fBd\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to delete a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdelete_child (\fBD\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to delete a file within a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread_acl (\fBc\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to read the ACL of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_acl (\fBC\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to write the ACL of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_owner (\fBo\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to change the owner of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsynchronize (\fBs\fR)\fR
+.ad
+.RS 24n
+.rt
+Permission to access file locally at server with synchronize reads and writes.
+.sp
+Currently, this permission is not supported.
+.RE
+
+.sp
+.LP
+Using the compact ACL format, permissions are specified by using 14 unique
+letters to indicate permissions.
+.sp
+.LP
+Using the positional ACL format, permissions are specified as positional
+arguments similar to the \fBls\fR \fB-V\fR format. The hyphen (\fB-\fR), which
+indicates that no permission is granted at that position, can be omitted and
+only the required letters have to be specified.
+.sp
+.LP
+The letters above are listed in the order they would be specified in positional
+notation.
+.sp
+.LP
+Permissions can be specified with these letters in the following way:
+.sp
+.in +2
+.nf
+rwx--D--------
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The hyphens can be removed to compact the string as follows:
+.sp
+.in +2
+.nf
+rwxD
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Several special permission sets or aliases are also supported. The following
+permission sets are used the same way that verbose permissions are specified.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfull_set\fR\fR
+.ad
+.RS 14n
+.rt
+All permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmodify_set\fR\fR
+.ad
+.RS 14n
+.rt
+All permissions except \fBwrite_acl\fR and \fBwrite_owner\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBread_set\fR\fR
+.ad
+.RS 14n
+.rt
+\fBread_data, read_acl, read_attributes,\fR and \fBread_xattr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwrite_set\fR\fR
+.ad
+.RS 14n
+.rt
+\fBwrite_data, append_data, write_attributes\fR, and \fBwrite_xattr\fR
+.RE
+
+.sp
+.LP
+The optional inheritance flags can be specified in the three formats. The first
+format uses words to indicate the various inheritance flags separated with a
+forward slash (\fB/\fR) character.
+.sp
+.ne 2
+.mk
+.na
+\fBfile_inherit (\fBf\fR)\fR
+.ad
+.RS 20n
+.rt
+Inherit to all newly created files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdir_inherit (\fBd\fR)\fR
+.ad
+.RS 20n
+.rt
+Inherit to all newly created directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBinherit_only (\fBi\fR)\fR
+.ad
+.RS 20n
+.rt
+When placed on a directory, do not apply to the directory, only to newly
+created files and directories. This flag requires that either
+\fBfile_inherit\fR and or \fBdir_inherit\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBno_propagate (\fBn\fR)\fR
+.ad
+.RS 20n
+.rt
+Indicates that ACL entries should be inherited to objects in a directory, but
+inheritance should stop after descending one level. This flag is dependent upon
+either \fBfile_inherit\fR and or \fBdir_inherit\fR also being specified.
+.RE
+
+.sp
+.LP
+The inheritance flags listed can also be specified in the compact format or as
+positional arguments similar to the \fBls\fR \fB-V\fR format. A hyphen
+character indicates that the inheritance flag at that position is not specified
+in the positional ACL format.
+.sp
+.LP
+The inheritance flags can be specified with these letters in any of the
+following equivalent ways.
+.sp
+.in +2
+.nf
+file_inherit/dir_inherit/no_propagate
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+fd-n--
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+fdn
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With this inheritance model, an ACL entry can be specified such as:
+.sp
+.in +2
+.nf
+user:tom:read_data/write_data/read_attributes:file_inherit:allow
+user:fred:read_data:file_inherit/dir_inherit:deny
+user:bob:read_data:allow
+.fi
+.in -2
+.sp
+
+.SS "Attribute Operation"
+.sp
+.LP
+An attribute operation command line has the following format:
+.sp
+.in +2
+.nf
+chmod [\fIoptions\fR] \fIattribute_specification_list\fR \fIfile\fR ...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where \fIattribute_specification_list\fR is the character \fBS\fR followed by a
+comma-separated list of one or more \fIattribute_specifications\fR. Each
+\fIattribute_specification\fR is of the form:
+.sp
+.in +2
+.nf
+[\fIoperator\fR]\fIattribute_specifier\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+An \fIoperator\fR is one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 5n
+.rt
+Each attribute specified by the associated \fIattribute_specifier\fR is
+adjusted to match the value specified by the \fIattribute_specifier\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 5n
+.rt
+Each attribute specified by the associated \fIattribute_specifier\fR is
+adjusted to match the inverse of the value specified by the
+\fIattribute_specifier\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR\fR
+.ad
+.RS 5n
+.rt
+Each attribute specified by the associated \fIattribute_specifier\fR is
+adjusted to match the value specified by the \fIattribute_specifier\fR. Any
+boolean read-write extended system attributes associated with the current file
+that are not specified by \fIattribute_specifier\fR is cleared.
+.RE
+
+.sp
+.LP
+If an \fIoperator\fR is not specified in an \fIattribute_specification\fR,
+\fBchmod\fR behaves as if \fB+\fR had been specified.
+.sp
+.LP
+An \fIattribute_specifier\fR takes one of the following forms:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set all boolean read-write extended system attributes associated with the
+current file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc[\fIcompact_attribute_list\fR]\fR\fR
+.ad
+.br
+.na
+\fB\fBc'{'\fIcompact_attribute_list\fR'}'\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set each boolean read-write extended system attribute identified by
+\fIcompact_attribute_list\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv[\fIverbose_attribute_setting\fR]\fR\fR
+.ad
+.br
+.na
+\fB\fBv['{'\fIverbose_attribute_setting_list\fR'}']\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set each boolean read-write extended system attribute identified by
+\fIverbose_attribute_setting\fR.
+.RE
+
+.sp
+.LP
+A \fIcompact_attribute_list\fR is a list of zero or more adjacent attribute
+abbreviation characters from list of \fBAttribute Names and Abbreviation
+Characters\fR later in this section. An arbitrary number of hyphen (\fB-\fR)
+characters can be included in a \fIcompact_attribute_list\fR. These are
+ignored.
+.sp
+.LP
+A \fIverbose_attribute_setting\fR is an attribute name from the list of
+\fBAttribute Names and Abbreviation Characters\fR later in this section,
+optionally, immediately preceded by \fBno\fR. If the attribute name is used
+without \fBno\fR, the attribute is set; otherwise the attribute is cleared.
+.sp
+.LP
+A \fIverbose_attribute_setting_list\fR is zero or more comma-separated
+\fIverbose_attribute_setting\fRs.
+.sp
+.LP
+Multiple operations specified for a file are accumulated and are all set for a
+file operand as a single attribute setting operation. If an attribute is
+specified more than once in an \fIattribute_specification_list\fR, the last
+specified operation is applied.
+.sp
+.LP
+The following is a list of \fBAttribute Names and Abbreviation Characters\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBAttribute Name\fR\fR
+.ad
+.RS 18n
+.rt
+\fBAbbreviation Character\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhidden\fR\fR
+.ad
+.RS 18n
+.rt
+\fBH\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsystem\fR\fR
+.ad
+.RS 18n
+.rt
+\fBS\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreadonly\fR\fR
+.ad
+.RS 18n
+.rt
+\fBR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBarchive\fR\fR
+.ad
+.RS 18n
+.rt
+\fBA\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnounlink\fR\fR
+.ad
+.RS 18n
+.rt
+\fBu\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimmutable\fR\fR
+.ad
+.RS 18n
+.rt
+\fBi\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBappendonly\fR\fR
+.ad
+.RS 18n
+.rt
+\fBa\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnodump\fR\fR
+.ad
+.RS 18n
+.rt
+\fBd\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBav_quarantined\fR\fR
+.ad
+.RS 18n
+.rt
+\fBq\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBav_modified\fR\fR
+.ad
+.RS 18n
+.rt
+\fBm\fR
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 22n
+.rt
+Force. \fBchmod\fR does not complain if it fails to change the mode of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 22n
+.rt
+Recursively descend through directory arguments, setting the mode for each
+file. When symbolic links are encountered, the mode of the target file is
+changed, but no recursion takes place.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-@\fR \fInamed_attribute\fR\fR
+.ad
+.RS 22n
+.rt
+Perform the attribute operation on the named extended attribute file of each
+file operand instead of the file operand itself. If multiple \fB-@\fR
+operations are supplied, the attribute specification mode is applied to each of
+the named attribute files.
+.sp
+A named attribute of \fB*\fR carries meaning to \fBchmod\fR, and is considered
+to mean all extended attribute files associated with a file operand. This does
+not refer to the special files \fB\&.\fR and \fB\&..\fR.
+.sp
+A named attribute of \fB\&..\fR carries special meaning to \fBchmod\fR, and is
+considered to mean the file operand itself. This allows \fBchmod\fR, in a
+single call, to apply the attribute specification mode to the specified named
+attribute file of the file operand and the file operand itself.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIabsolute-mode\fR\fR
+.ad
+.br
+.na
+\fB\fIsymbolic-mode-list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Represents the change to be made to the file mode bits of each file named by
+one of the \fIfile\fR operands. See \fBAbsolute Mode\fR and \fBSymbolic Mode\fR
+in the \fBDESCRIPTION\fR section of this manual page for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIacl_operation\fR\fR
+.ad
+.sp .6
+.RS 4n
+Represents the modification to be performed on the file's ACL. See \fBACL
+Operation\fR in the \fBDESCRIPTION\fR section for more information.
+.sp
+\fIacl_operation\fR is one of the following:
+.sp
+.in +2
+.nf
+\fBA[\fR\fInumber\fR\fB] -\fR
+\fBA-\fR\fIacl_specification\fR
+\fBA[\fR\fIindex\fR\fB]{+|=}\fR\fBacl_specification\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIattribute_specification_list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Represents the modification to performed on the file's attributes. See
+Attribute Operation in the \fBDESCRIPTION\fR section of this manual page for
+more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+A path name of a file whose file mode bits are to be modified.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBchmod\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDenying \fBexecute\fR Permission
+.sp
+.LP
+The following example denies execute permission to everyone:
+
+.sp
+.in +2
+.nf
+% chmod a-x \fIfile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRAllowing \fBread-only\fR Permission
+.sp
+.LP
+The following example allows only read permission to everyone:
+
+.sp
+.in +2
+.nf
+% chmod 444 \fIfile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRMaking a File \fBreadable\fR and \fBwritable\fR
+.sp
+.LP
+The following example makes a file readable and writable by the group and
+others:
+
+.sp
+.in +2
+.nf
+% chmod go+rw \fIfile\fR
+% chmod 066 \fIfile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRLocking a File From Access
+.sp
+.LP
+The following example locks a file from access:
+
+.sp
+.in +2
+.nf
+$ chmod +l \fIfile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRGranting \fBread\fR, \fBwrite\fR, \fBexecute\fR, and \fBset
+group-ID\fR Permission on a File
+.sp
+.LP
+The following example grants everyone read, write, and execute permissions on
+the file, and turns on the set group-ID:
+
+.sp
+.in +2
+.nf
+$ chmod a=rwx,g+s \fIfile\fR
+$ chmod 2777 \fIfile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRPrepending a New ACL Entry on a ZFS File
+.sp
+.LP
+The following example prepends a new ACL entry on a ZFS file.
+
+.sp
+.LP
+First, display the current ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.3
+-rw-r--r-- 1 marks staff 0 Oct 9 15:49 file.3
+ 0:owner@:execute:deny
+ 1:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 2:group@:write_data/append_data/execute:deny
+ 3:group@:read_data:allow
+ 4:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 5:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Issue the following command:
+
+.sp
+.in +2
+.nf
+$ chmod A+user:lp:read_data:deny file.3
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Display the new ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.3
+-rw-r--r--+ 1 marks staff 0 Oct 9 15:49 file.3
+ 0:user:lp:read_data:deny
+ 1:owner@:execute:deny
+ 2:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 3:group@:write_data/append_data/execute:deny
+ 4:group@:read_data:allow
+ 5:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 6:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRPrepending a New POSIX-draft ACL Entry on a UFS File
+.sp
+.LP
+The following example prepends a new POSIX-draft ACL entry on a UFS file.
+
+.sp
+.LP
+First, display the current ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.2
+-rw-r--r-- 1 marks staff 0 Oct 9 15:52 file.2
+ 0:user::rw-
+ 1:group::r-- #effective:r--
+ 2:mask:r--
+ 3:other:r--
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Issue the following command:
+
+.sp
+.in +2
+.nf
+$ chmod A+user:lp:-wx file.2
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Display the new ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.2
+-rw-r--r--+ 1 marks staff 0 Oct 9 15:52 file.2
+ 0:user::rw-
+ 1:user:lp:-wx #effective:---
+ 2:group::r-- #effective:r--
+ 3:mask:r--
+ 4:other:r--
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRInserting an ACL Entry in a Specific Position on a ZFS file
+.sp
+.LP
+The following example inserts an ACL entry in a specific position on a ZFS file
+system. It also illustrates the compact ACL format.
+
+.sp
+.LP
+First, display the ACL to pick a location to insert a new ACE.
+
+.sp
+.in +2
+.nf
+% ls -V file.1
+-rw-r--r--+ 1 root root 0 Oct 6 12:16 file.1
+ user:lp:rw------------:------:allow
+ owner@:--x-----------:------:deny
+ owner@:rw-p---A-W-Co-:------:allow
+ group@:-wxp----------:------:deny
+ group@:r-------------:------:allow
+ everyone@:-wxp---A-W-Co-:------:deny
+ everyone@:r-----a-R-c--s:------:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Next, insert a new entry in location 3. This causes the entries that are
+currently in position 3 - 6 to be pushed down.
+
+.sp
+.LP
+Issue the following command:
+
+.sp
+.in +2
+.nf
+$ chmod A3+user:marks:r:deny file.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Display the new ACL:
+
+.sp
+.in +2
+.nf
+$ ls -V file.1
+-rw-r--r--+ 1 root staff 0 Feb 3 14:13 file.1
+ user:lp:rw------------:------:allow
+ owner@:--x-----------:------:deny
+ owner@:rw-p---A-W-Co-:------:allow
+ user:marks:r-------------:------:deny
+ group@:-wxp----------:------:deny
+ group@:r-------------:------:allow
+ everyone@:-wxp---A-W-Co-:------:deny
+ everyone@:r-----a-R-c--s:------:allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRInserting a POSIX-draft ACL in a Specific Position on a UFS
+File
+.sp
+.LP
+The file system reorders ACLs when they are stored in the file system. The
+following example illustrates this behavior.
+
+.sp
+.in +2
+.nf
+$ ls -v file.1
+-rw-r--r--+ 1 root root 0 Sep 29 16:10 file.1
+ 0:user::rw-
+ 1:user:lp:rw- #effective:r--
+ 2:group::r-- #effective:r--
+ 3:mask:r--
+ 4:other:r--
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Now, insert an entry at index position 3. The command works, but the file
+system reorders the ACL.
+
+.sp
+.in +2
+.nf
+$ chmod A3+user:marks:rw- file.1
+$ ls -v file.1
+-rw-r--r--+ 1 root root 0 Sep 29 16:10 file.1
+ 0:user::rw-
+ 1:user:lp:rw- #effective:r--
+ 2:user:marks:rw- #effective:r--
+ 3:group::r-- #effective:r--
+ 4:mask:r--
+ 5:other:r--
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Rather than inserting the ACL entry in position 3 as requested, it actually
+ends up in position 2.
+
+.LP
+\fBExample 10 \fRRemoving an ACL Entry on a ZFS File
+.sp
+.LP
+The following example removes the \fBlp\fR entry from an ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.3
+-rw-r--r--+ 1 marks staff 0 Oct 9 15:49 file.3
+ 0:user:lp:read_data:deny
+ 1:owner@:execute:deny
+ 2:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 3:group@:write_data/append_data/execute:deny
+ 4:group@:read_data:allow
+ 5:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 6:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+$ chmod A-user:lp:read_data:deny file.3
+$ ls -v file.3
+-rw-r--r-- 1 marks staff 0 Oct 9 15:49 file.3
+ 0:owner@:execute:deny
+ 1:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 2:group@:write_data/append_data/execute:deny
+ 3:group@:read_data:allow
+ 4:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 5:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 11 \fRRemoving a POSIX-draft ACL on a UFS File
+.sp
+.LP
+The following example removes the \fBlp\fR entry from an ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.2
+-rw-r--r--+ 1 marks staff 0 Oct 9 15:52 file.2
+ 0:user::rw-
+ 1:user:lp:-wx #effective:---
+ 2:group::r-- #effective:r--
+ 3:mask:r--
+ 4:other:r--
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+$ chmod A-user:lp:-wx file.2
+$ ls -v file.2
+-rw-r--r-- 1 marks staff 0 Oct 9 15:52 file.2
+ 0:user::rw-
+ 1:group::r-- #effective:r--
+ 2:mask:r--
+ 3:other:r--
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 12 \fRRemoving a Specific ACL Entry by Index Number on a ZFS File
+.sp
+.LP
+Consider the following ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file
+ 0:group:staff:read_data/write_data/execute/read_acl:allow
+ 1:user:bin:read_data:deny
+ 2:user:bin:read_data:allow
+ 3:owner@:write_data/append_data:deny
+ 4:owner@:read_data/write_xattr/execute/write_attributes/write_acl
+ /write_owner:allow
+ 5:group@:write_data/append_data:deny
+ 6:group@:read_data/execute:allow
+ 7:everyone@:write_data/append_data/write_xattr/write_attributes
+ /write_acl/write_owner:deny
+ 8:everyone@:read_data/read_xattr/execute/read_attributes/read_acl
+ /synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Remove the second user entry for bin.
+
+.sp
+.in +2
+.nf
+$ chmod A2- file
+$ ls -v file
+ 0:group:staff:read_data/write_data/execute/read_acl:allow
+ 1:user:bin:read_data:deny
+ 2:owner@:write_data/append_data:deny
+ 3:owner@:read_data/write_xattr/execute/write_attributes/write_acl
+ /write_owner:allow
+ 4:group@:write_data/append_data:deny
+ 5:group@:read_data/execute:allow
+ 6:everyone@:write_data/append_data/write_xattr/write_attributes
+ /write_acl/write_owner:deny
+ 7:everyone@:read_data/read_xattr/execute/read_attributes/read_acl
+ /synchronize:allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 13 \fRRemoving a Specific POSIX-draft ACL Entry on a UFS File
+.sp
+.LP
+The following example removes the lp entry by index number from the following
+ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.1
+-rw-r--r--+ 1 root root 0 Sep 29 16:10 file.1
+ 0:user::rw-
+ 1:user:lp:rw- #effective:r--
+ 2:group::r-- #effective:r--
+ 3:mask:r--
+ 4:other:r--
+
+ $ chmod A1- file.1
+ $ ls -v
+-rw-r--r--+ 1 root root 0 Sep 29 16:10 file.1
+ 0:user::rw-
+ 1:group::r-- #effective:r--
+ 2:mask:r--
+ 3:other:r--
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 14 \fRRemoving All ACLs From a File
+.sp
+.LP
+The following command works with either NFSv4/ZFS or POSIX-draft ACLs.
+
+.sp
+.LP
+Consider the following ACL:
+
+.sp
+.in +2
+.nf
+$ ls -v file.3
+-rw-r--r--+ 1 marks staff 0 Oct 9 15:49 file.3
+ 0:user:lp:read_data/write_data:allow
+ 1:user:marks:read_acl:allow
+ 2:owner@:execute:deny
+ 3:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 4:group@:write_data/append_data/execute:deny
+ 5:group@:read_data:allow
+ 6:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 7:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The existing ACL is effectively removed and is replaced with an ACL that
+represents the permission bits of the file.
+
+.sp
+.in +2
+.nf
+$ chmod A- file.3
+$ ls -v file.3
+-rw-r--r-- 1 marks staff 0 Oct 9 15:49 file.3
+ 0:owner@:execute:deny
+ 1:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 2:group@:write_data/append_data/execute:deny
+ 3:group@:read_data:allow
+ 4:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 5:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 15 \fRReplacing an Entire ACL Entry on a ZFS File
+.sp
+.LP
+Use the following \fBchmod\fR syntax if you want to replace an ACL in its
+entirety:
+
+.sp
+.in +2
+.nf
+$ chmod A=owner@:read_data/write_data:allow,group@:read_data/
+ write_data:allow,user:lp:read_data:allow file.4
+$ ls -v file.4
+-rw-rw----+ 1 marks staff 0 Oct 9 16:12 file.4
+ 0:owner@:read_data/write_data:allow
+ 1:group@:read_data/write_data:allow
+ 2:user:lp:read_data:allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 16 \fRReplacing an Entire POSIX-draft ACL on a UFS File
+.sp
+.LP
+This operation is a little more complicated. The replacement ACL needs the
+necessary entries to represent the file owner, file group owner, other, mask
+and any additional entries you wish to set.
+
+.sp
+.in +2
+.nf
+$ chmod A=user::rw-,group::rw-,other::---,mask:r--,
+ user:lp:r-- file.3
+$ ls -v file.3
+-rw-r-----+ 1 root root 0 Oct 9 16:14 file.3
+ 0:user::rw-
+ 1:user:lp:r-- #effective:r--
+ 2:group::rw- #effective:r--
+ 3:mask:r--
+ 4:other:---
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 17 \fRReplacing a Specific Entry on a ZFS File
+.sp
+.LP
+Consider the following ACL.
+
+.sp
+.in +2
+.nf
+$ ls -v file.5
+-rw-r--r--+ 1 marks staff 0 Oct 9 16:18 file.5
+ 0:user:marks:read_data:allow
+ 1:owner@:execute:deny
+ 2:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 3:group@:write_data/append_data/execute:deny
+ 4:group@:read_data:allow
+ 5:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 6:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Now, change the allow access to a deny for user marks:
+
+.sp
+.in +2
+.nf
+$ chmod A0=user:marks:read_data:deny file.5
+$ ls -v file.5
+-rw-r--r--+ 1 marks staff 0 Aug 23 09:11 file.5
+0:user:marks:read_data:deny
+1:owner@:read_data/write_data/append_data/write_xattr/write_attributes
+ /write_acl/write_owner:allow
+2:group@:write_data/append_data/execute:deny
+3:group@:read_data:allow
+4:everyone@:write_data/append_data/write_xattr/execute/write_attributes
+ /write_acl/write_owner:deny
+5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize
+ :allow
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 18 \fRReplacing a Specific POSIX-draft ACL on a UFS File
+.sp
+.LP
+Consider the following ACL.
+
+.sp
+.in +2
+.nf
+$ ls -v file.4
+-rw-r--r--+ 1 marks staff 0 Oct 9 16:21 file.4
+ 0:user::rw-
+ 1:user:lp:rwx #effective:r--
+ 2:group::r-- #effective:r--
+ 3:mask:r--
+ 4:other:r--
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Now, change the permission on \fBlp\fR from \fBrwx\fR to \fBr--\fR:
+
+.sp
+.in +2
+.nf
+$ chmod A1=user:lp:r-- file.4
+
+$ ls -v file
+-rw-r--r--+ 1 marks staff 0 Oct 9 16:21 file.4
+ 0:user::rw-
+ 1:user:lp:r-- #effective:r--
+ 2:group::r-- #effective:r--
+ 3:mask:r--
+ 4:other:r--
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 19 \fRSetting ACL Inheritance Flags on a ZFS File
+.sp
+.LP
+You can only set inheritance flags on ZFS files. When setting ACLs on
+directories, several inheritance flags can be optionally set.
+
+.sp
+.LP
+Suppose you have an ACL entry for user \fBlp\fR that you want to be inherited
+to newly created files in a directory. First, you need to create an
+inheritable ACL entry on the directory:
+
+.sp
+.in +2
+.nf
+$ chmod A+user:lp:read_data:file_inherit:allow test.dir
+$ ls -dv test.dir
+drwxr-xr-x+ 2 marks staff 2 Aug 23 09:08 test.dir/
+0:user:lp:read_data:file_inherit:allow
+1:owner@::deny
+2:owner@:list_directory/read_data/add_file/write_data/add_subdirectory
+ /append_data/write_xattr/execute/write_attributes/write_acl
+ /write_owner:allow
+3:group@:add_file/write_data/add_subdirectory/append_data:deny
+4:group@:list_directory/read_data/execute:allow
+5:everyone@:add_file/write_data/add_subdirectory/append_data/write_xattr
+ /write_attributes/write_acl/write_owner:deny
+6:everyone@:list_directory/read_data/read_xattr/execute/read_attributes
+ /read_acl/synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBlp\fR entry is inherited to newly created files in the directory
+\fBtest.dir\fR.
+
+.sp
+.in +2
+.nf
+$ touch test.dir/file.test
+$ ls -v test.dir/file.test
+-rw-r--r--+ 1 marks staff 0 Oct 9 16:29 test.dir/file.test
+ 0:user:lp::deny
+ 1:user:lp:read_data:allow
+ 2:owner@:execute:deny
+ 3:owner@:read_data/write_data/append_data/write_xattr/
+ write_attributes/write_acl/write_owner:allow
+ 4:group@:write_data/append_data/execute:deny
+ 5:group@:read_data:allow
+ 6:everyone@:write_data/append_data/write_xattr/execute/
+ write_attributes/write_acl/write_owner:deny
+ 7:everyone@:read_data/read_xattr/read_attributes/read_acl/
+ synchronize:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The user \fBlp\fR entry is inherited to the newly created file. Multiple
+combinations of the inheritance flags can be specified. For example, if you
+wanted the \fBlp\fR entry to also be inherited to directories, then the
+following command can be used:
+
+.sp
+.in +2
+.nf
+$ chmod A+user:lp:read_data:file_inherit/\e
+ dir_inherit:allow test.dir
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 20 \fRReplacing System Attributes of a ZFS File
+.sp
+.LP
+The following examples replace system attributes of a ZFS file:
+
+.sp
+.in +2
+.nf
+$ chmod S=v{archive,hidden,readonly,system,appendonly,\e
+ nonodump,immutable,noav_modified,noav_quarantined,\e
+ nounlink} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S=c{AHRSaiu} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S=c{AHRSa-i--u} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S=cAHRSaiu file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod -@ '..' S=cAHRSaiu file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Assuming appropriate privileges, this results in the following system
+attributes of \fBfile1\fR being set: \fBarchive\fR, \fBhidden\fR,
+\fBreadonly\fR, \fBsystem\fR, \fBappendonly\fR, \fBimmutable\fR, and
+\fBnounlink\fR. Assuming appropriate privileges, the following system
+attributes of \fBfile1\fR are cleared: \fBnodump\fR, \fBav_modified\fR, and
+\fBav_quarantined\fR.
+
+.LP
+\fBExample 21 \fRClearing All System Attributes of a ZFS File
+.sp
+.LP
+The following examples clears all system attributes of a ZFS file:
+
+.sp
+.in +2
+.nf
+$ chmod S-a file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod -@ '..' S-a file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Assuming appropriate privileges, all boolean read-write system attributes are
+cleared on \fBfile1\fR.
+
+.LP
+\fBExample 22 \fRSetting a System Attribute of a Named Attribute File of a ZFS
+File
+.sp
+.LP
+The following example sets a system attribute of a named attribute file of a
+ZFS file, but not of the file itself:
+
+.sp
+.in +2
+.nf
+$ chmod -@ myattr S+vhidden file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This results in the hidden system attribute being set for the named attribute
+file \fBmyattr\fR of \fBfile1\fR, but not the file itself.
+
+.LP
+\fBExample 23 \fRSetting a System Attribute of All Named Attribute File of a
+ZFS File
+.sp
+.LP
+The following example sets a system attribute of all named attribute files of a
+ZFS file, but not of the file itself:
+
+.sp
+.in +2
+.nf
+$ chmod -@ '*' S+a file1
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 24 \fRSetting a System Attribute of All Named Attribute Files of a
+ZFS File
+.sp
+.LP
+The following example sets a system attribute of all named attribute files of a
+ZFS file, as well as of the file itself:
+
+.sp
+.in +2
+.nf
+$ chmod -@ '..' -@ '*' S+vhidden file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This results in the hidden system attribute being set for all named attribute
+files of \fBfile1\fR, as well as the file itself.
+
+.LP
+\fBExample 25 \fRRecursively Descending Through a Directory Hierarchy
+.sp
+.LP
+The following example recursively descends through a directory hierarchy, and
+sets all system attributes of all named attribute files, the ZFS file operands,
+as well as of the directory itself:
+
+.sp
+.in +2
+.nf
+$ chmod -R -@ '..' -@ '*' S+a directory1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This results in the hidden system attribute being set for all named attribute
+files of all regular files and directories within the directory hierarchy of
+\fBdirectory1\fR, as well as of \fBdirectory1\fR itself.
+
+.LP
+\fBExample 26 \fRSetting the \fBhidden\fR and \fBsystem\fR System Attributes of
+a ZFS File
+.sp
+.LP
+The following examples set the \fBhidden\fR and \fBsystem\fR system attributes
+of a ZFS file:
+
+.sp
+.in +2
+.nf
+$ chmod S+cHS file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S+vhidden,+vsystem file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S+v{hidden,system} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S+c{-HS--------} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S-v{nohidden,nosystem} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S-v{hidden,system},+v{hidden,system} file1
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 27 \fRClearing All System Attributes of a ZFS File
+.sp
+.LP
+The following example clears all system attributes of a ZFS file:
+
+.sp
+.in +2
+.nf
+$ chmod S-a file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+$ chmod S=v{} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In the following two examples, the last attribute operation specified takes
+precedence.
+
+.sp
+.LP
+In this example, the replacement attribute name list (\fB{}\fR) clears all
+system attributes for \fBfile1\fR:
+
+.sp
+.in +2
+.nf
+$ chmod S+cHS,=v{} file1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this example, the clear attributes operation (\fB-a\fR) clears all system
+attributes of \fBfile1\fR:
+
+.sp
+.in +2
+.nf
+$ chmod S+vhidden,+vsystem,-a file1
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 28 \fRSetting the Values of All Boolean read-write System Attributes
+of a File
+.sp
+.LP
+The following example sets the values of all boolean read-write system
+attributes of a file to the same as the boolean read-write system attributes of
+another file:
+
+.sp
+.in +2
+.nf
+$ chmod S=v`ls -/v file1|sed -n '2s/.*{/{/p'` file2
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Assuming appropriate privileges and that \fBfile1\fR and \fBfile2\fR have the
+same supported system attributes, all system attributes of \fBfile1\fR that are
+set are also set on \fBfile2\fR. All system attributes of \fBfile1\fR that are
+cleared are also cleared on \fBfile2\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBchmod\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetfacl\fR(1), \fBls\fR(1), \fBsetfacl\fR(1), \fBchmod\fR(2),
+\fBfgetattr\fR(3C), \fBacl\fR(5), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBfsattr\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Absolute changes do not work for the set-group-\fBID\fR bit of a directory. You
+must use \fBg+s\fR or \fBg-s\fR.
+.sp
+.LP
+\fBchmod\fR permits you to produce useless modes so long as they are not
+illegal (for instance, making a text file executable). \fBchmod\fR does not
+check the file type to see if mandatory locking is meaningful.
+.sp
+.LP
+If the filesystem is mounted with the \fInosuid\fR option, \fIsetuid\fR
+execution is not allowed.
+.sp
+.LP
+If you use \fBchmod\fR to change the file group owner permissions on a file
+with \fBACL\fR entries, both the file group owner permissions and the \fBACL\fR
+mask are changed to the new permissions. Be aware that the new \fBACL\fR mask
+permissions can change the effective permissions for additional users and
+groups who have \fBACL\fR entries on the file. Use the \fBgetfacl\fR(1) or
+\fBls\fR(1)command to make sure the appropriate permissions are set for all
+\fBACL\fR entries.
diff --git a/usr/src/man/man1/chown.1 b/usr/src/man/man1/chown.1
new file mode 100644
index 0000000000..9d8209b132
--- /dev/null
+++ b/usr/src/man/man1/chown.1
@@ -0,0 +1,618 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH chown 1 "11 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+chown \- change file ownership
+.SH SYNOPSIS
+.SS "/usr/bin/chown"
+.LP
+.nf
+\fB/usr/bin/chown\fR [\fB-fhR\fR] \fIowner\fR[:\fIgroup\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/chown\fR \fB-s\fR [\fB-fhR\fR] \fIownersid\fR[:\fIgroupsid\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/chown\fR \fB-R\fR [\fB-f\fR] [\fB-H\fR | \fB-L\fR | \fB-P\fR] \fIowner\fR[:\fIgroup\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/chown\fR \fB-s\fR \fB-R\fR [\fB-f\fR] [\fB-H\fR | \fB-L\fR | \fB-P\fR] \fIownersid\fR[:\fIgroupsid\fR] \fIfile\fR...
+.fi
+
+.SS "/usr/xpg4/bin/chown"
+.LP
+.nf
+\fB/usr/xpg4/bin/chown\fR [\fB-fhR\fR] \fIowner\fR[:\fIgroup\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/chown\fR \fB-s\fR [\fB-fhR\fR] \fIownersid\fR[:\fIgroupsid\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/chown\fR \fB-R\fR [\fB-f\fR] [\fB-H\fR | \fB-L\fR | \fB-P\fR] \fIowner\fR[:\fIgroup\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/chown\fR \fB-s\fR \fB-R\fR [\fB-f\fR] [\fB-H\fR | \fB-L\fR | \fB-P\fR] \fIownersid\fR[:\fIgroupsid\fR] \fIfile\fR...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBchown\fR [\fB-cflhmnvHLPRX\fR] [\fB-r\fR \fIfile\fR] \fIowner\fR[:\fIgroup\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/chown and /usr/xpg4/bin/chown"
+.sp
+.LP
+The \fBchown\fR utility sets the user \fBID\fR of the file named by each
+\fBfile\fR to the user \fBID\fR specified by \fIowner\fR, and, optionally, sets
+the group \fBID\fR to that specified by \fIgroup\fR.
+.sp
+.LP
+If \fBchown\fR is invoked by other than the super-user, the set-user-\fBID\fR
+bit is cleared.
+.sp
+.LP
+Only the owner of a file (or the super-user) can change the owner of that file.
+.sp
+.LP
+The operating system has a configuration option
+\fB{_POSIX_CHOWN_RESTRICTED}\fR, to restrict ownership changes. When this
+option is in effect the owner of the file is prevented from changing the owner
+\fBID\fR of the file. Only the super-user can arbitrarily change owner
+\fBID\fRs whether or not this option is in effect. To set this configuration
+option, include the following line in \fB/etc/system\fR:
+.sp
+.in +2
+.nf
+\fBset rstchown = 1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To disable this option, include the following line in \fB/etc/system\fR:
+.sp
+.in +2
+.nf
+\fBset rstchown = 0\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fB{_POSIX_CHOWN_RESTRICTED}\fR is enabled by default. See \fBsystem\fR(4) and
+\fBfpathconf\fR(2).
+.SS "ksh93"
+.sp
+.LP
+The \fBchown\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBchown\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/chown\fR or
+/usr/bin/chown executable.
+.sp
+.LP
+\fBchown\fR changes the ownership of each file to \fIowner\fR. \fIowner\fR can
+be specified as either a user name or a numeric user id. The group ownership of
+each file can also be changed to \fIgroup\fR by appending \fI:group\fR to the
+user name.
+.SH OPTIONS
+.SS "/usr/bin/chown and /usr/xpg4/bin/chown"
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Force. Does not report errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+If the file is a symbolic link, this option changes the owner of the symbolic
+link. Without this option, the owner of the file referenced by the symbolic
+link is changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+If the file specified on the command line is a symbolic link referencing a file
+of type directory, this option changes the owner of the directory referenced by
+the symbolic link and all the files in the file hierarchy below it. If a
+symbolic link is encountered when traversing a file hierarchy, the owner of the
+target file is changed, but no recursion takes place.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+If the file is a symbolic link, this option changes the owner of the file
+referenced by the symbolic link. If the file specified on the command line, or
+encountered during the traversal of the file hierarchy, is a symbolic link
+referencing a file of type directory, then this option changes the owner of the
+directory referenced by the symbolic link and all files in the file hierarchy
+below it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 6n
+.rt
+If the file specified on the command line or encountered during the traversal
+of a file hierarchy is a symbolic link, this option changes the owner of the
+symbolic link. This option does not follow the symbolic link to any other part
+of the file hierarchy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+The owner and/or group arguments are Windows SID strings. This option requires
+a file system that supports storing SIDs, such as ZFS.
+.RE
+
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fR, \fB-L\fR,
+or \fB-P\fR is not considered an error. The last option specified determines
+the behavior of \fBchown\fR.
+.SS "/usr/bin/chown"
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Recursive. \fBchown\fR descends through the directory, and any subdirectories,
+setting the specified ownership \fBID\fR as it proceeds. When a symbolic link
+is encountered, the owner of the target file is changed, unless the \fB-h\fR or
+\fB-P\fR option is specified. However, no recursion takes place, unless the
+\fB-H\fR or \fB-L\fR option is specified.
+.RE
+
+.SS "/usr/xpg4/bin/chown"
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Recursive. \fBchown\fR descends through the directory, and any subdirectories,
+setting the specified ownership \fBID\fR as it proceeds. When a symbolic link
+is encountered, the owner of the target file is changed, unless the \fB-h\fR or
+\fB-P\fR option is specified. Unless the \fB-H\fR, \fB-L\fR, or \fB-P\fR option
+is specified, the \fB-L\fR option is used as the default mode.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by the \fBksh93\fR built-in \fBchown\fR
+command:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--changes\fR\fR
+.ad
+.sp .6
+.RS 4n
+Describe only files whose ownership actually changes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.br
+.na
+\fB\fB--quiet | silent\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not report files whose ownership fails to change.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l | h\fR\fR
+.ad
+.br
+.na
+\fB\fB--symlink\fR\fR
+.ad
+.sp .6
+.RS 4n
+Change the ownership of the symbolic links on systems that support this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.br
+.na
+\fB\fB--map\fR\fR
+.ad
+.sp .6
+.RS 4n
+Interpret the first operand as a file that contains a map of:
+.sp
+.in +2
+.nf
+\fIfrom_uid\fR:\fIfrom_gid to_uid:to_gid\fR
+.fi
+.in -2
+.sp
+
+pairs. Ownership of files matching the \fIfrom\fR part of any pair is changed
+to the corresponding \fIto\fR part of the pair. The process stops at the first
+match for each file. Unmatched files are silently ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.br
+.na
+\fB\fB--show\fR\fR
+.ad
+.sp .6
+.RS 4n
+Show actions but do not execute.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB--reference=file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Omit the explicit ownership operand and use the ownership of the file instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.br
+.na
+\fB\fB--verbose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Describe the changed permissions of all files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.br
+.na
+\fB\fB--metaphysical\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follow symbolic links for command arguments. Otherwise do not follow symbolic
+links when traversing directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.br
+.na
+\fB\fB--logical | follow\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follow symbolic links when traversing directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.br
+.na
+\fB\fB--physical | nofollow\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not follow symbolic links when traversing directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.br
+.na
+\fB\fB--recursive\fR\fR
+.ad
+.sp .6
+.RS 4n
+Recursively change ownership of directories and their contents.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.br
+.na
+\fB\fB--test\fR\fR
+.ad
+.sp .6
+.RS 4n
+Canonicalize output for testing.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIowner\fR[\fB:\fR\fIgroup\fR]\fR
+.ad
+.RS 17n
+.rt
+A user \fBID\fR and optional group \fBID\fR to be assigned to \fBfile\fR. The
+\fIowner\fR portion of this operand must be a user name from the user database
+or a numeric user \fBID\fR. Either specifies a user \fBID\fR to be given to
+each file named by \fIfile\fR. If a numeric \fIowner\fR exists in the user
+database as a user name, the user \fBID\fR number associated with that user
+name is used as the user \fBID\fR. Similarly, if the \fIgroup\fR portion of
+this operand is present, it must be a group name from the group database or a
+numeric group \fBID\fR. Either specifies a group \fBID\fR to be given to each
+file. If a numeric group operand exists in the group database as a group name,
+the group \fBID\fR number associated with that group name is used as the group
+\fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 17n
+.rt
+A path name of a file whose user \fBID\fR is to be modified.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBchown\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRChanging Ownership of All Files in the Hierarchy
+.sp
+.LP
+The following command changes ownership of all files in the hierarchy,
+including symbolic links, but not the targets of the links:
+
+.sp
+.in +2
+.nf
+example% \fBchown \(miR \(mih \fIowner\fR[:group] \fIfile\fR...\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBchown\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The utility executed successfully and all requested changes were made.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+System password file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/chown"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled. See NOTES.
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "/usr/xpg4/bin/chown"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled. See \fBNOTES\fR.
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBchgrp\fR(1), \fBchmod\fR(1),\fBksh93\fR(1), \fBchown\fR(2),
+\fBfpathconf\fR(2), \fBpasswd\fR(4), \fBsystem\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBchown\fR is \fBCSI\fR-enabled except for the \fIowner\fR and \fIgroup\fR
+names.
diff --git a/usr/src/man/man1/ckdate.1 b/usr/src/man/man1/ckdate.1
new file mode 100644
index 0000000000..4c71d21bcd
--- /dev/null
+++ b/usr/src/man/man1/ckdate.1
@@ -0,0 +1,362 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckdate 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckdate, errdate, helpdate, valdate \- prompts for and validates a date
+.SH SYNOPSIS
+.LP
+.nf
+\fBckdate\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-f\fR \fIformat\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errdate\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR] [\fB-f\fR \fIformat\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpdate\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR] [\fB-f\fR \fIformat\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valdate\fR [\fB-f\fR \fIformat\fR] \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckdate\fR utility prompts a user and validates the response. It defines,
+among other things, a prompt message whose response should be a date, text for
+help and error messages, and a default value (which will be returned if the
+user responds with a RETURN). The user response must match the defined format
+for a date.
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including newline) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
+placed at the beginning or end of a message definition, the default text will
+be inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) will be displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckdate\fR command. They are
+\fBerrdate\fR (which formats and displays an error message), \fBhelpdate\fR
+(which formats and displays a help message), and \fBvaldate\fR (which validates
+a response). These modules should be used in conjunction with FML objects. In
+this instance, the FML object defines the prompt. When \fBformat\fR is defined
+in the \fBerrdate\fR and \fBhelpdate\fR modules, the messages will describe the
+expected format.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdefault\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default does not have to meet
+the format criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fIerror\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIformat\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies the format against which the input will be verified. Possible formats
+and their definitions are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%b\fR =\fR
+.ad
+.RS 9n
+.rt
+abbreviated month name (jan, feb, mar)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%B\fR =\fR
+.ad
+.RS 9n
+.rt
+full month name \fB%d\fR = day of month (01 - 31)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%D\fR =\fR
+.ad
+.RS 9n
+.rt
+date as %m/%d/%y (the default format)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%e\fR =\fR
+.ad
+.RS 9n
+.rt
+day of month (1 - 31; single digits are preceded by a blank)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%h\fR =\fR
+.ad
+.RS 9n
+.rt
+abbreviated month name, identical to \fB%b%\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%m\fR =\fR
+.ad
+.RS 9n
+.rt
+month number (01 - 12)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%y\fR =\fR
+.ad
+.RS 9n
+.rt
+year within century (for instance, 89)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%Y\fR =\fR
+.ad
+.RS 9n
+.rt
+year as \fBCCYY\fR (for instance, 1989)
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI help\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fBhelp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI signal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fBsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fBwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against format criteria.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 5n
+.rt
+Garbled format argument.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default prompt for \fBckdate\fR is:
+.sp
+.in +2
+.nf
+Enter the date [?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message is:
+.sp
+.in +2
+.nf
+ERROR - Please enter a date. Format is <format>.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+Please enter a date. Format is <format>.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. The \fBvaldate\fR module will not produce any output.
+It returns zero for success and non-zero for failure.
diff --git a/usr/src/man/man1/ckgid.1 b/usr/src/man/man1/ckgid.1
new file mode 100644
index 0000000000..12bf45f6fd
--- /dev/null
+++ b/usr/src/man/man1/ckgid.1
@@ -0,0 +1,268 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckgid 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckgid, errgid, helpgid, valgid \- prompts for and validates a group id
+.SH SYNOPSIS
+.LP
+.nf
+\fBckgid\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-m\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errgid\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpgid\fR [\fB-W\fR \fIwidth\fR] [\fB-m\fR] [\fB-h\fR \fIhelp\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valgid\fR \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBckgid\fR prompts a user and validates the response. It defines, among other
+things, a prompt message whose response should be an existing group ID, text
+for help and error messages, and a default value (which will be returned if the
+user responds with a carriage return).
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including newline) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
+placed at the beginning or end of a message definition, the default text will
+be inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) will be displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckgid\fR command. They are
+\fBerrgid\fR (which formats and displays an error message), \fBhelpgid\fR
+(which formats and displays a help message), and \fBvalgid\fR (which validates
+a response). These modules should be used in conjunction with \fBFML\fR
+objects. In this instance, the \fBFML\fR object defines the prompt.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fI error\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI help\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 14n
+.rt
+Displays a list of all groups when help is requested or when the user makes an
+error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI signal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fI signal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against \fB/etc/group\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default prompt for \fBckgid\fR is:
+.sp
+.in +2
+.nf
+Enter the name of an existing group [?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message is:
+.sp
+.in +2
+.nf
+ERROR: Please enter one of the following group names: [\fIList\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the \fB-m\fR option of \fBckgid\fR is used, a list of valid groups is
+displayed here.
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+ERROR: Please enter one of the following group names: [\fIList\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the \fB-m\fR option of \fBckgid\fR is used, a list of valid groups is
+displayed here.
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. The \fBvalgid\fR module will not produce any output.
+It returns \fB0\fR for success and non-zero for failure.
diff --git a/usr/src/man/man1/ckint.1 b/usr/src/man/man1/ckint.1
new file mode 100644
index 0000000000..2b95b5f551
--- /dev/null
+++ b/usr/src/man/man1/ckint.1
@@ -0,0 +1,267 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckint 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckint, errint, helpint, valint \- display a prompt; verify and return an
+integer value
+.SH SYNOPSIS
+.LP
+.nf
+\fBckint\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-b\fR \fIbase\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errint\fR [\fB-W\fR \fIwidth\fR] [\fB-b\fR \fIbase\fR] [\fB-e\fR \fIerror\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpint\fR [\fB-W\fR \fIwidth\fR] [\fB-b\fR \fIbase\fR] [\fB-h\fR \fIhelp\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valint\fR [\fB-b\fR \fIbase\fR] \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckint\fR utility prompts a user, then validates the response. It
+defines, among other things, a prompt message whose response should be an
+integer, text for help and error messages, and a default value (which will be
+returned if the user responds with a carriage return).
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including newline) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
+placed at the beginning or end of a message definition, the default text will
+be inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) will be displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckint\fR command. They are
+\fBerrint\fR (which formats and displays an error message), \fBhelpint\fR
+(which formats and displays a help message), and \fBvalint\fR (which validates
+a response). These modules should be used in conjunction with FML objects. In
+this instance, the FML object defines the prompt. When \fIbase\fR is defined in
+the \fBerrint\fR and \fBhelpint\fR modules, the messages will include the
+expected base of the input.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fI base\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the base for input. Must be \fB2\fR to \fB36\fR, default is
+\fB10\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fI error\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI help\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI signal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fI signal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against \fIbase\fR criterion.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default base 10 prompt for \fBckint\fR is:
+.sp
+.in +2
+.nf
+Enter an integer [?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default base 10 error message is:
+.sp
+.in +2
+.nf
+ERROR - Please enter an integer.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default base 10 help message is:
+.sp
+.in +2
+.nf
+Please enter an integer.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The messages are changed from "integer" to "base \fIbase\fR integer" if the
+base is set to a number other than 10.
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. The \fBvalint\fR module will not produce any output.
+It returns \fB0\fR for success and non-zero for failure.
diff --git a/usr/src/man/man1/ckitem.1 b/usr/src/man/man1/ckitem.1
new file mode 100644
index 0000000000..b32b433c82
--- /dev/null
+++ b/usr/src/man/man1/ckitem.1
@@ -0,0 +1,381 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckitem 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckitem, erritem, helpitem \- build a menu; prompt for and return a menu item
+.SH SYNOPSIS
+.LP
+.nf
+\fBckitem\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-uno\fR] [\fB-f\fR \fIfilename\fR] [\fB-l\fR \fIlabel\fR]
+ [ [\fB-i\fR \fIinvis\fR] [,]...] [\fB-m\fR \fImax\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fI error\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+ [\fIchoice\fR [...]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/erritem\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR] [\fIchoice\fR [..]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpitem\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR] [\fIchoice\fR [..]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckitem\fR utility builds a menu and prompts the user to choose one item
+from a menu of items. It then verifies the response. Options for this command
+define, among other things, a prompt message whose response will be a menu
+item, text for help and error messages, and a default value (which will be
+returned if the user responds with a carriage return).
+.sp
+.LP
+By default, the menu is formatted so that each item is prepended by a number
+and is printed in columns across the terminal. Column length is determined by
+the longest choice. Items are alphabetized.
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including newline) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
+placed at the beginning or end of a message definition, the default text will
+be inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) will be displayed.
+.sp
+.LP
+Two visual tool modules are linked to the \fBckitem\fR command. They are
+\fBerritem\fR (which formats and displays an error message) and \fBhelpitem\fR
+(which formats and displays a help message). These modules should be used in
+conjunction with \fBFML\fR objects. In this instance, the \fBFML\fR object
+defines the prompt. When \fIchoice\fR is defined in these modules, the messages
+will describe the available menu choice (or choices).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 15n
+.rt
+Define the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fI error\fR\fR
+.ad
+.RS 15n
+.rt
+Define the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI filename\fR\fR
+.ad
+.RS 15n
+.rt
+Define a file, \fIfilename\fR, which contains a list of menu items to be
+displayed. (The format of this file is: \fBtoken<tab>description\fR. Lines
+beginning with a pound sign (#) are designated as comments and ignored.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI help\fR\fR
+.ad
+.RS 15n
+.rt
+Define the help messages as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fI invis\fR\fR
+.ad
+.RS 15n
+.rt
+Define invisible menu choices (those which will not be printed in the menu).
+(For example, ``all'' used as an invisible choice would mean it is a legal
+option but does not appear in the menu. Any number of invisible choices may be
+defined.) Invisible choices should be made known to a user either in the prompt
+or in a help message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that the process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI label\fR\fR
+.ad
+.RS 15n
+.rt
+Define a label, \fIlabel\fR, to print above the menu.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI max\fR\fR
+.ad
+.RS 15n
+.rt
+Define the maximum number of menu choices that the user can choose. The default
+is 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that menu items should not be displayed in alphabetical order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that only one menu token will be returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 15n
+.rt
+Define the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI signal\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that process \fBID\fR \fIpid\fR defined with the \fB-k\fR option is to
+be sent signal \fI signal\fR when quit is chosen. If no signal is specified,
+\fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that menu items should be displayed as an unnumbered list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 15n
+.rt
+Specify that prompt, help and error messages will be formatted to a line length
+of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIchoice\fR\fR
+.ad
+.RS 10n
+.rt
+Define menu items. Items should be separated by white space or newline.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or inability to open
+file on \fB-f\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 5n
+.rt
+No choices from which to choose.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The user may input the number of the menu item if choices are numbered or as
+much of the string required for a unique identification of the item. Long menus
+are paged with 10 items per page.
+.sp
+.LP
+When menu entries are defined both in a file (by using the \fB-f\fR option) and
+also on the command line, they are usually combined alphabetically. However, if
+the \fB-n\fR option is used to suppress alphabetical ordering, then the
+entries defined in the file are shown first, followed by the options defined on
+the command line.
+.sp
+.LP
+The default prompt for \fBckitem\fR is:
+.sp
+.in +2
+.nf
+Enter selection [?,??,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+One question mark will give a help message and then redisplay the prompt. Two
+question marks will give a help message and then redisplay the menu label, the
+menu and the prompt.
+.sp
+.LP
+The default error message if you typed a number is:
+.sp
+.in +2
+.nf
+ERROR: Bad numeric choice specification
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message if you typed a string is:
+.sp
+.in +2
+.nf
+ERROR: Entry does not match available menu selection. Enter the number
+of the menu item you wish to select, the token which is associated
+with the menu item, or a partial string which uniquely identifies the
+token for the menu item. Enter ?? to reprint the menu.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+Enter the number of the menu item you wish to select, the token
+which is associated with the menu item, or a partial string which
+uniquely identifies the token for the menu item. Enter ? to
+reprint the menu.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR.
diff --git a/usr/src/man/man1/ckkeywd.1 b/usr/src/man/man1/ckkeywd.1
new file mode 100644
index 0000000000..7ff449ab79
--- /dev/null
+++ b/usr/src/man/man1/ckkeywd.1
@@ -0,0 +1,228 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckkeywd 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckkeywd \- prompts for and validates a keyword
+.SH SYNOPSIS
+.LP
+.nf
+\fBckkeywd\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR] [\fB-e\fR \fIerror\fR]
+ [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]] \fIkeyword\fR [...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBckkeywd\fR prompts a user and validates the response. It defines, among
+other things, a prompt message whose response should be one of a list of
+keywords, text for help and error messages, and a default value (which will be
+returned if the user responds with a carriage return). The answer returned
+from this command must match one of the defined list of keywords.
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including newline) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde
+is placed at the beginning or end of a message definition, the default text
+will be inserted at that point, allowing both custom text and the default text
+to be displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) will be displayed.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fI error\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI help\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI signal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fI signal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIkeyword\fR\fR
+.ad
+.RS 11n
+.rt
+Defines the keyword, or list of keywords, against which the answer will be
+verified.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or no keywords from
+which to choose, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default prompt for \fBckkeywd\fR is:
+.sp
+.in +2
+.nf
+Enter appropriate value [\fIkeyword\fR,[\|.\|.\|.\|],?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message is:
+.sp
+.in +2
+.nf
+ERROR: Please enter one of the following keywords: \fIkeyword\fR,[\|.\|.\|.\|],q
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+\fIkeyword\fR\fB,[\|.\|.\|.\|],q\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR.
diff --git a/usr/src/man/man1/ckpath.1 b/usr/src/man/man1/ckpath.1
new file mode 100644
index 0000000000..8627d29fbb
--- /dev/null
+++ b/usr/src/man/man1/ckpath.1
@@ -0,0 +1,464 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckpath 1 "4 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+ckpath, errpath, helppath, valpath \- display a prompt; verify and return a
+pathname
+.SH SYNOPSIS
+.LP
+.nf
+\fBckpath\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-a\fR | l] [\fB-b\fR | c | f | y]
+ [\fB-n\fR [o | z]] [\fB-rtwx\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errpath\fR [\fB-W\fR \fIwidth\fR] [\fB-a\fR | l] [\fB-b\fR | c | f | y]
+ [\fB-n\fR [o | z]] [\fB-rtwx\fR] [\fB-e\fR \fIerror\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helppath\fR [\fB-W\fR \fIwidth\fR] [\fB-a\fR | l] [\fB-b\fR | c | f | y]
+ [\fB-n\fR [o | z]] [\fB-rtwx\fR] [\fB-h\fR \fIhelp\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valpath\fR [\fB-a\fR | l] [\fB-b\fR | c | f | y]
+ [\fB-n\fR [o | z]] [\fB-rtwx\fR] \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckpath\fR utility prompts a user and validates the response. It defines,
+among other things, a prompt message whose response should be a pathname, text
+for help and error messages, and a default value (which is returned if the user
+responds with a RETURN).
+.sp
+.LP
+The pathname must obey the criteria specified by the first group of options. If
+no criteria is defined, the pathname must be for a normal file that does not
+yet exist. If neither \fB-a\fR (absolute) or \fB-l\fR (relative) is given, then
+either is assumed to be valid.
+.sp
+.LP
+All messages are limited in length to 79 characters and are formatted
+automatically. Tabs and newlines are removed after a single white space
+character in a message definition, but spaces are not removed. When a tilde is
+placed at the beginning or end of a message definition, the default text is
+inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under EXAMPLES) is displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckpath\fR command. They are
+\fBerrpath\fR (which formats and displays an error message on the standard
+output), \fBhelppath\fR (which formats and displays a help message on the
+standard output), and \fBvalpath\fR (which validates a response).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be an absolute path.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be a block special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be a character special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdefault\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be a regular file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhelp\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help message as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to quit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be a relative path.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must not exist (must be new).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must exist (must be old).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIprompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that \fBquit\fR is not allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be readable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be creatable (touchable). Pathname will be created if it does not
+already exist.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be writable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIwidth\fR\fR
+.ad
+.RS 14n
+.rt
+Specify that prompt, help and error messages be formatted to a line length of
+\fIwidth\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be executable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must be a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.RS 14n
+.rt
+Pathname must have a file having a size greater than zero bytes.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against validation options.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The text of the default messages for \fBckpath\fR depends upon the criteria
+options that have been used.
+.LP
+\fBExample 1 \fRDefault prompt
+.sp
+.LP
+An example default prompt for \fBckpath\fR (using the \fB-a\fR option) is:
+
+.sp
+.in +2
+.nf
+example% \fBckpath \fR\fB-a\fR
+Enter an absolute pathname [?,q]
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDefault error message
+.sp
+.LP
+An example default error message (using the \fB-a\fR option) is:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/errpath \fR\fB-a\fR
+ERROR: A pathname is a filename, optionally preceded by parent
+ directories.
+ The pathname you enter: - must begin with a slash (/)
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDefault help message
+.sp
+.LP
+An example default help message (using the \fB-a\fR option) is:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/helppath \fR\fB-a\fR
+A pathname is a filename, optionally preceded by parent directories.
+The pathname you enter: - must begin with a slash (/)
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRThe quit option
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. Quit input gets a trailing newline.
+
+.LP
+\fBExample 5 \fRUsing the valpath module
+.sp
+.LP
+The \fBvalpath\fR module will produce a usage message on stderr. It returns
+\fB0\fR for success and non-zero for failure.
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/valpath\fR
+usage: valpath [\fB-[a|l][b|c|f|y][n|[o|z]]rtwx\fR] input
+ .
+ .
+ .
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Mutually exclusive options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 5n
+.rt
+Mutually exclusive options.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsignal.h\fR(3HEAD), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ckrange.1 b/usr/src/man/man1/ckrange.1
new file mode 100644
index 0000000000..6190fd86aa
--- /dev/null
+++ b/usr/src/man/man1/ckrange.1
@@ -0,0 +1,358 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckrange 1 "4 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+ckrange, errange, helprange, valrange \- prompts for and validates an integer
+.SH SYNOPSIS
+.LP
+.nf
+\fBckrange\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-l\fR \fIlower\fR] [\fB-u\fR \fIupper\fR] [\fB-b\fR \fIbase\fR]
+ [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR] [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR]
+ [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errange\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR] [\fB-l\fR \fIlower\fR]
+ [\fB-u\fR \fIupper\fR] [\fB-b\fR \fIbase\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helprange\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR] [\fB-l\fR \fIlower\fR]
+ [\fB-u\fR \fIupper\fR] [\fB-b\fR \fIbase\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valrange\fR [\fB-l\fR \fIlower\fR] [\fB-u\fR \fIupper\fR] [\fB-b\fR \fIbase\fR] \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckrange\fR utility prompts a user for an integer between a specified
+range and determines whether this response is valid. It defines, among other
+things, a prompt message whose response should be an integer in the range
+specified, text for help and error messages, and a default value (which is
+returned if the user responds with a RETURN).
+.sp
+.LP
+This command also defines a range for valid input. If either the lower or upper
+limit is left undefined, then the range is bounded on only one end.
+.sp
+.LP
+All messages are limited in length to 79 characters and are formatted
+automatically. Tabs and newlines are removed after a single whitespace
+character in a message definition, but spaces are not removed. When a tilde is
+placed at the beginning or end of a message definition, the default text will
+be inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under EXAMPLES) is displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckrange\fR command. They are
+\fBerrange\fR (which formats and displays an error message on the standard
+output), \fBhelprange\fR (which formats and displays a help message on the
+standard output), and \fBvalrange\fR (which validates a response).
+.sp
+.LP
+\fBNote:\fR Negative "input" arguments confuse \fBgetopt\fR in \fBvalrange\fR.
+By inserting a "\(mi" before the argument, \fBgetopt\fR processing will stop.
+See \fBgetopt\fR(1) and \fBIntro\fR(1) about \fBgetopt\fR parameter handling.
+\fBgetopt\fR is used to parse positional parameters and to check for legal
+options.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbase\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the base for input. Must be 2 to 36, default is 10. Base conversion
+uses \fBstrtol\fR(3C). Output is always base 10.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdefault\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. \fIdefault\fR is converted using
+\fBstrtol\fR(3C) in the desired base. Any characters invalid in the specified
+base will terminate the \fBstrtol\fR conversion without error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhelp\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help message as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to quit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlower\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the lower limit of the range as \fIlower\fR. Default is the machine's
+largest negative long.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIprompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIupper\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the upper limit of the range as \fIupper\fR. Default is the machine's
+largest positive long.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIwidth\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against upper and lower limits and base.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDefault base 10 prompt
+.sp
+.LP
+The default base 10 prompt for \fBckrange\fR is:
+
+.sp
+.in +2
+.nf
+example% \fBckrange\fR
+Enter an integer between \fIlower_bound \fRand
+\fIupper_bound \fR[\fIlower_bound\(miupper_bound\fR,?,q]:
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDefault base 10 error message
+.sp
+.LP
+The default base 10 error message is:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/errange\fR
+ERROR: Please enter an integer between \fIlower_bound \e\fR
+ and \fIupper_bound\fR.
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDefault base 10 help message
+.sp
+.LP
+The default base 10 help message is:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/helprange\fR
+Please enter an integer between \fIlower_bound\fR and \fIupper_bound\fR.
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRChanging messages for a base other than 10
+.sp
+.LP
+The messages are changed from ``integer'' to ``base \fIbase\fR integer'' if the
+base is set to a number other than 10. For example,
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/helprange -b 36\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRUsing the quit option
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. Quit input gets a trailing newline.
+
+.LP
+\fBExample 6 \fRUsing the valrange module
+.sp
+.LP
+The \fBvalrange\fR module will produce a usage message on stderr. It returns
+\fB0\fR for success and non-zero for failure.
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/valrange\fR
+usage: valrange [-l lower] [-u upper] [-b base] input
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBIntro\fR(1), \fBgetopt\fR(1), \fBstrtol\fR(3C), \fBattributes\fR(5),
+\fBsignal.h\fR(3HEAD)
diff --git a/usr/src/man/man1/ckstr.1 b/usr/src/man/man1/ckstr.1
new file mode 100644
index 0000000000..0339fb6557
--- /dev/null
+++ b/usr/src/man/man1/ckstr.1
@@ -0,0 +1,332 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckstr 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckstr, errstr, helpstr, valstr \- display a prompt; verify and return a string
+answer
+.SH SYNOPSIS
+.LP
+.nf
+\fBckstr\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [ [\fB-r\fR \fIregexp\fR] [...]] [\fB-l\fR \fIlength\fR]
+ [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR] [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR]
+ [\fB-k\fR \fIpid\fR [\fB- s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errstr\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR] [\fB-l\fR \fIlength\fR]
+ [ [\fB-r\fR \fIregexp\fR] [...]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpstr\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR] [\fB-l\fR \fIlength\fR]
+ [ [\fB-r\fR \fIregexp\fR] [...]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valstr\fR [\fB-l\fR \fIlength\fR] [ [\fB-r\fR \fIregexp\fR] [...]] \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckstr\fR utility prompts a user and validates the response. It defines,
+among other things, a prompt message whose response should be a string, text
+for help and error messages, and a default value (which are returned if the
+user responds with a RETURN).
+.sp
+.LP
+The answer returned from this command must match the defined regular expression
+and be no longer than the length specified. If no regular expression is given,
+valid input must be a string with a length less than or equal to the length
+defined with no internal, leading or trailing white space. If no length is
+defined, the length is not checked.
+.sp
+.LP
+All messages are limited in length to 79 characters and are formatted
+automatically. Tabs and newlines are removed after a single white space
+character in a message definition, but spaces are not removed. When a tilde is
+placed at the beginning or end of a message definition, the default text will
+be inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under EXAMPLES) is displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckstr\fR command. They are
+\fBerrstr\fR (which formats and displays an error message on the standard
+output), \fBhelpstr\fR (which formats and displays a help message on the
+standard output), and \fBvalstr\fR (which validates a response).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdefault\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fI error\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhelp\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help message as \fI help\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to quit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlength\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies the maximum length of the input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIprompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that \fBquit\fR will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIregexp\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies a regular expression, \fI regexp\fR, against which the input should
+be validated. May include white space. If multiple expressions are defined, the
+answer need match only one of them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIwidth\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against format length and/or regular expression criteria.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDefault prompt
+.sp
+.LP
+The default prompt for \fBckstr\fR is:
+
+.sp
+.in +2
+.nf
+example% \fBckstr\fR
+Enter an appropriate value [?,q]:
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDefault error message
+.sp
+.LP
+The default error message is dependent upon the type of validation involved.
+The user will be told either that the length or the pattern matching failed.
+The default error message is:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/errstr\fR
+ERROR: Please enter a string which contains no embedded,
+leading or trailing spaces or tabs.
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDefault help message
+.sp
+.LP
+The default help message is also dependent upon the type of validation
+involved. If a regular expression has been defined, the message is:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/helpstr \fR\fB-r\fR\fB regexp\fR
+Please enter a string which matches the following pattern:
+regexp
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Other messages define the length requirement and the definition of a string.
+
+.LP
+\fBExample 4 \fRUsing the quit option
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. Quit input gets a trailing newline.
+
+.LP
+\fBExample 5 \fRUsing the valstr module
+.sp
+.LP
+The \fBvalstr\fR module will produce a usage message on stderr. It returns
+\fB0\fR for success and non-zero for failure.
+
+.sp
+.in +2
+.nf
+example% \fB/usr/sadm/bin/valstr\fR
+usage: valstr [\fB-l\fR length] [[\fB-r\fR regexp] [\|.\|.\|.\|]] input
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid regular expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsignal.h\fR(3HEAD), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/cksum.1 b/usr/src/man/man1/cksum.1
new file mode 100644
index 0000000000..316ca34a8f
--- /dev/null
+++ b/usr/src/man/man1/cksum.1
@@ -0,0 +1,178 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cksum 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+cksum \- write file checksums and sizes
+.SH SYNOPSIS
+.LP
+.nf
+\fBcksum\fR [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcksum\fR command calculates and writes to standard output a cyclic
+redundancy check (CRC) for each input file, and also writes to standard output
+the number of octets in each file.
+.sp
+.LP
+For each file processed successfully, \fBcksum\fR will write in the following
+format:
+.sp
+.LP
+\fB"%u %d %s\en"\fR <\fIchecksum\fR>, <\fI# of octets\fR>, <\fIpath name\fR>
+.sp
+.LP
+If no \fIfile\fR operand was specified, the path name and its leading space
+will be omitted.
+.sp
+.LP
+The CRC used is based on the polynomial used for CRC error checking in the
+referenced Ethernet standard.
+.sp
+.LP
+The encoding for the CRC checksum is defined by the generating polynomial:
+.sp
+.LP
+\fIG\|\fR(\fIx\fR) = \fIx\fR^32 + \fIx\fR^26 + \fIx\fR^23 + \fIx\fR^22 +
+\fIx\fR^16 + \fIx\fR^12 + \fIx\fR^11 + \fIx\fR^10 + \fIx\fR^8 + \fIx\fR^7 +
+\fIx\fR^5 + \fIx\fR^4 + \fIx\fR^2 + \fIx\fR + 1
+.sp
+.LP
+Mathematically, the CRC value corresponding to a given file is defined by the
+following procedure:
+.RS +4
+.TP
+1.
+The \fIn\fR bits to be evaluated are considered to be the coefficients of a
+mod 2 polynomial \fIM\fR(\fIx\fR) of degree \fIn\fR\(mi\fI1.\fR These \fIn\fR
+bits are the bits from the file, with the most significant bit being the most
+significant bit of the first octet of the file and the last bit being the least
+significant bit of the last octet, padded with zero bits (if necessary) to
+achieve an integral number of octets, followed by one or more octets
+representing the length of the file as a binary value, least significant octet
+first. The smallest number of octets capable of representing this integer is
+used.
+.RE
+.RS +4
+.TP
+2.
+\fIM\fR(\fIx\fR) is multiplied by \fIx\fR ^\fI32\fR (that is, shifted left
+32 bits) and divided by \fIG\fR(\fIx\fR) using mod 2 division, producing a
+remainder \fIR\fR(\fIx\fR) of degree \(<= 31.
+.RE
+.RS +4
+.TP
+3.
+The coefficients of \fIR\fR(\fIx\fR) are considered to be a 32-bit sequence.
+.RE
+.RS +4
+.TP
+4.
+The bit sequence is complemented and the result is the CRC.
+.RE
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be checked. If no \fIfile\fR operands are specified,
+the standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBcksum\fR command is typically used to quickly compare a suspect file
+against a trusted version of the same, such as to ensure that files transmitted
+over noisy media arrive intact. However, this comparison cannot be considered
+cryptographically secure. The chances of a damaged file producing the same CRC
+as the original are astronomically small; deliberate deception is difficult,
+but probably not impossible.
+.sp
+.LP
+Although input files to \fBcksum\fR can be any type, the results need not be
+what would be expected on character special device files. Since this document
+does not specify the block size used when doing input, checksums of character
+special files need not process all of the data in those files.
+.sp
+.LP
+The algorithm is expressed in terms of a bitstream divided into octets. If a
+file is transmitted between two systems and undergoes any data transformation
+(such as moving 8-bit characters into 9-bit bytes or changing "Little Endian"
+byte ordering to "Big Endian"), identical CRC values cannot be expected.
+Implementations performing such transformations may extend \fBcksum\fR to
+handle such situations.
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcksum\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcksum\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All files were processed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdigest\fR(1), \fBsum\fR(1), \fBbart\fR(1M), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/cktime.1 b/usr/src/man/man1/cktime.1
new file mode 100644
index 0000000000..c73a36d9f0
--- /dev/null
+++ b/usr/src/man/man1/cktime.1
@@ -0,0 +1,290 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cktime 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+cktime, errtime, helptime, valtime \- display a prompt; verify and return a
+time of day
+.SH SYNOPSIS
+.LP
+.nf
+\fBcktime\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-f\fR \fIformat\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/errtime\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR] [\fB-f\fR \fIformat\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helptime\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR] [\fB-f\fR \fIformat\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valtime\fR [\fB-f\fR \fIformat\fR] \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcktime\fR utility prompts a user and validates the response. It defines,
+among other things, a prompt message whose response should be a time, text for
+help and error messages, and a default value (which is returned if the user
+responds with a RETURN). The user response must match the defined format for
+the time of day.
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including \fBNEWLINE)\fR
+is stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde
+is placed at the beginning or end of a message definition, the default text is
+inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) is displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBcktime\fR command. They are
+\fBerrtime\fR (which formats and displays an error message), \fBhelptime\fR
+(which formats and displays a help message), and \fBvaltime\fR (which validates
+a response). These modules should be used in conjunction with \fBFML\fR
+objects. In this instance, the \fBFML\fR object defines the prompt. When
+\fBformat\fR is defined in the \fBerrtime\fR and \fBhelptime\fR modules, the
+messages will describe the expected format.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fIerror\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIformat\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies the format against which the input will be verified. Possible formats
+and their definitions are:
+.sp
+.in +2
+.nf
+\fB%H\fR = hour (00 - 23)
+\fB%I\fR = hour (00 - 12)
+\fB%M\fR = minute (00 - 59)
+\fB%p\fR = ante meridian or post meridian
+\fB%r\fR = time as \fB%I:%M:%S %p\fR
+\fB%R\fR = time as \fB%H:%M\fR (the default format)
+\fB%S\fR = seconds (00 - 59)
+\fB%T\fR = time as \fB%H:%M:%S\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhelp\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fIhelp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against format criteria.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error .
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit) .
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 5n
+.rt
+Garbled format argument.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default prompt for \fBcktime\fR is:
+.sp
+.in +2
+.nf
+Enter a time of day [?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message is:
+.sp
+.in +2
+.nf
+ERROR: Please enter the time of day. Format is <format>.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+Please enter the time of day. Format is <format>.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. The \fBvaltime\fR module will not produce any output.
+It returns \fB0\fR for success and non-zero for failure.
diff --git a/usr/src/man/man1/ckuid.1 b/usr/src/man/man1/ckuid.1
new file mode 100644
index 0000000000..ddb5b51baa
--- /dev/null
+++ b/usr/src/man/man1/ckuid.1
@@ -0,0 +1,293 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckuid 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckuid, erruid, helpuid, valuid \- prompts for and validates a user ID
+.SH SYNOPSIS
+.LP
+.nf
+\fBckuid\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-m\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
+ [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/erruid\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpuid\fR [\fB-W\fR \fIwidth\fR] [\fB-m\fR] [\fB-h\fR \fIhelp\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valuid\fR \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBckuid\fR utility prompts a user and validates the response. It defines,
+among other things, a prompt message whose response should be an existing user
+\fBID,\fR text for help and error messages, and a default value (which are
+returned if the user responds with a RETURN).
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including NEWLINE) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
+placed at the beginning or end of a message definition, the default text is
+inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) is displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckuid\fR command. They are
+\fBerruid\fR (which formats and displays an error message), \fBhelpuid\fR
+(which formats and displays a help message), and \fBvaluid\fR (which validates
+a response). These modules should be used in conjunction with \fBFML\fR
+objects. In this instance, the \fBFML\fR object defines the prompt.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fIerror\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhelp\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fIhelp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 14n
+.rt
+Displays a list of all logins when help is requested or when the user makes an
+error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified against \fB/etc/passwd\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default prompt for \fBckuid\fR is:
+.sp
+.in +2
+.nf
+Enter the login name of an existing user [?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message is:
+.sp
+.in +2
+.nf
+ERROR - Please enter the login name of an existing user.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the \fB-m\fR option is used, the default error message is:
+.sp
+.in +2
+.nf
+ERROR: Please enter one of the following login names: <List>
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+Please enter the login name of an existing user.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the \fB-m\fR option is used, the default help message is:
+.sp
+.in +2
+.nf
+Please enter one of the following login names: <List>
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. The \fBvaluid\fR module will not produce any output.
+It returns \fB0\fR for success and non-zero for failure.
diff --git a/usr/src/man/man1/ckyorn.1 b/usr/src/man/man1/ckyorn.1
new file mode 100644
index 0000000000..6f55cb5545
--- /dev/null
+++ b/usr/src/man/man1/ckyorn.1
@@ -0,0 +1,261 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ckyorn 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+ckyorn, erryorn, helpyorn, valyorn \- prompts for and validates yes/no
+.SH SYNOPSIS
+.LP
+.nf
+\fBckyorn\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR] [\fB-e\fR \fIerror\fR]
+ [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/erryorn\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/helpyorn\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/sadm/bin/valyorn\fR \fIinput\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBckyorn\fR prompts a user and validates the response. It defines, among other
+things, a prompt message for a yes or no answer, text for help and error
+messages, and a default value (which is returned if the user responds with a
+RETURN).
+.sp
+.LP
+All messages are limited in length to 70 characters and are formatted
+automatically. Any white space used in the definition (including newline) is
+stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
+placed at the beginning or end of a message definition, the default text is
+inserted at that point, allowing both custom text and the default text to be
+displayed.
+.sp
+.LP
+If the prompt, help or error message is not defined, the default message (as
+defined under \fBNOTES\fR) is displayed.
+.sp
+.LP
+Three visual tool modules are linked to the \fBckyorn\fR command. They are
+\fBerryorn\fR (which formats and displays an error message), \fBhelpyorn\fR
+(which formats and displays a help message), and \fBvalyorn\fR (which validates
+a response). These modules should be used in conjunction with \fBFACE\fR
+objects. In this instance, the \fBFACE\fR object defines the prompt.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI default\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the default value as \fIdefault\fR. The default is not validated and so
+does not have to meet any criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIerror\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the error message as \fIerror\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhelp\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the help messages as \fIhelp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fI pid\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
+chooses to abort.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI prompt\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the prompt message as \fIprompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that quit will not be allowed as a valid response.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
+is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
+specified, \fBSIGTERM\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fI width\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies that prompt, help and error messages will be formatted to a line
+length of \fIwidth\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 9n
+.rt
+Input to be verified as \fBy\fR, \fByes\fR, or \fBn\fR, \fBno\fR (in any
+combination of upper- and lower-case letters).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+\fBEOF\fR on input, or negative width on \fB-W\fR option, or usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+User termination (quit).
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default prompt for \fBckyorn\fR is:
+.sp
+.in +2
+.nf
+Yes or No [y,n,?,q]:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default error message is:
+.sp
+.in +2
+.nf
+ERROR - Please enter yes or no.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default help message is:
+.sp
+.in +2
+.nf
+To respond in the affirmative, enter y, yes, Y, or YES.
+To respond in the negative, enter n, no, N, or NO.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the quit option is chosen (and allowed), \fBq\fR is returned along with
+the return code \fB3\fR. The \fBvalyorn\fR module will not produce any output.
+It returns \fB0\fR for success and non-zero for failure.
diff --git a/usr/src/man/man1/clear.1 b/usr/src/man/man1/clear.1
new file mode 100644
index 0000000000..48834bd90b
--- /dev/null
+++ b/usr/src/man/man1/clear.1
@@ -0,0 +1,38 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH clear 1 "12 Jul 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+clear \- clear the terminal screen
+.SH SYNOPSIS
+.LP
+.nf
+\fBclear\fR [\fIterm\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBclear\fR utility clears the terminal screen if this is possible. It
+looks in the environment for the terminal type, if this is not already
+specified by the \fIterm\fR operand, and then looks up the terminfo database to
+figure out how to clear the screen.
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIterm\fR\fR
+.ad
+.RS 8n
+.rt
+Indicates the type of terminal. Normally, this operand is unnecessary because
+the default is taken from the environment variable \fBTERM\fR.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtput\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/cmp.1 b/usr/src/man/man1/cmp.1
new file mode 100644
index 0000000000..c523a48dcd
--- /dev/null
+++ b/usr/src/man/man1/cmp.1
@@ -0,0 +1,181 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cmp 1 "19 Jul 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+cmp \- compare two files
+.SH SYNOPSIS
+.LP
+.nf
+\fBcmp\fR [\fB-l\fR | \fB-s\fR] \fIfile1\fR \fIfile2\fR [\fIskip1\fR] [\fIskip2\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcmp\fR utility compares two files. \fBcmp\fR writes no output if the
+files are the same. Under default options, if they differ, it writes to
+standard output the byte and line numbers at which the first difference
+occurred. Bytes and lines are numbered beginning with 1. If one file is an
+initial subsequence of the other, that fact is noted. \fIskip1\fR and
+\fIskip2\fR are initial byte offsets into \fIfile1\fR and \fIfile2\fR
+respectively, and can be either octal or decimal. A leading 0 denotes octal.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Write the byte number (decimal) and the differing bytes (octal) for each
+difference.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Write nothing for differing files. Return exit status only.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR\fR
+.ad
+.RS 9n
+.rt
+A path name of the first file to be compared. If \fIfile1\fR is \fB\(mi\fR, the
+standard input is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile2\fR\fR
+.ad
+.RS 9n
+.rt
+A path name of the second file to be compared. If \fIfile2\fR is \fB\(mi\fR,
+the standard input is used.
+.RE
+
+.sp
+.LP
+If both \fIfile1\fR and \fIfile2\fR refer to standard input or refer to the
+same \fBFIFO\fR special, block special or character special file, an error
+results.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcmp\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRComparing Files Byte for Byte
+.sp
+.LP
+The following example does a byte for byte comparison of \fIfile1\fR and
+\fIfile2\fR:
+
+.sp
+.in +2
+.nf
+example% \fBcmp file1 file2 0 1024\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+It skips the first 1024 bytes in \fIfile2\fR before starting the comparison.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcmp\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following error values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The files are identical.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+The files are different. This includes the case where one file is identical to
+the first part of the other.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcomm\fR(1), \fBdiff\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/col.1 b/usr/src/man/man1/col.1
new file mode 100644
index 0000000000..531b998f17
--- /dev/null
+++ b/usr/src/man/man1/col.1
@@ -0,0 +1,194 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH col 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+col \- reverse line-feeds filter
+.SH SYNOPSIS
+.LP
+.nf
+\fBcol\fR [\fB-bfpx\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcol\fR utility reads from the standard input and writes to the standard
+output. It performs the line overlays implied by reverse line-feeds, and by
+forward and reverse half-line-feeds. Unless \fB-x\fR is used, all blank
+characters in the input will be converted to tab characters wherever possible.
+\fBcol\fR is particularly useful for filtering multi-column output made with
+the \fB\&.rt\fR command of \fBnroff\fR(1) and output resulting from use of the
+\fBtbl\fR(1) preprocessor.
+.sp
+.LP
+The \fBASCII\fR control characters \fBSO\fR and \fBSI\fR are assumed by
+\fBcol\fR to start and end text in an alternative character set. The character
+set to which each input character belongs is remembered, and on output \fBSI\fR
+and \fBSO\fR characters are generated as appropriate to ensure that each
+character is written in the correct character set.
+.sp
+.LP
+On input, the only control characters accepted are space, backspace, tab,
+carriage-return and newline characters, \fBSI,\fR \fBSO,\fR \fBVT,\fR reverse
+line-feed, forward half-line-feed and reverse half-line-feed. The \fBVT\fR
+character is an alternative form of full reverse line-feed, included for
+compatibility with some earlier programs of this type. The only other
+characters to be copied to the output are those that are printable.
+.sp
+.LP
+The \fBASCII\fR codes for the control functions and line-motion sequences
+mentioned above are as given in the table below. \fBESC\fR stands for the
+\fBASCII\fR escape character, with the octal code 033; \fBESC\fR\fB\(mi\fR
+means a sequence of two characters, \fBESC\fR followed by the character
+\fBx\fR.
+.sp
+
+.sp
+.TS
+tab();
+lw(2.75i) lw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+reverse line-feedESC\(mi7
+reverse half-line-feedESC\(mi8
+forward half-line-feedESC\(mi9
+vertical-tab (VT)013
+start-of-text (SO)016
+end-of-text (SI)017
+.TE
+
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 7n
+.rt
+Assume that the output device in use is not capable of backspacing. In this
+case, if two or more characters are to appear in the same place, only the last
+one read will be output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 7n
+.rt
+Although \fBcol\fR accepts half-line motions in its input, it normally does not
+emit them on output. Instead, text that would appear between lines is moved to
+the next lower full-line boundary. This treatment can be suppressed by the
+\fB-f\fR (fine) option; in this case, the output from \fBcol\fR may contain
+forward half-line-feeds (ESC-9), but will still never contain either kind of
+reverse line motion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fR
+.ad
+.RS 7n
+.rt
+Normally, \fBcol\fR will ignore any escape sequences unknown to it that are
+found in its input; the \fB-p\fR option may be used to cause \fBcol\fR to
+output these sequences as regular characters, subject to overprinting from
+reverse line motions. The use of this option is highly discouraged unless the
+user is fully aware of the textual position of the escape sequences.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fR
+.ad
+.RS 7n
+.rt
+Prevent \fBcol\fR from converting blank characters to tab characters on output
+wherever possible. Tab stops are considered to be at each column position
+\fIn\fR such that \fIn\fR modulo 8 equals 1.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcol\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following error values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+CSIenabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBnroff\fR(1), \fBtbl\fR(1), \fBascii\fR(5), \fBattributes\fR(5),
+\fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+The input format accepted by \fBcol\fR matches the output produced by
+\fBnroff\fR with either the \fB-T37\fR or \fB-Tlp\fR options. Use \fB-T37\fR
+(and the \fB-f\fR option of \fBcol\fR) if the ultimate disposition of the
+output of \fBcol\fR will be a device that can interpret half-line motions, and
+\fB-Tlp\fR otherwise.
+.sp
+.LP
+\fBcol\fR cannot back up more than 128 lines or handle more than 800 characters
+per line.
+.sp
+.LP
+Local vertical motions that would result in backing up over the first line of
+the document are ignored. As a result, the first line must not have any
+superscripts.
diff --git a/usr/src/man/man1/comm.1 b/usr/src/man/man1/comm.1
new file mode 100644
index 0000000000..7c48ee19ac
--- /dev/null
+++ b/usr/src/man/man1/comm.1
@@ -0,0 +1,204 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH comm 1 "3 Mar 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+comm \- select or reject lines common to two files
+.SH SYNOPSIS
+.LP
+.nf
+\fBcomm\fR [\fB-123\fR] \fIfile1\fR \fIfile2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcomm\fR utility reads \fIfile1\fR and \fIfile2\fR, which must be ordered
+in the current collating sequence, and produces three text columns as output:
+lines only in \fIfile1\fR; lines only in \fIfile2\fR; and lines in both files.
+.sp
+.LP
+If the input files were ordered according to the collating sequence of the
+current locale, the lines written will be in the collating sequence of the
+original lines. If not, the results are unspecified.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses the output column of lines unique to \fIfile1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-2\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses the output column of lines unique to \fIfile2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-3\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses the output column of lines duplicated in \fIfile1\fR and
+\fIfile2\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR\fR
+.ad
+.RS 9n
+.rt
+A path name of the first file to be compared. If \fIfile1\fR is \fB\(mi\fR, the
+standard input is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile2\fR\fR
+.ad
+.RS 9n
+.rt
+A path name of the second file to be compared. If \fIfile2\fR is \fB\(mi\fR,
+the standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcomm\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting a list of utilities specified by files
+.sp
+.LP
+If \fIfile1\fR, \fIfile2\fR, and \fIfile3\fR each contain a sorted list of
+utilities, the command
+
+.sp
+.in +2
+.nf
+example% \fBcomm -23 file1 file2 | comm -23 - file3\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints a list of utilities in \fIfile1\fR not specified by either of the other
+files. The entry:
+
+.sp
+.in +2
+.nf
+example% \fBcomm -12 file1 file2 | comm -12 - file3\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints a list of utilities specified by all three files. And the entry:
+
+.sp
+.in +2
+.nf
+example% \fBcomm -12 file2 file3 | comm -23 -file1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints a list of utilities specified by both \fIfile2\fR and \fIfile3\fR, but
+not specified in \fIfile1\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcomm\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input files were successfully output as specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcmp\fR(1), \fBdiff\fR(1), \fBsort\fR(1), \fBuniq\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/command.1 b/usr/src/man/man1/command.1
new file mode 100644
index 0000000000..bf72cdfecc
--- /dev/null
+++ b/usr/src/man/man1/command.1
@@ -0,0 +1,490 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH command 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+command \- execute a simple command
+.SH SYNOPSIS
+.SS "/usr/bin/command"
+.LP
+.nf
+\fBcommand\fR [\fB-p\fR] \fIcommand_name\fR [\fIargument\fR]...
+.fi
+
+.LP
+.nf
+\fBcommand\fR [\fB-v\fR | \fB-V\fR] \fIcommand_name\fR
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBcommand\fR [\fB-pvxV\fR] [\fIcommand_name\fR [\fIargument\fR...]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcommand\fR utility causes the shell to treat the arguments as a simple
+command, suppressing the shell function lookup.
+.sp
+.LP
+If the \fIcommand_name\fR is the same as the name of one of the special
+built-in utilities, the special properties do not occur. In every other
+respect, if \fIcommand_name\fR is not the name of a function, the effect of
+\fBcommand\fR (with no options) are the same as omitting \fBcommand\fR.
+.sp
+.LP
+The \fBcommand\fR utility also provides information concerning how a command
+name is interpreted by the shell. See \fB-v\fR and \fB-V\fR.
+.SS "ksh93"
+.sp
+.LP
+Without the \fB-v\fR or \fB-V\fR option, \fBcommand\fR executes
+\fIcommand_name\fR with arguments specified by \fIargument\fR, suppressing the
+shell function lookup that normally occurs. In addition, if \fIcommand\fR is a
+special built-in command, the special properties are removed so that failures
+do not cause the script that executes it to terminate.
+.sp
+.LP
+If the \fB-v\fR or \fB-V\fR options are specified, \fBcommand\fR is equivalent
+to \fBwhence\fR(1).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported by \fB/usr/bin/command\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Performs the command search using a default value for \fBPATH\fR that is
+guaranteed to find all of the standard utilities.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Writes a string to standard output that indicates the path or command that is
+be used by the shell, in the current shell execution environment to invoke
+\fIcommand_name\fR, but does not invoke \fIcommand_name\fR.
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Utilities, regular built-in utilities, \fIcommand_names\fR including a slash
+character, and any implementation-provided functions that are found using the
+\fBPATH\fR variable is written as absolute path names.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Shell functions, special built-in utilities, regular built-in utilities not
+associated with a \fBPATH\fR search, and shell reserved words are written as
+just their names.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+An alias is written as a command line that represents its alias definition.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, no output is written and the exit status reflects that the name was
+not found.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Writes a string to standard output that indicates how the name specified in the
+\fIcommand_name\fR operand is interpreted by the shell, in the current shell
+execution environment, but does not invoke \fIcommand_name\fR. Although the
+format of this string is unspecified, it indicates in which of the following
+categories \fIcommand_name\fR falls and include the information stated:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Utilities, regular built-in utilities, and any implementation-provided
+functions that are found using the \fBPATH\fR variable is identified as such
+and include the absolute path name in the string.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Other shell functions is identified as functions.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Aliases are identified as aliases and their definitions are included in the
+string.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Special built-in utilities are identified as special built-in utilities.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Regular built-in utilities not associated with a \fBPATH\fR search is
+identified as regular built-in utilities.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Shell reserved words are identified as reserved words.
+.RE
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by \fBksh93\fR \fBcommand\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Causes a default path to be searched rather than the one defined by the value
+of \fBPATH\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Equivalent to:
+.sp
+.in +2
+.nf
+whence \fIcommand\fR [\fIargument\fR ...]
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Equivalent to:
+.sp
+.in +2
+.nf
+whence -v \fIcommand\fR [\fIargument\fR ...]
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+If command fails because there are too many arguments, it is invoked multiple
+times with a subset of the arguments on each invocation. Arguments that occur
+prior to the first word that expand to multiple arguments and arguments that
+occur after the last word that expands to multiple arguments are passed on each
+invocation. The exit status is the maximum invocation exit status.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 16n
+.rt
+One of the strings treated as an argument to \fIcommand_name\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand_name\fR\fR
+.ad
+.RS 16n
+.rt
+The name of a utility or a special built-in utility.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRMaking a Version of \fBcd\fR That Always Prints Out the New
+Working Directory
+.sp
+.LP
+The following example takes a version of \fBcd\fR that always prints out the
+new working directory exactly once:
+
+.sp
+.in +2
+.nf
+cd() {
+ command cd "$@" >/dev/null
+ pwd
+}
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRStarting Off a \fBsecure shell script\fR in Which the Script
+Avoids Being Spoofed by Its Parent
+.sp
+.LP
+The following example starts off a \fBsecure shell script\fR in which the
+script avoids being spoofed by its parent:
+
+.sp
+.in +2
+.nf
+IFS='
+\&'
+# The preceding value should be <space><tab><newline>.
+# Set IFS to its default value.
+\eunalias -a
+# Unset all possible aliases.
+# Note that unalias is escaped to prevent an alias
+# being used for unalias.
+unset -f command
+# Ensure command is not a user function.
+PATH="$(command -p getconf _CS_PATH):$PATH"
+# Put on a reliable PATH prefix.
+# ...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+At this point, given correct permissions on the directories called by
+\fBPATH\fR, the script has the ability to ensure that any utility it calls is
+the intended one. It is being very cautious because it assumes that
+implementation extensions can be present that would allow user functions to
+exist when it is invoked. This capability is not specified by this document,
+but it is not prohibited as an extension. For example, the \fBENV\fR variable
+precedes the invocation of the script with a user startup script. Such a script
+could define functions to spoof the application.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcommand\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 8n
+.rt
+Determine the search path used during the command search, except as described
+under the \fB-p\fR option.
+.RE
+
+.SH EXIT STATUS
+.SS "/usr/bin/command"
+.sp
+.LP
+When the \fB-v\fR or \fB-V\fR options are specified, the following exit values
+are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+The \fIcommand_name\fR could not be found or an error occurred.
+.RE
+
+.sp
+.LP
+Otherwise, the following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 7n
+.rt
+The utility specified by \fIcommand_name\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 7n
+.rt
+An error occurred in the \fBcommand\fR utility or the utility specified by
+\fIcommand_name\fR could not be found.
+.RE
+
+.sp
+.LP
+Otherwise, the exit status of \fBcommand\fR is that of the simple command
+specified by the arguments to \fBcommand\fR.
+.SS "ksh93"
+.sp
+.LP
+If \fIcommand\fR is invoked, the exit status of \fBcommand\fR is that of
+\fIcommand\fR. Otherwise, it is one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcommand_name\fR completed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 7n
+.rt
+\fB-v\fR or \fB-V\fR has been specified and an error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcommand_name\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcommand_name\fR could not be found.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/command"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBsh\fR(1), \fBtype\fR(1), \fBwhence\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/compress.1 b/usr/src/man/man1/compress.1
new file mode 100644
index 0000000000..57046e4136
--- /dev/null
+++ b/usr/src/man/man1/compress.1
@@ -0,0 +1,448 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH compress 1 "13 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+compress, uncompress, zcat \- compress, uncompress files or display expanded
+files
+.SH SYNOPSIS
+.LP
+.nf
+\fBcompress\fR [\fB-fv/\fR] [\fB-b\fR \fIbits\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBcompress\fR \fB-c\fR [\fB-fv\fR] [\fB-b\fR \fIbits\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fBuncompress\fR [\fB-fv\fR] [\fB-c | -/\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBzcat\fR [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.SS "compress"
+.sp
+.LP
+The \fBcompress\fR utility attempts to reduce the size of the named files by
+using adaptive Lempel-Ziv coding. Except when the output is to the standard
+output, each file is replaced by one with the extension \fB\&.Z\fR, while
+keeping the same ownership modes, change times and modification times, ACLs,
+and extended attributes. The compress utility also attempt to set the owner and
+group of \fIfile\fR\fB\&.z\fR to the owner and group of file, but does not fail
+if this cannot be done. If appending the \fB\&.Z\fR to the file pathname would
+make the pathname exceed \fB1023\fR bytes, the command fails. If no files are
+specified, the standard input is compressed to the standard output.
+.sp
+.LP
+The amount of compression obtained depends on the size of the input, the number
+of \fIbits\fR per code, and the distribution of common substrings. Typically,
+text such as source code or English is reduced by 50\(mi60%. Compression is
+generally much better than that achieved by Huffman coding (as used in
+\fBpack\fR(1)) and it takes less time to compute. The \fIbits\fR parameter
+specified during compression is encoded within the compressed file, along with
+a magic number to ensure that neither decompression of random data nor
+recompression of compressed data is subsequently allowed.
+.SS "uncompress"
+.sp
+.LP
+The \fBuncompress\fR utility restores files to their original state after they
+have been compressed using the \fBcompress\fR utility. If no files are
+specified, the standard input is uncompressed to the standard output.
+.sp
+.LP
+This utility supports the uncompressing of any files produced by
+\fBcompress\fR. For files produced by \fBcompress\fR on other systems,
+\fBuncompress\fR supports 9- to 16-bit compression (see \fB-b\fR).
+.SS "zcat"
+.sp
+.LP
+The \fBzcat\fR utility writes to standard output the uncompressed form of files
+that have been compressed using \fBcompress\fR. It is the equivalent of
+\fBuncompress\fR\fB-c\fR. Input files are not affected.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbits\fR\fR
+.ad
+.RS 11n
+.rt
+Sets the upper limit (in bits) for common substring codes. \fIbits\fR must be
+between 9 and 16 (16 is the default). Lowering the number of bits result in
+larger, less compressed files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 11n
+.rt
+Writes to the standard output; no files are changed and no \fB\&.Z\fR files are
+created. The behavior of \fBzcat\fR is identical to that of `\fBuncompress\fR
+\fB-c\fR'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 11n
+.rt
+When compressing, forces compression of \fIfile\fR, even if it does not
+actually reduce the size of the file, or if the corresponding
+\fIfile\fR\fB\&.Z\fR file already exists.
+.sp
+If the \fB-f\fR option is not specified, and the process is not running in the
+background, prompts to verify whether an existing file should be overwritten.
+If the response is affirmative, the existing file is overwritten. When
+uncompressing, does not prompt for overwriting files. If the \fB-f\fR option is
+not specified, and the process is not running in the background, prompts to
+verify whether an existing file should be overwritten. If the standard input is
+not a terminal and \fB-f\fR is not specified, writes a diagnostic message to
+standard error and exits with a status greater than \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 11n
+.rt
+Verbose. Writes to standard error messages concerning the percentage reduction
+or expansion of each file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-/\fR\fR
+.ad
+.RS 11n
+.rt
+When compressing or decompressing, copies any extended system attributes
+associated with the source file to the target file and copies any extended
+system attributes associated with extended attributes of the source file to the
+corresponding extended attributes associated with the target file. If any
+extended system attributes cannot be copied, the original file is retained, a
+diagnostic is written to \fBstderr\fR, and the final exit status is
+\fBnon-zero\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be compressed by \fBcompress\fR, uncompressed by
+\fBuncompress\fR, or whose uncompressed form is written to standard out by
+\fBzcat\fR. If \fIfile\fR is \fB\(mi\fR, or if no \fIfile\fR is specified, the
+standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcompress\fR,
+\fBuncompress\fR, and \fBzcat\fR when encountering files greater than or equal
+to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcompress\fR, \fBuncompress\fR, and \fBzcat\fR:
+\fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+and \fBNLSPATH\fR.
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following error values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 6n
+.rt
+One or more files were not compressed because they would have increased in size
+(and the \fB-f\fR option was not specified).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>2\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBln\fR(1), \fBpack\fR(1), \fBfgetattr\fR(3C), \fBfsetattr\fR(3C),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBlocale\fR(5),
+\fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fBUsage: \fBcompress [-fv/] [-b\fR \fIbits\fR] [\fIfile\fR\|.\|.\|. ]\fR
+.ad
+.br
+.na
+\fB\fBcompress c [-fv] [-b\fR \fIbits\fR] [\fIfile\fR\|.\|.\|. ]\fR
+.ad
+.sp .6
+.RS 4n
+Invalid options were specified on the command line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBUsage: \fBuncompress [-fv] [-c | -/] [\fR\fIfile\fR\fB]...\fR\fR
+.ad
+.sp .6
+.RS 4n
+Invalid options were specified on the command line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBMissing maxbits\fR
+.ad
+.sp .6
+.RS 4n
+Maxbits must follow \fB-b\fR, or invalid maxbits, not a numeric value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR: not in compressed format\fR
+.ad
+.sp .6
+.RS 4n
+The file specified to \fBuncompress\fR has not been compressed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR: compressed with \fIxx\fRbits, can only handle \fIyy\fRbits\fR
+.ad
+.sp .6
+.RS 4n
+\fBfile\fR was compressed by a program that could deal with more \fIbits\fR
+than the compress code on this machine. Recompress the file with smaller
+\fIbits\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR: already has .\|Z suffix -- no change\fR
+.ad
+.sp .6
+.RS 4n
+The file is assumed to be already compressed. Rename the file and try again.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR: already exists; do you wish to overwrite (y or n)?\fR
+.ad
+.sp .6
+.RS 4n
+Respond \fBy\fR if you want the output file to be replaced; \fBn\fR if not.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBuncompress: corrupt input\fR
+.ad
+.sp .6
+.RS 4n
+A \fBSIGSEGV\fR violation was detected, which usually means that the input file
+is corrupted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBCompression:\fIxx.xx\fR\fB%\fR\fR
+.ad
+.sp .6
+.RS 4n
+Percentage of the input saved by compression. (Relevant only for \fB-v\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB- - not a regular file: unchanged\fR
+.ad
+.sp .6
+.RS 4n
+When the input file is not a regular file, (such as a directory), it is left
+unaltered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB- - has \fIxx\fR other links: unchanged\fR
+.ad
+.sp .6
+.RS 4n
+The input file has links; it is left unchanged. See \fBln\fR(1) for more
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB- - file unchanged\fR
+.ad
+.sp .6
+.RS 4n
+No savings are achieved by compression. The input remains uncompressed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB- -filename too long to tack on .Z\fR
+.ad
+.sp .6
+.RS 4n
+The path name is too long to append the \fB\&.Z\fR suffix.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB- -cannot preserve extended attributes. file unchanged\fR
+.ad
+.sp .6
+.RS 4n
+Extended system attributes could not be copied.
+.RE
+
+.SH NOTES
+.sp
+.LP
+Although compressed files are compatible between machines with large memory,
+\fB-b\fR 12 should be used for file transfer to architectures with a small
+process data space (64KB or less).
+.sp
+.LP
+\fBcompress\fR should be more flexible about the existence of the \fB\&.\|Z\fR
+suffix.
diff --git a/usr/src/man/man1/cp.1 b/usr/src/man/man1/cp.1
new file mode 100644
index 0000000000..bda0189e11
--- /dev/null
+++ b/usr/src/man/man1/cp.1
@@ -0,0 +1,539 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cp 1 "30 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+cp \- copy files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/cp\fR [\fB-fip@/\fR] \fIsource_file\fR \fItarget_file\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/cp\fR [\fB-fip@/\fR] \fIsource_file\fR... \fItarget\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/cp\fR \fB-r\fR | \fB-R\fR [\fB-H\fR | \fB-L\fR | \fB-P\fR] [\fB-fip@/\fR] \fIsource_dir\fR... \fItarget\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/cp\fR \fB-R\fR | \fB-R\fR [\fB-H\fR | \fB-L\fR | \fB-P\fR] [\fB-fip@/\fR] \fIsource_dir\fR... \fItarget\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/cp\fR [\fB-fip@/\fR] \fIsource_file\fR \fItarget_file\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/cp\fR [\fB-fip@/\fR] \fIsource_file\fR... \fItarget\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/cp\fR \fB-r\fR | \fB-R\fR [\fB-H\fR | \fB-L\fR | \fB-P\fR] [\fB-fip@/\fR] \fIsource_dir\fR... \fItarget\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/cp\fR \fB-R\fR | \fB-R\fR [\fB-H\fR | \fB-L\fR | \fB-P\fR] [\fB-fip@/\fR] \fIsource_dir\fR... \fItarget\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+In the first synopsis form, neither \fIsource_file\fR nor \fItarget_file\fR are
+directory files, nor can they have the same name. The \fBcp\fR utility copies
+the contents of \fIsource_file\fR to the destination path named by
+\fItarget_file\fR. If \fItarget_file\fR exists, \fBcp\fR overwrites its
+contents, but the mode (and \fBACL\fR if applicable), owner, and group
+associated with it are not changed. The last modification time of
+\fItarget_file\fR and the last access time of \fIsource_file\fR are set to the
+time the copy was made. If \fItarget_file\fR does not exist, \fBcp\fR creates a
+new file named \fItarget_file\fR that has the same mode as \fIsource_file\fR
+except that the sticky bit is not set unless the user is super-user. In this
+case, the owner and group of \fItarget_file\fR are those of the user, unless
+the setgid bit is set on the directory containing the newly created file. If
+the directory's setgid bit is set, the newly created file has the group of the
+containing directory rather than of the creating user. If \fItarget_file\fR is
+a link to another file, \fBcp\fR overwrites the link destination with the
+contents of \fIsource_file\fR; the link(s) from \fItarget_file\fR remains.
+.sp
+.LP
+In the second synopsis form, one or more \fIsource_file\fRs are copied to the
+directory specified by \fItarget\fR. It is an error if any \fIsource_file\fR is
+a file of type directory, if \fItarget\fR either does not exist or is not a
+directory.
+.sp
+.LP
+In the third or fourth synopsis forms, one or more directories specified by
+\fIsource_dir\fR are copied to the directory specified by \fItarget\fR. Either
+the \fB-r\fR or \fB-R\fR must be specified. For each \fIsource_dir\fR, \fBcp\fR
+copies all files and subdirectories.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/cp\fR and
+\fB/usr/xpg4/bin/cp\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Unlink. If a file descriptor for a destination file cannot be obtained, this
+option attempts to unlink the destination file and proceed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+Takes actions based on the type and contents of the file referenced by any
+symbolic link specified as a \fIsource_file\fR operand.
+.sp
+If the \fIsource_file\fR operand is a symbolic link, then \fBcp\fR copies the
+file referenced by the symbolic link for the \fIsource_file\fR operand. All
+other symbolic links encountered during traversal of a file hierarchy are
+preserved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Interactive. \fBcp\fR prompts for confirmation whenever the copy would
+overwrite an existing \fItarget\fR. An affirmative response means that the copy
+should proceed. Any other answer prevents \fBcp\fR from overwriting
+\fItarget\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Takes actions based on the type and contents of the file referenced by any
+symbolic link specified as a \fIsource_file\fR operand or any symbolic links
+encountered during traversal of a file hierarchy.
+.sp
+Copies files referenced by symbolic links. Symbolic links encountered during
+traversal of a file hierarchy are not preserved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Preserve. The \fBcp\fR utility duplicates not only the contents of
+\fIsource_file\fR, but also attempts to preserve its ACL, access and
+modification times, extended attributes, extended system attributes, file mode,
+and owner and group ids.
+.sp
+If \fBcp\fR is unable to preserve the access and modification times, extended
+attributes, or the file mode, \fBcp\fR does not consider it a failure. If
+\fBcp\fR is unable to preserve the owner and group id, the copy does not fail,
+but \fBcp\fR silently clears the \fBS_ISUID\fR and \fBS_ISGID\fR bits from the
+file mode of the target. The copy fails if \fBcp\fR is unable to clear these
+bits. If \fBcp\fR is unable to preserve the ACL or extended system attributes,
+the copy fails. If the copy fails, then a diagnostic message is written to
+\fBstderr\fR and (after processing any remaining operands) \fBcp\fR exits with
+a \fBnon-zero\fR exit status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 6n
+.rt
+Takes actions on any symbolic link specified as a \fIsource_file\fR operand or
+any symbolic link encountered during traversal of a file hierarchy.
+.sp
+Copies symbolic links. Symbolic links encountered during traversal of a file
+hierarchy are preserved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Recursive. \fBcp\fR copies the directory and all its files, including any
+subdirectories and their files to \fItarget\fR. Unless the \fB-H\fR, \fB-L\fR,
+or \fB-P\fR option is specified, the \fB-L\fR option is used as the default
+mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Same as \fB-r\fR, except pipes are replicated, not read from.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-@\fR\fR
+.ad
+.RS 6n
+.rt
+Preserves extended attributes. \fBcp\fR attempts to copy all of the source
+file's extended attributes along with the file data to the destination file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-/\fR\fR
+.ad
+.RS 6n
+.rt
+Preserves extended attributes and extended system attributes. Along with the
+file's data, the \fBcp\fR utility attempts to copy extended attributes and
+extended system attributes from each source file, and extended system
+attributes associated with extended attributes to the destination file. If
+\fBcp\fR is unable to copy extended attributes or extended system attributes,
+then a diagnostic message is written to \fBstderr\fR and (after processing any
+remaining operands) exits with a \fBnon-zero\fR exit status.
+.RE
+
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fR, \fB-L\fR,
+and \fB-P\fR is not considered an error. The last option specified determines
+the behavior of the utility.
+.SS "/usr/bin/cp"
+.sp
+.LP
+If the \fB-p\fR option is specified with either the \fB-@\fR option or the
+\fB-/\fR option, \fB/usr/bin/cp\fR behaves as follows
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When both \fB-p\fR and \fB-@\fR are specified in any order, the copy fails if
+extended attributes cannot be copied.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When both \fB-p\fR and \fB-/\fR are specified in any order, the copy fails if
+extended system attributes cannot be copied.
+.RE
+.SS "/usr/xpg4/bin/cp"
+.sp
+.LP
+If the \fB-p\fR option is specified with either the \fB-@\fR option or the
+\fB-/\fR option, /\fBusr/xpg4/bin/cp\fR behaves as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When both \fB-p\fR and \fB-@\fR are specified, the last option specified
+determines whether the copy fails if extended attributes cannot be preserved.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When both \fB-p\fR and \fB-/\fR are specified, the last option specified
+determines whether the copy fails if extended system attributes cannot be
+preserved.
+.RE
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsource_file\fR\fR
+.ad
+.RS 15n
+.rt
+A pathname of a regular file to be copied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsource_dir\fR\fR
+.ad
+.RS 15n
+.rt
+A pathname of a directory to be copied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItarget_file\fR\fR
+.ad
+.RS 15n
+.rt
+A pathname of an existing or non-existing file, used for the output when a
+single file is copied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItarget\fR\fR
+.ad
+.RS 15n
+.rt
+A pathname of a directory to contain the copied files.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcp\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCopying a File
+.sp
+.LP
+The following example copies a file:
+
+.sp
+.in +2
+.nf
+example% cp goodies goodies.old
+
+example% ls goodies*
+goodies goodies.old
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCopying a List of Files
+.sp
+.LP
+The following example copies a list of files to a destination directory:
+
+.sp
+.in +2
+.nf
+example% cp ~/src/* /tmp
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRCopying a Directory
+.sp
+.LP
+The following example copies a directory, first to a new, and then to an
+existing destination directory
+
+.sp
+.in +2
+.nf
+example% ls ~/bkup
+/usr/example/fred/bkup not found
+
+example% cp \fB-r\fR ~/src ~/bkup
+
+example% ls \fB-R\fR ~/bkup
+x.c y.c z.sh
+
+example% cp \fB-r\fR ~/src ~/bkup
+
+example% ls \fB-R\fR ~/bkup
+src x.c y.c z.sh
+src:
+x.c y.c z.s
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRCopying Extended File System Attributes
+.sp
+.LP
+The following example copies extended file system attributes:
+
+.sp
+.in +2
+.nf
+$ ls -/ c file1
+-rw-r--r-- 1 foo staff 0 Oct 29 20:04 file1
+ {AH-----m--}
+
+$ cp -/ file1 file2
+$ ls -/c file2
+-rw-r--r-- 1 foo staff 0 Oct 29 20:17 file2
+ {AH-----m--}
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRFailing to Copy Extended System Attributes
+.sp
+.LP
+The following example fails to copy extended system attributes:
+
+.sp
+.in +2
+.nf
+$ ls -/c file1
+-rw-r--r-- 1 foo staff 0 Oct 29 20:04 file1
+ {AH-----m--}
+
+$ cp -/ file1 /tmp
+cp: Failed to copy extended system attributes from file1 to /tmp/file1
+
+
+$ ls -/c /tmp/file1
+-rw-r--r-- 1 foo staff 0 Oct 29 20:09 /tmp/file1
+ {}
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcp\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All files were copied successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/cp"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+.TE
+
+.SS "/usr/xpg4/bin/cp"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBchown\fR(1), \fBsetfacl\fR(1), \fButime\fR(2),
+\fBfgetattr\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5), \fBfsattr\fR(5),
+\fBlargefile\fR(5), \fBlocale\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The permission modes of the source file are preserved in the copy.
+.sp
+.LP
+A \fB--\fR permits the user to mark the end of any command line options
+explicitly, thus allowing \fBcp\fR to recognize filename arguments that begin
+with a \fB-\fR.
diff --git a/usr/src/man/man1/cpio.1 b/usr/src/man/man1/cpio.1
new file mode 100644
index 0000000000..dbd0bdd191
--- /dev/null
+++ b/usr/src/man/man1/cpio.1
@@ -0,0 +1,935 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cpio 1 "3 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+cpio \- copy file archives in and out
+.SH SYNOPSIS
+.LP
+.nf
+\fBcpio\fR \fB-i\fR [\fB-bBcdfkmPrsStuvV6@/\fR] [\fB-C\fR \fIbufsize\fR] [\fB-E\fR \fIfile\fR]
+ [\fB-H\fR \fIheader\fR] [\fB-I\fR \fI\fR [\fB-M\fR \fImessage\fR]] [\fB-R\fR \fIid\fR] [\fIpattern\fR]...
+.fi
+
+.LP
+.nf
+\fBcpio\fR \fB-o\fR [\fB-aABcLPvV@/\fR] [\fB-C\fR \fIbufsize\fR] [\fB-H\fR \fIheader\fR]
+ [\fB-O\fR \fIfile\fR [\fB-M\fR \fImessage\fR]]
+.fi
+
+.LP
+.nf
+\fBcpio\fR \fB-p\fR [\fB-adlLmPuvV@/\fR] [\fB-R\fR \fIid\fR] \fIdirectory\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcpio\fR command copies files into and out of a \fBcpio\fR archive. The
+\fBcpio\fR archive can span multiple volumes. The \fB-i\fR, \fB-o\fR, and
+\fB-p\fR options select the action to be performed. The following list
+describes each of the actions. These actions are mutually exclusive.
+.SS "Copy In Mode"
+.sp
+.LP
+\fBcpio\fR \fB-i\fR (copy in) extracts files from the standard input, which is
+assumed to be the product of a previous \fBcpio\fR \fB-o\fR command. Only files
+with names that match one of the \fIpattern\fRs are selected. See \fBsh\fR(1)
+and OPERANDS for more information about \fIpattern\fR. Extracted files are
+conditionally copied into the current directory tree, based on the options
+described below. The permissions of the files are those of the previous \fBcpio
+-o\fR command. The owner and group are the same as the current user, unless the
+current user has the \fB{PRIV_FILE_CHOWN_SELF}\fR privilege. See
+\fBchown\fR(2). If this is the case, owner and group are the same as those
+resulting from the previous \fBcpio -o\fR command. Notice that if \fBcpio\fR
+\fB-i\fR tries to create a file that already exists and the existing file is
+the same age or younger (\fBnewer\fR), \fBcpio\fR outputs a warning message and
+not replace the file. The \fB-u\fR option can be used to unconditionally
+overwrite the existing file.
+.SS "Copy Out Mode"
+.sp
+.LP
+\fBcpio\fR \fB-o\fR (copy out) reads a list of file path names from the
+standard input and copies those files to the standard output, together with
+path name and status information in the form of a \fBcpio\fR archive. Output is
+padded to an 8192-byte boundary by default or to the user-specified block size
+(with the \fB-B\fR or \fB-C\fR options) or to some device-dependent block size
+where necessary (as with the CTC tape).
+.SS "Pass Mode"
+.sp
+.LP
+\fBcpio\fR \fB-p\fR (pass) reads a list of file path names from the standard
+input and conditionally copies those files into the destination directory tree,
+based on the options described below.
+.sp
+.LP
+If the underlying file system of the source file supports detection of holes as
+reported by \fBpathconf\fR(2), the file is a sparse file, and the destination
+file is seekable, then holes in sparse files are preserved in pass mode,
+otherwise holes are filled with zeros.
+.sp
+.LP
+\fBcpio\fR assumes four-byte words.
+.sp
+.LP
+If, when writing to a character device (\fB-o\fR) or reading from a character
+device (\fB-i\fR), \fBcpio\fR reaches the end of a medium (such as the end of a
+diskette), and the \fB-O\fR and \fB-I\fR options are not used, \fBcpio\fR
+prints the following message:
+.sp
+.in +2
+.nf
+To continue, type device/file name when ready.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To continue, you must replace the medium and type the character special device
+name (\fB/dev/rdiskette\fR for example) and press RETURN. You might want to
+continue by directing \fBcpio\fR to use a different device. For example, if you
+have two floppy drives you might want to switch between them so \fBcpio\fR can
+proceed while you are changing the floppies. Press RETURN to cause the
+\fBcpio\fR process to exit.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+(copy in) Reads an archive from the standard input and conditionally extracts
+the files contained in it and places them into the current directory tree.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+(copy out) Reads a list of file path names from the standard input and copies
+those files to the standard output in the form of a \fBcpio\fR archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+(pass) Reads a list of file path names from the standard input and
+conditionally copies those files into the destination directory tree.
+.RE
+
+.sp
+.LP
+The following options can be appended in any sequence to the \fB-i\fR,
+\fB-o\fR, or \fB-p\fR options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 14n
+.rt
+Resets access times of input files after they have been copied, making
+\fBcpio\fR's access invisible. Access times are not reset for linked files when
+\fBcpio\fR \fB-pla\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 14n
+.rt
+Appends files to an archive. The \fB-A\fR option requires the \fB-O\fR option.
+Valid only with archives that are files, or that are on floppy diskettes or
+hard disk partitions. The effect on files that are linked in the existing
+portion of the archive is unpredictable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 14n
+.rt
+Reverses the order of the bytes within each word. Use only with the \fB-i\fR
+option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 14n
+.rt
+Blocks input/output 5120 bytes to the record. The default buffer size is 8192
+bytes when this and the \fB-C\fR options are not used. \fB-B\fR does not apply
+to the \fB-p\fR (pass) option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 14n
+.rt
+Reads or writes header information in \fBASCII\fR character form for
+portability. There are no \fBUID\fR or \fBGID\fR restrictions associated with
+this header format. Use this option between SVR4-based machines, or the
+\fB-H\fR \fBodc\fR option between unknown machines. The \fB-c\fR option implies
+the use of expanded device numbers, which are only supported on SVR4-based
+systems. When transferring files between SunOS 4 or Interactive UNIX and the
+Solaris 2.6 Operating environment or compatible versions, use \fB-H\fR
+\fBodc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIbufsize\fR\fR
+.ad
+.RS 14n
+.rt
+Blocks input/output \fIbufsize\fR bytes to the record, where \fIbufsize\fR is
+replaced by a positive integer. The default buffer size is 8192 bytes when this
+and \fB-B\fR options are not used. \fB-C\fR does not apply to the \fB-p\fR
+(pass) option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 14n
+.rt
+Creates directories as needed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR \fIfile\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies an input file (\fIfile\fR) that contains a list of filenames to be
+extracted from the archive (one filename per line).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 14n
+.rt
+Copies in all files except those in \fIpattern\fRs. See OPERANDS for a
+description of \fIpattern\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR \fIheader\fR\fR
+.ad
+.RS 14n
+.rt
+Reads or writes header information in \fIheader\fR format. Always use this
+option or the \fB-c\fR option when the origin and the destination machines are
+different types. This option is mutually exclusive with options \fB-c\fR and
+\fB-6\fR.
+.sp
+Valid values for \fIheader\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbar\fR\fR
+.ad
+.RS 17n
+.rt
+\fBbar\fR head and format. Used only with the \fB-i\fR option ( read only).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrc\fR | \fBCRC\fR\fR
+.ad
+.RS 17n
+.rt
+\fBASCII\fR header with expanded device numbers and an additional per-file
+checksum. There are no \fBUID\fR or \fBGID\fR restrictions associated with this
+header format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBodc\fR\fR
+.ad
+.RS 17n
+.rt
+\fBASCII\fR header with small device numbers. This is the IEEE/P1003 Data
+Interchange Standard cpio header and format. It has the widest range of
+portability of any of the header formats. It is the official format for
+transferring files between POSIX-conforming systems (see \fBstandards\fR(5)).
+Use this format to communicate with SunOS 4 and Interactive UNIX. This header
+format allows \fBUID\fRs and \fBGID\fRs up to 262143 to be stored in the
+header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtar\fR | \fBTAR\fR\fR
+.ad
+.RS 17n
+.rt
+\fBtar\fR header and format. This is an older \fBtar\fR header format that
+allows \fBUID\fRs and \fBGID\fRs up to 2097151 to be stored in the header. It
+is provided for the reading of legacy archives only, that is, in conjunction
+with option \fB-i\fR.
+.sp
+Specifying this archive format with option \fB-o\fR has the same effect as
+specifying the "ustar" format: the output archive is in \fBustar\fR format, and
+must be read using \fB-H\fR \fBustar\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBustar\fR | \fBUSTAR\fR\fR
+.ad
+.RS 17n
+.rt
+IEEE/P1003 Data Interchange Standard tar header and format. This header format
+allows \fBUID\fRs and \fBGID\fRs up to 2097151 to be stored in the header.
+.RE
+
+Files with \fBUID\fRs and \fBGID\fRs greater than the limit stated above are
+archived with the \fBUID\fR and \fBGID\fR of \fB60001\fR. To transfer a large
+file (8 Gb \(em 1 byte), the header format can be \fBtar|TAR\fR,
+\fBustar|USTAR\fR, or \fBodc\fR only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIfile\fR\fR
+.ad
+.RS 14n
+.rt
+Reads the contents of \fIfile\fR as an input archive, instead of the standard
+input. If \fIfile\fR is a character special device, and the current medium has
+been completely read, replace the medium and press RETURN to continue to the
+next medium. This option is used only with the \fB-i\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 14n
+.rt
+Attempts to skip corrupted file headers and I/O errors that might be
+encountered. If you want to copy files from a medium that is corrupted or out
+of sequence, this option lets you read only those files with good headers. For
+\fBcpio\fR archives that contain other \fBcpio\fR archives, if an error is
+encountered, \fBcpio\fR can terminate prematurely. \fBcpio\fR finds the next
+good header, which can be one for a smaller archive, and terminate when the
+smaller archive's trailer is encountered. Use only with the \fB-i\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 14n
+.rt
+In pass mode, makes hard links between the source and destination whenever
+possible. If the \fB-L\fR option is also specified, the hard link is to the
+file referred to by the symbolic link. Otherwise, the hard link is to the
+symbolic link itself. Use only with the \fB-p\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 14n
+.rt
+Follows symbolic links. If a symbolic link to a directory is encountered,
+archives the directory referred to by the link, using the name of the link.
+Otherwise, archives the file referred to by the link, using the name of the
+link.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 14n
+.rt
+Retains previous file modification time. This option is ineffective on
+directories that are being copied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fImessage\fR\fR
+.ad
+.RS 14n
+.rt
+Defines a \fImessage\fR to use when switching media. When you use the \fB-O\fR
+or \fB-I\fR options and specify a character special device, you can use this
+option to define the message that is printed when you reach the end of the
+medium. One \fB%d\fR can be placed in \fImessage\fR to print the sequence
+number of the next medium needed to continue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIfile\fR\fR
+.ad
+.RS 14n
+.rt
+Directs the output of \fBcpio\fR to \fIfile\fR, instead of the standard output.
+If \fIfile\fR is a character special device and the current medium is full,
+replace the medium and type a carriage return to continue to the next medium.
+Use only with the \fB-o\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 14n
+.rt
+Preserves \fBACL\fRs. If the option is used for output, existing \fBACL\fRs are
+written along with other attributes, except for extended attributes, to the
+standard output. \fBACL\fRs are created as special files with a special file
+type. If the option is used for input, existing \fBACL\fRs are extracted along
+with other attributes from standard input. The option recognizes the special
+file type. Notice that errors occurs if a \fBcpio\fR archive with \fBACL\fRs is
+extracted by previous versions of \fBcpio\fR. This option should not be used
+with the \fB-c\fR option, as \fBACL\fR support might not be present on all
+systems, and hence is not portable. Use \fBASCII\fR headers for portability.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 14n
+.rt
+Interactively renames files. If the user types a carriage return alone, the
+file is skipped. If the user types a ``.'', the original pathname is retained.
+Not available with \fBcpio\fR \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIid\fR\fR
+.ad
+.RS 14n
+.rt
+Reassigns ownership and group information for each file to user ID. (ID must be
+a valid login ID from the \fBpasswd\fR database.) This option is valid only
+when id is the invoking user or the super-user. See \fBNOTES\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 14n
+.rt
+Swaps bytes within each half word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 14n
+.rt
+Swaps halfwords within each word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 14n
+.rt
+Prints a table of contents of the input. If any file in the table of contents
+has extended attributes, these are also listed. No files are created. \fB-t\fR
+and \fB-V\fR are mutually exclusive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 14n
+.rt
+Copies unconditionally. Normally, an older file is not replaced a newer file
+with the same name, although an older directory updates a newer directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 14n
+.rt
+Verbose. Prints a list of file and extended attribute names. When used with the
+\fB-t\fR option, the table of contents looks like the output of an \fBls\fR
+\fB-l\fR command (see \fBls\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 14n
+.rt
+Special verbose. Prints a dot for each file read or written. Useful to assure
+the user that \fBcpio\fR is working without printing out all file names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-6\fR\fR
+.ad
+.RS 14n
+.rt
+Processes a UNIX System Sixth Edition archive format file. Use only with the
+\fB-i\fR option. This option is mutually exclusive with \fB-c\fR and \fB-H\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-@\fR\fR
+.ad
+.RS 14n
+.rt
+Includes extended attributes in archive. By default, \fBcpio\fR does not place
+extended attributes in the archive. With this flag, \fBcpio\fR looks for
+extended attributes on the files to be placed in the archive and add them, as
+regular files, to the archive. The extended attribute files go in the archive
+as special files with special file types. When the \fB-@\fR flag is used with
+\fB-i\fR or \fB-p\fR, it instructs \fBcpio\fR to restore extended attribute
+data along with the normal file data. Extended attribute files can only be
+extracted from an archive as part of a normal file extract. Attempts to
+explicitly extract attribute records are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-/\fR\fR
+.ad
+.RS 14n
+.rt
+Includes extended system attributes in archive. By default, \fBcpio\fR does not
+place extended system attributes in the archive. With this flag, \fBcpio\fR
+looks for extended system attributes on the files to be placed in the archive
+and add them, as regular files, to the archive. The extended attribute files go
+in the archive as special files with special file types. When the \fB-/\fR flag
+is used with \fB-i\fR or \fB-p\fR, it instructs \fBcpio\fR to restore extended
+system attribute data along with the normal file data. Extended system
+attribute files can only be extracted from an archive as part of a normal file
+extract. Attempts to explicitly extract attribute records are ignored.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdirectory\fR\fR
+.ad
+.RS 13n
+.rt
+A path name of an existing directory to be used as the target of \fBcpio\fR
+\fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 13n
+.rt
+Expressions making use of a pattern-matching notation similar to that used by
+the shell (see \fBsh\fR(1)) for filename pattern matching, and similar to
+regular expressions. The following metacharacters are defined:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 9n
+.rt
+Matches any string, including the empty string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 9n
+.rt
+Matches any single character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[...]\fR\fR
+.ad
+.RS 9n
+.rt
+Matches any one of the enclosed characters. A pair of characters separated by
+`\(mi' matches any symbol between the pair (inclusive), as defined by the
+system default collating sequence. If the first character following the opening
+\fB`['\fR is a \fB`!'\fR, the results are unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.RS 9n
+.rt
+The ! (exclamation point) means \fInot\fR. For example, the \fB!abc*\fR pattern
+would exclude all files that begin with \fBabc\fR.
+.RE
+
+In \fIpattern\fR, metacharacters \fB?\fR, \fB*\fR, and \fB[\fR\|.\|.\|.\fB]\fR
+match the slash (\fB/\fR) character, and backslash (\fB\e\fR) is an escape
+character. Multiple cases of \fIpattern\fR can be specified and if no
+\fIpattern\fR is specified, the default for \fIpattern\fR is \fB*\fR (that is,
+select all files).
+.sp
+Each pattern must be enclosed in double quotes. Otherwise, the name of a file
+in the current directory might be used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcpio\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.sp
+.LP
+The following examples show three uses of \fBcpio\fR.
+.LP
+\fBExample 1 \fRUsing standard input
+.sp
+.in +2
+.nf
+example% \fBls | cpio -oc > ../newfile\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When standard input is directed through a pipe to \fBcpio\fR \fB-o\fR, as in
+the example above, it groups the files so they can be directed (>) to a single
+file (\fB\&../newfile\fR). The \fB-c\fR option insures that the file is
+portable to other machines (as would the \fB-H\fR option). Instead of
+\fBls\fR(1), you could use \fBfind\fR(1), \fBecho\fR(1), \fBcat\fR(1), and so
+on, to pipe a list of names to \fBcpio\fR. You could direct the output to a
+device instead of a file.
+
+.LP
+\fBExample 2 \fRExtracting files into directories
+.sp
+.in +2
+.nf
+example% \fBcat newfile | cpio -icd "memo/a1" "memo/b*"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this example, \fBcpio\fR \fB-i\fR uses the output file of \fBcpio\fR
+\fB-o\fR (directed through a pipe with \fBcat\fR), extracts those files that
+match the patterns (\fBmemo/a1\fR, \fBmemo/b*\fR), creates directories below
+the current directory as needed (\fB-d\fR option), and places the files in the
+appropriate directories. The \fB-c\fR option is used if the input file was
+created with a portable header. If no patterns were given, all files from
+\fBnewfile\fR would be placed in the directory.
+
+.LP
+\fBExample 3 \fRCopying or linking files to another directory
+.sp
+.in +2
+.nf
+example% \fBfind . -depth -print | cpio -pdlmv newdir\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this example, \fBcpio\fR \fB-p\fR takes the file names piped to it and
+copies or links (\fB-l\fR option) those files to another directory,
+\fBnewdir\fR. The \fB-d\fR option says to create directories as needed. The
+\fB-m\fR option says to retain the modification time. (It is important to use
+the \fB-depth\fR option of \fBfind\fR(1) to generate path names for \fBcpio\fR.
+This eliminates problems that \fBcpio\fR could have trying to create files
+under read-only directories.) The destination directory, \fBnewdir\fR, must
+exist.
+
+.sp
+.LP
+Notice that when you use \fBcpio\fR in conjunction with \fBfind\fR, if you use
+the \fB-L\fR option with \fBcpio\fR, you must use the \fB-follow\fR option with
+\fBfind\fR and vice versa. Otherwise, there are undesirable results.
+.sp
+.LP
+For multi-reel archives, dismount the old volume, mount the new one, and
+continue to the next tape by typing the name of the next device (probably the
+same as the first reel). To stop, type a RETURN and \fBcpio\fR ends.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcpio\fR: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
+\fBLC_MESSAGES\fR, \fBLC_TIME\fR, \fBTZ\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMPDIR\fR\fR
+.ad
+.RS 10n
+.rt
+\fBcpio\fR creates its temporary file in \fB/var/tmp\fR by default. Otherwise,
+it uses the directory specified by \fBTMPDIR\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBcat\fR(1), \fBecho\fR(1), \fBfind\fR(1), \fBls\fR(1),
+\fBpax\fR(1), \fBsetfacl\fR(1), \fBsh\fR(1), \fBtar\fR(1), \fBchown\fR(2),
+\fBarchives.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBfsattr\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The maximum path name length allowed in a \fBcpio\fR archive is determined by
+the header type involved. The following table shows the proper value for each
+supported archive header type.
+.sp
+
+.sp
+.TS
+tab();
+cw(1.83i) cw(1.83i) cw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+Header typeCommand line optionsMaximum path name length
+BINARY"\fB-o\fR"256
+POSIX"\fB-oH\fR odc"256
+ASCII"\fB-oc\fR"1023
+CRC"\fB-oH\fR crc"1023
+USTAR"\fB-oH\fR ustar"255
+.TE
+
+.sp
+.LP
+When the command line options "\fB-o\fR \fB-H\fR \fBtar\fR" are specified, the
+archive created is of type \fBUSTAR\fR. This means that it is an error to read
+this same archive using the command line options "\fB-i\fR \fB-H\fR \fBtar\fR".
+The archive should be read using the command line options "\fB-i\fR \fB-H\fR
+\fBustar\fR". The options "\fB-i\fR \fB-H\fR \fBtar\fR" refer to an older tar
+archive format.
+.sp
+.LP
+An error message is output for files whose \fBUID\fR or \fBGID\fR are too large
+to fit in the selected header format. Use \fB-H\fR \fBcrc\fR or \fB-c\fR to
+create archives that allow all \fBUID\fR or \fBGID\fR values.
+.sp
+.LP
+Only the super-user can copy special files.
+.sp
+.LP
+Blocks are reported in 512-byte quantities.
+.sp
+.LP
+If a file has \fB000\fR permissions, contains more than 0 characters of data,
+and the user is not root, the file is not saved or restored.
+.sp
+.LP
+When cpio is invoked in \fBCopy In\fR or \fBPass Mode\fR by a user with
+\fB{PRIV_FILE_CHOWN_SELF}\fR privilege, and in particular on a system where
+\fB{_POSIX_CHOWN_RESTRICTED}\fR is not in effect (effectively granting this
+privilege to all users where not overridden), extracted or copied files can end
+up with owners and groups determined by those of the original archived files,
+which can differ from the invoking user's. This might not be what the user
+intended. The \fB-R\fR option can be used to retain file ownership, if desired,
+if you specify the user's id.
+.sp
+.LP
+The inode number stored in the header (\fB/usr/include/archives.h\fR) is an
+unsigned short, which is 2 bytes. This limits the range of inode numbers from
+\fB0\fR to \fB65535\fR. Files which are hard linked must fall in this inode
+range. This could be a problem when moving \fBcpio\fR archives between
+different vendors' machines.
+.sp
+.LP
+You must use the same blocking factor when you retrieve or copy files from the
+tape to the hard disk as you did when you copied files from the hard disk to
+the tape. Therefore, you must specify the \fB-B\fR or \fB-C\fR option.
+.sp
+.LP
+During \fB-p\fR and \fB-o\fR processing, \fBcpio\fR buffers the file list
+presented on stdin in a temporary file.
+.sp
+.LP
+The new \fBpax\fR(1) format, with a command that supports it (for example,
+\fBtar\fR), should be used for large files. The \fBcpio\fR command is no longer
+part of the current POSIX standard and is deprecated in favor of \fBpax\fR.
diff --git a/usr/src/man/man1/cputrack.1 b/usr/src/man/man1/cputrack.1
new file mode 100644
index 0000000000..5c9d516127
--- /dev/null
+++ b/usr/src/man/man1/cputrack.1
@@ -0,0 +1,444 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cputrack 1 "19 Apr 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+cputrack \- monitor process and LWP behavior using CPU performance counters
+.SH SYNOPSIS
+.LP
+.nf
+\fBcputrack\fR \fB-c\fR \fIeventspec\fR [\fB-c\fR \fIeventspec\fR]... [\fB-efntvD\fR]
+ [\fB-N\fR \fIcount\fR] [\fB-o\fR \fIpathname\fR] [\fB-T\fR \fIinterval\fR] \fIcommand\fR [\fIargs\fR]
+.fi
+
+.LP
+.nf
+\fBcputrack\fR \fB-c\fR \fIeventspec\fR [\fB-c\fR \fIeventspec\fR]... \fB-p\fR \fIpid\fR [\fB-efntvD\fR]
+ [\fB-N\fR \fIcount\fR] [\fB-o\fR \fIpathname\fR] [\fB-T\fR \fIinterval\fR]
+.fi
+
+.LP
+.nf
+\fBcputrack\fR \fB-h\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcputrack\fR utility allows \fBCPU\fR performance counters to be used to
+monitor the behavior of a process or family of processes running on the system.
+If \fIinterval\fR is specified with the \fB-T\fR option, \fBcputrack\fR samples
+activity every \fIinterval\fR seconds, repeating forever. If a \fIcount\fR is
+specified with the \fB-N\fR option, the statistics are repeated \fIcount\fR
+times for each process tracked. If neither are specified, an interval of one
+second is used. If \fIcommand\fR and optional \fIargs\fR are specified,
+\fBcputrack\fR runs the command with the arguments given while monitoring the
+specified \fBCPU\fR performance events. Alternatively, the process \fBID\fR of
+an existing process can be specified using the \fB-p\fR option.
+.sp
+.LP
+Because \fBcputrack\fR is an unprivileged program, it is subject to the same
+restrictions that apply to \fBtruss\fR(1). For example, \fBsetuid\fR(2)
+executables cannot be tracked.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIeventspec\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies a set of events for the \fBCPU\fR performance counters to monitor.
+The syntax of these event specifications is:
+.sp
+.in +2
+.nf
+[picn=]\fIeventn\fR[,attr[\fIn\fR][=\fIval\fR]][,[picn=]\fIeventn\fR
+ [,attr[n][=\fIval\fR]],...,]
+.fi
+.in -2
+.sp
+
+You can use the \fB-h\fR option to obtain a list of available events and
+attributes. This causes generation of the usage message. You can omit an
+explicit counter assignment, in which case \fBcpustat\fR attempts to choose a
+capable counter automatically.
+.sp
+Attribute values can be expressed in hexadecimal, octal, or decimal notation,
+in a format suitable for \fBstrtoll\fR(3C). An attribute present in the event
+specification without an explicit value receives a default value of \fB1\fR. An
+attribute without a corresponding counter number is applied to all counters in
+the specification.
+.sp
+The semantics of these event specifications can be determined by reading the
+\fBCPU\fR manufacturer's documentation for the events.
+.sp
+Multiple \fB-c\fR options can be specified, in which case \fBcputrack\fR cycles
+between the different event settings on each sample.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 16n
+.rt
+Enables debug mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 16n
+.rt
+Follows all \fBexec\fR(2), or \fBexecve\fR(2) system calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 16n
+.rt
+Follows all children created by \fBfork\fR(2), \fBfork1\fR(2), or
+\fBvfork\fR(2) system calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 16n
+.rt
+Prints an extended help message on how to use the utility, how to program the
+processor-dependent counters, and where to look for more detailed information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 16n
+.rt
+Omits all header output (useful if \fBcputrack\fR is the beginning of a
+pipeline).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIcount\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the maximum number of \fBCPU\fR performance counter samples to take
+before exiting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutfile\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies file to be used for the \fBcputrack\fR output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpid\fR\fR
+.ad
+.RS 16n
+.rt
+Interprets the argument as the process \fBID\fR of an existing process to which
+process counter context should be attached and monitored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 16n
+.rt
+Prints an additional column of processor cycle counts, if available on the
+current architecture.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fIinterval\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the interval between \fBCPU\fR performance counter samples in
+seconds. Very small intervals may cause some samples to be skipped. See
+WARNINGS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 16n
+.rt
+Enables more verbose output.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The operating system enforces certain restrictions on the tracing of processes.
+In particular, a command whose object file cannot be read by a user cannot be
+tracked by that user; set-uid and set-gid commands can only be tracked by a
+privileged user. Unless it is run by a privileged user, \fBcputrack\fR loses
+control of any process that performs an \fBexec()\fR of a set-id or unreadable
+object file. Such processes continue normally, though independently of
+\fBcputrack\fR, from the point of the \fBexec()\fR.
+.sp
+.LP
+The system may run out of per-user process slots when the \fB-f\fR option is
+used, since \fBcputrack\fR runs one controlling process for each process being
+tracked.
+.sp
+.LP
+The times printed by \fBcputrack\fR correspond to the wallclock time when the
+hardware counters were actually sample. The time is derived from the same
+timebase as \fBgethrtime\fR(3C).
+.sp
+.LP
+The \fBcputrack\fR utility attaches performance counter context to each process
+that it examines. The presence of this context allows the performance counters
+to be multiplexed between different processes on the system, but it cannot be
+used at the same time as the \fBcpustat\fR(1M) utility.
+.sp
+.LP
+Once an instance of the \fBcpustat\fR utility is running, further attempts to
+run \fBcputrack\fR will fail until all instances of \fBcpustat\fR terminate.
+.sp
+.LP
+Sometimes \fBcputrack\fR provides sufficient flexibility and prints sufficient
+statistics to make adding the observation code to an application unnecessary.
+However, more control is occasionally desired. Because the same performance
+counter context is used by both the application itself and by the agent LWP
+injected into the application by \fBcputrack\fR, it is possible for an
+application to interact with the counter context to achieve some interesting
+capabilities. See \fBcpc_enable\fR(3CPC).
+.sp
+.LP
+The processor cycle counts enabled by the \fB-t\fR option always apply to both
+user and system modes, regardless of the settings applied to the performance
+counter registers.
+.sp
+.LP
+The output of \fBcputrack\fR is designed to be readily parseable by
+\fBnawk\fR(1) and \fBperl\fR(1), thereby allowing performance tools to be
+composed by embedding \fBcputrack\fR in scripts. Alternatively, tools may be
+constructed directly using the same \fBAPI\fRs that \fBcputrack\fR is built
+upon, using the facilities of \fBlibcpc\fR(3LIB) and \fBlibpctx\fR(3LIB). See
+\fBcpc\fR(3CPC).
+.sp
+.LP
+Although \fBcputrack\fR uses performance counter context to maintain separate
+performance counter values for each LWP, some of the events that can be counted
+will inevitably be impacted by other activities occurring on the system,
+particularly for limited resources that are shared between processes (for
+example, cache miss rates). For such events, it may also be interesting to
+observe overall system behavior with \fBcpustat\fR(1M).
+.sp
+.LP
+For the \fB-T\fR \fIinterval\fR option, if \fIinterval\fR is specified as zero,
+no periodic sampling is performed. The performance counters are only sampled
+when the process creates or destroys an \fBLWP\fR, or it invokes \fBfork\fR(2),
+\fBexec\fR(2), or \fBexit\fR(2).
+.SH EXAMPLES
+.SS "SPARC"
+.LP
+\fBExample 1 \fRUsing Performance Counters to Count Clock Cycles
+.sp
+.LP
+In this example, the utility is being used on a machine containing an
+UltraSPARC-III+ processor. The counters are set to count processor clock cycles
+and instructions dispatched in user mode while running the \fBsleep\fR(1)
+command.
+
+.sp
+.in +2
+.nf
+example% \fBcputrack -c pic0=Cycle_cnt,pic1=Instr_cnt sleep 10\fR
+
+
+ time lwp event pic0 pic1
+ 1.007 1 tick 765308 219233
+ 2.007 1 tick 0 0
+ 4.017 1 tick 0 0
+ 6.007 1 tick 0 0
+ 8.007 1 tick 0 0
+10.007 1 tick 0 0
+10.017 1 exit 844703 228058
+
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCounting External Cache References and Misses
+.sp
+.LP
+This example shows more verbose output while following the \fBfork()\fR and
+\fBexec()\fR of a simple shell script on an UltraSPARC machine. The counters
+are measuring the number of external cache references and external cache
+misses. Notice that the explicit \fBpic0\fR and \fBpic1\fR names can be omitted
+where there are no ambiguities.
+
+.sp
+.in +2
+.nf
+example% \fBcputrack -fev -c EC_ref,EC_hit /bin/ulimit -c\fR
+
+
+time pid lwp event pic0 pic1
+0.007 101142 1 init_lwp 805286 20023
+0.023 101142 1 fork # 101143
+0.026 101143 1 init_lwp 1015382 24461
+0.029 101143 1 fini_lwp 1025546 25074
+0.029 101143 1 exec 1025546 25074
+0.000 101143 1 exec \e
+ # '/usr/bin/sh /usr/bin/basename\e
+ /bin/ulimit'
+0.039 101143 1 init_lwp 1025546 25074
+0.050 101143 1 fini_lwp 1140482 27806
+0.050 101143 1 exec 1140482 27806
+0.000 101143 1 exec # '/usr/bin/expr \e
+ //bin/ulimit : \(.*[^/]\)/*$ : .*/\(..*\) : \(.*\)$ | //bin/ulimi'
+0.059 101143 1 init_lwp 1140482 27806
+0.075 101143 1 fini_lwp 1237647 30207
+0.075 101143 1 exit 1237647 30207
+unlimited
+0.081 101142 1 fini_lwp 953383 23814
+0.081 101142 1 exit 953383 23814
+.fi
+.in -2
+.sp
+
+.SS "x86"
+.LP
+\fBExample 3 \fRCounting Instructions
+.sp
+.LP
+This example shows how many instructions were executed in the application and
+in the kernel to print the date on a Pentium III machine:
+
+.sp
+.in +2
+.nf
+example% \fBcputrack -c inst_retired,inst_retired,nouser1,sys1 date\fR
+
+
+ time lwp event pic0 pic1
+Fri Aug 20 20:03:08 PDT 1999
+ 0.072 1 exit 246725 339666
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRCounting TLB Hits
+.sp
+.LP
+This example shows how to use processor-specific attributes to count TLB hits
+on a Pentium 4 machine:
+
+.sp
+.in +2
+.nf
+example% \fBcputrack -c ITLB_reference,emask=1 date\fR
+
+
+ time lwp event pic0
+ Fri Aug 20 20:03:08 PDT 1999
+ 0.072 1 exit 246725
+.fi
+.in -2
+.sp
+
+.SH WARNINGS
+.sp
+.LP
+By running any instance of the \fBcpustat\fR(1M) utility, all existing
+performance counter context is forcibly invalidated across the machine. This
+may in turn cause all invocations of the \fBcputrack\fR command to exit
+prematurely with unspecified errors.
+.sp
+.LP
+If \fBcpustat\fR is invoked on a system that has \fBCPU\fR performance counters
+which are not supported by Solaris, the following message appears:
+.sp
+.in +2
+.nf
+cputrack: cannot access performance counters - Operation not applicable
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This error message implies that \fBcpc_open()\fR has failed and is documented
+in \fBcpc_open\fR(3CPC). Review this documentation for more information about
+the problem and possible solutions.
+.sp
+.LP
+If a short interval is requested, \fBcputrack\fR may not be able to keep up
+with the desired sample rate. In this case, some samples may be dropped.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBnawk\fR(1), \fBperl\fR(1), \fBproc\fR(1), \fBtruss\fR(1), \fBprstat\fR(1M),
+\fBcpustat\fR(1M), \fBexec\fR(2), \fBexit\fR(2), \fBfork\fR(2),
+\fBsetuid\fR(2), \fBvfork\fR(2), \fBgethrtime\fR(3C), \fBstrtoll\fR(3C),
+\fBcpc\fR(3CPC), \fBcpc_bind_pctx\fR(3CPC), \fBcpc_enable\fR(3CPC),
+\fBcpc_open\fR(3CPC), \fBlibcpc\fR(3LIB), \fBlibpctx\fR(3LIB), \fBproc\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/crle.1 b/usr/src/man/man1/crle.1
new file mode 100644
index 0000000000..5fc482b69d
--- /dev/null
+++ b/usr/src/man/man1/crle.1
@@ -0,0 +1,1035 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH crle 1 "6 Oct 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+crle \- configure runtime linking environment
+.SH SYNOPSIS
+.LP
+.nf
+\fBcrle\fR [\fB-64\fR] [\fB-a\fR \fIname\fR] [\fB-A\fR \fIname\fR] [\fB-c\fR \fIconf\fR] [\fB-e\fR \fIenv\fR] [\fB-E\fR \fIenv\fR]
+ [\fB-f\fR \fIflags\fR] [\fB-i\fR \fIname\fR] [\fB-I\fR \fIname\fR] [\fB-g\fR \fIname\fR] [\fB-G\fR \fIname\fR]
+ [\fB-l\fR \fIdir\fR] [\fB-o\fR \fIdir\fR] [\fB-s\fR \fIdir\fR] [\fB-t\fR [ ELF | AOUT]] [\fB-u\fR] [\fB-v\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcrle\fR utility provides for the creation and display of a runtime
+linking configuration file. The configuration file is read and interpreted by
+the runtime linker, \fBld.so.1\fR(1), during process startup. The runtime
+linker attempts to read a default configuration file for all processes. For
+32-bit processes, the default configuration file is \fB/var/ld/ld.config\fR.
+For 64-bit processes, the default configuration file is
+\fB/var/ld/64/ld.config\fR.
+.sp
+.LP
+Without any arguments, or with just the \fB-c\fR option, \fBcrle\fR displays
+configuration information. This information includes the contents of a
+configuration file, any system defaults and the command-line required to
+regenerate the configuration file. When used with any other options, a new
+configuration file is created or updated.
+.sp
+.LP
+The runtime linker can also be directed to an alternative configuration file by
+setting one of the \fBLD_CONFIG\fR family of environment variable.
+\fBLD_CONFIG\fR applies to both 32-bit and 64-bit programs. Since 32-bit and
+64-bit configuration files differ, a single configuration file cannot be used
+for both class of object. Hence, \fBLD_CONFIG\fR can adversely affect program
+execution in cases where a program of one class executes a program of the other
+class. In particular, it is common practice for the 32-bit version of standard
+Solaris utilities to execute their 64-bit counterpart. \fBLD_CONFIG\fR cannot
+be successfully used in this case. Therefore, the use of the \fBLD_CONFIG_32\fR
+and \fBLD_CONFIG_64\fR environment variables, that precisely target the
+appropriate class of process, is recommended.
+.sp
+.LP
+Creating an incorrect configuration file in the standard location,
+\fB/var/ld\fR, can prevent programs from running, and can therefore be
+difficult to recover from. To guard against this situation, it is recommented
+that new configuration files first be created in a temporary location. Then set
+the appropriate \fBLD_CONFIG\fR environment variable to this new configuration
+file. This setting causes the new configuration file to be used by the runtime
+linker instead of any default. After verification, the new configuration file
+can be moved to the default location if desired. At any time, the environment
+variable \fBLD_NOCONFIG\fR can be set to any value to instruct the runtime
+linker to ignore any configuration files. This setting can prove useful during
+experimentation.
+.sp
+.LP
+A configuration file can contain the following information.
+.sp
+.ne 2
+.mk
+.na
+\fBDefault Search Paths\fR
+.ad
+.sp .6
+.RS 4n
+The runtime linker uses a prescribed search path for locating the dynamic
+dependencies of an object. This search path starts with the components of any
+\fBLD_LIBRARY_PATH\fR definition, followed by the components of an object's
+\fBrunpath\fR. Finally, any default search paths specific to the object's class
+are used. This last component of the search path can be expressed within the
+configuration file. Typically, use of this facility should be augmented with
+any system default. See the \fB-l\fR and \fB-u\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBTrusted Directories\fR
+.ad
+.sp .6
+.RS 4n
+When processing a secure application, the runtime linker restricts the use of
+\fBLD_LIBRARY_PATH\fR searches, and \fB$ORIGIN\fR token expansion. See
+\fISecurity\fR in \fILinker and Libraries Guide\fR. In addition, the
+directories from which preload and audit libraries can be located are also
+restricted. The path names that are associated with preload and audit libraries
+are restricted to known trusted directories. Trusted directories can be
+expressed within the configuration file. Typically, use of this facility should
+be augmented with any system defaults. See the \fB-s\fR and \fB-u\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBEnvironment Variables\fR
+.ad
+.sp .6
+.RS 4n
+Any environment variable interpreted by the runtime linker can be specified
+within the configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBDirectory Cache\fR
+.ad
+.sp .6
+.RS 4n
+The location of shared objects within defined directories can be maintained as
+a cache within the configuration file. This directory cache can reduce the
+overhead of searching for application dependencies.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBAlternative Objects\fR
+.ad
+.sp .6
+.RS 4n
+In conjunction with the directory cache, shared objects can have alternative
+objects specified for use at runtime. These alternate objects, can be supplied
+by the user. Alternative objects can also be created by \fBcrle\fR as copies of
+shared objects fixed to known memory locations. These fixed alternative objects
+can require less processing at runtime than their original shared object
+counterpart.
+.RE
+
+.sp
+.LP
+Defining additional default search paths, or additional trusted directories can
+be useful for administrators who wish to install third party software in a
+central location, or otherwise alter the search path of applications that might
+not have been coded with a suitable runpath.
+.sp
+.LP
+The declaration of alternative objects provides a means of replacing
+dependencies other than by using symbolic links or requiring
+\fBLD_LIBRARY_PATH\fR settings.
+.sp
+.LP
+The declaration of environment variables that are interpreted by the runtime
+linker provides a means of centralizing their definition for all applications.
+.sp
+.LP
+The directory cache, and \fBcrle\fR generated alternate objects, can provide a
+means of reducing the runtime startup overhead of applications. Alternative
+objects can be useful for applications that require many dependencies, or whose
+dependencies are expensive to relocate. Shared objects that contain
+\fBposition-dependent\fR code are often expensive to relocate. Note, the system
+has many caching facilities that help mitigate expenses such as negative path
+lookups, and thus employing \fBcrle\fR to create a directory cache may have
+minimal effect other than for some very specific cases.
+.sp
+.LP
+When alternate objects that are generated by \fBcrle\fR are specified within a
+configuration file, the runtime linker performs some minimal consistency
+verification. The alternative objects are verified against their originating
+objects. This verification is intended to avert application failure should an
+applications configuration information become out-of-sync with the underlying
+system components. When this situation arises the flexibility offered by
+dynamic linking system components can be compromised. This type of application
+failure can be very difficult to diagnose. No verification of directory cache
+information is performed. Any changes to the directory structure are not seen
+by a process until the cache is rebuilt.
+.sp
+.LP
+System shared objects are often well tuned, and can show little benefit from
+being cached. The directory cache and alternative object features are typically
+applicable to user applications and shared objects, and may only show
+improvement in some very specific cases.
+.sp
+.LP
+\fBcrle\fR creates alternate objects for the shared objects that are discovered
+when using the \fB-I\fR and \fB-G\fR options, using \fBdldump\fR(3C). The
+alternate object is created in the directory specified by the preceding
+\fB-o\fR option, or defaults to the directory in which the configuration file
+is created. The flags used by \fBdldump()\fR are specified using the \fB-f\fR
+option, or default to \fBRTLD_REL_RELATIVE\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify to process 64-bit objects, the default is 32-bit. Use \fB-64\fR to
+create a 64-bit specific configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Create an alternative path name for \fIname\fR. The alternative path name is
+added to the configuration file.
+.sp
+The actual alternative file must be supplied by the user. Multiple occurrences
+of this option are permitted. If \fIname\fR is a directory, each shared object
+within the directory is added to the cache. If \fIname\fR does not exist, then
+\fIname\fR is marked in the cache as a nonexistent file.
+.sp
+Typically, this option is used with the \fB-o\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Create an optional alternative path name for \fIname\fR. This alternative path
+name is added to the configuration file.
+.sp
+This option mimics the \fB-a\fR option, except that if the alternative is
+unavailable at runtime, the original object \fIname\fR is used. This model
+mimics the use of auxiliary filters. See \fIGenerating Auxiliary Filters\fR in
+\fILinker and Libraries Guide\fR.
+.sp
+Typically, this option is used with the \fB-o\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIconf\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify to use the configuration file name \fIconf\fR. If this option is not
+supplied, the default configuration file is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIenv\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a \fBreplaceable\fR environment variable, \fIenv\fR. Only environment
+variables that are applicable to the runtime linker are meaningful. Multiple
+occurrences of this option are permitted. This option is similar to the
+\fB-E\fR option. However, the options differs in how configuration file
+definitions, and process environment definitions of the same name are resolved
+at runtime.
+.sp
+A definition established in a configuration file can be \fBoverridden\fR by a
+process environment definition, or be \fBsuppressed\fR by a null-value process
+environment definition.
+.sp
+In other words, these configuration file definitions can be replaced, or
+removed by the process environment at runtime.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR \fIenv\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a \fBpermanent\fR environment variable, \fIenv\fR. Only environment
+variables that are applicable to the runtime linker are meaningful. Multiple
+occurrences of this option are permitted. This option is similar to the
+\fB-e\fR option. However, the option differs in how configuration file
+definitions, and process environment definitions of the same name are resolved
+at runtime.
+.sp
+Environment variable definitions that are meaningful to the runtime linker fall
+into one of two categories. Singular definitions are definitions such as
+\fBLD_NOLAZYLOAD=1\fR and \fBLD_DEBUG_OUTPUT=\fR\fIfile\fR. List definitions,
+which can take one or more values, are definitions such as
+\fBLD_LIBRARY_PATH=\fR\fIpath\fR, and \fBLD_DEBUG=\fR\fIfiles\fR,\fIdetails\fR.
+.sp
+A singular definition that is established in a configuration file takes
+precedence over a process environment definition. A list definition that is
+established in a configuration file is \fBappended\fR to a process environment
+definition. Any definition that is established in a configuration file can
+\fBnot\fR be suppressed by a null-value process environment definition.
+.sp
+In other words, these configuration file definitions can \fBnot\fR be replaced,
+or removed by the process environment at runtime.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIflags\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provide the symbolic \fIflags\fR argument to the \fBdldump\fR(3C) calls used to
+generate alternate objects. Any of the \fBRTLD_REL\fR flags that are defined in
+\fB/usr/include/dlfcn.h\fR can be used. Multiple flags can be \fBor\fR'ed
+together using the "\fB|\fR" character. In this case, the string should be
+quoted to avoid expansion by the shell. If no \fIflags\fR values are provided
+the default flag is \fBRTLD_REL_RELATIVE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Add an individual \fIname\fR to the configuration cache. Multiple occurrences
+of this option are permitted. \fIname\fR can be a shared object or a directory.
+If \fIname\fR is a directory, each shared object within the directory is added
+to the cache. If \fIname\fR does not exist, the \fIname\fR is marked in the
+cache as a nonexistent directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mimic the \fB-i\fR, and in addition any shared object that is processed has an
+alternative created using \fBdldump\fR(3C). If the \fB-f\fR flag contains
+\fBRTLD_REL_EXEC\fR, then \fIname\fR can be a dynamic executable, for which an
+alternative is created. Only one dynamic executable can be specified in this
+manner, as the cache that is created is specific to this application.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Add the group \fIname\fR to the configuration cache. Each object is expanded to
+determine its dependencies. Multiple occurrences of this option are permitted.
+\fIname\fR can be a dynamic executable, shared object or a directory. If
+\fIname\fR is a shared object, the shared object and its dependencies are added
+to the cache. If \fIname\fR is a directory, each shared object within the
+directory, and its dependencies, are added to the cache.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mimic the \fB-g\fR option, and in addition any shared object that is processed
+has an alternative created using \fBdldump\fR(3C). If \fIname\fR is a dynamic
+executable, and the \fB-f\fR flag contains \fBRTLD_REL_EXEC\fR, then an
+alternative for the dynamic executable is also created. Only one dynamic
+executable can be specified in this manner as the cache that is created is
+specific to this application.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIdir\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a new default search directory \fIdir\fR for \fBELF\fR or \fBAOUT\fR
+objects. Multiple occurrences of this option are permitted. The type of object
+that is applicable to the search, is specified by the preceding \fB-t\fR
+option, or defaults to \fBELF\fR.
+.sp
+The default search paths for 32-bit \fBELF\fR objects are \fB/lib\fR followed
+by \fB/usr/lib\fR. For 64-bit \fBELF\fR objects, the default search paths are
+\fB/lib/64\fR followed by \fB/usr/lib/64\fR.
+.sp
+The default search paths for \fBAOUT\fR objects are \fB/usr/4lib\fR, followed
+by \fB/usr/lib\fR and finally \fB/usr/local/lib\fR.
+.sp
+Use of this option \fBreplaces\fR the default search path. Therefore, a
+\fB-l\fR option is normally required to specify the original system default in
+relation to any new paths that are being applied. However, if the \fB-u\fR
+option is in effect, and a configuration file does \fBnot\fR exist, the system
+defaults are added to the new configuration file. These defaults are added
+before the new paths specified with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIdir\fR\fR
+.ad
+.sp .6
+.RS 4n
+When used with either the \fB-a\fR or \fB-A\fR options, specifies the directory
+\fIdir\fR in which any alternate objects exist. When alternative objects are
+created by \fBcrle\fR, this option specified where the alternative are created.
+Without this option, alternate objects exist in the directory in which the
+configuration file is created. Multiple occurrences of this option are
+permitted, the directory \fIdir\fR being used to locate alternatives for any
+following command-line options. Alternative objects are not permitted to
+override their associated originals.
+.sp
+Typically, this option is used with the \fB-a\fR or \fB-A\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIdir\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a new trusted directory \fIdir\fR for \fIsecure\fR \fBELF\fR or
+\fBAOUT\fR objects. See \fBSECURITY\fR in \fBld.so.1\fR(1) for a definition of
+secure objects. See \fISecurity\fR in \fILinker and Libraries Guide\fR for a
+discussion of runtime restrictions imposed on secure applications.
+.sp
+Multiple occurrences of this option are permitted. The type of object that is
+applicable to the search is specified by the preceding \fB-t\fR option, or
+defaults to \fBELF\fR.
+.sp
+The default trusted directories for secure 32-bit \fBELF\fR objects, and
+\fBAOUT\fR objects, are \fB/lib/secure\fR followed by \fB/usr/lib/secure\fR.
+For 64-bit secure \fBELF\fR objects, the default trusted directories are
+\fB/lib/secure/64\fR followed by \fB/usr/lib/secure/64\fR.
+.sp
+Use of this option \fBreplaces\fR the default trusted directories. Therefore, a
+\fB-s\fR option is normally required to specify the original system default in
+relation to any new directories that are being applied. However, if the
+\fB-u\fR option is in effect, and a configuration file does \fBnot\fR exist,
+the system defaults are added to the new configuration file. These defaults are
+added before the new directories specified with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fBELF\fR | \fBAOUT\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggle the object type that is applicable to any \fB-l\fR or \fB-s\fR options
+that follow. The default object type is \fBELF\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.sp .6
+.RS 4n
+Request that a configuration file be updated, possibly with the addition of new
+information. Without other options, any existing configuration file is
+inspected and its contents recomputed. Additional arguments allow information
+to be appended to the recomputed contents. See NOTES.
+.sp
+If a configuration file does not exist, the configuration file is created as
+directed by the other arguments. In the case of the \fB-l\fR and \fB-s\fR
+options, any system defaults are first applied to the configuration file before
+the directories specified with these options.
+.sp
+The configuration file can be in the older format that lacks the system
+identification information that is normally written at the beginning of the
+file. In this case, \fBcrle\fR does not place system identification information
+into the resulting file, preserving compatibility of the file with older
+versions of Solaris. See NOTES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify verbose mode. When creating a configuration file, a trace of the files
+that are being processed is written to the standard out. When printing the
+contents of a configuration file, more extensive directory and file information
+is provided.
+.RE
+
+.sp
+.LP
+By default, the runtime linker attempts to read the configuration file
+\fB/var/ld/ld.config\fR for each 32-bit application processed.
+\fB/var/ld/64/ld.config\fR is read for each 64-bit application. When processing
+an alternative application, the runtime linker uses a
+\fB$ORIGIN/ld.config.\fIapp-name\fR\fR configuration file if present. See
+NOTES. Applications can reference an alternative configuration file by setting
+the \fBLD_CONFIG\fR environment variable. An alternative configuration file can
+also be specified by recording the configuration file name in the application
+at the time the application is built. See the \fB-c\fR option of \fBld\fR(1).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExperimenting With a Temporary Configuration File
+.sp
+.LP
+The following example creates a temporary configuration file with a new default
+search path for ELF objects. The environment variable \fBLD_CONFIG_32\fR is
+used to instruct the runtime linker to use this configuration file for all
+32-bit processes.
+
+.sp
+.in +2
+.nf
+$ \fBcrle -c /tmp/ld.config -u -l /local/lib\fR
+$ \fBcrle -c /tmp/ld.config\fR
+
+Configuration file [version 4]: /tmp/ld.config
+ Platform: 32-bit MSB SPARC
+ Default Library Path (ELF): /lib:/usr/lib:/local/lib
+ Trusted Directories (ELF): /lib/secure:/usr/lib/secure \e
+ (system default)
+
+Command line:
+ crle -c /tmp/ld.config -l /lib:/usr/lib:/local/lib
+
+$ \fBLD_CONFIG_32=/tmp/ld.config date\fR
+Thu May 29 17:42:00 PDT 2008
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUpdating and Displaying a New Default Search Path for ELF
+Objects
+.sp
+.LP
+The following example updates and displays a new default search path for ELF
+objects.
+
+.sp
+.in +2
+.nf
+# \fBcrle -u -l /local/lib\fR
+# \fBcrle\fR
+
+Configuration file [version 4]: /var/ld/ld.config
+ Platform: 32-bit MSB SPARC
+ Default Library Path (ELF): /lib:/usr/lib:/local/lib
+ Trusted Directories (ELF): /lib/secure:/usr/lib/secure \e
+ (system default)
+
+Command line:
+ crle -l /lib:/usr/lib:/local/lib
+
+# \fBcrle -u -l /ISV/lib\fR
+# \fBcrle\fR
+
+Configuration file [version 4]: /var/ld/ld.config
+ Platform 32-bit MSB SPARC
+ Default Library Path (ELF): /lib:/usr/lib:/local/lib:/ISV/lib
+ Trusted Directories (ELF): /lib/secure:/usr/lib/secure \e
+ (system default)
+
+Command line:
+ crle -l /lib:/usr/lib:/local/lib:/usr/local/lib
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this example, the default configuration file initially did not exist.
+Therefore, the new search path \fB/local/lib\fR is appended to the system
+default. The next update appends the search path \fB/ISV/lib\fR to those paths
+already established in the configuration file.
+
+.LP
+\fBExample 3 \fRRecovering From a Bad Configuration File
+.sp
+.LP
+The following example creates a bad configuration file in the default location.
+The file can be removed by instructing the runtime linker to ignore any
+configuration file with the \fBLD_NOCONFIG\fR environment variable. Note, it is
+recommended that temporary configuration files be created and the environment
+variable \fBLD_CONFIG\fR used to experiment with these files.
+
+.sp
+.in +2
+.nf
+# \fBcrle -l /local/lib\fR
+# \fBdate\fR
+ld.so.1: date: fatal: libc.so.1: open failed: \e
+ No such file or directory
+Killed
+# \fBLD_NOCONFIG=yes rm /var/ld/ld.config\fR
+# \fBdate\fR
+Thu May 29 17:52:00 PDT 2008
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Note, the reason the configuration file is bad is because the system default
+search paths are not present. Hence, the \fBdate\fR utility is not able to
+locate the system dependencies that it required. In this case, the \fB-u\fR
+option should have been used.
+.LP
+\fBExample 4 \fRCreating and Displaying a New Default Search Path and New
+Trusted Directory for ELF Objects
+.sp
+.LP
+The following example creates and displays a new default search path and new
+trusted directory for ELF objects.
+
+.sp
+.in +2
+.nf
+# \fBcrle -l /local/lib -l /lib -l /usr/lib -s /local/lib\fR
+# \fBcrle\fR
+
+Configuration file [version 4]: /var/ld/ld.config
+ Platform: 32-bit MSB SPARC
+ Default Library Path (ELF): /local/lib:/lib:/usr/lib
+ Trusted Directories (ELF): /local/lib
+
+Command line:
+ crle -l /local/lib:/lib:/usr/lib -s /local/lib
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With this configuration file, third party applications could be installed in
+\fB/local/bin\fR and their associated dependencies in \fB/local/lib\fR. The
+default search path allows the applications to locate their dependencies
+without the need to set \fBLD_LIBRARY_PATH\fR. The default trusted directories
+have also been replaced with this example.
+
+.LP
+\fBExample 5 \fRCreating a Directory Cache for ELF Objects
+.sp
+.LP
+The following example creates a directory cache for ELF objects.
+
+.sp
+.in +2
+.nf
+$ \fBcrle -i /usr/dt/lib -i /usr/openwin/lib -i /lib -i /usr/lib \e
+ -c config\fR
+$ \fBldd -s ./main\fR
+\&....
+ find object=libc.so.1; required by ./main
+ search path=/usr/dt/lib:/usr/openwin/lib (RUNPATH/RPATH ./main)
+ trying path=/usr/dt/lib/libc.so.1
+ trying path=/usr/openwin/lib/libc.so.1
+ search path=/lib (default)
+ trying path=/lib/libc.so.1
+ libc.so.1 => /lib/libc.so.1
+
+$ \fBLD_CONFIG=config ldd -s ./main\fR
+\&....
+ find object=libc.so.1; required by ./main
+ search path=/usr/dt/lib:/usr/openwin/lib (RUNPATH/RPATH ./main)
+ search path=/lib (default)
+ trying path=/lib/libc.so.1
+ libc.so.1 => /lib/libc.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With this configuration, the cache reflects that the system library
+\fBlibc.so.1\fR does not exist in the directories \fB/usr/dt/lib\fR or
+\fB/usr/openwin/lib\fR. Therefore, the search for this system file ignores
+these directories even though the application's runpath indicates these paths
+should be searched.
+
+.LP
+\fBExample 6 \fRCreating an Alternative Object Cache for an ELF Executable
+.sp
+.LP
+The following example creates an alternative object cache for an ELF
+executable.
+
+.sp
+.in +2
+.nf
+$ \fBcrle -c /local/$HOST/.xterm/ld.config.xterm \e
+ -f RTLD_REL_ALL -G /usr/openwin/bin/xterm\fR
+$ \fBln -s /local/$HOST/.xterm/xterm /local/$HOST/xterm\fR
+$ \fBldd /usr/local/$HOST/xterm\fR
+ libXaw.so.5 => /local/$HOST/.xterm/libWaw.so.5 (alternate)
+ libXmu.so.4 => /local/$HOST/.xterm/libXmu.so.4 (alternate)
+ ....
+ libc.so.1 => /local/$HOST/.xterm/libc.so.1 (alternate)
+ ....
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With this configuration, a new \fBxterm\fR and its dependencies are created.
+These new objects are fully relocated to each other, and result in faster
+startup than the originating objects. The execution of this application uses
+its own specific configuration file. This model is generally more flexible than
+using the environment variable \fBLD_CONFIG\fR, as the configuration file can
+not be erroneously used by other applications such as \fBldd\fR(1) or
+\fBtruss\fR(1).
+
+.LP
+\fBExample 7 \fRCreating an Alternative Object Cache to Replace an ELF Shared
+Object
+.sp
+.LP
+The following example creates an alternative object cache to replace an ELF
+shared object.
+
+.sp
+.in +2
+.nf
+$ \fBldd /usr/bin/vi\fR
+ libcurses.so.1 => /lib/libcurses.so.1
+ ....
+
+# \fBcrle -a /lib/libcurses.so.1 -o /usr/ucblib\fR
+# \fBcrle\fR
+
+Configuration file [version 4]: /var/ld/ld.config
+ Platform: 32-bit MSB SPARC
+ Default Library Path (ELF): /lib:/usr/lib (system default)
+ Trusted Directories (ELF): /lib/secure:/usr/lib/secure \e
+ (system default)
+
+Directory: /lib
+ libcurses.so.1 (alternate: /usr/ucblib/libcurses.so.1)
+\&....
+
+$ \fBldd /usr/bin/vi\fR
+ libcurses.so.1 => /usr/ucblib/libcurses.so.1 (alternate)
+ ....
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With this configuration, any dependency that would normally resolve to
+\fB/usr/lib/libcurses.so.1\fR instead resolves to
+\fB/usr/ucblib/libcurses.so.1\fR.
+
+.LP
+\fBExample 8 \fRSetting Replaceable and Permanent Environment Variables
+.sp
+.LP
+The following example sets replaceable and permanent environment variables.
+
+.sp
+.in +2
+.nf
+# \fBcrle -e LD_LIBRARY_PATH=/local/lib \e
+ -E LD_PRELOAD=preload.so.1\fR
+# \fBcrle\fR
+\&.....
+Environment Variables:
+ LD_LIBRARY_PATH=/local/lib (replaceable)
+ LD_PRELOAD=preload.so.1 (permanent)
+
+\&.....
+$ \fBLD_DEBUG=files LD_PRELOAD=preload.so.2 ./main\fR
+\&.....
+18764: file=preload.so.2; preloaded
+18764: file=/local/lib/preload.so.2 [ ELF ]; generating link map
+\&.....
+18764: file=preload.so.1; preloaded
+18764: file=/local/lib/preload.so.1 [ ELF ]; generating link map
+\&.....
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With this configuration file, a replaceable search path has been specified
+together with a permanent preload object which becomes appended to the process
+environment definition.
+
+.SH EXIT STATUS
+.sp
+.LP
+The creation or display of a configuration file results in a \fB0\fR being
+returned. Otherwise, any error condition is accompanied with a diagnostic
+message and a non-zero value being returned.
+.SH NOTES
+.sp
+.LP
+The ability to tag an alternative application to use an application-specific
+configuration file, is possible if the original application contains one of the
+\fI\&.dynamic\fR tags \fBDT_FLAGS_1\fR or \fBDT_FEATURE_1\fR. Without these
+entries, a configuration file must be specified using the \fBLD_CONFIG\fR
+environment variable. Care should be exercised with this latter method as this
+environment variable is visible to any forked applications.
+.sp
+.LP
+The use of the \fB-u\fR option requires at least version 2 of \fBcrle\fR. This
+version level is evident from displaying the contents of a configuration file.
+.sp
+.in +2
+.nf
+$ \fBcrle\fR
+
+Configuration file [2]: /var/ld/ld.config
+ ......
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With a version 2 configuration file, \fBcrle\fR is capable of constructing the
+command-line arguments required to regenerate the configuration file. This
+command-line construction, provides full update capabilities using the \fB-u\fR
+option. Although a version 1 configuration file update is possible, the
+configuration file contents might be insufficient for \fBcrle\fR to compute the
+entire update requirements.
+.sp
+.LP
+Configuration files contain platform specific binary data. A given
+configuration file can only be interpreted by software with the same machine
+class and byte ordering. However, the information necessary to enforce this
+restriction was not included in configuration files until \fBSXCE\fR build
+\fB41\fR. As of this \fBSXCE\fR build, configuration files have system
+identification information at the beginning of the file. This additional
+information is used by \fBcrle\fR and the runtime to check their compatibility
+with configuration files. This information also allows the \fBfile\fR(1)
+command to properly identify configuration files. For backward compatibility,
+older files that are missing this information are still accepted, although
+without the identification and error checking that would otherwise be possible.
+When processing an update (\fB-u\fR) operation for an older file that lacks
+system information, \fBcrle\fR does not add system identification information
+to the result.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/ld/ld.config\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default configuration file for 32-bit applications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/ld/64/ld.config\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default configuration file for 64-bit applications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/tmp\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default location for temporary configuration file. See \fBtempnam\fR(3C).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lddstub\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stub application that is employed to \fBdldump\fR(3C) 32-bit objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/64/lddstub\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stub application that is employed to \fBdldump\fR(3C) 64-bit objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/libcrle.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Audit library that is employed to \fBdldump\fR(3C) 32-bit objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/64/libcrle.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Audit library that is employed to \fBdldump\fR(3C) 64-bit objects.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+There are no environment variables that are referenced by \fBcrle\fR. However,
+several environment variables affect the runtime linkers behavior in regard to
+the processing of configuration files that are created by \fBcrle\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_CONFIG\fR, \fBLD_CONFIG_32\fR and \fBLD_CONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provide an alternative configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOCONFIG\fR, \fBLD_NOCONFIG_32\fR and \fBLD_NOCONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable configuration file processing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NODIRCONFIG\fR, \fBLD_NODIRCONFIG_32\fR and \fBLD_NODIRCONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable directory cache processing from a configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOENVCONFIG\fR, \fBLD_NOENVCONFIG_32\fR and \fBLD_NOENVCONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable environment variable processing from a configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOOBJALTER\fR, \fBLD_NOOBJALTER_32\fR and \fBLD_NOOBJALTER_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable alternative object processing from a configuration file.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes.
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBfile\fR(1), \fBld\fR(1), \fBld.so.1\fR(1), \fBdldump\fR(3C),
+\fBtempnam\fR(3C), \fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/crontab.1 b/usr/src/man/man1/crontab.1
new file mode 100644
index 0000000000..310192421d
--- /dev/null
+++ b/usr/src/man/man1/crontab.1
@@ -0,0 +1,719 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH crontab 1 "6 Apr 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+crontab \- user crontab file
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/crontab\fR [\fIfilename\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/crontab\fR \fB-e\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/crontab\fR \fB-l\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/crontab\fR \fB-r\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/crontab\fR [\fIfilename\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/crontab\fR \fB-e\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/crontab\fR \fB-l\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/crontab\fR \fB-r\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/crontab\fR [\fIfilename\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/crontab\fR \fB-e\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/crontab\fR \fB-l\fR [\fIusername\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/crontab\fR \fB-r\fR [\fIusername\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcrontab\fR utility manages a user's access with \fBcron\fR (see
+\fBcron\fR(1M)) by copying, creating, listing, and removing \fBcrontab\fR
+files. If invoked without options, \fBcrontab\fR copies the specified file, or
+the standard input if no file is specified, into a directory that holds all
+users' crontabs.
+.sp
+.LP
+If \fBcrontab\fR is invoked with \fIfilename\fR, this overwrites an existing
+\fBcrontab\fR entry for the user that invokes it.
+.SS "\fBcrontab\fR Access Control"
+.sp
+.LP
+Users: Access to \fBcrontab\fR is allowed:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if the user's name appears in \fB/etc/cron.d/cron.allow\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if \fB/etc/cron.d/cron.allow\fR does not exist and the user's name is not in
+\fB/etc/cron.d/cron.deny\fR.
+.RE
+.sp
+.LP
+Users: Access to \fBcrontab\fR is denied:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if \fB/etc/cron.d/cron.allow\fR exists and the user's name is not in it.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if \fB/etc/cron.d/cron.allow\fR does not exist and user's name is in
+\fB/etc/cron.d/cron.deny\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if neither file exists, only a user with the \fBsolaris.jobs.user\fR
+authorization is allowed to submit a job.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if Solaris Auditing is enabled, the user's shell is not audited and the user is
+not the \fBcrontab\fR owner. This can occur if the user logs in by way of a
+program, such as some versions of \fBSSH\fR, which does not set audit
+parameters.
+.RE
+.sp
+.LP
+The rules for \fBallow\fR and \fBdeny\fR apply to \fBroot\fR only if the
+\fBallow\fR/\fBdeny\fR files exist.
+.sp
+.LP
+The \fBallow\fR/\fBdeny\fR files consist of one user name per line.
+.SS "\fBcrontab\fR Entry Format"
+.sp
+.LP
+A \fBcrontab\fR file consists of lines of six fields each. The fields are
+separated by spaces or tabs. The first five are integer patterns that specify
+the following:
+.sp
+.in +2
+.nf
+minute (0\(mi59),
+hour (0\(mi23),
+day of the month (1\(mi31),
+month of the year (1\(mi12),
+day of the week (0\(mi6 with 0=Sunday).
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Each of these patterns can be either an asterisk (meaning all legal values) or
+a list of elements separated by commas. An element is either a number or two
+numbers separated by a minus sign (meaning an inclusive range). Time specified
+here is interpreted in the currently active timezone. At the top of the crontab
+file this is the timezone which is set system-wide in /etc/default/init. A user
+can add a line such as:
+.sp
+.in +2
+.nf
+TZ=\fItimezone\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\&...and all subsequent entries will be interpreted using that timezone, until
+a new \fBTZ=\fR\fItimezone\fR line is encountered. The specification of days
+can be made by two fields (day of the month and day of the week). Both are
+adhered to if specified as a list of elements. See \fBEXAMPLES\fR.
+.sp
+.LP
+The sixth field of a line in a \fBcrontab\fR file is a string that is executed
+by the shell at the specified times. A percent character in this field (unless
+escaped by \fB\e\fR\|) is translated to a \fINEWLINE\fR character.
+.sp
+.LP
+Only the first line (up to a \fB`\|%\|'\fR or end of line) of the command field
+is executed by the shell. Other lines are made available to the command as
+standard input. Any blank line or line beginning with a \fB`\|#\|'\fR is a
+comment and is ignored.
+.sp
+.LP
+The shell is invoked from your $HOME directory. As with $TZ, both $SHELL and
+$HOME can be set by having a line such as:
+.sp
+.in +2
+.nf
+SHELL=/usr/bin/\fIsomeshell\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\&...or:
+.sp
+.in +2
+.nf
+HOME=\fIsomedirectory\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\&...which will take precedence for all the remaining entries in the
+\fBcrontab\fR or until there is another \fBHOME\fR or \fBSHELL\fR entry. It is
+invoked with an \fBarg0\fR of the basename of the $SHELL that is currently in
+effect. A user who wants to have his \fB\&.profile\fR or equivalent file
+executed must explicitly do so in the \fBcrontab\fR file. \fBcron\fR supplies
+a default environment for every shell, defining HOME, LOGNAME, SHELL, TZ, and
+PATH. The default PATH for user \fBcron\fR jobs is \fB/usr/bin\fR; while root
+\fBcron\fR jobs default to \fB/usr/sbin:/usr/bin\fR. The default PATH can be
+set in \fB/etc/default/cron\fR (see \fBcron\fR(1M)). The TZ, HOME, and SHELL
+environment variables are set to match those that are in effect in the
+\fBcrontab\fR file at the time.
+.sp
+.LP
+If you do not redirect the standard output and standard error of your commands,
+any generated output or errors are mailed to you.
+.SS "\fBcrontab\fR Environment Variables"
+.sp
+.LP
+The following variables are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.sp .6
+.RS 4n
+Allows the user to choose and alternative directory for cron to change
+directory to prior to running the command. For example:
+.sp
+.in +2
+.nf
+HOME=/var/tmp
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.sp .6
+.RS 4n
+The name of the shell to use to run subsequent commands. For example:
+.sp
+.in +2
+.nf
+SHELL=/usr/bin/ksh
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.sp .6
+.RS 4n
+Allows the user to choose the timezone in which the \fBcron\fR entries are run.
+This effects both the environment of the command that is run and the timing of
+the entry. For example, to have your entries run using the timezone for
+Iceland, use:
+.sp
+.in +2
+.nf
+TZ=Iceland
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.LP
+Each of these variables affects all of the lines that follow it in the
+\fBcrontab\fR file, until it is reset by a subsequent line resetting that
+variable. Hence, it is possible to have multiple timezones supported within a
+single \fBcrontab\fR file.
+.sp
+.LP
+The lines that are not setting these environment variables are the same as
+crontab entries that conform to the UNIX standard and are described elsewhere
+in this man page.
+.SS "Setting \fBcron\fR Jobs Across Timezones"
+.sp
+.LP
+The default timezone of the \fBcron\fR daemon sets the system-wide timezone for
+\fBcron\fR entries. This, in turn, is by set by default system-wide using
+\fB/etc/default/init\fR.
+.sp
+.LP
+If some form of \fBdaylight savings\fR or \fBsummer/winter time\fR is in
+effect, then jobs scheduled during the switchover period could be executed
+once, twice, or not at all.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Edits a copy of the current user's \fBcrontab\fR file, or creates an empty file
+to edit if \fBcrontab\fR does not exist. When editing is complete, the file is
+installed as the user's \fBcrontab\fR file.
+.sp
+The environment variable \fBEDITOR\fR determines which editor is invoked with
+the \fB-e\fR option. All \fBcrontab\fR jobs should be submitted using
+\fBcrontab\fR. Do not add jobs by just editing the \fBcrontab\fR file, because
+\fBcron\fR is not aware of changes made this way.
+.sp
+If all lines in the \fBcrontab\fR file are deleted, the old \fBcrontab\fR file
+is restored. The correct way to delete all lines is to remove the \fBcrontab\fR
+file using the \fB-r\fR option.
+.sp
+If \fIusername\fR is specified, the specified user's \fBcrontab\fR file is
+edited, rather than the current user's \fBcrontab\fR file. This can only be
+done by root or by a user with the \fBsolaris.jobs.admin\fR authorization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Lists the \fBcrontab\fR file for the invoking user. Only root or a user with
+the \fBsolaris.jobs.admin\fR authorization can specify a username following the
+\fB-l\fR option to list the \fBcrontab\fR file of the specified user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Removes a user's \fBcrontab\fR from the \fBcrontab\fR directory. Only root or a
+user with the \fBsolaris.jobs.admin\fR authorization can specify a username
+following the \fB-r\fR option to remove the \fBcrontab\fR file of the specified
+user.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCleaning up Core Files
+.sp
+.LP
+This example cleans up \fBcore\fR files every weekday morning at 3:15 am:
+
+.sp
+.in +2
+.nf
+\fB15 3 * * 1-5 find $HOME\fR \fB-name\fR\fBcore 2>/dev/null | xargs rm\fR \fB-f\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRMailing a Birthday Greeting
+.sp
+.LP
+This example mails a birthday greeting:
+
+.sp
+.in +2
+.nf
+\fB0 12 14 2 * mailx john%Happy Birthday!%Time for lunch.\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSpecifying Days of the Month and Week
+.sp
+.LP
+This example runs a command on the first and fifteenth of each month, as well
+as on every Monday:
+
+.sp
+.in +2
+.nf
+\fB0 0 1,15 * 1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To specify days by only one field, the other field should be set to *. For
+example:
+
+.sp
+.in +2
+.nf
+\fB0 0 * * 1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would run a command only on Mondays.
+
+.LP
+\fBExample 4 \fRUsing Environment Variables
+.sp
+.LP
+The following entries take advantage of \fBcrontab\fR support for certain
+environment variables.
+
+.sp
+.in +2
+.nf
+TZ=GMT
+HOME=/local/home/user
+SHELL=/usr/bin/ksh
+0 0 * * * echo $(date) > midnight.GMT
+TZ=PST
+0 0 * * * echo $(date) > midnight.PST
+TZ=EST
+HOME=/local/home/myuser
+SHELL=/bin/csh
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The preceding entries allow two jobs to run. The first one would run at
+midnight in the GMT timezone and the second would run at midnight in the PST
+timezone. Both would be run in the directory \fB/local/home/user\fR using the
+Korn shell. The file concludes with \fBTZ\fR, \fBHOME\fR, and \fBSHELL\fR
+entries that return those variable to their default values.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcrontab\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SS "\fB/usr/bin/crontab\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEDITOR\fR\fR
+.ad
+.RS 10n
+.rt
+Determine the editor to be invoked when the \fB-e\fR option is specified. This
+is overridden by the \fBVISUAL\fR environmental variable. The default editor is
+\fBvi\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 10n
+.rt
+The \fBPATH\fR in \fBcrontab\fR's environment specifies the search path used to
+find the editor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBVISUAL\fR\fR
+.ad
+.RS 10n
+.rt
+Determine the visual editor to be invoked when the \fB-e\fR option is
+specified. If \fBVISUAL\fR is not specified, then the environment variable
+\fBEDITOR\fR is used. If that is not set, the default is \fBvi\fR(1).
+.RE
+
+.SS "\fB/usr/xpg4/bin/crontab\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEDITOR\fR\fR
+.ad
+.RS 10n
+.rt
+Determine the editor to be invoked when the \fB-e\fR option is specified. The
+default editor is \fB/usr/xpg4/bin/vi\fR.
+.RE
+
+.SS "\fB/usr/xpg6/bin/crontab\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEDITOR\fR\fR
+.ad
+.RS 10n
+.rt
+Determine the editor to be invoked when the \fB-e\fR option is specified. The
+default editor is \fB/usr/xpg6/bin/vi\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/cron.d\fR\fR
+.ad
+.RS 28n
+.rt
+main cron directory
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/cron.d/cron.allow\fR\fR
+.ad
+.RS 28n
+.rt
+list of allowed users
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/default/cron\fR\fR
+.ad
+.RS 28n
+.rt
+contains cron default settings
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/cron.d/cron.deny\fR\fR
+.ad
+.RS 28n
+.rt
+list of denied users
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/cron/log\fR\fR
+.ad
+.RS 28n
+.rt
+accounting information
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/cron/crontabs\fR\fR
+.ad
+.RS 28n
+.rt
+spool area for \fBcrontab\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "\fB/usr/bin/crontab\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SS "\fB/usr/xpg4/bin/crontab\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SS "\fB/usr/xpg6/bin/crontab\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBatq\fR(1), \fBatrm\fR(1), \fBauths\fR(1), \fBed\fR(1), \fBsh\fR(1),
+\fBvi\fR(1), \fBcron\fR(1M), \fBsu\fR(1M), \fBauth_attr\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+If you inadvertently enter the \fBcrontab\fR command with no arguments, do not
+attempt to get out with Control-d. This removes all entries in your
+\fBcrontab\fR file. Instead, exit with Control-c.
+.sp
+.LP
+When updating \fBcron\fR, check first for existing \fBcrontab\fR entries that
+can be scheduled close to the time of the update. Such entries can be lost if
+the update process completes after the scheduled event. This can happen
+because, when \fBcron\fR is notified by \fBcrontab\fR to update the internal
+view of a user's \fBcrontab\fR file, it first removes the user's existing
+internal \fBcrontab\fR and any internal scheduled events. Then it reads the new
+\fBcrontab\fR file and rebuilds the internal \fBcrontab\fR and events. This
+last step takes time, especially with a large \fBcrontab\fR file, and can
+complete \fBafter\fR an existing \fBcrontab\fR entry is scheduled to run if it
+is scheduled too close to the update. To be safe, start a new job at least 60
+seconds after the current date and time.
+.sp
+.LP
+If an authorized user other than root modifies another user's \fBcrontab\fR
+file, the resulting behavior can be unpredictable. Instead, the authorized user
+should first use \fBsu\fR(1M) to become superuser to the other user's login
+before making any changes to the \fBcrontab\fR file.
+.sp
+.LP
+Care should be taken when adding \fBTZ\fR, \fBSHELL\fR and \fBHOME\fR variables
+to the \fBcrontab\fR file when the \fBcrontab\fR file could be shared with
+applications that do not expect those variables to be changed from the default.
+Resetting the values to their defaults at the bottom of the file will minimize
+the risk of problems.
diff --git a/usr/src/man/man1/crypt.1 b/usr/src/man/man1/crypt.1
new file mode 100644
index 0000000000..85efa3f4ae
--- /dev/null
+++ b/usr/src/man/man1/crypt.1
@@ -0,0 +1,81 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH crypt 1 "8 Mar 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+crypt \- encode or decode a file
+.SH SYNOPSIS
+.LP
+.nf
+\fBcrypt\fR [\fIpassword\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcrypt\fR utility encrypts and decrypts the contents of a file.
+\fBcrypt\fR reads from the standard input and writes on the standard output.
+The \fIpassword\fR is a key that selects a particular transformation. If no
+\fIpassword\fR is given, \fBcrypt\fR demands a key from the terminal and turns
+off printing while the key is being typed in. \fBcrypt\fR encrypts and decrypts
+with the same key:
+.sp
+.in +2
+.nf
+example% \fBcrypt key < clear.file > encrypted.file\fR
+example% \fBcrypt key < encrypted.file | pr\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints the contents of \fBclear.file\fR.
+.sp
+.LP
+Files encrypted by \fBcrypt\fR are compatible with those treated by the editors
+\fBed\fR(1), \fBex\fR(1), and \fBvi\fR(1) in encryption mode.
+.sp
+.LP
+The security of encrypted files depends on three factors: the fundamental
+method must be hard to solve; direct search of the key space must be
+infeasible; "sneak paths" by which keys or cleartext can become visible must be
+minimized.
+.sp
+.LP
+\fBcrypt\fR implements a one-rotor machine designed along the lines of the
+German Enigma, but with a 256-element rotor. Methods of attack on such
+machines are widely known, thus \fBcrypt\fR provides minimal security.
+.sp
+.LP
+The transformation of a key into the internal settings of the machine is
+deliberately designed to be expensive, that is, to take a substantial fraction
+of a second to compute. However, if keys are restricted to (say) three
+lower-case letters, then encrypted files can be read by expending only a
+substantial fraction of five minutes of machine time.
+.sp
+.LP
+Since the key is an argument to the \fBcrypt\fR command, it is potentially
+visible to users executing \fBps\fR(1) or a derivative command. To minimize
+this possibility, \fBcrypt\fR takes care to destroy any record of the key
+immediately upon entry. No doubt the choice of keys and key security are the
+most vulnerable aspect of \fBcrypt\fR.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/tty\fR\fR
+.ad
+.RS 12n
+.rt
+for typed key
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdes\fR(1), \fBed\fR(1), \fBex\fR(1), \fBps\fR(1), \fBvi\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/csh.1 b/usr/src/man/man1/csh.1
new file mode 100644
index 0000000000..f67546fb2c
--- /dev/null
+++ b/usr/src/man/man1/csh.1
@@ -0,0 +1,3569 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH csh 1 "27 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+csh \- shell command interpreter with a C-like syntax
+.SH SYNOPSIS
+.LP
+.nf
+\fBcsh\fR [\fB-bcefinstvVxX\fR] [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBcsh\fR, the C shell, is a command interpreter with a syntax reminiscent of
+the C language. It provides a number of convenient features for interactive use
+that are not available with the Bourne shell, including filename completion,
+command aliasing, history substitution, job control, and a number of built-in
+commands. As with the Bourne shell, the C shell provides variable, command and
+filename substitution.
+.SS "Initialization and Termination"
+.sp
+.LP
+When first started, the C shell normally performs commands from the
+\fB\&.cshrc\fR file in your home directory, provided that it is readable and
+you either own it or your real group \fBID\fR matches its group \fBID\fR. If
+the shell is invoked with a name that starts with `\fB\(mi\fR\&', as when
+started by \fBlogin\fR(1), the shell runs as a \fBlogin\fR shell.
+.sp
+.LP
+If the shell is a login shell, this is the sequence of invocations: First,
+commands in \fB/etc/.login\fR are executed. Next, commands from the
+\fB\&.cshrc\fR file your \fBhome\fR directory are executed. Then the shell
+executes commands from the \fB\&.login\fR file in your home directory; the same
+permission checks as those for \fB\&.cshrc\fR are applied to this file.
+Typically, the \fB\&.login\fR file contains commands to specify the terminal
+type and environment. (For an explanation of file interpreters, see \fBCommand
+Execution\fR and \fBexec\fR(2).)
+.sp
+.LP
+As a login shell terminates, it performs commands from the \fB\&.logout\fR file
+in your home directory; the same permission checks as those for \fB\&.cshrc\fR
+are applied to this file.
+.SS "Interactive Operation"
+.sp
+.LP
+After startup processing is complete, an interactive C shell begins reading
+commands from the terminal, prompting with \fBhostname\fR\fB%\fR (or
+\fBhostname\fR\fB#\fR for the privileged user). The shell then repeatedly
+performs the following actions: a line of command input is read and broken into
+\fIwords\fR. This sequence of words is placed on the history list and then
+parsed, as described under USAGE. Finally, the shell executes each command in
+the current line.
+.SS "Noninteractive Operation"
+.sp
+.LP
+When running noninteractively, the shell does not prompt for input from the
+terminal. A noninteractive C shell can execute a command supplied as an
+\fIargument\fR on its command line, or interpret commands from a file, also
+known as a script.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Forced a "break" from option processing. Subsequent command line arguments are
+not interpreted as C shell options. This allows the passing of options to a
+script without confusion. The shell does not run set-user-ID or set-group-ID
+scripts unless this option is present.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Executes the first \fIargument\fR, which must be present. Remaining arguments
+are placed in \fBargv\fR, the argument-list variable, and passed directly to
+\fBcsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Exits if a command terminates abnormally or yields a nonzero exit status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Fast start. Reads neither the \fB\&.cshrc\fR file, nor the \fB\&.login\fR file
+(if a login shell) upon startup.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Forced interactive. Prompts for command line input, even if the standard input
+does not appear to be a terminal (character-special device).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Parses (interprets), but does not execute commands. This option can be used to
+check C shell scripts for syntax errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Takes commands from the standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Reads and executes a single command line. A `\fB\e\fR\&' (backslash) can be
+used to escape each newline for continuation of the command line onto
+subsequent input lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Verbose. Sets the \fBverbose\fR predefined variable. Command input is echoed
+after history substitution, but before other substitutions and before
+execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Sets \fBverbose\fR before reading \fB\&.cshrc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Echo. Sets the \fBecho\fR variable. Echoes commands after all substitutions and
+just before execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.RS 6n
+.rt
+Sets \fBecho\fR before reading \fB\&.cshrc\fR.
+.RE
+
+.sp
+.LP
+Except with the options \fB-c\fR, \fB-i\fR, \fB-s\fR, or \fB-t\fR, the first
+nonoption \fIargument\fR is taken to be the name of a command or script. It is
+passed as argument zero, and subsequent arguments are added to the argument
+list for that command or script.
+.SH USAGE
+.SS "Filename Completion"
+.sp
+.LP
+When enabled by setting the variable \fBfilec\fR, an interactive C shell can
+complete a partially typed filename or user name. When an unambiguous partial
+filename is followed by an \fBESC\fR character on the terminal input line, the
+shell fills in the remaining characters of a matching filename from the working
+directory.
+.sp
+.LP
+If a partial filename is followed by the \fBEOF\fR character (usually typed as
+Control-d), the shell lists all filenames that match. It then prompts once
+again, supplying the incomplete command line typed in so far.
+.sp
+.LP
+When the last (partial) word begins with a tilde (\fB~\fR), the shell attempts
+completion with a user name, rather than a file in the working directory.
+.sp
+.LP
+The terminal bell signals errors or multiple matches. This bell signal can be
+inhibited by setting the variable \fBnobeep\fR. You can exclude files with
+certain suffixes by listing those suffixes in the variable \fBfignore\fR. If,
+however, the only possible completion includes a suffix in the list, it is not
+ignored. \fBfignore\fR does not affect the listing of filenames by the
+\fBEOF\fR character.
+.SS "Lexical Structure"
+.sp
+.LP
+The shell splits input lines into words at space and tab characters, except as
+noted below. The characters \fB&\fR, \fB|\fR, \fB;\fR, \fB<\fR, \fB>\fR,
+\fB(\fR, and \fB)\fR form separate words; if paired, the pairs form single
+words. These shell metacharacters can be made part of other words, and their
+special meaning can be suppressed by preceding them with a `\fB\e\fR\&'
+(backslash). A newline preceded by a \fB\e\fR is equivalent to a space
+character.
+.sp
+.LP
+In addition, a string enclosed in matched pairs of single-quotes (\fB\&'\fR),
+double-quotes (\fB"\fR), or backquotes (\fB`\fR), forms a partial word.
+Metacharacters in such a string, including any space or tab characters, do not
+form separate words. Within pairs of backquote (\fB`\fR) or double-quote
+(\fB"\fR) characters, a newline preceded by a `\fB\e\fR\&' (backslash) gives a
+true newline character. Additional functions of each type of quote are
+described, below, under \fBVariable Substitution\fR, \fBCommand
+Substitution\fR, and \fBFilename\fR \fBSubstitution\fR.
+.sp
+.LP
+When the shell's input is not a terminal, the character \fB#\fR introduces a
+comment that continues to the end of the input line. Its special meaning is
+suppressed when preceded by a \fB\e\fR or enclosed in matching quotes.
+.SS "Command Line Parsing"
+.sp
+.LP
+A \fIsimple command\fR is composed of a sequence of words. The first word (that
+is not part of an I/O redirection) specifies the command to be executed. A
+simple command, or a set of simple commands separated by \fB|\fR or \fB|&\fR
+characters, forms a \fIpipeline\fR. With \fB|\fR, the standard output of the
+preceding command is redirected to the standard input of the command that
+follows. With \fB|\|&\fR, both the standard error and the standard output are
+redirected through the pipeline.
+.sp
+.LP
+Pipelines can be separated by semicolons (\|\fB;\fR\|), in which case they are
+executed sequentially. Pipelines that are separated by \fB&&\fR or \fB|\||\fR
+form conditional sequences in which the execution of pipelines on the right
+depends upon the success or failure, respectively, of the pipeline on the left.
+.sp
+.LP
+A pipeline or sequence can be enclosed within parentheses `()' to form a simple
+command that can be a component in a pipeline or sequence.
+.sp
+.LP
+A sequence of pipelines can be executed asynchronously or "in the background"
+by appending an `\fB&\fR\&'; rather than waiting for the sequence to finish
+before issuing a prompt, the shell displays the job number (see \fBJob
+Control\fR, below) and associated process IDs and prompts immediately.
+.SS "History Substitution"
+.sp
+.LP
+History substitution allows you to use words from previous command lines in the
+command line you are typing. This simplifies spelling corrections and the
+repetition of complicated commands or arguments. Command lines are saved in the
+history list, the size of which is controlled by the \fBhistory\fR variable.
+The most recent command is retained in any case. A history substitution begins
+with a \fB!\fR (although you can change this with the \fBhistchars\fR variable)
+and occurs anywhere on the command line; history substitutions do not nest. The
+\fB!\fR can be escaped with \fB\e\fR to suppress its special meaning.
+.sp
+.LP
+Input lines containing history substitutions are echoed on the terminal after
+being expanded, but before any other substitutions take place or the command
+gets executed.
+.SS "Event Designators"
+.sp
+.LP
+An event designator is a reference to a command line entry in the history list.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.sp .6
+.RS 4n
+Start a history substitution, except when followed by a space character, tab,
+newline, \fB=\fR or \fB(\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!!\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the previous command. By itself, this substitution repeats the
+previous command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to command line \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the current command line minus \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIstr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command starting with \fIstr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!?\fR\fIstr\fR\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command containing \fIstr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!?\fR\fIstr\fR\fB?\fR \fIadditional\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command containing \fIstr\fR and append
+\fIadditional\fR to that referenced command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!{\fR\fIcommand\fR\fB}\fR \fIadditional\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command beginning with \fIcommand\fR and append
+\fIadditional\fR to that referenced command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fIprevious_word\fR\fB^\fR\fIreplacement\fR\fB^\fR\fR
+.ad
+.sp .6
+.RS 4n
+Repeat the previous command line replacing the string \fIprevious_word\fR with
+the string \fIreplacement\fR. This is equivalent to the history substitution:
+.sp
+.in +2
+.nf
+!:s/\fIprevious_word\fR/\fIreplacement\fR/.
+.fi
+.in -2
+.sp
+
+To re-execute a specific previous command AND make such a substitution, say,
+re-executing command #6,
+.sp
+.in +2
+.nf
+!:6s/\fIprevious_word\fR/\fIreplacement\fR/.
+.fi
+.in -2
+.sp
+
+.RE
+
+.SS "Word Designators"
+.sp
+.LP
+A `\fB:\fR' (colon) separates the event specification from the word designator.
+It can be omitted if the word designator begins with a \fB^\fR, \fB$\fR,
+\fB*\fR, \fB\(mi\fR or \fB%\fR. If the word is to be selected from the previous
+command, the second \fB!\fR character can be omitted from the event
+specification. For instance, \fB!!:1\fR and \fB!:1\fR both refer to the first
+word of the previous command, while \fB!!$\fR and \fB!$\fR both refer to the
+last word in the previous command. Word designators include:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 10n
+.rt
+The entire command line typed so far.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 10n
+.rt
+The first input word (command).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 10n
+.rt
+The \fIn\fR'th argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fR
+.ad
+.RS 10n
+.rt
+The first argument, that is, \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fR
+.ad
+.RS 10n
+.rt
+The last argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fR
+.ad
+.RS 10n
+.rt
+The word matched by the \fB?\fR\fIs\fR search.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\(mi\fR\fIy\fR\fR
+.ad
+.RS 10n
+.rt
+A range of words; \fB\(mi\fR\fIy\fR abbreviates \fB0\(mi\fR\fIy\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 10n
+.rt
+All the arguments, or a null value if there is just one word in the event.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB*\fR\fR
+.ad
+.RS 10n
+.rt
+Abbreviates \fIx\fR\fB\(mi$\fR\fI\&.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\(mi\fR\fR
+.ad
+.RS 10n
+.rt
+Like \fIx*\fR but omitting word \fB$\fR.
+.RE
+
+.SS "Modifiers"
+.sp
+.LP
+After the optional word designator, you can add one of the following modifiers,
+preceded by a \fB:\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 10n
+.rt
+Remove a trailing pathname component, leaving the head.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 10n
+.rt
+Remove a trailing suffix of the form `\fB\&.\fR\fIxxx\fR', leaving the
+basename.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.RS 10n
+.rt
+Remove all but the suffix, leaving the Extension.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs/\fR\fIl\fR\fB/\fR\fIr\fR\fB/\fR\fR
+.ad
+.RS 10n
+.rt
+Substitute \fIr\fR for \fIl\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 10n
+.rt
+Remove all leading pathname components, leaving the tail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB&\fR\fR
+.ad
+.RS 10n
+.rt
+Repeat the previous substitution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 10n
+.rt
+Apply the change to the first occurrence of a match in each word, by prefixing
+the above (for example, \fBg&\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 10n
+.rt
+Print the new command but do not execute it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 10n
+.rt
+Quote the substituted words,escaping further substitutions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 10n
+.rt
+Like \fBq\fR, but break into words at each space character, tab or newline.
+.RE
+
+.sp
+.LP
+Unless preceded by a \fBg\fR, the modification is applied only to the first
+string that matches \fIl\fR; an error results if no string matches.
+.sp
+.LP
+The left-hand side of substitutions are not regular expressions, but character
+strings. Any character can be used as the delimiter in place of \fB/\fR. A
+backslash quotes the delimiter character. The character \fB&\fR, in the right
+hand side, is replaced by the text from the left-hand-side. The \fB&\fR can be
+quoted with a backslash. A null \fIl\fR uses the previous string either from a
+\fIl\fR or from a contextual scan string \fIs\fR from \fB!?\fR\fIs\fR. You can
+omit the rightmost delimiter if a newline immediately follows \fIr\fR; the
+rightmost \fB?\fR in a context scan can similarly be omitted.
+.sp
+.LP
+Without an event specification, a history reference refers either to the
+previous command, or to a previous history reference on the command line (if
+any).
+.SS "Quick Substitution"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fIl\fR\fB^\fR\fIr\fR\fB^\fR\fR
+.ad
+.RS 9n
+.rt
+This is equivalent to the history substitution:
+.sp
+.in +2
+.nf
+!:s/\fIl\fR/\fIr\fR/.
+.fi
+.in -2
+.sp
+
+.RE
+
+.SS "Aliases"
+.sp
+.LP
+The C shell maintains a list of aliases that you can create, display, and
+modify using the \fBalias\fR and \fBunalias\fR commands. The shell checks the
+first word in each command to see if it matches the name of an existing alias.
+If it does, the command is reprocessed with the alias definition replacing its
+name; the history substitution mechanism is made available as though that
+command were the previous input line. This allows history substitutions,
+escaped with a backslash in the definition, to be replaced with actual command
+line arguments when the alias is used. If no history substitution is called
+for, the arguments remain unchanged.
+.sp
+.LP
+Aliases can be nested. That is, an alias definition can contain the name of
+another alias. Nested aliases are expanded before any history substitutions is
+applied. This is useful in pipelines such as
+.sp
+.in +2
+.nf
+\fBalias lm 'ls -l \e!* | more'\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+which when called, pipes the output of \fBls\fR(1) through \fBmore\fR(1).
+.sp
+.LP
+Except for the first word, the name of the alias can not appear in its
+definition, nor in any alias referred to by its definition. Such loops are
+detected, and cause an error message.
+.SS "I/O Redirection"
+.sp
+.LP
+The following metacharacters indicate that the subsequent word is the name of a
+file to which the command's standard input, standard output, or standard error
+is redirected; this word is variable, command, and filename expanded separately
+from the rest of the command.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<\fR\fR
+.ad
+.RS 15n
+.rt
+Redirect the standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<\|<\fR\fI\|word\fR\fR
+.ad
+.RS 15n
+.rt
+Read the standard input, up to a line that is identical with \fIword\fR, and
+place the resulting lines in a temporary file. Unless \fIword\fR is escaped or
+quoted, variable and command substitutions are performed on these lines. Then,
+the pipeline is invoked with the temporary file as its standard input.
+\fIword\fR is not subjected to variable, filename, or command substitution, and
+each line is compared to it before any substitutions are performed by the
+shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>\fR \fB>!\fR \fB>&\fR \fB>&!\fR\fR
+.ad
+.RS 15n
+.rt
+Redirect the standard output to a file. If the file does not exist, it is
+created. If it does exist, it is overwritten; its previous contents are lost.
+.sp
+When set, the variable \fBnoclobber\fR prevents destruction of existing files.
+It also prevents redirection to terminals and \fB/dev/null\fR, unless one of
+the \fB!\fR forms is used. The \fB&\fR forms redirect both standard output and
+the standard error (diagnostic output) to the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>\|>\fR \fB>\|>&\fR \fB>\|>!\fR \fB>\|>&!\fR\fR
+.ad
+.RS 27n
+.rt
+Append the standard output. Like \fB>\fR, but places output at the end of the
+file rather than overwriting it. If \fBnoclobber\fR is set, it is an error for
+the file not to exist, unless one of the \fB!\fR forms is used. The \fB&\fR
+forms append both the standard error and standard output to the file.
+.RE
+
+.SS "Variable Substitution"
+.sp
+.LP
+The C shell maintains a set of variables, each of which is composed of a
+\fIname\fR and a \fIvalue\fR. A variable name consists of up to 128 letters and
+digits, and starts with a letter. An underscore (\fB_\fR) is considered a
+letter). A variable's value is a space-separated list of zero or more words. If
+the shell supports a variable name upto 128 characters the variable
+\fBSUNW_VARLEN\fR is defined. If a variable name of up to 128 characters is not
+supported, then an older version of the shell is being used, and the shell
+variable name length has a maximum length of 20.
+.sp
+.LP
+To refer to a variable's value, precede its name with a `\fB$\fR'. Certain
+references (described below) can be used to select specific words from the
+value, or to display other information about the variable. Braces can be used
+to insulate the reference from other characters in an input-line word.
+.sp
+.LP
+Variable substitution takes place after the input line is analyzed, aliases are
+resolved, and I/O redirections are applied. Exceptions to this are variable
+references in I/O redirections (substituted at the time the redirection is
+made), and backquoted strings (see Command Substitution).
+.sp
+.LP
+Variable substitution can be suppressed by preceding the \fB$\fR with a
+\fB\e\fR, except within double-quotes where it always occurs. Variable
+substitution is suppressed inside of single-quotes. A \fB$\fR is escaped if
+followed by a space character, tab or newline.
+.sp
+.LP
+Variables can be created, displayed, or destroyed using the \fBset\fR and
+\fBunset\fR commands. Some variables are maintained or used by the shell. For
+instance, the \fBargv\fR variable contains an image of the shell's argument
+list. Of the variables used by the shell, a number are toggles; the shell does
+not care what their value is, only whether they are set or not.
+.sp
+.LP
+Numerical values can be operated on as numbers (as with the \fB@\fR built-in
+command). With numeric operations, an empty value is considered to be zero. The
+second and subsequent words of multiword values are ignored. For instance, when
+the \fBverbose\fR variable is set to any value (including an empty value),
+command input is echoed on the terminal.
+.sp
+.LP
+Command and filename substitution is subsequently applied to the words that
+result from the variable substitution, except when suppressed by double-quotes,
+when \fBnoglob\fR is set (suppressing filename substitution), or when the
+reference is quoted with the \fB:q\fR modifier. Within double-quotes, a
+reference is expanded to form (a portion of) a quoted string; multiword values
+are expanded to a string with embedded space characters. When the \fB:q\fR
+modifier is applied to the reference, it is expanded to a list of
+space-separated words, each of which is quoted to prevent subsequent command or
+filename substitutions.
+.sp
+.LP
+Except as noted below, it is an error to refer to a variable that is not set.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fIvar\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIvar\fR\fB}\fR\fR
+.ad
+.RS 17n
+.rt
+These are replaced by words from the value of \fIvar\fR, each separated by a
+space character. If \fIvar\fR is an environment variable, its value is returned
+(but `\fB:\fR' modifiers and the other forms given below are not available).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fIvar\fR\fB[\fR\fIindex\fR\fB]\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIvar\fR\fB[\fR\fIindex\fR\fB]}\fR\fR
+.ad
+.RS 17n
+.rt
+These select only the indicated words from the value of \fIvar\fR. Variable
+substitution is applied to \fIindex\fR\|, which can consist of (or result in) a
+either single number, two numbers separated by a `\fB\(mi\fR\&', or an
+asterisk. Words are indexed starting from 1; a `\fB*\fR' selects all words. If
+the first number of a range is omitted (as with \fB$argv[\(mi2]\fR), it
+defaults to 1. If the last number of a range is omitted (as with
+\fB$argv[1\(mi]\fR), it defaults to \fB$#\fR\fIvar\fR (the word count). It is
+not an error for a range to be empty if the second argument is omitted (or
+within range).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$#\fR\fIname\fR\fR
+.ad
+.br
+.na
+\fB\fB${#\fR\fIname\fR\fB}\fR\fR
+.ad
+.RS 17n
+.rt
+These give the number of words in the variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$0\fR\fR
+.ad
+.RS 17n
+.rt
+This substitutes the name of the file from which command input is being read
+except for setuid shell scripts. An error occurs if the name is not known.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fIn\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIn\fR\fB}\fR\fR
+.ad
+.RS 17n
+.rt
+Equivalent to \fB$argv[\fR\fIn\fR\fB]\fR\fI\&.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$*\fR\fR
+.ad
+.RS 17n
+.rt
+Equivalent to \fB$argv[*]\fR.
+.RE
+
+.sp
+.LP
+The modifiers \fB:e\fR, \fB:h\fR, \fB:q\fR, \fB:r\fR, \fB:t\fR, and \fB:x\fR
+can be applied (see \fBHistory\fR \fBSubstitution\fR), as can \fB:gh\fR,
+\fB:gt\fR, and \fB:gr\fR. If \fB{\|}\fR (braces) are used, then the modifiers
+must appear within the braces. The current implementation allows only one such
+modifier per expansion.
+.sp
+.LP
+The following references can not be modified with \fB:\fR modifiers.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$?\fR\fIvar\fR\fR
+.ad
+.br
+.na
+\fB\fB${?\fR\fIvar\fR\fB}\fR\fR
+.ad
+.RS 11n
+.rt
+Substitutes the string 1 if \fIvar\fR is set or 0 if it is not set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$?0\fR\fR
+.ad
+.RS 11n
+.rt
+Substitutes 1 if the current input filename is known or 0 if it is not.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$$\fR\fR
+.ad
+.RS 11n
+.rt
+Substitutes the process number of the (parent) shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$<\fR\fR
+.ad
+.RS 11n
+.rt
+Substitutes a line from the standard input, with no further interpretation
+thereafter. It can be used to read from the keyboard in a C shell script.
+.RE
+
+.SS "Command and Filename Substitutions"
+.sp
+.LP
+Command and filename substitutions are applied selectively to the arguments of
+built-in commands. Portions of expressions that are not evaluated are not
+expanded. For non-built-in commands, filename expansion of the command name is
+done separately from that of the argument list; expansion occurs in a subshell,
+after I/O redirection is performed.
+.SS "Command Substitution"
+.sp
+.LP
+A command enclosed by backquotes (\|\fB`\fR\|.\|.\|.\|\fB`\fR\|) is performed
+by a subshell. Its standard output is broken into separate words at each space
+character, tab and newline; null words are discarded. This text replaces the
+backquoted string on the current command line. Within double-quotes, only
+newline characters force new words; space and tab characters are preserved.
+However, a final newline is ignored. It is therefore possible for a command
+substitution to yield a partial word.
+.SS "Filename Substitution"
+.sp
+.LP
+Unquoted words containing any of the characters \fB*\fR, \fB?\fR, \fB[\fR or
+\fB{\fR, or that begin with ~, are expanded (also known as \fIglobbing\fR) to
+an alphabetically sorted list of filenames, as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB*\fR
+.ad
+.RS 24n
+.rt
+Match any (zero or more) characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB?\fR
+.ad
+.RS 24n
+.rt
+Match any single character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR.\|.\|.\fB]\fR\fR
+.ad
+.RS 24n
+.rt
+Match any single character in the enclosed list(s) or range(s). A list is a
+string of characters. A range is two characters separated by a dash
+(\fB\(mi\fR), and includes all the characters in between in the \fBASCII\fR
+collating sequence (see \fBascii\fR(5)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB{\fIstr\fR\fB,\fR \fIstr\fR\fB,\fR .\|.\|. \fB}\fR\fR
+.ad
+.RS 24n
+.rt
+Expand to each string (or filename-matching pattern) in the comma-separated
+list. Unlike the pattern-matching expressions above, the expansion of this
+construct is not sorted. For instance, \fB{b,a}\fR expands to `\fBb\fR'
+`\fBa\fR', (not `\fBa\fR' `\fBb\fR'). As special cases, the characters \fB{\fR
+and \fB}\fR, along with the string \fB{\|}\fR, are passed undisturbed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB~[\fIuser\fR]\fR
+.ad
+.RS 24n
+.rt
+Your home directory, as indicated by the value of the variable \fBhome\fR, or
+that of \fIuser\fR, as indicated by the password entry for \fIuser\fR.
+.RE
+
+.sp
+.LP
+Only the patterns \fB*\fR, \fB?\fR and \fB[\fR.\|.\|.\fB]\fR imply pattern
+matching; an error results if no filename matches a pattern that contains them.
+The `\fB\&.\fR' (dot character), when it is the first character in a filename
+or pathname component, must be matched explicitly. The \fB/\fR (slash) must
+also be matched explicitly.
+.SS "Expressions and Operators"
+.sp
+.LP
+A number of C shell built-in commands accept expressions, in which the
+operators are similar to those of C and have the same precedence. These
+expressions typically appear in the \fB@\fR, \fBexit\fR, \fBif\fR, \fBset\fR
+and \fBwhile\fR commands, and are often used to regulate the flow of control
+for executing commands. Components of an expression are separated by white
+space.
+.sp
+.LP
+Null or missing values are considered \fB0\fR. The result of all expressions is
+a string, which can represent decimal numbers.
+.sp
+.LP
+The following C shell operators are grouped in order of precedence:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(\|\fR.\|.\|.\|\fB\|)\fR\fR
+.ad
+.RS 19n
+.rt
+grouping
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB~\fR\fR
+.ad
+.RS 19n
+.rt
+one's complement
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.RS 19n
+.rt
+logical negation
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB* / %\fR\fR
+.ad
+.RS 19n
+.rt
+multiplication, division, remainder. These are right associative, which can
+lead to unexpected results. Combinations should be grouped explicitly with
+parentheses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ \(mi\fR\fR
+.ad
+.RS 19n
+.rt
+addition, subtraction (also right associative)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<< >>\fR\fR
+.ad
+.RS 19n
+.rt
+bitwise shift left, bitwise shift right
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB< > <= >=\fR\fR
+.ad
+.RS 19n
+.rt
+less than, greater than, less than or equal to, greater than or equal to
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\|= != =~ !~\fR\fR
+.ad
+.RS 19n
+.rt
+equal to, not equal to, filename-substitution pattern match (described below),
+filename-substitution pattern mismatch
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB&\fR\fR
+.ad
+.RS 19n
+.rt
+bitwise AND
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fR
+.ad
+.RS 19n
+.rt
+bitwise XOR (exclusive or)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB|\fR\fR
+.ad
+.RS 19n
+.rt
+bitwise inclusive OR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB&&\fR\fR
+.ad
+.RS 19n
+.rt
+logical AND
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB|\|\||\fR\fR
+.ad
+.RS 19n
+.rt
+logical OR
+.RE
+
+.sp
+.LP
+The operators: \fB==\fR, \fB!=\fR, \fB=~\fR, and \fB!~\fR compare their
+arguments as strings; other operators use numbers. The operators \fB=~\fR and
+\fB!~\fR each check whether or not a string to the left matches a filename
+substitution pattern on the right. This reduces the need for \fBswitch\fR
+statements when pattern-matching between strings is all that is required.
+.sp
+.LP
+Also available are file inquiries:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+Return true, or 1 if the user has read access. Otherwise it returns false, or
+0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if the user has write access.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if the user has execute permission (or search permission on a directory).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if \fIfilename\fR exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if the user owns \fIfilename\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if \fIfilename\fR is of zero length (empty).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if \fIfilename\fR is a plain file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+True if \fIfilename\fR is a directory.
+.RE
+
+.sp
+.LP
+If \fIfilename\fR does not exist or is inaccessible, then all inquiries return
+false.
+.sp
+.LP
+An inquiry as to the success of a command is also available:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB{\fR \fIcommand\fR\fB}\fR\fR
+.ad
+.RS 14n
+.rt
+If \fIcommand\fR runs successfully, the expression evaluates to true, 1.
+Otherwise, it evaluates to false, 0. \fBNote:\fR Conversely, \fIcommand\fR
+itself typically returns 0 when it runs successfully, or some other value if it
+encounters a problem. If you want to get at the status directly, use the value
+of the \fBstatus\fR variable rather than this expression.
+.RE
+
+.SS "Control Flow"
+.sp
+.LP
+The shell contains a number of commands to regulate the flow of control in
+scripts and within limits, from the terminal. These commands operate by forcing
+the shell either to reread input (to \fIloop\fR), or to skip input under
+certain conditions (to \fIbranch\fR).
+.sp
+.LP
+Each occurrence of a \fBforeach\fR, \fBswitch\fR, \fBwhile\fR,
+\fBif\fR.\|.\|.\fBthen\fR and \fBelse\fR built-in command must appear as the
+first word on its own input line.
+.sp
+.LP
+If the shell's input is not seekable and a loop is being read, that input is
+buffered. The shell performs seeks within the internal buffer to accomplish the
+rereading implied by the loop. (To the extent that this allows, backward
+\fBgoto\fR commands succeeds on nonseekable inputs.)
+.SS "Command Execution"
+.sp
+.LP
+If the command is a C shell built-in command, the shell executes it directly.
+Otherwise, the shell searches for a file by that name with execute access. If
+the command name contains a \fB/\fR, the shell takes it as a pathname, and
+searches for it. If the command name does not contain a \fB/\fR, the shell
+attempts to resolve it to a pathname, searching each directory in the
+\fBpath\fR variable for the command. To speed the search, the shell uses its
+hash table (see the \fBrehash\fR built-in command) to eliminate directories
+that have no applicable files. This hashing can be disabled with the \fB-c\fR
+or \fB-t\fR, options, or the \fBunhash\fR built-in command.
+.sp
+.LP
+As a special case, if there is no \fB/\fR in the name of the script and there
+is an alias for the word \fBshell\fR, the expansion of the \fBshell\fR alias is
+prepended (without modification) to the command line. The system attempts to
+execute the first word of this special (late-occurring) alias, which should be
+a full pathname. Remaining words of the alias's definition, along with the text
+of the input line, are treated as arguments.
+.sp
+.LP
+When a pathname is found that has proper execute permissions, the shell forks a
+new process and passes it, along with its arguments, to the kernel using the
+\fBexecve\fR(\|) system call (see \fBexec\fR(2)). The kernel then attempts to
+overlay the new process with the desired program. If the file is an executable
+binary (in \fBa.out\fR(4) format) the kernel succeeds and begins executing the
+new process. If the file is a text file and the first line begins with
+\fB#!\fR, the next word is taken to be the pathname of a shell (or command) to
+interpret that script. Subsequent words on the first line are taken as options
+for that shell. The kernel invokes (overlays) the indicated shell, using the
+name of the script as an argument.
+.sp
+.LP
+If neither of the above conditions holds, the kernel cannot overlay the file
+and the \fBexecve\fR(\|) call fails (see \fBexec\fR(2)). The C shell then
+attempts to execute the file by spawning a new shell, as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the first character of the file is a \fB#\fR, a C shell is invoked.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, a Bourne shell is invoked.
+.RE
+.SS "Signal Handling"
+.sp
+.LP
+The shell normally ignores \fBQUIT\fR signals. Background jobs are immune to
+signals generated from the keyboard, including hangups (\fBHUP\fR). Other
+signals have the values that the C shell inherited from its environment. The
+shell's handling of interrupt and terminate signals within scripts can be
+controlled by the \fBonintr\fR built-in command. Login shells catch the
+\fBTERM\fR signal. Otherwise, this signal is passed on to child processes. In
+no case are interrupts allowed when a login shell is reading the
+\fB\&.logout\fR file.
+.SS "Job Control"
+.sp
+.LP
+The shell associates a numbered \fIjob\fR with each command sequence to keep
+track of those commands that are running in the background or have been stopped
+with \fBTSTP\fR signals (typically Control-z). When a command or command
+sequence (semicolon separated list) is started in the background using the
+\fB&\fR metacharacter, the shell displays a line with the job number in
+brackets and a list of associated process numbers:
+.sp
+.in +2
+.nf
+[1] 1234
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To see the current list of jobs, use the \fBjobs\fR built-in command. The job
+most recently stopped (or put into the background if none are stopped) is
+referred to as the \fIcurrent\fR job and is indicated with a `\fB+\fR'. The
+previous job is indicated with a `\fB\(mi\fR\&'. When the current job is
+terminated or moved to the foreground, this job takes its place (becomes the
+new current job).
+.sp
+.LP
+To manipulate jobs, refer to the \fBbg\fR, \fBfg\fR, \fBkill\fR, \fBstop\fR,
+and \fB%\fR built-in commands.
+.sp
+.LP
+A reference to a job begins with a `\fB%\fR'. By itself, the percent-sign
+refers to the current job.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR \fB%+\fR \fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+The current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\(mi\fR\fR
+.ad
+.RS 12n
+.rt
+The previous job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIj\fR\fR
+.ad
+.RS 12n
+.rt
+Refer to job \fIj\fR as in: `\fBkill\fR \fB-9\fR \fB%\fR\fIj\fR'. \fIj\fR can
+be a job number, or a string that uniquely specifies the command line by which
+it was started; `\fBfg %vi\fR' might bring a stopped \fBvi\fR job to the
+foreground, for instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Specify the job for which the command line uniquely contains \fIstring\fR.
+.RE
+
+.sp
+.LP
+A job running in the background stops when it attempts to read from the
+terminal. Background jobs can normally produce output, but this can be
+suppressed using the `\fBstty tostop\fR' command.
+.SS "Status Reporting"
+.sp
+.LP
+While running interactively, the shell tracks the status of each job and
+reports whenever the job finishes or becomes blocked. It normally displays a
+message to this effect as it issues a prompt, in order to avoid disturbing the
+appearance of your input. When set, the \fBnotify\fR variable indicates that
+the shell is to report status changes immediately. By default, the \fBnotify\fR
+command marks the current process; after starting a background job, type
+\fBnotify\fR to mark it.
+.SS "Commands"
+.sp
+.LP
+Built-in commands are executed within the C shell. If a built-in command occurs
+as any component of a pipeline except the last, it is executed in a subshell.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:\fR\fR
+.ad
+.RS 26n
+.rt
+Null command. This command is interpreted, but performs no action.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBalias\fR [ \fIname\fR [ \fIdef\fR ] ]\fR
+.ad
+.RS 26n
+.rt
+Assign \fIdef\fR to the alias \fIname\fR. \fIdef\fR is a list of words that can
+contain escaped history-substitution metasyntax. \fIname\fR is not allowed to
+be \fBalias\fR or \fBunalias\fR. If \fIdef\fR is omitted, the current
+definition for the alias \fIname\fR is displayed. If both \fIname\fR and
+\fIdef\fR are omitted, all aliases are displayed with their definitions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbg\fR [ \fB%\fR\fIjob .\|.\|.\fR ]\fR
+.ad
+.RS 26n
+.rt
+Run the current or specified jobs in the background.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbreak\fR\fR
+.ad
+.RS 26n
+.rt
+Resume execution after the \fBend\fR of the nearest enclosing \fBforeach\fR or
+\fBwhile\fR loop. The remaining commands on the current line are executed. This
+allows multilevel breaks to be written as a list of \fBbreak\fR commands, all
+on one line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbreaksw\fR\fR
+.ad
+.RS 26n
+.rt
+Break from a \fBswitch\fR, resuming after the \fBendsw\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcase\fR \fIlabel\fR\fB:\fR\fR
+.ad
+.RS 26n
+.rt
+A label in a \fBswitch\fR statement.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR [\fIdir\fR ]\fR
+.ad
+.br
+.na
+\fB\fBchdir\fR [\fIdir\fR ]\fR
+.ad
+.RS 26n
+.rt
+Change the shell's working directory to directory \fIdir\fR. If no argument is
+given, change to the home directory of the user. If \fIdir\fR is a relative
+pathname not found in the current directory, check for it in those directories
+listed in the \fBcdpath\fR variable. If \fIdir\fR is the name of a shell
+variable whose value starts with a \fB/\fR, change to the directory named by
+that value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcontinue\fR\fR
+.ad
+.RS 26n
+.rt
+Continue execution of the next iteration of the nearest enclosing \fBwhile\fR
+or \fBforeach\fR loop.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefault:\fR\fR
+.ad
+.RS 26n
+.rt
+Labels the default case in a \fBswitch\fR statement. The default should come
+after all \fBcase\fR labels. Any remaining commands on the command line are
+first executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdirs\fR [\fB-l\fR]\fR
+.ad
+.RS 26n
+.rt
+Print the directory stack, most recent to the left. The first directory shown
+is the current directory. With the \fB-l\fR argument, produce an unabbreviated
+printout; use of the ~ notation is suppressed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBecho\fR [\fB-n\fR] \fIlist\fR\fR
+.ad
+.RS 26n
+.rt
+The words in \fIlist\fR are written to the shell's standard output, separated
+by space characters. The output is terminated with a newline unless the
+\fB-n\fR option is used. \fBcsh\fR, by default, invokes its built-in
+\fBecho\fR, if \fBecho\fR is called without the full pathname of a Unix
+command, regardless of the configuration of your \fBPATH\fR (see
+\fBecho\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeval\fR \fIargument\fR\fB\|.\|.\|.\fR\fR
+.ad
+.RS 26n
+.rt
+Reads the arguments as input to the shell and executes the resulting
+command(s). This is usually used to execute commands generated as the result of
+command or variable substitution. See \fBtset\fR(1B) for an example of how to
+use \fBeval\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexec\fR \fIcommand\fR\fR
+.ad
+.RS 26n
+.rt
+Execute \fIcommand\fR in place of the current shell, which terminates.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexit\fR [\fB(\fR\fIexpr\fR\fB)\fR]\fR
+.ad
+.RS 26n
+.rt
+The calling shell or shell script exits, either with the value of the status
+variable or with the value specified by the expression \fIexpr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfg\fR [\fB%\fR\fIjob\fR ]\fR
+.ad
+.RS 26n
+.rt
+Bring the current or specified \fIjob\fR into the foreground.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBforeach\fR \fIvar\fR\fB(\fR\fIwordlist\fR\fB)\fR\fR
+.ad
+.br
+.na
+\fB\&.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBend\fR\fR
+.ad
+.RS 26n
+.rt
+The variable \fIvar\fR is successively set to each member of \fIwordlist\fR.
+The sequence of commands between this command and the matching \fBend\fR is
+executed for each new value of \fIvar\fR. Both \fBforeach\fR and \fBend\fR must
+appear alone on separate lines.
+.sp
+The built-in command \fBcontinue\fR can be used to terminate the execution of
+the current iteration of the loop and the built-in command \fBbreak\fR can be
+used to terminate execution of the \fBforeach\fR command. When this command is
+read from the terminal, the loop is read once prompting with \fB?\fR before any
+statements in the loop are executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBglob\fR \fIwordlist\fR\fR
+.ad
+.sp .6
+.RS 4n
+Perform filename expansion on \fIwordlist\fR. Like \fBecho\fR, but no \fB\e\fR
+escapes are recognized. Words are delimited by \fINULL\fR characters in the
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgoto\fR\fIlabel\fR\fR
+.ad
+.sp .6
+.RS 4n
+The specified \fIlabel\fR is a filename and a command expanded to yield a
+label. The shell rewinds its input as much as possible and searches for a line
+of the form \fIlabel\fR\fB:\fR possibly preceded by space or tab characters.
+Execution continues after the indicated line. It is an error to jump to a label
+that occurs between a \fBwhile\fR or \fBfor\fR built-in command and its
+corresponding \fBend\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhashstat\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print a statistics line indicating how effective the internal hash table for
+the \fIpath\fR variable has been at locating commands (and avoiding
+\fBexec\fRs). An \fBexec\fR is attempted for each component of the \fIpath\fR
+where the hash function indicates a possible hit and in each component that
+does not begin with a `\fB/\fR'. These statistics only reflect the
+effectiveness of the \fIpath\fR variable, not the \fIcdpath\fR variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhistory\fR [\fB-hr\fR] [\fIn\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Display the history list; if \fIn\fR is given, display only the \fIn\fR most
+recent events.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Reverse the order of printout to be most recent first rather than oldest first.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Display the history list without leading numbers. This is used to produce files
+suitable for sourcing using the \fB-h\fR option to \fIsource\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBif (\fR\fIexpr\fR \fB)\fR\fIcommand\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the specified expression evaluates to true, the single \fIcommand\fR with
+arguments is executed. Variable substitution on \fIcommand\fR happens early, at
+the same time it does for the rest of the \fBif\fR command. \fIcommand\fR must
+be a simple command, not a pipeline, a command list, or a parenthesized command
+list. \fBNote:\fR I/O redirection occurs even if \fIexpr\fR is false, when
+\fIcommand\fR is \fInot\fR executed (this is a bug).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBif (\fR\fBexpr\fR\fB) then\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBelse if (\fR\fIexpr2\fR\fB) then\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBelse\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBendif\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIexpr\fR is true, commands up to the first \fBelse\fR are executed.
+Otherwise, if \fIexpr2\fR is true, the commands between the \fBelse if\fR and
+the second \fBelse\fR are executed. Otherwise, commands between the \fBelse\fR
+and the \fBendif\fR are executed. Any number of \fBelse if\fR pairs are
+allowed, but only one \fBelse\fR. Only one \fBendif\fR is needed, but it is
+required. The words \fBelse\fR and \fBendif\fR must be the first nonwhite
+characters on a line. The \fBif\fR must appear alone on its input line or after
+an \fBelse\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBjobs\fR [\fB-l\fR]\fR
+.ad
+.sp .6
+.RS 4n
+List the active jobs under job control.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+List process \fBID\fRs, in addition to the normal information.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkill\fR [\fIsig\fR ] [ \fIpid\fR ] [ \fB%\fR\fB\fIjob\fR ] .\|.\|.\fR\fR
+.ad
+.br
+.na
+\fB\fBkill\fR \fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTERM\fR (terminate) signal, by default, or the signal specified, to
+the specified process ID, the \fIjob\fR indicated, or the current \fIjob\fR.
+Signals are either given by number or by name. There is no default. Typing
+\fBkill\fR does not send a signal to the current job. If the signal being sent
+is \fBTERM\fR (terminate) or \fBHUP\fR (hangup), then the job or process is
+sent a \fBCONT\fR (continue) signal as well.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+List the signal names that can be sent.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlimit\fR [\fB-h\fR] [\fIresource\fR [\fImax-use\fR ] ]\fR
+.ad
+.sp .6
+.RS 4n
+Limit the consumption by the current process or any process it spawns, each not
+to exceed \fImax-use\fR on the specified \fIresource\fR. The string
+\fBunlimited\fR requests that the current limit, if any, be removed. If
+\fImax-use\fR is omitted, print the current limit. If \fIresource\fR is
+omitted, display all limits. Run the \fBsysdef\fR(1M) command to display
+maximum limits for certain resources in your system (although it does not
+report stack size). The values reported are in hexadecimal, but can be
+translated into decimal numbers using the \fBbc\fR(1) command.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Use hard limits instead of the current limits. Hard limits impose a ceiling on
+the values of the current limits. Only the privileged user can raise the hard
+limits.
+.RE
+
+\fIresource\fR is one of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcputime\fR\fR
+.ad
+.RS 23n
+.rt
+Maximum \fBCPU\fR seconds per process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfilesize\fR\fR
+.ad
+.RS 23n
+.rt
+Largest single file allowed. Limited to the size of the filesystem. (See
+\fBdf\fR(1M)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdatasize\fR (heapsize)\fR
+.ad
+.RS 23n
+.rt
+Maximum data size (including stack) for the process. This is the size of your
+virtual memory See \fBswap\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstacksize\fR\fR
+.ad
+.RS 23n
+.rt
+Maximum stack size for the process. The default stack size is 2^64 bytes. You
+can use \fBlimit\fR(1) to change this default within a shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcoredumpsize\fR\fR
+.ad
+.RS 23n
+.rt
+Maximum size of a core dump (file). This limited to the size of the filesystem.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdescriptors\fR\fR
+.ad
+.RS 23n
+.rt
+Maximum number of file descriptors. Run \fBsysdef()\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmemorysize\fR\fR
+.ad
+.RS 23n
+.rt
+Maximum size of virtual memory.
+.RE
+
+\fImax-use\fR is a number, with an optional scaling factor, as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBh\fR\fR
+.ad
+.RS 9n
+.rt
+Hours (for \fBcputime\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBk\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR kilobytes. This is the default for all but \fBcputime\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBm\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR megabytes or minutes (for \fBcputime\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR\fB:\fR\fIss\fR\fR
+.ad
+.RS 9n
+.rt
+Minutes and seconds (for \fBcputime\fR).
+.RE
+
+Example of limit: To limit the size of a core file dump to \fB0\fR Megabytes,
+type the following:
+.sp
+.in +2
+.nf
+\fBlimit coredumpsize 0M\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogin\fR [\fIusername\fR\|| \fB-p\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Terminate a login shell and invoke \fBlogin\fR(1). The \fB\&.logout\fR file is
+not processed. If \fIusername\fR is omitted, \fBlogin\fR prompts for the name
+of a user.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Preserve the current environment (variables).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogout\fR\fR
+.ad
+.sp .6
+.RS 4n
+Terminate a login shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnice\fR [\fB+\fR\fIn\fR \||\fB-\fR\fIn\fR ] [\fIcommand\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Increment the process priority value for the shell or for \fIcommand\fR by
+\fIn\fR. The higher the priority value, the lower the priority of a process,
+and the slower it runs. When given, \fIcommand\fR is always run in a subshell,
+and the restrictions placed on commands in simple \fBif\fR commands apply. If
+\fIcommand\fR is omitted, \fBnice\fR increments the value for the current
+shell. If no increment is specified, \fBnice\fR sets the process priority value
+to 4. The range of process priority values is from \(mi20 to 20. Values of
+\fIn\fR outside this range set the value to the lower, or to the higher
+boundary, respectively.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+Increment the process priority value by \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+Decrement by \fIn\fR. This argument can be used only by the privileged user.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnohup\fR [\fIcommand\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Run \fIcommand\fR with \fBHUP\fRs ignored. With no arguments, ignore \fBHUP\fRs
+throughout the remainder of a script. When given, \fIcommand\fR is always run
+in a subshell, and the restrictions placed on commands in simple \fBif\fR
+statements apply. All processes detached with \fB&\fR are effectively
+\fBnohup\fR'd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnotify\fR [\fB%\fR\fIjob\fR] .\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Notify the user asynchronously when the status of the current job or specified
+jobs changes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBonintr\fR [\fB\(mi\fR| \fIlabel\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Control the action of the shell on interrupts. With no arguments, \fBonintr\fR
+restores the default action of the shell on interrupts. (The shell terminates
+shell scripts and returns to the terminal command input level). With the
+\fB\(mi\fR argument, the shell ignores all interrupts. With a \fIlabel\fR
+argument, the shell executes a \fBgoto\fR \fIlabel\fR when an interrupt is
+received or a child process terminates because it was interrupted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpopd\fR [\fB+\fR\fIn\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Pop the directory stack and \fBcd\fR to the new top directory. The elements of
+the directory stack are numbered from 0 starting at the top.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+Discard the \fIn\fR'th entry in the stack.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpushd\fR [\fB+\fR\fIn\fR |\fIdir\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Push a directory onto the directory stack. With no arguments, exchange the top
+two elements.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIn\fR\fR
+.ad
+.RS 7n
+.rt
+Rotate the \fIn\fR'th entry to the top of the stack and \fBcd\fR to it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdir\fR\fR
+.ad
+.RS 7n
+.rt
+Push the current working directory onto the stack and change to \fIdir\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrehash\fR\fR
+.ad
+.sp .6
+.RS 4n
+Recompute the internal hash table of the contents of directories listed in the
+\fIpath\fR variable to account for new commands added. Recompute the internal
+hash table of the contents of directories listed in the \fIcdpath\fR variable
+to account for new directories added.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrepeat\fR \fIcount command\fR\fR
+.ad
+.sp .6
+.RS 4n
+Repeat \fIcommand count\fR times. \fIcommand\fR is subject to the same
+restrictions as with the one-line \fBif\fR statement.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBset\fR [\fIvar\fR [\fB=\fR \fIvalue\fR ] ]\fR
+.ad
+.br
+.na
+\fB\fBset\fR \fIvar\fR\fB[\fR\fIn\fR\fB] =\fR \fIword\fR\fR
+.ad
+.sp .6
+.RS 4n
+With no arguments, \fBset\fR displays the values of all shell variables.
+Multiword values are displayed as a parenthesized list. With the \fIvar\fR
+argument alone, \fBset\fR assigns an empty (null) value to the variable
+\fIvar\fR. With arguments of the form \fIvar\fR \fB=\fR \fIvalue\fR \fBset\fR
+assigns \fIvalue\fR to \fIvar\fR, where \fIvalue\fR is one of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+A single word (or quoted string).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(\fR\fIwordlist\fR\fB)\fR\fR
+.ad
+.RS 14n
+.rt
+A space-separated list of words enclosed in parentheses.
+.RE
+
+Values are command and filename expanded before being assigned. The form
+\fBset\fR\fIvar\fR\fB[\fR\fIn\fR\fB] =\fR \fIword\fR replaces the \fIn\fR'th
+word in a multiword value with \fIword\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetenv\fR [\fIVAR\fR [\fIword\fR ] ]\fR
+.ad
+.sp .6
+.RS 4n
+With no arguments, \fBsetenv\fR displays all environment variables. With the
+\fIVAR\fR argument, \fBsetenv\fR sets the environment variable
+\fB\fR\fIVAR\fR\fB \fR to have an empty (null) value. (By convention,
+environment variables are normally given upper-case names.) With both \fIVAR\fR
+and \fIword\fR arguments, \fBsetenv\fR sets the environment variable \fBNAME\fR
+to the value \fIword\fR, which must be either a single word or a quoted string.
+The most commonly used environment variables, \fBUSER\fR, \fBTERM\fR, and
+\fBPATH\fR, are automatically imported to and exported from the \fBcsh\fR
+variables \fBuser\fR, \fBterm\fR, and \fBpath\fR. There is no need to use
+\fBsetenv\fR for these. In addition, the shell sets the \fBPWD\fR environment
+variable from the \fBcsh\fR variable \fBcwd\fR whenever the latter changes.
+.sp
+The environment variables \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR,
+\fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR take immediate effect
+when changed within the C shell.
+.sp
+If any of the \fBLC_*\fR variables (\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+\fBLC_TIME\fR, \fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR) (see
+\fBenviron\fR(5)) are not set in the environment, the operational behavior of
+\fBcsh\fR for each corresponding locale category is determined by the value of
+the \fBLANG\fR environment variable. If \fBLC_ALL\fR is set, its contents are
+used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. If
+none of the above variables is set in the environment, the "C" (U.S. style)
+locale determines how \fBcsh\fR behaves.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR\fR
+.ad
+.RS 15n
+.rt
+Determines how \fBcsh\fR handles characters. When \fBLC_CTYPE\fR is set to a
+valid value, \fBcsh\fR can display and handle text and filenames containing
+valid characters for that locale.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR\fR
+.ad
+.RS 15n
+.rt
+Determines how diagnostic and informative messages are presented. This includes
+the language and style of the messages and the correct form of affirmative and
+negative responses. In the "C" locale, the messages are presented in the
+default form found in the program itself (in most cases, U.S./English).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_NUMERIC\fR\fR
+.ad
+.RS 15n
+.rt
+Determines the value of the radix character, decimal point, (\fB\&.\fR) in the
+"C" locale) and thousand separator, empty string (\fB""\fR) in the "C" locale).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshift\fR [\fIvariable\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+The components of \fBargv\fR, or \fIvariable\fR, if supplied, are shifted to
+the left, discarding the first component. It is an error for the variable not
+to be set or to have a null value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsource\fR [\fB-h\fR] \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Reads commands from \fIname\fR. \fBsource\fR commands can be nested, but if
+they are nested too deeply the shell can run out of file descriptors. An error
+in a sourced file at any level terminates all nested \fBsource\fR commands.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Place commands from the file \fIname\fR on the history list without executing
+them.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR \fB%\fR\fIjobid .\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stop the current or specified background job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR \fIpid .\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stop the specified process, \fIpid\fR. (see \fBps\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsuspend\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stop the shell in its tracks, much as if it had been sent a stop signal with
+\fB^Z\fR. This is most often used to stop shells started by \fBsu\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBswitch (\fR\fIstring\fR\fB)\fR\fR
+.ad
+.br
+.na
+\fB\fBcase\fR \fIlabel\fR\fB:\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBbreaksw\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBdefault:\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBbreaksw\fR\fR
+.ad
+.br
+.na
+\fB\fBendsw\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each \fIlabel\fR is successively matched, against the specified \fIstring\fR,
+which is first command and filename expanded. The file metacharacters \fB*\fR,
+\fB?\fR and \fB[\fR.\|.\|.\fB]\fR can be used in the case labels, which are
+variable expanded. If none of the labels match before a "default" label is
+found, execution begins after the default label. Each \fBcase\fR statement and
+the \fBdefault\fR statement must appear at the beginning of a line. The command
+\fBbreaksw\fR continues execution after the \fBendsw\fR. Otherwise control
+falls through subsequent \fBcase\fR and \fBdefault\fR statements as with C. If
+no label matches and there is no default, execution continues after the
+\fBendsw\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtime\fR [\fIcommand\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+With no argument, print a summary of time used by this C shell and its
+children. With an optional \fIcommand\fR, execute \fIcommand\fR and print a
+summary of the time it uses. As of this writing, the \fBtime\fR built-in
+command does NOT compute the last 6 fields of output, rendering the output to
+erroneously report the value \fB0\fR for these fields.
+.sp
+.in +2
+.nf
+example %\fBtime ls\fR \fB-R\fR
+ 9.0u 11.0s 3:32 10% 0+0k 0+0io 0pf+0w
+.fi
+.in -2
+.sp
+
+(See the \fBEnvironment Variables and Predefined Shell Variables\fR sub-section
+on the \fBtime\fR variable.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBumask\fR [\fIvalue\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Display the file creation mask. With \fIvalue\fR, set the file creation mask.
+With \fIvalue\fR given in octal, the user can turn off any bits, but cannot
+turn on bits to allow new permissions. Common values include 077, restricting
+all permissions from everyone else; 002, giving complete access to the group,
+and read (and directory search) access to others; or 022, giving read (and
+directory search) but not write permission to the group and others.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunalias\fR \fIpattern\fR\fR
+.ad
+.sp .6
+.RS 4n
+Discard aliases that match (filename substitution) \fIpattern\fR. All aliases
+are removed by `\fBunalias *\fR'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunhash\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable the internal hash tables for the \fIpath\fR and \fIcdpath\fR variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunlimit\fR [\fB-h\fR] [\fIresource\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Remove a limitation on \fIresource\fR. If no \fIresource\fR is specified, then
+all resource limitations are removed. See the description of the \fBlimit\fR
+command for the list of resource names.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Remove corresponding hard limits. Only the privileged user can do this.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunset\fR \fIpattern\fR\fR
+.ad
+.sp .6
+.RS 4n
+Remove variables whose names match (filename substitution) \fIpattern\fR. All
+variables are removed by `\fBunset *\fR'; this has noticeably distasteful side
+effects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunsetenv\fR \fIvariable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Remove \fIvariable\fR from the environment. As with \fBunset\fR, pattern
+matching is not performed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwait\fR\fR
+.ad
+.sp .6
+.RS 4n
+Wait for background jobs to finish (or for an interrupt) before prompting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwhile (\fR\fIexpr\fR\fB)\fR\fR
+.ad
+.br
+.na
+\fB\|\|\|.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBend\fR\fR
+.ad
+.sp .6
+.RS 4n
+While \fIexpr\fR is true (evaluates to nonzero), repeat commands between the
+\fBwhile\fR and the matching \fBend\fR statement. \fBbreak\fR and
+\fBcontinue\fR can be used to terminate or continue the loop prematurely. The
+\fBwhile\fR and \fBend\fR must appear alone on their input lines. If the
+shell's input is a terminal, it prompts for commands with a question-mark until
+the \fBend\fR command is entered and then performs the commands in the loop.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR [\fIjob\fR ] [\fB&\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Bring the current or indicated \fIjob\fR to the foreground. With the ampersand,
+continue running \fIjob\fR in the background.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB@\fR [\fIvar\fR \fB=\fR\fIexpr\fR]\fR
+.ad
+.br
+.na
+\fB\fB@\fR [\fIvar\fR\fB[\fR\fIn\fR\fB]\fR\fB=\fR\fIexpr\fR]\fR
+.ad
+.sp .6
+.RS 4n
+With no arguments, display the values for all shell variables. With arguments,
+set the variable \fIvar\fR, or the \fIn\fR'th word in the value of \fIvar\fR,
+to the value that \fIexpr\fR evaluates to. (If \fB[\fR\fIn\fR\fB]\fR is
+supplied, both \fIvar\fR and its \fIn\fR'th component must already exist.)
+.sp
+If the expression contains the characters \fB>\fR, \fB<\fR, \fB&\fR, or
+\fB|\fR, then at least this part of \fIexpr\fR must be placed within
+parentheses.
+.sp
+The operators \fB*=\fR, \fB+=\fR, and so forth, are available as in C. The
+space separating the name from the assignment operator is optional. Spaces are,
+however, mandatory in separating components of \fIexpr\fR that would otherwise
+be single words.
+.sp
+Special postfix operators, \fB+\|+\fR and \fB\(mi\|\(mi\fR, increment or
+decrement \fIname\fR, respectively.
+.RE
+
+.SS "Environment Variables and Predefined Shell Variables"
+.sp
+.LP
+Unlike the Bourne shell, the C shell maintains a distinction between
+environment variables, which are automatically exported to processes it
+invokes, and shell variables, which are not. Both types of variables are
+treated similarly under variable substitution. The shell sets the variables
+\fBargv\fR, \fBcwd\fR, \fBhome\fR, \fBpath\fR, \fBprompt\fR, \fBshell\fR, and
+\fBstatus\fR upon initialization. The shell copies the environment variable
+\fBUSER\fR into the shell variable \fBuser\fR, \fBTERM\fR into \fBterm\fR, and
+\fBHOME\fR into \fBhome\fR, and copies each back into the respective
+environment variable whenever the shell variables are reset. \fBPATH\fR and
+\fBpath\fR are similarly handled. You need only set \fBpath\fR once in the
+\fB\&.cshrc\fR or \fB\&.login\fR file. The environment variable \fBPWD\fR is
+set from \fBcwd\fR whenever the latter changes. The following shell variables
+have predefined meanings:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBargv\fR\fR
+.ad
+.RS 13n
+.rt
+Argument list. Contains the list of command line arguments supplied to the
+current invocation of the shell. This variable determines the value of the
+positional parameters \fB$1\fR, \fB$2\fR, and so on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcdpath\fR\fR
+.ad
+.RS 13n
+.rt
+Contains a list of directories to be searched by the \fBcd\fR, \fBchdir\fR, and
+\fBpopd\fR commands, if the directory argument each accepts is not a
+subdirectory of the current directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcwd\fR\fR
+.ad
+.RS 13n
+.rt
+The full pathname of the current directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBecho\fR\fR
+.ad
+.RS 13n
+.rt
+Echo commands (after substitutions) just before execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfignore\fR\fR
+.ad
+.RS 13n
+.rt
+A list of filename suffixes to ignore when attempting filename completion.
+Typically the single word `\fB\&.o\fR'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfilec\fR\fR
+.ad
+.RS 13n
+.rt
+Enable filename completion, in which case the Control-d character \fBEOT\fR and
+the \fBESC\fR character have special significance when typed in at the end of a
+terminal input line:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEOT\fR\fR
+.ad
+.RS 7n
+.rt
+Print a list of all filenames that start with the preceding string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBESC\fR\fR
+.ad
+.RS 7n
+.rt
+Replace the preceding string with the longest unambiguous extension.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhardpaths\fR\fR
+.ad
+.RS 13n
+.rt
+If set, pathnames in the directory stack are resolved to contain no
+symbolic-link components.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhistchars\fR\fR
+.ad
+.RS 13n
+.rt
+A two-character string. The first character replaces \fB!\fR as the
+history-substitution character. The second replaces the carat (\fB^\fR) for
+quick substitutions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhistory\fR\fR
+.ad
+.RS 13n
+.rt
+The number of lines saved in the history list. A very large number can use up
+all of the C shell's memory. If not set, the C shell saves only the most recent
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhome\fR\fR
+.ad
+.RS 13n
+.rt
+The user's home directory. The filename expansion of ~ refers to the value of
+this variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignoreeof\fR\fR
+.ad
+.RS 13n
+.rt
+If set, the shell ignores \fBEOF\fR from terminals. This protects against
+accidentally killing a C shell by typing a Control-d.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmail\fR\fR
+.ad
+.RS 13n
+.rt
+A list of files where the C shell checks for mail. If the first word of the
+value is a number, it specifies a mail checking interval in seconds (default 5
+minutes).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnobeep\fR\fR
+.ad
+.RS 13n
+.rt
+Suppress the bell during command completion when asking the C shell to extend
+an ambiguous filename.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoclobber\fR\fR
+.ad
+.RS 13n
+.rt
+Restrict output redirection so that existing files are not destroyed by
+accident. \fB>\fR redirections can only be made to new files. \fB>>\fR
+redirections can only be made to existing files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoglob\fR\fR
+.ad
+.RS 13n
+.rt
+Inhibit filename substitution. This is most useful in shell scripts once
+filenames (if any) are obtained and no further expansion is desired.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnonomatch\fR\fR
+.ad
+.RS 13n
+.rt
+Return the filename substitution pattern, rather than an error, if the pattern
+is not matched. Malformed patterns still result in errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnotify\fR\fR
+.ad
+.RS 13n
+.rt
+If set, the shell notifies you immediately as jobs are completed, rather than
+waiting until just before issuing a prompt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpath\fR\fR
+.ad
+.RS 13n
+.rt
+The list of directories in which to search for commands. \fBpath\fR is
+initialized from the environment variable \fBPATH\fR, which the C shell updates
+whenever \fBpath\fR changes. A null word ('') specifies the current directory.
+The default is typically \fB(/usr/bin .)\fR. One can override this initial
+search path upon \fBcsh\fR start-up by setting it in \fB\&.cshrc\fR or
+\fB\&.login\fR (for login shells only). If \fBpath\fR becomes unset, only full
+pathnames execute. An interactive C shell normally hashes the contents of the
+directories listed after reading \fB\&.cshrc\fR, and whenever \fBpath\fR is
+reset. If new commands are added, use the \fBrehash\fR command to update the
+table.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprompt\fR\fR
+.ad
+.RS 13n
+.rt
+The string an interactive C shell prompts with. Noninteractive shells leave the
+\fBprompt\fR variable unset. Aliases and other commands in the \fB\&.cshrc\fR
+file that are only useful interactively, can be placed after the following
+test: `\fBif ($?prompt == 0) exit\fR', to reduce startup time for
+noninteractive shells. A \fB!\fR in the \fBprompt\fR string is replaced by the
+current event number. The default prompt is \fIhostname\fR\fB%\fR for mere
+mortals, or \fIhostname\fR\fB#\fR for the privileged user.
+.sp
+The setting of \fB$prompt\fR has three meanings:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$prompt\fR not set\fR
+.ad
+.RS 25n
+.rt
+non-interactive shell, test \fB$?prompt\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$prompt\fR set but \fB== ""\fR\fR
+.ad
+.RS 25n
+.rt
+\fB\&.cshrc\fR called by the \fBwhich\fR(1) command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$prompt\fR set and \fB!= ""\fR\fR
+.ad
+.RS 25n
+.rt
+normal interactive shell.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsavehist\fR\fR
+.ad
+.RS 13n
+.rt
+The number of lines from the history list that are saved in ~/.history when the
+user logs out. Large values for \fBsavehist\fR slow down the C shell during
+startup.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshell\fR\fR
+.ad
+.RS 13n
+.rt
+The file in which the C shell resides. This is used in forking shells to
+interpret files that have execute bits set, but that are not executable by the
+system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.RS 13n
+.rt
+The status returned by the most recent command. If that command terminated
+abnormally, 0200 is added to the status. Built-in commands that fail return
+exit status 1; all other built-in commands set status to 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtime\fR\fR
+.ad
+.RS 13n
+.rt
+Control automatic timing of commands. Can be supplied with one or two values.
+The first is the reporting threshold in \fBCPU\fR seconds. The second is a
+string of tags and text indicating which resources to report on. A tag is a
+percent sign (\fB%\fR) followed by a single upper-case letter (unrecognized
+tags print as text):
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%D\fR\fR
+.ad
+.RS 6n
+.rt
+Average amount of unshared data space used in Kilobytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%E\fR\fR
+.ad
+.RS 6n
+.rt
+Elapsed (wallclock) time for the command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%F\fR\fR
+.ad
+.RS 6n
+.rt
+Page faults.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%I\fR\fR
+.ad
+.RS 6n
+.rt
+Number of block input operations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%K\fR\fR
+.ad
+.RS 6n
+.rt
+Average amount of unshared stack space used in Kilobytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%M\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum real memory used during execution of the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%O\fR\fR
+.ad
+.RS 6n
+.rt
+Number of block output operations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%P\fR\fR
+.ad
+.RS 6n
+.rt
+Total CPU time \(em U (user) plus S (system) \(em as a percentage of E
+(elapsed) time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%S\fR\fR
+.ad
+.RS 6n
+.rt
+Number of seconds of CPU time consumed by the kernel on behalf of the user's
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%U\fR\fR
+.ad
+.RS 6n
+.rt
+Number of seconds of \fBCPU\fR time devoted to the user's process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%W\fR\fR
+.ad
+.RS 6n
+.rt
+Number of swaps.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%X\fR\fR
+.ad
+.RS 6n
+.rt
+Average amount of shared memory used in Kilobytes.
+.RE
+
+The default summary display outputs from the \fB%U\fR, \fB%S\fR, \fB%E\fR,
+\fB%P\fR, \fB%X\fR, \fB%D\fR, \fB%I\fR, \fB%O\fR, \fB%F\fR, and \fB%W\fR tags,
+in that order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.RS 13n
+.rt
+Display each command after history substitution takes place.
+.RE
+
+.SS "Large File Behavior"
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcsh\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.cshrc\fR\fR
+.ad
+.RS 15n
+.rt
+Read at beginning of execution by each shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.login\fR\fR
+.ad
+.RS 15n
+.rt
+Read by login shells after \fB\&.cshrc\fR at login.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.logout\fR\fR
+.ad
+.RS 15n
+.rt
+Read by login shells at logout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.history\fR\fR
+.ad
+.RS 15n
+.rt
+Saved history for use at next login.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/sh\fR\fR
+.ad
+.RS 15n
+.rt
+The Bourne shell, for shell scripts not starting with a `\fB#\fR'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/sh*\fR\fR
+.ad
+.RS 15n
+.rt
+Temporary file for `\fB<<\fR\&'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+Source of home directories for `~\fIname\fR'.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbc\fR(1), \fBecho\fR(1), \fBlimit\fR(1), \fBlogin\fR(1), \fBls\fR(1),
+\fBmore\fR(1), \fBpfcsh\fR(1), \fBpfexec\fR(1), \fBps\fR(1), \fBsh\fR(1),
+\fBshell_builtins\fR(1), \fBtset\fR(1B), \fBwhich\fR(1), \fBdf\fR(1M),
+\fBswap\fR(1M), \fBsysdef\fR(1M), \fBaccess\fR(2), \fBexec\fR(2),
+\fBfork\fR(2), \fBpipe\fR(2), \fBa.out\fR(4), \fBascii\fR(5),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBtermio\fR(7I)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBYou have stopped jobs.\fR\fR
+.ad
+.RS 26n
+.rt
+You attempted to exit the C shell with stopped jobs under job control. An
+immediate second attempt to exit succeeds, terminating the stopped jobs.
+.RE
+
+.SH WARNINGS
+.sp
+.LP
+The use of \fBsetuid\fR shell scripts is \fIstrongly\fR discouraged.
+.SH NOTES
+.sp
+.LP
+Words can be no longer than 1024 bytes. The system limits argument lists to
+1,048,576 bytes. However, the maximum number of arguments to a command for
+which filename expansion applies is 1706. Command substitutions can expand to
+no more characters than are allowed in the argument list. To detect looping,
+the shell restricts the number of \fBalias\fR substitutions on a single line to
+20.
+.sp
+.LP
+When a command is restarted from a stop, the shell prints the directory it
+started in if this is different from the current directory; this can be
+misleading (that is, wrong) as the job might have changed directories
+internally.
+.sp
+.LP
+Shell built-in functions are not stoppable/restartable. Command sequences of
+the form \fIa\fR \fIb\fR \fIc\fR are also not handled gracefully when stopping
+is attempted. If you suspend \fIb\fR, the shell never executes \fIc\fR. This is
+especially noticeable if the expansion results from an alias. It can be avoided
+by placing the sequence in parentheses to force it into a subshell.
+.sp
+.LP
+Commands within loops, prompted for by \fB?\fR, are not placed in the
+\fIhistory\fR list.
+.sp
+.LP
+Control structures should be parsed rather than being recognized as built-in
+commands. This would allow control commands to be placed anywhere, to be
+combined with \fB|\fR, and to be used with \fB&\fR and \fB;\fR metasyntax.
+.sp
+.LP
+It should be possible to use the \fB:\fR modifiers on the output of command
+substitutions. There are two problems with \fB:\fR modifier usage on variable
+substitutions: not all of the modifiers are available, and only one modifier
+per substitution is allowed.
+.sp
+.LP
+The \fBg\fR (global) flag in history substitutions applies only to the first
+match in each word, rather than all matches in all words. The common text
+editors consistently do the latter when given the \fBg\fR flag in a
+substitution command.
+.sp
+.LP
+Quoting conventions are confusing. Overriding the escape character to force
+variable substitutions within double quotes is counterintuitive and
+inconsistent with the Bourne shell.
+.sp
+.LP
+Symbolic links can fool the shell. Setting the \fBhardpaths\fR variable
+alleviates this.
+.sp
+.LP
+It is up to the user to manually remove all duplicate pathnames accrued from
+using built-in commands as
+.sp
+.in +2
+.nf
+set path = \fIpathnames\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+.sp
+.in +2
+.nf
+setenv PATH = \fIpathnames\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+more than once. These often occur because a shell script or a \fB\&.cshrc\fR
+file does something like
+.sp
+.in +2
+.nf
+`set path=(/usr/local /usr/hosts $path)'
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+to ensure that the named directories are in the pathname list.
+.sp
+.LP
+The only way to direct the standard output and standard error separately is by
+invoking a subshell, as follows:
+.sp
+.in +2
+.nf
+\fIcommand\fR > \fIoutfile\fR ) >& \fIerrorfile\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Although robust enough for general use, adventures into the esoteric periphery
+of the C shell can reveal unexpected quirks.
+.sp
+.LP
+If you start \fBcsh\fR as a login shell and you do not have a \fB\&.login\fR in
+your home directory, then the \fBcsh\fR reads in the \fB/etc/.login\fR.
+.sp
+.LP
+When the shell executes a shell script that attempts to execute a non-existent
+command interpreter, the shell returns an erroneous diagnostic message that the
+shell script file does not exist.
+.SH BUGS
+.sp
+.LP
+As of this writing, the \fBtime\fR built-in command does \fBnot\fR compute the
+last 6 fields of output, rendering the output to erroneously report the value
+\fB0\fR for these fields:
+.sp
+.in +2
+.nf
+example %\fBtime ls -R\fR
+ 9.0u 11.0s 3:32 10% 0+0k 0+0io 0pf+0w
+.fi
+.in -2
+.sp
+
diff --git a/usr/src/man/man1/csplit.1 b/usr/src/man/man1/csplit.1
new file mode 100644
index 0000000000..1d384168d0
--- /dev/null
+++ b/usr/src/man/man1/csplit.1
@@ -0,0 +1,307 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH csplit 1 "4 Dec 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+csplit \- split files based on context
+.SH SYNOPSIS
+.LP
+.nf
+\fBcsplit\fR [\fB-ks\fR] [\fB-f\fR \fIprefix\fR] [\fB-n\fR \fInumber\fR] \fIfile\fR \fIarg1\fR... \fIargn\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBcsplit\fR utility reads the file named by the \fIfile\fR operand, writes
+all or part of that file into other files as directed by the \fIarg\fR
+operands, and writes the sizes of the files.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI prefix\fR\fR
+.ad
+.RS 13n
+.rt
+Names the created files \fIprefix\fR\fB00\fR, \fIprefix\fR\fB01\fR, ...,
+\fIprefix\fR\fIn\fR. The default is \fBxx00\fR ... \fBxx\fR\fIn\fR. If the
+\fIprefix\fR argument would create a file name exceeding \fB14\fR bytes, an
+error results. In that case, \fBcsplit\fR exits with a diagnostic message and
+no files are created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 13n
+.rt
+Leaves previously created files intact. By default, \fBcsplit\fR removes
+created files if an error occurs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI number\fR\fR
+.ad
+.RS 13n
+.rt
+Uses \fInumber\fR decimal digits to form filenames for the file pieces. The
+default is \fB2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Suppresses the output of file size messages.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+The path name of a text file to be split. If \fIfile\fR is \fB-\fR, the
+standard input will be used.
+.RE
+
+.sp
+.LP
+The operands \fIarg1\fR ... \fIargn\fR can be a combination of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB/\fIrexp\fR/[\fIoffset\fR]\fR
+.ad
+.RS 18n
+.rt
+Create a file using the content of the lines from the current line up to, but
+not including, the line that results from the evaluation of the regular
+expression with \fIoffset\fR, if any, applied. The regular expression
+\fIrexp\fR must follow the rules for basic regular expressions. Regular
+expressions can include the use of '\fB\e/\fR\&' and '\fB\e%\fR\&'. These forms
+must be properly quoted with single quotes, since "\fB\e\fR" is special to the
+shell. The optional \fIoffset\fR must be a positive or negative integer value
+representing a number of lines. The integer value must be preceded by \fB+\fR
+or \fB\(mi\fR\&. If the selection of lines from an offset expression of this
+type would create a file with zero lines, or one with greater than the number
+of lines left in the input file, the results are unspecified. After the section
+is created, the current line will be set to the line that results from the
+evaluation of the regular expression with any offset applied. The pattern match
+of \fIrexp\fR always is applied from the current line to the end of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%\fIrexp\fR%[\fIoffset\fR]\fR
+.ad
+.RS 18n
+.rt
+This operand is the same as /\fIrexp\fR/[\fIoffset\fR], except that no file
+will be created for the selected section of the input file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIline_no\fR\fR
+.ad
+.RS 18n
+.rt
+Create a file from the current line up to (but not including) the line number
+\fIline_no\fR. Lines in the file will be numbered starting at one. The current
+line becomes \fIline_no\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB{\fInum\fR}\fR
+.ad
+.RS 18n
+.rt
+Repeat operand. This operand can follow any of the operands described
+previously. If it follows a \fIrexp\fR type operand, that operand will be
+applied \fInum\fR more times. If it follows a \fIline_no\fR operand, the file
+will be split every \fIline_no\fR lines, \fInum\fR times, from that point.
+.RE
+
+.sp
+.LP
+An error will be reported if an operand does not reference a line between the
+current position and the end of the file.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcsplit\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSplitting and combining files
+.sp
+.LP
+This example creates four files, \fBcobol00\fR...\fBcobol03\fR.
+
+.sp
+.in +2
+.nf
+example% \fBcsplit -f cobol filename \e
+ '/procedure division/' /par5./ /par16./\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+After editing the \fBsplit\fR files, they can be recombined as follows:
+
+.sp
+.in +2
+.nf
+example% \fBcat cobol0[0\(mi3] > \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This example overwrites the original file.
+
+.LP
+\fBExample 2 \fRSplitting a file into equal parts
+.sp
+.LP
+This example splits the file at every 100 lines, up to 10,000 lines. The
+\fB-k\fR option causes the created files to be retained if there are less than
+10,000 lines; however, an error message would still be printed.
+
+.sp
+.in +2
+.nf
+example% \fBcsplit -k filename 100 {99}\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRCreating a file for separate C routines
+.sp
+.LP
+If \fBprog.c\fR follows the normal C coding convention (the last line of a
+routine consists only of a \fB}\fR in the first character position), this
+example creates a file for each separate C routine (up to 21) in \fBprog.c\fR.
+
+.sp
+.in +2
+.nf
+example% \fBcsplit -k prog.c '%main(%' '/^}/+1' {20}\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcsplit\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsed\fR(1), \fBsplit\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+The diagnostic messages are self-explanatory, except for the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIarg\fR \(mi out of range\fR
+.ad
+.RS 25n
+.rt
+The given argument did not reference a line between the current position and
+the end of the file.
+.RE
+
diff --git a/usr/src/man/man1/ctags.1 b/usr/src/man/man1/ctags.1
new file mode 100644
index 0000000000..842465fd3a
--- /dev/null
+++ b/usr/src/man/man1/ctags.1
@@ -0,0 +1,340 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1980 Regents of the University of California. Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ctags 1 "18 Mar 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+ctags \- create a tags file for use with ex and vi
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ctags\fR [\fB-aBFtuvwx\fR] [\fB-f\fR \fItagsfile\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ctags\fR [\fB-aBFuvwx\fR] [\fB-f\fR \fItagsfile\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBctags\fR utility makes a tags file for \fBex\fR(1) from the specified C,
+C++, Pascal, FORTRAN, \fByacc\fR(1), and \fBlex\fR(1) sources. A tags file
+gives the locations of specified objects (in this case functions and typedefs)
+in a group of files. Each line of the tags file contains the object name, the
+file in which it is defined, and an address specification for the object
+definition. Functions are searched with a pattern, typedefs with a line number.
+Specifiers are given in separate fields on the line, separated by SPACE or TAB
+characters. Using the tags file, \fBex\fR can quickly find these objects'
+definitions.
+.sp
+.LP
+Normally, \fBctags\fR places the tag descriptions in a file called \fBtags\fR;
+this may be overridden with the \fB-f\fR option.
+.sp
+.LP
+Files with names ending in \fB\&.c\fR or \fB\&.h\fR are assumed to be either C
+or C++ source files and are searched for C/C++ routine and macro definitions.
+Files with names ending in \fB\&.cc\fR, \fB\&.C\fR, or \fB\&.cxx\fR, are
+assumed to be C++ source files. Files with names ending in \fB\&.y\fR are
+assumed to be \fByacc\fR source files. Files with names ending in \fB\&.l\fR
+are assumed to be \fBlex\fR files. Others are first examined to see if they
+contain any Pascal or \fBFORTRAN\fR routine definitions; if not, they are
+processed again looking for C definitions.
+.sp
+.LP
+The tag \fBmain\fR is treated specially in C or C++ programs. The tag formed
+is created by prepending \fBM\fR to \fIfile\fR, with a trailing \fB\&.c \fR,
+\fB\&.cc\fR \fB\&.C\fR, or \fB\&.cxx\fR removed, if any, and leading path name
+components also removed. This makes use of \fBctags\fR practical in
+directories with more than one program.
+.SH OPTIONS
+.sp
+.LP
+The precedence of the options that pertain to printing is \fB-x\fR, \fB-v\fR,
+then the remaining options. The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Appends output to an existing \fBtags\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 15n
+.rt
+Uses backward searching patterns (\fB?\fR.\|.\|.\|\fB?\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fItagsfile\fR\fR
+.ad
+.RS 15n
+.rt
+Places the tag descriptions in a file called \fItagsfile\fR instead of
+\fBtags\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 15n
+.rt
+Uses forward searching patterns (\fB/\fR.\|.\|.\|\fB/\fR) (default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 15n
+.rt
+Creates tags for typedefs. \fB/usr/xpg4/bin/ctags\fR creates tags for typedefs
+by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 15n
+.rt
+Updates the specified files in tags, that is, all references to them are
+deleted, and the new values are appended to the file. Beware: this option is
+implemented in a way that is rather slow; it is usually faster to simply
+rebuild the \fBtags\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 15n
+.rt
+Produces on the standard output an index listing the function name, file name,
+and page number (assuming 64 line pages). Since the output will be sorted into
+lexicographic order, it may be desired to run the output through \fBsort\fR
+\fB-f\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 15n
+.rt
+Suppresses warning diagnostics.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Produces a list of object names, the line number and file name on which each is
+defined, as well as the text of that line and prints this on the standard
+output. This is a simple index which can be printed out as an off-line readable
+function index.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following \fIfile\fR operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fB\&.c\fR\fR
+.ad
+.RS 12n
+.rt
+Files with basenames ending with the \fB\&.c\fR suffix are treated as
+C-language source code.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fB\&.h\fR\fR
+.ad
+.RS 12n
+.rt
+Files with basenames ending with the \fB\&.h\fR suffix are treated as
+C-language source code.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fB\&.f\fR\fR
+.ad
+.RS 12n
+.rt
+Files with basenames ending with the \fB\&.f\fR suffix are treated as
+FORTRAN-language source code.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fB-v\fR option is mainly used with \fBvgrind\fR which will be part of the
+optional \fBBSD\fR Compatibility Package.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRProducing entries in alphabetical order
+.sp
+.LP
+Using \fBctags\fR with the \fB-v\fR option produces entries in an order which
+may not always be appropriate for \fBvgrind\fR. To produce results in
+alphabetical order, you may want to run the output through \fBsort\fR \fB-f\fR.
+
+.sp
+.in +2
+.nf
+example% \fBctags -v filename.c filename.h | sort -f \|>\| index\fR
+example% \fBvgrind -x index\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRBuilding a tags file
+.sp
+.LP
+To build a tags file for C sources in a directory hierarchy rooted at
+\fIsourcedir\fR, first create an empty tags file, and then run \fBfind\fR(1)
+
+.sp
+.in +2
+.nf
+example% \fBcd \fIsourcedir \fR ; rm -f tags ; touch tags\fR
+example% \fBfind . \e( -name SCCS -prune -name \e\e
+ '*.c' -o -name '*.h' \e) -exec ctags -u {} \e;\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that spaces must be entered exactly as shown.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBctags\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtags\fR\fR
+.ad
+.RS 8n
+.rt
+output tags file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+.SS "/usr/xpg4/bin/ctags"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBex\fR(1), \fBlex\fR(1), \fBvgrind\fR(1), \fBvi\fR(1), \fByacc\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Recognition of \fBfunctions\fR, \fBsubroutines\fR, and \fBprocedures\fR for
+\fBFORTRAN\fR and Pascal is done in a very simpleminded way. No attempt is made
+to deal with block structure; if you have two Pascal procedures in different
+blocks with the same name, you lose.
+.sp
+.LP
+The method of deciding whether to look for C or Pascal and \fBFORTRAN\fR
+functions is a hack.
+.sp
+.LP
+The \fBctags\fR utility does not know about \fB#ifdefs\fR.
+.sp
+.LP
+The \fBctags\fR utility should know about Pascal types. Relies on the input
+being well formed to detect typedefs. Use of \fB-tx\fR shows only the last line
+of typedefs.
diff --git a/usr/src/man/man1/ctrun.1 b/usr/src/man/man1/ctrun.1
new file mode 100644
index 0000000000..63e75aad93
--- /dev/null
+++ b/usr/src/man/man1/ctrun.1
@@ -0,0 +1,457 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ctrun 1 "25 Feb 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+ctrun \- execute command in a process contract
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ctrun\fR [\fIoptions\fR] \fIcommand\fR [ \fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBctrun\fR utility starts a command in a newly created process contract.
+\fBctrun\fR holds the contract and can be instructed to output or respond to
+events that occur within the contract.
+.sp
+.LP
+For additional information about process contracts, see \fBcontract\fR(4) and
+\fBprocess\fR(4).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fIfmri aux\fR\fR
+.ad
+.RS 26n
+.rt
+Sets the process contract creator's auxiliary field.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIevent\fR,[\fIevent\fR ...]\fR
+.ad
+.br
+.na
+\fB\fB-f\fR \fIevent\fR,[\fIevent\fR ...]\fR
+.ad
+.RS 26n
+.rt
+Sets the informative and fatal events, respectively.
+.sp
+The following are valid \fIevent\fRs:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcore\fR\fR
+.ad
+.RS 10n
+.rt
+A member process dumped core.
+.sp
+\fBcore\fR events are informative by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBempty\fR\fR
+.ad
+.RS 10n
+.rt
+The last member of the process contract exited.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexit\fR\fR
+.ad
+.RS 10n
+.rt
+A member process exited.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfork\fR\fR
+.ad
+.RS 10n
+.rt
+A process was added to the process contract.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhwerr\fR\fR
+.ad
+.RS 10n
+.rt
+A member process encountered a hardware error.
+.sp
+\fBhwerr\fR events are fatal by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsignal\fR\fR
+.ad
+.RS 10n
+.rt
+A member process received a fatal signal from a process in a different process
+contract.
+.RE
+
+Only \fBcore\fR, \fBhwerr\fR, and \fBsignal\fR events can be made fatal.
+.sp
+More events can be delivered than requested if \fBctrun\fR requires them for
+its own purposes. For example, \fBempty\fR messages are always requested if a
+lifetime of \fBcontract\fR is specified. See \fB-l\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIfmri\fR\fR
+.ad
+.RS 26n
+.rt
+Sets the process contract service \fBFMRI\fR field. To set this field the
+caller is required to have the \fB{PRIV_CONTRACT_IDENTITY}\fR in its effective
+set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlifetime\fR\fR
+.ad
+.RS 26n
+.rt
+The following valid \fIlifetime\fR values are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchild\fR\fR
+.ad
+.RS 12n
+.rt
+\fBctrun\fR exits when the command exits, regardless of whether the contract is
+empty.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcontract\fR\fR
+.ad
+.RS 12n
+.rt
+\fBctrun\fR exits only when the contract exits. This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnone\fR\fR
+.ad
+.RS 12n
+.rt
+\fBctrun\fR exits immediately, orphaning the contract.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR,[\fIoption\fR ...]\fR
+.ad
+.RS 26n
+.rt
+The following \fIoption\fRs are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoorphan\fR\fR
+.ad
+.RS 12n
+.rt
+Kills all processes in the contract if the holder (\fBctrun\fR) exits.
+.sp
+This option is invalid when a lifetime of \fBnone\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpgrponly\fR\fR
+.ad
+.RS 12n
+.rt
+If a fatal error occurs, kills at most the process group of which the errant
+process is a member.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBregent\fR\fR
+.ad
+.RS 12n
+.rt
+The contract inherits inheritable contracts when abandoned by member processes.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIcount\fR\fR
+.ad
+.RS 26n
+.rt
+If the contract encounters a fault, this option attempts to restart the command
+\fIcount\fR times. If \fIcount\fR is \fB0\fR, the attempt to restart continues
+indefinitely. By default, \fBctrun\fR does not attempt to restart the command.
+.sp
+This option is invalid if a lifetime other than \fBcontract\fR is specified or
+if the \fBpgrponly\fR option is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 26n
+.rt
+If the contract created by \fBctrun\fR inherited subcontracts from its member
+processes, attempts to transfer them to the new contract when restarting.
+.sp
+This option is invalid unless \fB-r\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 26n
+.rt
+Displays contract events and \fBctrun\fR actions as they occur.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 26n
+.rt
+Displays verbose contract events, as are displayed by the \fB-v\fR option of
+\fBctwatch\fR. Implies \fB-v\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+One of the strings treated as an argument to \fIcommand\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 12n
+.rt
+The command to be passed to \fBexecvp\fR(2). See \fBexec\fR(2).
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRRunning a Shell in a New Process Contract
+.sp
+.LP
+The following example runs a shell in a new process contract:
+
+.sp
+.in +2
+.nf
+example% ctrun -l child -o pgrponly ksh
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fB-l\fR \fBchild\fR option argument is specified so that \fBctrun\fR won't
+wait until all children of the shell have exited. \fB-o\fR \fBpgrponly\fR is
+specified because an interactive \fBksh\fR puts each job in a new process
+group, and an error in one job is unlikely to affect the others.
+
+.LP
+\fBExample 2 \fRRunning a Simple Server
+.sp
+.LP
+The following example runs a simple server:
+
+.sp
+.in +2
+.nf
+example% \fBctrun -r 0 -t -f hwerr,core,signal server\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fB-r\fR \fB0\fR and \fB-t\fR options are specified to indicate that if the
+server encounters a fatal error, \fBctrun\fR should try to restart it. The
+\fB-f\fR option makes "\fBhwerr\fR", "\fBcore\fR", and "\fBsignal\fR" fatal
+events.
+
+.SH EXIT STATUS
+.sp
+.LP
+If \fIcommand\fR is specified and successfully invoked (see \fBexec\fR(2)), the
+exit status of \fBctrun\fR is the exit status of \fIcommand\fR. Otherwise,
+\fBctrun\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB123\fR\fR
+.ad
+.RS 7n
+.rt
+The child process exited abnormally.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB124\fR\fR
+.ad
+.RS 7n
+.rt
+\fBctrun\fR encountered an internal error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB125\fR\fR
+.ad
+.RS 7n
+.rt
+Invalid arguments were provided to \fBctrun\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcommand\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcommand\fR could not be found.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/system/contract/process/*\fR\fR
+.ad
+.RS 30n
+.rt
+
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+Human Readable Output is Uncommitted. Invocation is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBctstat\fR(1), \fBctwatch\fR(1), \fBexec\fR(2), \fBcontract\fR(4),
+\fBprocess\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ctstat.1 b/usr/src/man/man1/ctstat.1
new file mode 100644
index 0000000000..471208074d
--- /dev/null
+++ b/usr/src/man/man1/ctstat.1
@@ -0,0 +1,405 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ctstat 1 "16 Jun 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ctstat \- display active system contracts
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ctstat\fR [\fB-a\fR] [\fB-i\fR \fIcontractid...\fR] [\fB-t\fR \fItype...\fR] [\fB-v\fR]
+ [\fB-T\fR u | d ] [\fIinterval\fR [\fIcount\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBctstat\fR utility allows a user to observe the contracts active on a
+system.
+.sp
+.LP
+Unless you specify the \fB-i\fR or \fB-t\fR option, \fBctstat\fR displays
+statistics on all contracts in the system.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display all contracts regardless of state. By default, only those contracts
+which are in the owned, inherited, or orphan states are displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIcontractid\fR...\fR
+.ad
+.sp .6
+.RS 4n
+Request status on the specified contracts, identified by their numeric contract
+identifier (\fIcontract_id\fR).
+.sp
+This option accepts lists as arguments . Items in the list can be separated by
+commas, or enclosed in quotes and separated by commas or spaces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fBu\fR | \fBd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display a time stamp.
+.sp
+Specify \fBu\fR for a printed representation of the internal representation of
+time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
+\fBdate\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItype\fR...\fR
+.ad
+.sp .6
+.RS 4n
+Request status on contracts of the specified type (\fItype\fR).
+.sp
+This option accepts lists as arguments. Items in the list can be separated by
+commas, or enclosed in quotes and separated by commas or spaces.
+.sp
+The following types are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprocess\fR\fR
+.ad
+.sp .6
+.RS 4n
+Process contracts
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Verbose output.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinterval\fR\fR
+.ad
+.sp .6
+.RS 4n
+Report once each \fIinterval\fR seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcount\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print only \fIcount\fR reports.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The following list defines the column headings and the meanings of a
+\fBctstat\fR report:
+.sp
+.ne 2
+.mk
+.na
+\fBCTID\fR
+.ad
+.sp .6
+.RS 4n
+The contract \fBID\fR of the contract.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBZONEID\fR
+.ad
+.sp .6
+.RS 4n
+The zone ID of the contract's creator.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBTYPE\fR
+.ad
+.sp .6
+.RS 4n
+The contract type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSTATE\fR
+.ad
+.sp .6
+.RS 4n
+The state of the contract:
+.sp
+.ne 2
+.mk
+.na
+\fBowned\fR
+.ad
+.sp .6
+.RS 4n
+Contract is owned by a process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBinherited\fR
+.ad
+.sp .6
+.RS 4n
+The contract owner has exited abnormally and the contract has been inherited by
+the owner's process contract.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBorphan\fR
+.ad
+.sp .6
+.RS 4n
+The contract owner has abandoned the contract, the contract owner exited
+abnormally and the contract was not inherited by the owner's process contract,
+or the process contract which had inherited the contract was abandoned by its
+owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdead\fR
+.ad
+.sp .6
+.RS 4n
+The contract is no longer active. It is removed from the system automatically
+when all references to it (open file descriptors, contract templates, and
+events) have been released.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBHOLDER\fR
+.ad
+.sp .6
+.RS 4n
+If the contract is in the \fBowned\fR state, the pid of the process that owns
+the contract. If the contract is in the \fBinherited\fR state, the id of the
+regent process contract.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBEVENTS\fR
+.ad
+.sp .6
+.RS 4n
+The number of unacknowledged critical events pending.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBQTIME\fR
+.ad
+.sp .6
+.RS 4n
+The time until quantum ends, or \fB-\fR if no negotiation is in progress.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBNTIME\fR
+.ad
+.sp .6
+.RS 4n
+The time until negotiation ends, or \fB-\fR if no negotiation is in progress.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRReporting on all Contracts in the System
+.sp
+.LP
+The following example reports on all contracts in the system:
+
+.sp
+.in +2
+.nf
+example% ctstat -a
+
+CTID TYPE STATE HOLDER EVENTS QTIME NTIME
+1 process owned 100579 0 - -
+2 process dead - 1 - -
+3 process inherit 1 3 - -
+4 process orphan - 0 - -
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRObtaining a Verbose Report of All Contracts in the System
+.sp
+.LP
+The following example obtains a verbose report of all contracts in the system:
+
+.sp
+.in +2
+.nf
+example% ctstat -av
+
+CTID TYPE STATE HOLDER EVENTS QTIME NTIME
+1 process owned 100579 0 - -
+ informative event set: none
+ critical event set: hwerr core
+ fatal event set: hwerr
+ parameter set: none
+ member processes: 100600 100601
+ inherited ctids: none
+ service fmri: svc:/system/init:default
+ svc_fmri ctid: 1
+ creator: sched
+ aux:
+
+2 process dead - 1 - -
+ informative event set: none
+ critical event set: none
+ fatal event set: hwerr core
+ parameter set: pgrponly
+ member processes: none
+ inherited ctids: none
+ service fmri: svc:/system/power:default
+ svc_fmri ctid: 19
+ creator: svc.startd
+ aux: start
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.sp .6
+.RS 4n
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.sp .6
+.RS 4n
+Invalid arguments.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/system/contract/*\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Uncommitted. The invocation is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBctrun\fR(1), \fBctwatch\fR(1), \fBcontract\fR(4), \fBprocess\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ctwatch.1 b/usr/src/man/man1/ctwatch.1
new file mode 100644
index 0000000000..bd1b4c68e9
--- /dev/null
+++ b/usr/src/man/man1/ctwatch.1
@@ -0,0 +1,268 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ctwatch 1 "14 Jul 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ctwatch \- watch events in a contract or group of contracts
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ctwatch\fR [\fB-f\fR] [\fB-r\fR] [\fB-v\fR] \fIcontract-type\fR... | \fIcontract-id\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBctwatch\fR utility allows a user to observe the events occurring within
+a set of contracts or contract types. By default, \fBctwatch\fR watches all
+contracts.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Report events starting at the front of the event queue. Normally, \fBctwatch\fR
+reports only events which occur after it has been invoked. With the \fB-f\fR
+option, any events that still exist in the contracts' event queues when
+\fBctwatch\fR is invoked (for example, unacknowledged critical events) are also
+reported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Reliably watches all messages. Normally, the system may drop informative events
+and acknowledged critical events at any time, so \fBctwatch\fR isn't guaranteed
+to see them all. This option may only be used if the \fBctwatch\fR is invoked
+with the \fB{PRIV_CONTRACT_EVENT}\fR privilege asserted in its effective set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Request verbose event descriptions.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcontract-type\fR\fR
+.ad
+.RS 17n
+.rt
+Valid contract types are:
+.sp
+.ne 2
+.mk
+.na
+\fBprocess\fR
+.ad
+.RS 11n
+.rt
+Process contracts.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcontract-id\fR\fR
+.ad
+.RS 17n
+.rt
+A valid contract id.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The following list defines the column headings and the meanings of a
+\fBctwatch\fR report:
+.sp
+.ne 2
+.mk
+.na
+\fBCTID\fR
+.ad
+.RS 11n
+.rt
+The contract \fBID\fR generating the event.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBEVID\fR
+.ad
+.RS 11n
+.rt
+The event \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBCRIT\fR
+.ad
+.RS 11n
+.rt
+Whether the event is informative, critical, or initiates an exit negotiation.
+Values are \fBinfo\fR, \fBcrit\fR, or \fBneg\fR, respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBACK\fR
+.ad
+.RS 11n
+.rt
+The event has been acknowledged. Values are \fByes\fR or "\fBno\fR".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBCTTYPE\fR
+.ad
+.RS 11n
+.rt
+The contract type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSUMMARY\fR
+.ad
+.RS 11n
+.rt
+A type-specific summary of the event.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRWatching a process contract
+.sp
+.in +2
+.nf
+example% \fBctwatch -r 1\fR
+
+CTID EVID CRIT ACK CTTYPE SUMMARY
+1 2 crit no process pid 100569 was created
+1 3 info no process pid 100569 encountered hardware error
+1 4 info no process pid 100568 exited
+1 5 info no process pid 100569 exited
+1 6 crit no process contract empty
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid arguments.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/system/contract/*\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+Human Readable Output is Unstable. Invocation is Evolving.
+.SH SEE ALSO
+.sp
+.LP
+\fBctrun\fR(1), \fBctstat\fR(1), \fBcontract\fR(4), \fBprocess\fR(4),
+\fBattributes\fR(5), \fBprivileges\fR(5)
+.SH NOTES
+.sp
+.LP
+Ordering of events is only guaranteed within a single contract, or within a
+single type when a type is specified.
+.sp
+.LP
+\fBctwatch\fR can only observe those events which are generated by contracts
+owned or authored by processes with the same effective user ID as
+\fBctwatch\fR, unless the \fB{PRIV_CONTRACT_OBSERVER}\fR privilege is asserted
+in its effective set.
diff --git a/usr/src/man/man1/cut.1 b/usr/src/man/man1/cut.1
new file mode 100644
index 0000000000..185e9a37cc
--- /dev/null
+++ b/usr/src/man/man1/cut.1
@@ -0,0 +1,405 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH cut 1 "29 Apr 1999" "SunOS 5.11" "User Commands"
+.SH NAME
+cut \- cut out selected fields of each line of a file
+.SH SYNOPSIS
+.LP
+.nf
+\fBcut\fR \fB-b\fR \fIlist\fR [\fB-n\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBcut\fR \fB-c\fR \fIlist\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBcut\fR \fB-f\fR \fIlist\fR [\fB-d\fR \fIdelim\fR] [\fB-s\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Use the \fBcut\fR utility to cut out columns from a table or fields from each
+line of a file; in data base parlance, it implements the projection of a
+relation. The fields as specified by \fIlist\fR can be fixed length, that is,
+character positions as on a punched card (\fB-c\fR option) or the length can
+vary from line to line and be marked with a field delimiter character like TAB
+(\fB-f\fR option). \fBcut\fR can be used as a filter.
+.sp
+.LP
+Either the \fB-b\fR, \fB-c\fR, or \fB-f\fR option must be specified.
+.sp
+.LP
+Use \fBgrep\fR(1) to make horizontal ``cuts'' (by context) through a file, or
+\fBpaste\fR(1) to put files together column-wise (that is, horizontally). To
+reorder columns in a table, use \fBcut\fR and \fBpaste\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlist\fR \fR
+.ad
+.RS 13n
+.rt
+A comma-separated or blank-character-separated list of integer field numbers
+(in increasing order), with optional \fB\(mi\fR to indicate ranges (for
+instance, \fB1,4,7\fR; \fB1\(mi3,8\fR; \fB\(mi5,10\fR (short for
+\fB1\(mi5,10\fR); or \fB3\(mi\fR (short for third through last field)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-b\fR \fIlist\fR \fR
+.ad
+.RS 13n
+.rt
+The \fIlist\fR following \fB-b\fR specifies byte positions (for instance,
+\fB-b1\fR\fB-72\fR would pass the first 72 bytes of each line). When \fB-b\fR
+and \fB-n\fR are used together, \fIlist\fR is adjusted so that no multi-byte
+character is split.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-c\fR \fIlist\fR \fR
+.ad
+.RS 13n
+.rt
+The \fIlist\fR following \fB-c\fR specifies character positions (for instance,
+\fB-c1\fR\fB-72\fR would pass the first 72 characters of each line).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-d\fR \fIdelim\fR \fR
+.ad
+.RS 13n
+.rt
+The character following \fB-d\fR is the field delimiter (\fB-f\fR option only).
+Default is \fItab\fR. Space or other characters with special meaning to the
+shell must be quoted. \fIdelim\fR can be a multi-byte character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-f\fR \fIlist\fR \fR
+.ad
+.RS 13n
+.rt
+The \fIlist\fR following \fB-f\fR is a list of fields assumed to be separated
+in the file by a delimiter character (see \fB-d\fR ); for instance,
+\fB-f1\fR\fB,7\fR copies the first and seventh field only. Lines with no field
+delimiters will be passed through intact (useful for table subheadings), unless
+\fB-s\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.RS 13n
+.rt
+Do not split characters. When \fB-b\fR \fIlist\fR and \fB-n\fR are used
+together, \fIlist\fR is adjusted so that no multi-byte character is split.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 13n
+.rt
+Suppresses lines with no delimiter characters in case of \fB-f\fR option.
+Unless specified, lines with no delimiters will be passed through untouched.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 9n
+.rt
+A path name of an input file. If no \fIfile\fR operands are specified, or if a
+\fIfile\fR operand is \fB\(mi\fR, the standard input will be used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBcut\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRMapping user IDs
+.sp
+.LP
+A mapping of user \fBIDs\fR to names follows:
+
+.sp
+.in +2
+.nf
+example% \fBcut -d: -f1,5 /etc/passwd\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSetting current login name
+.sp
+.LP
+To set \fBname\fR to current login name:
+
+.sp
+.in +2
+.nf
+example$ \fBname=\(gawho am i | cut -f1 -d' '\(ga\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBcut\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+All input files were output successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgrep\fR(1), \fBpaste\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: \fR\fB-n\fR\fB may only be used with \fR\fB-b\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: \fR\fB-d\fR\fB may only be used with \fR\fB-f\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: \fR\fB-s\fR\fB may only be used with \fR\fB-f\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: cannot open \fR\fI<file>\fR \fR
+.ad
+.sp .6
+.RS 4n
+Either \fIfile\fR cannot be read or does not exist. If multiple files are
+present, processing continues.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: no delimiter specified\fR \fR
+.ad
+.sp .6
+.RS 4n
+Missing \fIdelim\fR on \fB-d\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: invalid delimiter\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: no \fIlist\fR\fR\fB specified\fR \fR
+.ad
+.sp .6
+.RS 4n
+Missing \fIlist\fR on \fB-b\fR, \fB-c\fR, or \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: invalid range specifier\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: too many ranges specified\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: range must be increasing\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: invalid character in range\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: internal error processing input\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: invalid multibyte character\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcut: unable to allocate enough memory\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
diff --git a/usr/src/man/man1/date.1 b/usr/src/man/man1/date.1
new file mode 100644
index 0000000000..e06d63197b
--- /dev/null
+++ b/usr/src/man/man1/date.1
@@ -0,0 +1,452 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH date 1 "11 May 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+date \- write the date and time
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/date\fR [\fB-u\fR] [+\fIformat\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/date\fR [\fB-a\fR [-]\fIsss.fff\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/date\fR [\fB-u\fR] [ [\fImmdd\fR] \fIHHMM\fR | \fImmddHHMM\fR [\fIcc\fR] \fIyy\fR] [\fI\&.SS\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/date\fR [\fB-u\fR] [+\fIformat\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/date\fR [\fB-a\fR [-]\fIsss.fff\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/date\fR [\fB-u\fR]
+ [ [\fImmdd\fR] \fIHHMM\fR | \fImmddHHMM\fR [\fIcc\fR] \fIyy\fR] [\fI\&.SS\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdate\fR utility writes the date and time to standard output or attempts
+to set the system date and time. By default, the current date and time is
+written.
+.sp
+.LP
+Specifications of native language translations of month and weekday names are
+supported. The month and weekday names used for a language are based on the
+locale specified by the environment variable \fBLC_TIME\fR. See
+\fBenviron\fR(5).
+.sp
+.LP
+The following is the default form for the "C" locale:
+.sp
+.in +2
+.nf
+\fI%a %b %e %T %Z %Y\fR
+.fi
+.in -2
+
+.sp
+.LP
+For example,
+.sp
+.in +2
+.nf
+Fri Dec 23 10:10:42 EST 1988
+.fi
+.in -2
+.sp
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR [\|\fB-\fR\|]\|\fIsss.fff\fR \fR
+.ad
+.RS 24n
+.rt
+Slowly adjust the time by \fIsss\fR.\fIfff\fR seconds (\fIfff\fR represents
+fractions of a second). This adjustment can be positive or negative. The
+system's clock is sped up or slowed down until it has drifted by the number of
+seconds specified. Only the super-user may adjust the time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fR
+.ad
+.RS 24n
+.rt
+Display (or set) the date in Greenwich Mean Time (GMT\(emuniversal time),
+bypassing the normal conversion to (or from) local time.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIformat\fR \fR
+.ad
+.RS 12n
+.rt
+If the argument begins with \fB+\fR, the output of \fBdate\fR is the result of
+passing \fIformat\fR and the current time to \fBstrftime()\fR. \fBdate\fR uses
+the conversion specifications listed on the \fBstrftime\fR(3C) manual page,
+with the conversion specification for \fB%C\fR determined by whether
+\fB/usr/bin/date\fR or \fB/usr/xpg4/bin/date\fR is used:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/date\fR \fR
+.ad
+.RS 23n
+.rt
+Locale's date and time representation. This is the default output for
+\fBdate\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg4/bin/date\fR \fR
+.ad
+.RS 23n
+.rt
+Century (a year divided by 100 and truncated to an integer) as a decimal number
+[00-99].
+.RE
+
+The string is always terminated with a NEWLINE. An argument containing blanks
+must be quoted; see the EXAMPLES section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR \fR
+.ad
+.RS 12n
+.rt
+Month number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdd\fR \fR
+.ad
+.RS 12n
+.rt
+Day number in the month
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIHH\fR \fR
+.ad
+.RS 12n
+.rt
+Hour number (24 hour system)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIMM\fR \fR
+.ad
+.RS 12n
+.rt
+Minute number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fISS\fR \fR
+.ad
+.RS 12n
+.rt
+Second number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcc\fR \fR
+.ad
+.RS 12n
+.rt
+Century (a year divided by 100 and truncated to an integer) as a decimal number
+[00-99]. For example, \fIcc\fR is \fB19\fR for the year 1988 and \fB20\fR for
+the year 2007.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIyy\fR \fR
+.ad
+.RS 12n
+.rt
+Last two digits of the year number. If century (\fIcc\fR) is not specified,
+then values in the range \fB69-99\fR shall refer to years 1969 to 1999
+inclusive, and values in the range \fB00-68\fR shall refer to years 2000 to
+2068, inclusive.
+.RE
+
+.sp
+.LP
+The month, day, year number, and century may be omitted; the current values are
+applied as defaults. For example, the following entry:
+.sp
+.in +2
+.nf
+example% \fBdate 10080045\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+sets the date to Oct 8, 12:45 a.m. The current year is the default because no
+year is supplied. The system operates in GMT. \fBdate\fR takes care of the
+conversion to and from local standard and daylight time. Only the super-user
+may change the date. After successfully setting the date and time, \fBdate\fR
+displays the new date according to the default format. The \fBdate\fR command
+uses \fBTZ\fR to determine the correct time zone information; see
+\fBenviron\fR(5).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGenerating Output
+.sp
+.LP
+The following command:
+
+.sp
+.in +2
+.nf
+example% \fBdate '+DATE: %m/%d/%y%nTIME:%H:%M:%S'\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+generates as output
+
+.sp
+.in +2
+.nf
+DATE: 08/01/76
+
+TIME: 14:45:05
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSetting the Current Time
+.sp
+.LP
+The following command sets the current time to \fB12:34:56\fR:
+
+.sp
+.in +2
+.nf
+example# \fBdate 1234.56\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSetting Another Time and Date in Greenwich Mean Time
+.sp
+.LP
+The following command sets the date to January 1st, 12:30 am, 2000:
+
+.sp
+.in +2
+.nf
+example# \fBdate -u 010100302000\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This is displayed as:
+
+.sp
+.in +2
+.nf
+Thu Jan 01 00:30:00 GMT 2000
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBdate\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR \fR
+.ad
+.RS 7n
+.rt
+Determine the timezone in which the time and date are written, unless the
+\fB-u\fR option is specified. If the \fBTZ\fR variable is not set and the
+\fB-u\fR is not specified, the system default timezone is used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/date"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+.TE
+
+.SS "/usr/xpg4/bin/date"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBstrftime\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBno permission\fR \fR
+.ad
+.RS 19n
+.rt
+You are not the super-user and you tried to change the date.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbad conversion\fR \fR
+.ad
+.RS 19n
+.rt
+The date set is syntactically incorrect.
+.RE
+
+.SH NOTES
+.sp
+.LP
+If you attempt to set the current date to one of the dates that the standard
+and alternate time zones change (for example, the date that daylight time is
+starting or ending), and you attempt to set the time to a time in the interval
+between the end of standard time and the beginning of the alternate time (or
+the end of the alternate time and the beginning of standard time), the results
+are unpredictable.
+.sp
+.LP
+Using the \fBdate\fR command from within windowing environments to change the
+date can lead to unpredictable results and is unsafe. It can also be unsafe in
+the multi-user mode, that is, outside of a windowing system, if the date is
+changed rapidly back and forth. The recommended method of changing the date
+is '\fBdate\fR \fB-a\fR'.
+.sp
+.LP
+Setting the system time or allowing the system time to progress beyond
+\fB03:14:07 UTC Jan 19, 2038\fR is not supported on Solaris.
diff --git a/usr/src/man/man1/dc.1 b/usr/src/man/man1/dc.1
new file mode 100644
index 0000000000..d01fa47833
--- /dev/null
+++ b/usr/src/man/man1/dc.1
@@ -0,0 +1,605 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dc 1 "29 Aug 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+dc \- desk calculator
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/dc\fR [\fIfilename\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/dc\fR [\fIfilename\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdc\fR is an arbitrary precision arithmetic package. Ordinarily it operates
+on decimal integers, but one may specify an input base, output base, and a
+number of fractional digits to be maintained. The overall structure of \fBdc\fR
+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.
+.sp
+.LP
+\fBbc\fR is a preprocessor for \fBdc\fR that provides infix notation and a
+C-like syntax that implements functions. \fBbc\fR also provides reasonable
+control structures for programs. See \fBbc\fR(1).
+.SH USAGE
+.SS "/usr/bin/dc, /usr/xpg6/bin/dc"
+.sp
+.LP
+The following constructions are recognized under both \fB/usr/bin/dc\fR and
+\fB/usr/xpg6/bin/dc\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fInumber\fR\fR
+.ad
+.RS 15n
+.rt
+The value of the number is pushed on the stack. A number is an unbroken string
+of the digits 0\(mi9. It may be preceded by an underscore (\fB_\fR) to input a
+negative number. Numbers may contain decimal points.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fIx\fR\fR
+.ad
+.RS 15n
+.rt
+The top of the stack is popped and stored into a register named \fIx\fR, where
+\fIx\fR may be any character. If the \fBs\fR is capitalized, \fIx\fR is
+treated as a stack and the value is pushed on it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fIx\fR\fR
+.ad
+.RS 15n
+.rt
+The value in register \fIx\fR is pushed on the stack. The register \fIx\fR is
+not altered. All registers start with zero value. If the \fBl\fR is
+capitalized, register \fIx\fR is treated as a stack and its top value is popped
+onto the main stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.RS 15n
+.rt
+The top value on the stack is duplicated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 15n
+.rt
+The top value on the stack is printed. The top value remains unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fR\fR
+.ad
+.RS 15n
+.rt
+Interprets the top of the stack as an ASCII string, removes it, and prints it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fR\fR
+.ad
+.RS 15n
+.rt
+All values on the stack are printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 15n
+.rt
+Exits the program. If executing a string, the recursion level is popped by two.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBQ\fR\fR
+.ad
+.RS 15n
+.rt
+Exits the program. The top value on the stack is popped and the string
+execution level is popped by that value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 15n
+.rt
+Treats the top element of the stack as a character string and executes it as a
+string of \fBdc\fR commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX\fR\fR
+.ad
+.RS 15n
+.rt
+Replaces the number on the top of the stack with its scale factor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[ ... ]\fR\fR
+.ad
+.RS 15n
+.rt
+Puts the bracketed ASCII string onto the top of the stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<\fR\fIx \fR \fB>\fR\fIx \fR \fB=\fR\fIx \fR\fR
+.ad
+.RS 15n
+.rt
+The top two elements of the stack are popped and compared. Register \fIx\fR is
+evaluated if they obey the stated relation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fR\fR
+.ad
+.RS 15n
+.rt
+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.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.RS 15n
+.rt
+Interprets the rest of the line as a shell command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.RS 15n
+.rt
+All values on the stack are popped.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 15n
+.rt
+The top value on the stack is popped and used as the number radix for further
+input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBI\fR\fR
+.ad
+.RS 15n
+.rt
+Pushes the input base on the top of the stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 15n
+.rt
+The top value on the stack is popped and used as the number radix for further
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBO\fR\fR
+.ad
+.RS 15n
+.rt
+Pushes the output base on the top of the stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBk\fR\fR
+.ad
+.RS 15n
+.rt
+The top of the stack is popped, and that value is used as a non-negative 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.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBK\fR\fR
+.ad
+.RS 15n
+.rt
+Pushes the current scale factor on the top of the stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBz\fR\fR
+.ad
+.RS 15n
+.rt
+The stack level is pushed onto the stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBZ\fR\fR
+.ad
+.RS 15n
+.rt
+Replaces the number on the top of the stack with its length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 15n
+.rt
+A line of input is taken from the input source (usually the terminal) and
+executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBY\fR\fR
+.ad
+.RS 15n
+.rt
+Displays \fBdc\fR debugging information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB; :\fR\fR
+.ad
+.RS 15n
+.rt
+Used by \fBbc\fR(1) for array operations.
+.RE
+
+.SS "/usr/bin/dc"
+.sp
+.LP
+The following construction is recognized under \fB/usr/bin/dc\fR, using the
+scale of whatever the result is.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ \(mi / * % ^\fR\fR
+.ad
+.RS 18n
+.rt
+The top two values on the stack are added (\fB+\fR), subtracted (\fB\(mi\fR),
+multiplied (\fB*\fR), divided (\fB/\fR), remaindered (\fB%\fR), or
+exponentiated (\fB^\fR). 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.
+.RE
+
+.SS "/usr/xpg6/bin/dc"
+.sp
+.LP
+The following construction is recognized under \fB/usr/xpg6/bin/dc\fR. The
+results of division are forced to be a scale of 20.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ \(mi / * % ^\fR\fR
+.ad
+.RS 18n
+.rt
+The top two values on the stack are added (\fB+\fR), subtracted (\fB\(mi\fR),
+multiplied (\fB*\fR), divided (\fB/\fR), remaindered (\fB%\fR), or
+exponentiated (\fB^\fR). 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.
+.sp
+Ensures that the scale set prior to division is the scale of the result.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting the first ten values of n!
+.sp
+.LP
+This example prints the first ten values of n!:
+
+.sp
+.in +2
+.nf
+[la1+dsa*pla10>y]sy
+0sa1
+lyx
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbc\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR \fBis unimplemented\fR\fR
+.ad
+.RS 29n
+.rt
+\fIx\fR is an octal number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBout of space\fR\fR
+.ad
+.RS 29n
+.rt
+The free list is exhausted (too many digits).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBout of stack space\fR\fR
+.ad
+.RS 29n
+.rt
+Too many pushes onto the stack (stack overflow).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBempty stack\fR\fR
+.ad
+.RS 29n
+.rt
+Too many pops from the stack (stack underflow).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnesting depth\fR\fR
+.ad
+.RS 29n
+.rt
+Too many levels of nested execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdivide by 0\fR\fR
+.ad
+.RS 29n
+.rt
+Division by zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsqrt of neg number\fR\fR
+.ad
+.RS 29n
+.rt
+Square root of a negative number is not defined (no imaginary numbers).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexp not an integer\fR\fR
+.ad
+.RS 29n
+.rt
+\fBdc\fR only processes integer exponentiation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexp too big\fR\fR
+.ad
+.RS 29n
+.rt
+The largest exponent allowed is 999.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinput base is too large\fR\fR
+.ad
+.RS 29n
+.rt
+The input base x: 2<= x <= 16.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinput base is too small\fR\fR
+.ad
+.RS 29n
+.rt
+The input base x: 2<= x <= 16.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutput base is too large\fR\fR
+.ad
+.RS 29n
+.rt
+The output base must be no larger than \fBBC_BASE_MAX\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinvalid scale factor\fR\fR
+.ad
+.RS 29n
+.rt
+Scale factor cannot be less than 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBscale factor is too large\fR\fR
+.ad
+.RS 29n
+.rt
+A scale factor cannot be larger than \fBBC_SCALE_MAX\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsymbol table overflow\fR\fR
+.ad
+.RS 29n
+.rt
+Too many variables have been specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinvalid index\fR\fR
+.ad
+.RS 29n
+.rt
+Index cannot be less than 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindex is too large\fR\fR
+.ad
+.RS 29n
+.rt
+An index cannot be larger than \fBBC_DIM_MAX\fR.
+.RE
+
diff --git a/usr/src/man/man1/deallocate.1 b/usr/src/man/man1/deallocate.1
new file mode 100644
index 0000000000..69bcda472e
--- /dev/null
+++ b/usr/src/man/man1/deallocate.1
@@ -0,0 +1,230 @@
+'\" te
+.\" Copyright 2008 Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH deallocate 1 "30 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+deallocate \- device deallocation
+.SH SYNOPSIS
+.LP
+.nf
+\fBdeallocate\fR [\fB-s\fR] [\fB-w\fR] [\fB-F\fR] [\fB-z\fR \fIzonename\fR]
+ [\fB-c\fR \fIdev-class\fR | \fB-g\fR \fIdev-type\fR | \fIdevice\fR]
+.fi
+
+.LP
+.nf
+\fBdeallocate\fR [\fB-s\fR] [\fB-w\fR] [\fB-F\fR] [\fB-z\fR \fIzonename\fR] \fB-I\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdeallocate\fR command frees an allocated device. It resets the ownership
+and permissions on all device special files associated with the device,
+disabling access to that device. \fBdeallocate\fR runs the device cleaning
+program for that device as specified in \fBdevice_allocate\fR(4).
+.sp
+.LP
+The default \fBdeallocate\fR operation deallocates devices allocated to the
+user.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIdev-class\fR\fR
+.ad
+.RS 16n
+.rt
+Deallocates all devices of the specified device class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIdevice\fR\fR
+.ad
+.RS 16n
+.rt
+Forces deallocation of the device associated with the file specified by
+\fIdevice\fR. Only a user with the \fBsolaris.device.revoke\fR authorization is
+permitted to use this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.RS 16n
+.rt
+Forces deallocation of all allocatable devices. Only a user with the
+\fBsolaris.device.revoke\fR authorization is permitted to use this option. This
+option should only be used at system initialization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 16n
+.rt
+Silent. Suppresses any diagnostic output.
+.RE
+
+.sp
+.LP
+The following options are supported when the system is configured with Trusted
+Extensions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIdev-type\fR\fR
+.ad
+.RS 15n
+.rt
+Deallocates a device of device type matching \fIdev-type\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 15n
+.rt
+Runs the device cleaning program in a windowing environment. If a windowing
+version of the program exists, it is used. Otherwise, the standard version is
+run in a terminal window.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzonename\fR\fR
+.ad
+.RS 15n
+.rt
+Deallocates device from the zone specified by \fIzonename\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevice\fR\fR
+.ad
+.RS 10n
+.rt
+Deallocates the specified \fIdevice\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 15n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB20\fR\fR
+.ad
+.RS 15n
+.rt
+No entry for the specified device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIother value\fR\fR
+.ad
+.RS 15n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/security/device_allocate\fR
+.sp
+.LP
+\fB/etc/security/device_maps\fR
+.sp
+.LP
+\fB/etc/security/dev/*\fR
+.sp
+.LP
+\fB/etc/security/lib/*\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The invocation is Uncommitted. The options are Uncommitted. The output is
+Not-an-Interface.
+.SH SEE ALSO
+.sp
+.LP
+\fBallocate\fR(1), \fBlist_devices\fR(1), \fBbsmconv\fR(1M), \fBdminfo\fR(1M),
+\fBmkdevalloc\fR(1M), \fBmkdevmaps\fR(1M), \fBdevice_allocate\fR(4),
+\fBdevice_maps\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fIControlling Access to Devices\fR
+.SH NOTES
+.sp
+.LP
+The functionality described in this man page is available only if Solaris
+Auditing has been enabled. See \fBbsmconv\fR(1M) for more information.
+.sp
+.LP
+On systems configured with Trusted Extensions, the functionality is enabled by
+default.
+.sp
+.LP
+\fB/etc/security/dev\fR, \fBmkdevalloc\fR(1M), and \fBmkdevmaps\fR(1M) might
+not be supported in a future release of the Solaris Operating Environment.
diff --git a/usr/src/man/man1/deroff.1 b/usr/src/man/man1/deroff.1
new file mode 100644
index 0000000000..a74022ad4b
--- /dev/null
+++ b/usr/src/man/man1/deroff.1
@@ -0,0 +1,88 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH deroff 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+deroff \- remove nroff/troff, tbl, and eqn constructs
+.SH SYNOPSIS
+.LP
+.nf
+\fBderoff\fR [\fB-m\fR [m | s | l]] [\fB-w\fR] [\fB-i\fR] [\fIfilename\fR...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBderoff\fR reads each of the \fIfilenames\fR in sequence and removes all
+\fBtroff\fR(1) requests, macro calls, backslash constructs, \fBeqn\fR(1)
+constructs (between \fB\&.EQ\fR and \fB\fR\fB\&.EN\fR\fB \fR lines, and between
+delimiters), and \fBtbl\fR(1) descriptions, perhaps replacing them with white
+space (blanks and blank lines), and writes the remainder of the file on the
+standard output. \fBderoff\fR follows chains of included files (\fB\&.so\fR and
+\fB\&.nx\fR \fBtroff\fR commands); if a file has already been included, a
+\fB\&.so\fR naming that file is ignored and a \fB\&.nx\fR naming that file
+terminates execution. If no input file is given, \fBderoff\fR reads the
+standard input.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+The \fB-m\fR option may be followed by an \fBm\fR, \fBs\fR, or \fBl\fR. The
+\fB-mm\fR option causes the macros to be interpreted so that only running text
+is output (that is, no text from macro lines.) The \fB-ml\fR option forces the
+\fB-mm\fR option and also causes deletion of lists associated with the \fBmm\fR
+macros.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 6n
+.rt
+If the \fB-w\fR option is given, the output is a word list, one ``word'' per
+line, with all other characters deleted. Otherwise, the output follows the
+original, with the deletions mentioned above. In text, a ``word'' is any string
+that \fIcontains\fR at least two letters and is composed of letters, digits,
+ampersands (\fB&\fR), and apostrophes (\fB\&'\fR); in a macro call, however, a
+``word'' is a string that \fIbegins\fR with at least two letters and contains a
+total of at least three letters. Delimiters are any characters other than
+letters, digits, apostrophes, and ampersands. Trailing apostrophes and
+ampersands are removed from ``words.''
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+The \fB-i\fR option causes \fBderoff\fR to ignore \fB\&.so\fR and
+\fB\&.nx\fR commands.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBeqn\fR(1), \fBnroff\fR(1), \fBtbl\fR(1), \fBtroff\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBderoff\fR is not a complete \fBtroff\fR interpreter, so it can be confused
+by subtle constructs. Most such errors result in too much rather than too
+little output.
+.sp
+.LP
+The \fB-ml\fR option does not handle nested lists correctly.
diff --git a/usr/src/man/man1/dhcpinfo.1 b/usr/src/man/man1/dhcpinfo.1
new file mode 100644
index 0000000000..7d5c0b9756
--- /dev/null
+++ b/usr/src/man/man1/dhcpinfo.1
@@ -0,0 +1,273 @@
+'\" te
+.\" Copyright (c) 1992-1996 Competitive Automation, Inc.
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dhcpinfo 1 "15 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+dhcpinfo \- display values of parameters received through DHCP
+.SH SYNOPSIS
+.LP
+.nf
+\fBdhcpinfo\fR [\fB-c\fR] [\fB-i\fR \fIinterface\fR] [\fB-n\fR \fIlimit\fR] [\fB-v 4|6\fR] \fIcode\fR
+.fi
+
+.LP
+.nf
+\fBdhcpinfo\fR [\fB-c\fR] [\fB-i\fR \fIinterface\fR] [\fB-n\fR \fIlimit\fR] [\fB-v 4|6\fR] \fIidentifier\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdhcpinfo\fR utility prints the \fBDHCP\fR-supplied value(s) of the
+parameter requested on the command line. The parameter can be identified either
+by its numeric code in the \fBDHCP\fR specification, or by its mnemonic
+identifier, as listed in \fBdhcp_inittab\fR(4). This command is intended to be
+used in command substitutions in the shell scripts invoked by \fBinit\fR(1M) at
+system boot. It first contacts the \fBDHCP\fR client daemon at system boot or
+in event scripts as described in \fBdhcpagent\fR(1M). It first contacts the
+DHCP client daemon \fBdhcpagent\fR(1M) to verify that \fBDHCP\fR has
+successfully completed on the requested interface. If \fBDHCP\fR has
+successfully completed on the requested interface, \fBdhcpinfo\fR retrieves the
+values for the requested parameter. Parameter values echoed by \fBdhcpinfo\fR
+should not be used without checking its exit status. See \fBexit\fR(1).
+.sp
+.LP
+See \fBdhcp_inittab\fR(4) for the list of mnemonic identifier codes for all
+\fBDHCP\fR parameters. See \fIRFC 2132, DHCP Options and BOOTP Vendor
+Extensions\fR for more details on DHCPv4 parameters, and RFC 3315, Dynamic Host
+Configuration Protocol for IPv6 (DHCPv6), for more details on DHCPv6
+parameters.
+.SS "Output Format"
+.sp
+.LP
+The output from \fBdhcpinfo\fR consists of one or more lines of \fBASCII\fR
+text; the format of the output depends upon the requested parameter. The number
+of values returned per line and the total number of lines output for a given
+parameter are determined by the parameter's \fBgranularity\fR and \fBmaximum\fR
+values, respectively, as defined by \fBdhcp_inittab\fR(4).
+.sp
+.LP
+The format of each individual value is determined by the data type of the
+option, as determined by \fBdhcp_inittab\fR(4). The possible data types and
+their formats are listed below:
+.sp
+
+.sp
+.TS
+tab();
+cw(1.4i) cw(2.1i) cw(2i)
+lw(1.4i) lw(2.1i) lw(2i)
+.
+Data TypeFormat\fBdhcp_inittab\fR(4) type
+Unsigned NumberOne or more decimal digitsT{
+\fBUNUMBER8\fR, \fBUNUMBER16\fR, \fBUNUMBER32\fR, \fBUNUMBER64\fR
+T}
+Signed NumberT{
+One or more decimal digits, optionally preceded by a minus sign
+T}T{
+\fBSNUMBER8\fR, \fBSNUMBER16\fR, \fBSNUMBER32\fR, \fBSNUMBER64\fR
+T}
+\fBIP\fR AddressDotted-decimal notation\fBIP\fR
+IPv6 AddressColon-separated notation\fBIPv6\fR
+OctetT{
+The string \fB0x\fR followed by a two-digit hexadecimal value
+T}\fBOCTET\fR
+StringZero or more \fBASCII\fR characters\fBASCII\fR
+DUIDDHCP Unique Identifier text\fBDUID\fR
+Domain NameT{
+Standard dot-separated domain name, RFC 1035 format
+T}\fBDOMAIN\fR
+.TE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 16n
+.rt
+Displays the output in a canonical format. This format is identical to the
+\fBOCTET\fR format with a granularity of \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIinterface\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the interface to retrieve values for \fBDHCP\fR parameters from. If
+this option is not specified, the primary interface is used.
+.sp
+If a primary interface has not been selected for the system by
+\fBifconfig\fR(1M) or for this command by \fB-i\fR, the system automatically
+selects an interface to consider as primary for the current command invocation.
+The selection chooses the interface whose name sorts lexically first, and that
+has DHCP parameters attached. This selection does not affect system state. Use
+\fBifconfig\fR(1M) to set a primary interface.
+.sp
+The recommended practice in the \fBdhcpagent\fR(1M) \fBeventhook\fR scripts is
+to specify the desired interface with \fB-i\fR, rather than relying on primary
+selection.
+.sp
+For DHCPv6, the interface name used should be the name of the physical
+interface, not one of the logical interfaces created by \fBdhcpagent\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIlimit\fR\fR
+.ad
+.RS 16n
+.rt
+Limits the list of values displayed to \fIlimit\fR lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fB4 | 6\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the DHCP version to query. Use \fB-v4\fRfor DHCPv4 and \fB-v6\fR for
+DHCPv6.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcode\fR\fR
+.ad
+.RS 14n
+.rt
+Numeric code for the requested \fBDHCP\fR parameter, as defined by the
+\fBDHCP\fR specification. Vendor options are specified by adding \fB256\fR to
+the actual vendor code for DHCPv4, and \fB65536\fR for DHCPv6.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIidentifier\fR\fR
+.ad
+.RS 14n
+.rt
+Mnemonic symbol for the requested \fBDHCP\fR parameter, as listed in
+\fBdhcp_inittab\fR(4).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+The operation was not successful. The \fBDHCP\fR client daemon might not be
+running, the interface might have failed to configure, or no satisfactory
+\fBDHCP\fR responses were received.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+Bad arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 5n
+.rt
+The operation timed out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB6\fR\fR
+.ad
+.RS 5n
+.rt
+System error (should never occur).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdhcpagent\fR(1M), \fBifconfig\fR(1M), \fBinit\fR(1M), \fBdhcp_inittab\fR(4),
+\fBattributes\fR(5)
+.sp
+.LP
+Alexander, S., and R. Droms, \fIRFC 2132, DHCP Options and BOOTP Vendor
+Extensions\fR, Silicon Graphics, Inc., Bucknell University, March 1997.
+.sp
+.LP
+Droms, R. , \fIRFC 3315, Dynamic Host Configuration Protocol for IPv6
+(DHCPv6)\fR, Cisco Systems, July 2003.
+.sp
+.LP
+Mockapetris, P.V. , \fIRFC 1035, Domain names - implementation and
+specification\fR, ISI, November 1987.
diff --git a/usr/src/man/man1/diff.1 b/usr/src/man/man1/diff.1
new file mode 100644
index 0000000000..f4e522c0b1
--- /dev/null
+++ b/usr/src/man/man1/diff.1
@@ -0,0 +1,511 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH diff 1 "22 Sep 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+diff \- compare two files
+.SH SYNOPSIS
+.LP
+.nf
+\fBdiff\fR [\fB-bitw\fR] [\fB-c\fR | \fB-e\fR | \fB-f\fR | \fB-h\fR | \fB-n\fR | \fB-u\fR] \fIfile1\fR \fIfile2\fR
+.fi
+
+.LP
+.nf
+\fBdiff\fR [\fB-bitw\fR] [\fB-C\fR \fInumber\fR | \fB-U\fR \fInumber\fR] \fIfile1\fR \fIfile2\fR
+.fi
+
+.LP
+.nf
+\fBdiff\fR [\fB-bitw\fR] [\fB-D\fR \fIstring\fR] \fIfile1\fR \fIfile2\fR
+.fi
+
+.LP
+.nf
+\fBdiff\fR [\fB-bitw\fR] [\fB-c\fR | \fB-e\fR | \fB-f\fR | \fB-h\fR | \fB-n\fR | \fB-u\fR] [\fB-l\fR] [\fB-r\fR] [\fB-s\fR]
+ [\fB-S\fR \fIname\fR] \fIdirectory1\fR \fIdirectory2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdiff\fR utility will compare the contents of \fIfile1\fR and \fIfile2\fR
+and write to standard output a list of changes necessary to convert \fIfile1\fR
+into \fIfile2\fR. This list should be minimal. Except in rare circumstances,
+\fBdiff\fR finds a smallest sufficient set of file differences. No output will
+be produced if the files are identical.
+.sp
+.LP
+The normal output contains lines of these forms:
+.sp
+.in +2
+.nf
+\fIn1\fR \fBa\fR \fIn3,n4\fR
+\fIn1,n2\fR \fBd\fR \fIn3\fR
+\fIn1,n2\fR \fBc\fR \fIn3,n4\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where \fIn1\fR and \fIn2\fR represent lines \fIfile1\fR and \fIn3\fR and
+\fIn4\fR represent lines in \fIfile2\fR These lines resemble \fBed\fR(1)
+commands to convert \fIfile1\fR to \fIfile2\fR. By exchanging \fBa\fR for
+\fBd\fR and reading backward, \fIfile2\fR can be converted to \fIfile1\fR. As
+in \fBed\fR, identical pairs, where \fIn1\fR=\fIn2\fR or \fIn3\fR=\fIn4\fR, are
+abbreviated as a single number.
+.sp
+.LP
+Following each of these lines come all the lines that are affected in the first
+file flagged by `\|\fB<\fR\|', then all the lines that are affected in the
+second file flagged by `\|\fB>\fR\|'.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fR
+.ad
+.RS 7n
+.rt
+Ignores trailing blanks (spaces and tabs) and treats other strings of blanks as
+equivalent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fR
+.ad
+.RS 7n
+.rt
+Ignores the case of letters. For example, `\fBA\fR' will compare equal to
+`\fBa\fR'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fR
+.ad
+.RS 7n
+.rt
+Expands TAB characters in output lines. Normal or \fB-c\fR output adds
+character(s) to the front of each line that may adversely affect the
+indentation of the original source lines and make the output lines difficult to
+interpret. This option will preserve the original source's indentation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fR
+.ad
+.RS 7n
+.rt
+Ignores all blanks (SPACE and TAB characters) and treats all other strings of
+blanks as equivalent. For example, `\fBif ( a =\|= b )\fR' will compare equal
+to `\fBif(a=\|=b)\fR'.
+.RE
+
+.sp
+.LP
+The following options are mutually exclusive:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 14n
+.rt
+Produces a listing of differences with three lines of context. With this
+option, output format is modified slightly. That is, output begins with
+identification of the files involved and their creation dates, then each change
+is separated by a line with a dozen \fB*\fR's. The lines removed from
+\fIfile1\fR are marked with '\(em'. The lines added to \fIfile2\fR are
+marked '\|+\|'. Lines that are changed from one file to the other are marked in both
+files with '\|!\|'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fInumber\fR \fR
+.ad
+.RS 14n
+.rt
+Produces a listing of differences identical to that produced by \fB-c\fR with
+\fInumber\fR lines of context.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIstring\fR \fR
+.ad
+.RS 14n
+.rt
+Creates a merged version of \fIfile1\fR and \fIfile2\fR with C preprocessor
+controls included so that a compilation of the result without defining
+\fIstring\fR is equivalent to compiling \fIfile1\fR, while defining
+\fIstring\fR will yield \fIfile2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fR
+.ad
+.RS 14n
+.rt
+Produces a script of only \fBa\fR, \fBc\fR, and \fBd\fR commands for the editor
+\fBed\fR, which will recreate \fIfile2\fR from \fIfile1\fR. In connection with
+the \fB-e\fR option, the following shell program may help maintain multiple
+versions of a file. Only an ancestral file ($1) and a chain of
+version-to-version \fBed\fR scripts ($2,$3,...) made by \fBdiff\fR need be on
+hand. A ``latest version'' appears on the standard output.
+.sp
+.in +2
+.nf
+(shift; cat $*; echo a\'1,$p') | ed \(mi $1
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 13n
+.rt
+Produces a similar script, not useful with \fBed\fR, in the opposite order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fR
+.ad
+.RS 13n
+.rt
+Does a fast, half-hearted job. It works only when changed stretches are short
+and well separated, but does work on files of unlimited length. Options
+\fB-c\fR, \fB-C\fR, \fB-D\fR, \fB-e\fR, \fB-f\fR, and \fB-n\fR are unavailable
+with \fB-h\fR. \fBdiff\fR does not descend into directories with this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.RS 13n
+.rt
+Produces a script similar to \fB-e\fR, but in the opposite order and with a
+count of changed lines on each insert or delete command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 13n
+.rt
+Produces a listing of differences with three lines of context. The output is
+similar to that of the \fB-c\fR option, except that the context is "unified".
+Removed and changed lines in \fIfile1\fR are marked by a '\fB-\fR' while lines
+added or changed in \fIfile2\fR are marked by a '\fB+\fR'. Both versions of
+changed lines appear in the output, while added, removed, and context lines
+appear only once. The identification of \fIfile1\fR and \fIfile2\fR is
+different, with "\fB\(mi\(mi\(mi\fR" and "\fB+++\fR" being printed where
+"\fB***\fR" and "\fB\(mi\(mi\(mi\fR" would appear with the \fB-c\fR option.
+Each change is separated by a line of the form
+.sp
+.in +2
+.nf
+\fB@@ -\fIn1\fR,\fIn2\fR +\fIn3\fR,\fIn4\fR @@\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR \fInumber\fR\fR
+.ad
+.RS 13n
+.rt
+Produces a listing of differences identical to that produced by \fB-u\fR with
+\fInumber\fR lines of context.
+.RE
+
+.sp
+.LP
+The following options are used for comparing directories:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fR
+.ad
+.RS 12n
+.rt
+Produces output in long format. Before the \fBdiff\fR, each text file is piped
+through \fBpr\fR(1) to paginate it. Other differences are remembered and
+summarized after all text file differences are reported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fR
+.ad
+.RS 12n
+.rt
+Applies \fBdiff\fR recursively to common subdirectories encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 12n
+.rt
+Reports files that are identical. These identical files would not otherwise be
+mentioned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIname\fR \fR
+.ad
+.RS 12n
+.rt
+Starts a directory \fBdiff\fR in the middle, beginning with the file
+\fIname\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fR
+.ad
+.br
+.na
+\fB\fIfile2\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of a file or directory to be compared. If either \fIfile1\fR or
+\fIfile2\fR is \fB\(mi\fR, the standard input will be used in its place.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdirectory1\fR \fR
+.ad
+.br
+.na
+\fB\fIdirectory2\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of a directory to be compared.
+.RE
+
+.sp
+.LP
+If only one of \fIfile1\fR and \fIfile2\fR is a directory, \fBdiff\fR will be
+applied to the non-directory file and the file contained in the directory file
+with a filename that is the same as the last component of the non-directory
+file.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBdiff\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRTypical output of the diff command
+.sp
+.LP
+In the following command, \fBdir1\fR is a directory containing a directory
+named \fBx\fR, \fBdir2\fR is a directory containing a directory named \fBx\fR,
+\fBdir1/x\fR and \fBdir2/x\fR both contain files named \fBdate.out\fR, and
+\fBdir2/x\fR contains a file named \fBy\fR:
+
+.sp
+.in +2
+.nf
+example% \fBdiff -r dir1 dir2\fR
+Common subdirectories: dir1/x and dir2/x
+
+Only in dir2/x: y
+
+diff -r dir1/x/date.out dir2/x/date.out
+
+1c1
+
+< Mon Jul 2 13:12:16 PDT 1990
+
+---
+
+> Tue Jun 19 21:41:39 PDT 1990
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBdiff\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR \fR
+.ad
+.RS 7n
+.rt
+Determines the locale for affecting the timezone used for calculating file
+timestamps written with the \fB-C\fR and \fB-c\fR options.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+No differences were found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 7n
+.rt
+Differences were found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/d?????\fR \fR
+.ad
+.RS 19n
+.rt
+temporary file used for comparison
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/diffh\fR \fR
+.ad
+.RS 19n
+.rt
+executable file for \fB-h\fR option
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbdiff\fR(1), \fBcmp\fR(1), \fBcomm\fR(1), \fBdircmp\fR(1), \fBed\fR(1),
+\fBpr\fR(1), \fBsdiff\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Editing scripts produced under the \fB-e\fR or \fB-f\fR options are naive about
+creating lines consisting of a single period (\fB\&.\fR).
+.sp
+.LP
+Missing NEWLINE at end of file indicates that the last line of the file in
+question did not have a NEWLINE. If the lines are different, they will be
+flagged and output, although the output will seem to indicate they are the
+same.
diff --git a/usr/src/man/man1/diff3.1 b/usr/src/man/man1/diff3.1
new file mode 100644
index 0000000000..27988ae4bb
--- /dev/null
+++ b/usr/src/man/man1/diff3.1
@@ -0,0 +1,269 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH diff3 1 "7 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+diff3 \- 3-way differential file comparison
+.SH SYNOPSIS
+.LP
+.nf
+\fBdiff3\fR [\fB-exEX3\fR] \fIfilename1\fR \fIfilename2\fR \fIfilename3\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdiff3\fR compares three versions of a file. It publishes disagreeing ranges
+of text flagged with the following codes:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB====\fR\fR
+.ad
+.RS 9n
+.rt
+all three files differ
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB====1\fR\fR
+.ad
+.RS 9n
+.rt
+\fIfilename1\fRis different
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB====2\fR\fR
+.ad
+.RS 9n
+.rt
+\fIfilename2\fRis different
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB====3\fR\fR
+.ad
+.RS 9n
+.rt
+\fIfilename3\fRis different
+.RE
+
+.sp
+.LP
+The type of change suffered in converting a given range of a given file to some
+other is indicated in one of the following ways:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIf\fR\fB : \fR\fIn1\fR\fB a\fR\fR
+.ad
+.RS 17n
+.rt
+Text is to be appended after line number \fIn1\fR in file \fIf\fR, where
+\fIf\fR = 1, 2, or 3.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIf\fR\fB : \fR\fIn1\fR\fB , \fR\fIn2\fR\fB c\fR\fR
+.ad
+.RS 17n
+.rt
+Text is to be changed in the range line \fIn1\fR to line \fIn2\fR. If \fIn1\fR
+= \fIn\fR2, the range can be abbreviated to \fIn1\fR.
+.RE
+
+.sp
+.LP
+The original contents of the range follows immediately after a \fBc\fR
+indication. When the contents of two files are identical, the contents of the
+lower-numbered file is suppressed.
+.sp
+.LP
+The following command applies the resulting script to \fIfilename1\fR.
+.sp
+.in +2
+.nf
+\fB(cat script; echo a\'1,$pa\') | ed \(mi \fR\fIfilename1\fR
+.fi
+.in -2
+.sp
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fR
+.ad
+.RS 7n
+.rt
+Produce a script for the \fBed\fR(1) editor that incorporates into
+\fIfilename1\fR all changes between \fIfilename2\fR and \fIfilename3\fR (that
+is, the changes that normally would be flagged \fB====\fR and \fB====3\fR).
+.sp
+Text lines that consist of a single dot (\fB\&.\fR defeat the \fB-e\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR \fR
+.ad
+.RS 7n
+.rt
+Produce a script that incorporates all changes between \fIfilename2\fR and
+\fIfilename3\fR, but treat overlapping changes (that is, changes that would be
+flagged with \fB====\fR in the normal listing) differently. The overlapping
+lines from both files are inserted by the edit script, bracketed by
+\fB<<<<<<\fR and \fB>>>>>>\fR lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fR
+.ad
+.RS 7n
+.rt
+Produce a script to incorporate only changes flagged \fB====\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR \fR
+.ad
+.RS 7n
+.rt
+Produce a script that incorporates only changes flagged \fB====\fR, but treat
+these changes in the manner of the \fB-E\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-3\fR \fR
+.ad
+.RS 7n
+.rt
+Produce a script to incorporate only changes flagged \fB====3\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBdiff3\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/d3*\fR \fR
+.ad
+.RS 23n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/diff3prog\fR \fR
+.ad
+.RS 23n
+.rt
+
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred. A difference was found or there was a fatal error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+A fatal error occurred.
+.RE
+
+.sp
+.LP
+Return values do not work the same as \fBdiff\fR(1) or other vendor's versions
+of \fBdiff3\fR.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdiff\fR(1), \fBattributes\fR(5), \fBlargefile\fR(5)
+.SH NOTES
+.sp
+.LP
+Files longer than 64 Kbytes do not work.
diff --git a/usr/src/man/man1/diffmk.1 b/usr/src/man/man1/diffmk.1
new file mode 100644
index 0000000000..cda7ddf2c8
--- /dev/null
+++ b/usr/src/man/man1/diffmk.1
@@ -0,0 +1,86 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH diffmk 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+diffmk \- mark differences between versions of a troff input file
+.SH SYNOPSIS
+.LP
+.nf
+\fBdiffmk\fR \fIoldfile\fR \fInewfile\fR \fImarkedfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdiffmk\fR compares two versions of a file and creates a third version that
+includes "change mark" (\fB\&.mc\fR) commands for \fBnroff\fR(1) and
+\fBtroff\fR(1). \fIoldfile\fR and \fInewfile\fR are the old and new versions of
+the file. \fBdiffmk\fR generates \fImarkedfile\fR, which, contains the text
+from \fInewfile\fR with \fBtroff\fR(1) "change mark" requests (\fB\&.mc\fR)
+inserted where \fInewfile\fR differs from \fIoldfile\fR. When
+\fImarkedfile\fR is formatted, changed or inserted text is shown by \fB|\fR at
+the right margin of each line. The position of deleted text is shown by a
+single \fB*\fR.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBdiffmk\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example of the \fBdiffmk\fR command.
+.sp
+.LP
+\fBdiffmk\fR can also be used in conjunction with the proper \fBtroff\fR
+requests to produce program listings with marked changes. In the following
+command line:
+
+.sp
+.in +2
+.nf
+\fBexample% diffmk old.c new.c marked.c ; nroff reqs marked.c | pr\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the file \fBreqs\fR contains the following \fBtroff\fR requests:
+
+.sp
+.in +2
+.nf
+\&.pl \|1
+\&.ll \|77
+\&.nf
+\&.eo
+\&.nh
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+which eliminate page breaks, adjust the line length, set no-fill mode, ignore
+escape characters, and turn off hyphenation, respectively.
+
+.sp
+.LP
+If the characters \fB|\fR and \fB*\fR are inappropriate, you might run
+\fImarkedfile\fR through \fBsed\fR(1) to globally change them.
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdiff\fR(1), \fBnroff\fR(1), \fBsed\fR(1), \fBtroff\fR(1),
+\fBattributes\fR(5), \fBlargefile\fR(5)
+.SH BUGS
+.sp
+.LP
+Aesthetic considerations may dictate manual adjustment of some output. File
+differences involving only formatting requests may produce undesirable output,
+that is, replacing \fB\&.sp\fR by \fB\&.sp 2\fR will produce a "change mark" on
+the preceding or following line of output.
diff --git a/usr/src/man/man1/digest.1 b/usr/src/man/man1/digest.1
new file mode 100644
index 0000000000..5d1eaf1f62
--- /dev/null
+++ b/usr/src/man/man1/digest.1
@@ -0,0 +1,200 @@
+'\" te
+.\" Copyright 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH digest 1 "21 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+digest \- calculate a message digest
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/digest\fR \fB-l\fR | [\fB-v\fR] \fB-a\fR \fIalgorithm\fR [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdigest\fR utility calculates the message digest of the given files or
+\fBstdin\fR using the algorithm specified. If more than one file is given, each
+line of output is the digest of a single file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIalgorithm\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the name of the algorithm to use during the encryption or decryption
+process. See USAGE, \fBAlgorithms\fR, for details.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 16n
+.rt
+Displays list of algorithms available on the system. This list can change
+depending on the configuration of the cryptographic framework.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 16n
+.rt
+Verbose output. Includes the algorithm name and filename in the output.
+.RE
+
+.SH USAGE
+.SS "Algorithms"
+.sp
+.LP
+These algorithms are provided by the Cryptographic Framework. Each algorithm
+supported by the command is an alias of the PKCS #11 mechanism for easier
+access. For example, \fBsha1\fR is an alias to \fBCKM_SHA_1\fR.
+.sp
+.LP
+These aliases are used with the \fB-a\fR option and are case-sensitive.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSimulating Output
+.sp
+.LP
+The following example simulates output of the common \fBmd5sum\fR program:
+
+.sp
+.in +2
+.nf
+example$ digest -v -a md5 /usr/bin/vi
+md5 (/usr/bin/vi) = e4e3588c5212903847c66d36b1a828a5
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDigesting a File
+.sp
+.LP
+The following example generates the \fBsha1\fR digest of the file
+\fB/etc/motd\fR:
+
+.sp
+.in +2
+.nf
+example$ digest -a sha1 /etc/motd
+9498a4f5303d056ad3ecae826b59f41448d63790
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRGenerating a Directory Manifest
+.sp
+.LP
+The following example generates a directory manifest with \fBsha1\fR:
+
+.sp
+.in +2
+.nf
+example$ digest -v -a sha1 /usr/lib/inet/*
+sha1 (/usr/lib/inet/certdb) = f6d43e6e395d50db24d34e4af4828598c8918b16
+sha1 (/usr/lib/inet/certlocal) = 7f74ba4a019b809c7023212b4bda10d9485e071d
+sha1 (/usr/lib/inet/certrldb) = 1f845d30b8d02066647de04311e74549049852ed
+sha1 (/usr/lib/inet/dhcp) = e3db5e4ff40a69d13f2497254526c2015d2c37b3
+sha1 (/usr/lib/inet/dsvclockd) = b61aad7ed6a0f82145c3c26aedc613ab4a1f032e
+sha1 (/usr/lib/inet/in.dhcpd) = 382210180c826fbb2e747236c489062bac8cc30b
+sha1 (/usr/lib/inet/in.iked) = be6061fad725d37256e773dc85f8bd5248649463
+sha1 (/usr/lib/inet/in.mpathd) = 5bd6bf0340fd5c4cc0c53f2df158302a0e85f9d0
+sha1 (/usr/lib/inet/in.ndpd) = fdb768aebe7e5eb4465e1c1bb5e679b496f5c5c6
+sha1 (/usr/lib/inet/in.ripngd) = 4f56a0df2d4a252f581a73c2e84143b920d0b66b
+sha1 (/usr/lib/inet/ncaconfd) = 7219542b5585a8d1104d7ce4a2ced07d8a260ea3
+sha1 (/usr/lib/inet/ppp) = c96ee458549871a6ffdf2674a888b01d0c9e9740
+sha1 (/usr/lib/inet/pppoec) = 5f022498d79dacacd947cddadc64f171822e3dee
+sha1 (/usr/lib/inet/pppoed) = 252bd2f0863dbc1b05fffae72821a2a95609b8ad
+sha1 (/usr/lib/inet/slpd) = dfa24cc0f0b05f790546d4f0948a9094f7089027
+sha1 (/usr/lib/inet/wanboot) = a8b8c51c389c774d0be2ae43cb85d1b1439484ae
+sha1 (/usr/lib/inet/ntpd) = 5b4aff102372cea801e7d08acde9655fec81f07c
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRDisplaying a List of Available Algorithms
+.sp
+.LP
+The following example displays a list of available algortithms to digest:
+
+.sp
+.in +2
+.nf
+example$ digest -l
+sha1
+md5
+sha256
+sha385
+sha512
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcksum\fR(1), \fBencrypt\fR(1), \fBmac\fR(1), \fBbart\fR(1M),
+\fBcryptoadm\fR(1M), \fBlibpkcs11\fR(3LIB), \fBattributes\fR(5),
+\fBpkcs11_softtoken\fR(5)
diff --git a/usr/src/man/man1/dircmp.1 b/usr/src/man/man1/dircmp.1
new file mode 100644
index 0000000000..c9f7fa917f
--- /dev/null
+++ b/usr/src/man/man1/dircmp.1
@@ -0,0 +1,130 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dircmp 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+dircmp \- directory comparison
+.SH SYNOPSIS
+.LP
+.nf
+\fBdircmp\fR [\fB-ds\fR] [\fB-w\fR \fIn\fR] \fIdir1\fR \fIdir2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdircmp\fR command examines \fIdir1\fR and \fIdir2\fR and generates
+various tabulated information about the contents of the directories. Listings
+of files that are unique to each directory are generated for all the options.
+If no option is entered, a list is output indicating whether the file names
+common to both directories have the same contents.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 8n
+.rt
+Compares the contents of files with the same name in both directories and
+output a list telling what must be changed in the two files to bring them into
+agreement. The list format is described in \fBdiff\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 8n
+.rt
+Suppresses messages about identical files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIn\fR\fR
+.ad
+.RS 8n
+.rt
+Changes the width of the output line to \fIn\fR characters. The default width
+is \fB72\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdir1\fR\fR
+.ad
+.br
+.na
+\fB\fIdir2\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a directory to be compared.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBdircmp\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBdircmp\fR: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
+\fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred. (Differences in directory contents are not considered
+errors.)
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcmp\fR(1), \fBdiff\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5)
diff --git a/usr/src/man/man1/dis.1 b/usr/src/man/man1/dis.1
new file mode 100644
index 0000000000..026828eaf8
--- /dev/null
+++ b/usr/src/man/man1/dis.1
@@ -0,0 +1,286 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dis 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+dis \- object code disassembler
+.SH SYNOPSIS
+.LP
+.nf
+\fBdis\fR [\fB-onqCLV\fR] [\fB-d\fR \fIsec\fR] [\fB-D\fR \fIsec\fR] [\fB-F\fR \fIfunction\fR]
+ [\fB-l\fR \fIstring\fR] [\fB-t\fR \fIsec\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdis\fR command produces an assembly language listing of \fIfile\fR,
+which can be an object file or an archive of object files. The listing includes
+assembly statements and an octal or hexadecimal representation of the binary
+that produced those statements.
+.SH OPTIONS
+.sp
+.LP
+Options are interpreted by the disassembler and can be specified in any order.
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 15n
+.rt
+Displays demangled C++ symbol names in the disassembly.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIsec\fR\fR
+.ad
+.RS 15n
+.rt
+Disassembles the named section as data, printing the offset of the data from
+the beginning of the section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIsec\fR\fR
+.ad
+.RS 15n
+.rt
+Disassembles the named section as data, printing the actual address of the
+data.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIfunction\fR\fR
+.ad
+.RS 15n
+.rt
+Disassembles only the named function in each object file specified on the
+command line. The \fB-F\fR option can be specified multiple times on the
+command line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIstring\fR\fR
+.ad
+.RS 15n
+.rt
+Disassembles the archive file specified by \fIstring\fR. For example, one would
+issue the command \fBdis\fR \fB-l\fR \fBx\fR \fB-l\fR \fBz\fR to disassemble
+\fBlibx.a\fR and \fBlibz.a\fR, which are assumed to be in \fBLIBDIR\fR.
+.sp
+This option is obsolete and might be removed in a future release of Solaris.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 15n
+.rt
+Invokes a lookup of C-language source labels in the symbol table for subsequent
+writing to standard output.
+.sp
+This option is obsolete and might be removed in a future release of Solaris.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+Displays all addresses numerically. Addresses are displayed using symbolic
+names by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 15n
+.rt
+Prints numbers in octal. The default is hexadecimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 15n
+.rt
+Quiet mode. Does not print any headers or function entry labels.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIsec\fR\fR
+.ad
+.RS 15n
+.rt
+Disassembles the named section as text.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 15n
+.rt
+Prints, on standard error, the version number of the disassembler being
+executed.
+.sp
+This option is obsolete and might be removed in a future release of Solaris.
+.RE
+
+.sp
+.LP
+If the \fB-d\fR, \fB-D\fR, or \fB-t\fR options are specified, only those named
+sections from each user-supplied file is disassembled. Otherwise, all sections
+containing text is disassembled.
+.sp
+.LP
+On output, a number enclosed in brackets at the beginning of a line, such as
+\fB[5]\fR, indicates that the break-pointable line number starts with the
+following instruction. These line numbers is printed only if the file was
+compiled with additional debugging information.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of an object file or an archive (see \fBar\fR(1)) of object files.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBdis\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLIBDIR\fR\fR
+.ad
+.RS 10n
+.rt
+If this environment variable contains a value, use this as the path to search
+for the library. If the variable contains a null value, or is not set, it
+defaults to searching for the library under \fB/usr/lib\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib\fR\fR
+.ad
+.RS 12n
+.rt
+default \fBLIBDIR\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Uncommitted. The command line options are
+Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBas\fR(1), \fBld\fR(1), \fBa.out\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+The self-explanatory diagnostics indicate errors in the command line or
+problems encountered with the specified files.
diff --git a/usr/src/man/man1/disown.1 b/usr/src/man/man1/disown.1
new file mode 100644
index 0000000000..74610fd19f
--- /dev/null
+++ b/usr/src/man/man1/disown.1
@@ -0,0 +1,180 @@
+'\" te
+.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH disown 1 "18 Apr 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+disown \- ksh93 built-in function to disassociate a job with the current shell
+.SH SYNOPSIS
+.LP
+.nf
+\fBdisown\fR [\fIjob ...\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBksh93\fR \fBdisown\fR command prevents the current shell from sending a
+\fBHUP\fR signal to each of the specified jobs when the current shell
+terminates a login session.
+.sp
+.LP
+If \fIjob\fR is omitted, \fBdisown\fR sends the \fBHUP\fR signal to the most
+recently started or stopped background job.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIjob\fR\fR
+.ad
+.RS 7n
+.rt
+Specifies the job or jobs on which disown operates.
+.sp
+Specify \fIjob\fR as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a process ID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a process group ID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a job number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a job whose name begins with \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a job whose name contains \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%+\fR or \fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to the current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%-\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to the previous job.
+.RE
+
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One or more specified jobs does not exist.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisowning a Job
+.sp
+.LP
+The following example disowns job 1:
+
+.sp
+.in +2
+.nf
+example% disown %1
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+David Korn, \fBdgk@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbg\fR(1), \fBjobs\fR(1), \fBksh93\fR(1), \fBwait\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/dispgid.1 b/usr/src/man/man1/dispgid.1
new file mode 100644
index 0000000000..aa481201ad
--- /dev/null
+++ b/usr/src/man/man1/dispgid.1
@@ -0,0 +1,49 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dispgid 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+dispgid \- displays a list of all valid group names
+.SH SYNOPSIS
+.LP
+.nf
+\fBdispgid\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdispgid\fR displays a list of all group names on the system (one group per
+line).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Cannot read the group file.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/dispuid.1 b/usr/src/man/man1/dispuid.1
new file mode 100644
index 0000000000..7156cdc51f
--- /dev/null
+++ b/usr/src/man/man1/dispuid.1
@@ -0,0 +1,49 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dispuid 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+dispuid \- displays a list of all valid user names
+.SH SYNOPSIS
+.LP
+.nf
+\fBdispuid\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdispuid\fR displays a list of all user names on the system (one line per
+name).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Cannot read the password file.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/dos2unix.1 b/usr/src/man/man1/dos2unix.1
new file mode 100644
index 0000000000..c4332f9dd4
--- /dev/null
+++ b/usr/src/man/man1/dos2unix.1
@@ -0,0 +1,219 @@
+'\" te
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dos2unix 1 "14 Sep 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+dos2unix \- convert text file from DOS format to ISO format
+.SH SYNOPSIS
+.LP
+.nf
+\fBdos2unix\fR [\fB-ascii\fR] [\fB-iso\fR] [\fB-7\fR]
+ [\fB-437\fR | \fB-850\fR | \fB-860\fR | \fB-863\fR | \fB-865\fR] \fIoriginalfile\fR \fIconvertedfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdos2unix\fR utility converts characters in the \fBDOS\fR extended
+character set to the corresponding \fBISO\fR standard characters.
+.sp
+.LP
+This command can be invoked from either \fBDOS\fR or SunOS. However, the
+filenames must conform to the conventions of the environment in which the
+command is invoked.
+.sp
+.LP
+If the original file and the converted file are the same, \fBdos2unix\fR will
+rewrite the original file after converting it.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ascii\fR\fR
+.ad
+.RS 10n
+.rt
+Removes extra carriage returns and converts end of file characters in \fBDOS\fR
+format text files to conform to SunOS requirements.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-iso\fR\fR
+.ad
+.RS 10n
+.rt
+This is the default. It converts characters in the \fBDOS\fR extended character
+set to the corresponding \fBISO\fR standard characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-7\fR\fR
+.ad
+.RS 10n
+.rt
+Converts 8 bit \fBDOS\fR graphics characters to 7 bit space characters so that
+SunOS can read the file.
+.RE
+
+.sp
+.LP
+On non-i386 systems, \fBdos2unix\fR will attempt to obtain the keyboard type to
+determine which code page to use. Otherwise, the default is US. The user may
+override the code page with one of the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-437\fR\fR
+.ad
+.RS 8n
+.rt
+Use US code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-850\fR\fR
+.ad
+.RS 8n
+.rt
+Use multilingual code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-860\fR\fR
+.ad
+.RS 8n
+.rt
+Use Portuguese code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-863\fR\fR
+.ad
+.RS 8n
+.rt
+Use French Canadian code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-865\fR\fR
+.ad
+.RS 8n
+.rt
+Use Danish code page
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are required:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoriginalfile\fR \fR
+.ad
+.RS 18n
+.rt
+The original file in \fBDOS\fR format that is being converted to \fBISO\fR
+format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIconvertedfile\fR \fR
+.ad
+.RS 18n
+.rt
+The new file in \fBISO\fR format that has been converted from the original
+\fBDOS\fR file format.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBunix2dos\fR(1), \fBls\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFile \fIfilename\fR not found, or no read permission\fR\fR
+.ad
+.sp .6
+.RS 4n
+The input file you specified does not exist, or you do not have read
+permission. Check with the SunOS command, \fBls\fR \fB-l\fR (see \fBls\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBBad output filename \fIfilename\fR, or no write permission\fR\fR
+.ad
+.sp .6
+.RS 4n
+The output file you specified is either invalid, or you do not have write
+permission for that file or the directory that contains it. Check also that
+the drive or diskette is not write-protected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBError while writing to temporary file\fR\fR
+.ad
+.sp .6
+.RS 4n
+An error occurred while converting your file, possibly because there is not
+enough space on the current drive. Check the amount of space on the current
+drive using the \fBDIR\fR command. Also be certain that the default diskette or
+drive is write-enabled (not write-protected). Notice that when this error
+occurs, the original file remains intact.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTranslated temporary file name =\fR \fIfilename\fR.\fR
+.ad
+.br
+.na
+\fB\fBCould not rename temporary file to \fIfilename\fR.\fR\fR
+.ad
+.sp .6
+.RS 4n
+The program could not perform the final step in converting your file. Your
+converted file is stored under the name indicated on the second line of this
+message.
+.RE
+
diff --git a/usr/src/man/man1/download.1 b/usr/src/man/man1/download.1
new file mode 100644
index 0000000000..acf68584cd
--- /dev/null
+++ b/usr/src/man/man1/download.1
@@ -0,0 +1,178 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH download 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+download \- host resident PostScript font downloader
+.SH SYNOPSIS
+.LP
+.nf
+\fBdownload\fR [\fB-f\fR] [\fB-p\fR \fIprinter\fR] [\fB-m\fR \fIname\fR] [\fB-H\fR \fIdirectory\fR]
+ [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/download\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdownload\fR prepends host resident fonts to \fIfiles\fR and writes the
+results on the standard output. If no \fIfiles\fR are specified, or if
+\fB\(mi\fR is one of the input \fIfiles\fR, the standard input is read.
+\fBdownload\fR assumes the input \fIfiles\fR make up a single PostScript job
+and that requested fonts can be included at the start of each input \fBfile\fR.
+.sp
+.LP
+Requested fonts are named in a comment (marked with \fB%%DocumentFonts:\fR) in
+the input \fIfiles\fR. Available fonts are the ones listed in the map table
+selected using the \fB-m\fR option.
+.sp
+.LP
+The map table consists of fontname\(mifile pairs. The fontname is the full name
+of the PostScript font, exactly as it would appear in a \fB%%DocumentFonts:\fR
+comment. The file is the pathname of the host resident font. A file that begins
+with a \fB/\fR is used as is. Otherwise the pathname is relative to the host
+font directory. Comments are introduced by % (as in PostScript) and extend to
+the end of the line.
+.sp
+.LP
+The only candidates for downloading are fonts listed in the map table that
+point \fBdownload\fR to readable files. A font is downloaded once, at most.
+Requests for unlisted fonts or inaccessible files are ignored. All requests are
+ignored if the map table can not be read.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 16n
+.rt
+Force a complete scan of each input \fBfile\fR. In the absence of an explicit
+comment pointing \fBdownload\fR to the end of the file, the default scan stops
+immediately after the PostScript header comments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI printer\fR\fR
+.ad
+.RS 16n
+.rt
+Check the list of printer-resident fonts in
+\fB/etc/lp/printers/\fR\fIprinter\fR\fB/residentfonts\fR before downloading.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI name\fR\fR
+.ad
+.RS 16n
+.rt
+Use \fIname\fR as the font map table. A \fIname\fR that begins with \fB/\fR is
+the full pathname of the map table and is used as is. Otherwise \fIname\fR is
+appended to the pathname of the host font directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fI directory\fR\fR
+.ad
+.RS 16n
+.rt
+Use \fIdir\fR as the host font directory. The default is
+\fB/usr/lib/lp/postscript\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the \fBdownload\fR command.
+.sp
+.LP
+The following map table could be used to control the downloading of the
+Bookman font family:
+
+.sp
+.in +2
+.nf
+%
+% The first string is the full PostScript font name. The second string
+% is the file name - relative to the host font directory unless it begins
+% with a /.
+%
+ Bookman-Light bookman/light
+ Bookman-LightItalic bookman/lightitalic
+ Bookman-Demi bookman/demi
+ Bookman-DemiItalic bookman/demiitalic
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Using the file \fBmyprinter/map\fR (in the default host font directory) as the
+map table, you could download fonts by issuing the following command:
+
+.sp
+.in +2
+.nf
+\fBexample% download \fR\fB-m\fR\fB \fImyprinter/map file\fR\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1), \fBpostio\fR(1),
+\fBpostmd\fR(1), \fBpostprint\fR(1), \fBposttek\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBdownload\fR program should be part of a more general program.
+.sp
+.LP
+\fBdownload\fR does not look for \fB%%PageFonts:\fR comments and there is no
+way to force multiple downloads of a particular font.
+.sp
+.LP
+Using full pathnames in either map tables or the names of map tables is not
+recommended.
diff --git a/usr/src/man/man1/dpost.1 b/usr/src/man/man1/dpost.1
new file mode 100644
index 0000000000..f3325cb478
--- /dev/null
+++ b/usr/src/man/man1/dpost.1
@@ -0,0 +1,413 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dpost 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+dpost \- troff postprocessor for PostScript printers
+.SH SYNOPSIS
+.LP
+.nf
+\fBdpost\fR [\fB-c\fR \fInum\fR] [\fB-e\fR \fInum\fR] [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR] [\fB-o\fR \fIlist\fR]
+ [\fB-w\fR \fInum\fR] [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fB-F\fR \fIdir\fR] [\fB-H\fR \fIdir\fR]
+ [\fB-L\fR \fIfile\fR] [\fB-O\fR] [\fB-T\fR \fIname\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/dpost\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdpost\fR translates \fIfiles\fR created by \fBtroff\fR(1) into PostScript
+and writes the results on the standard output. If no \fIfiles\fR are specified,
+or if \(mi is one of the input \fIfiles\fR, the standard input is read.
+.sp
+.LP
+The \fIfiles\fR should be prepared by \fBtroff\fR. The default font files in
+\fB/usr/lib/font/devpost\fR produce the best and most efficient output. They
+assume a resolution of 720 dpi, and can be used to format files by adding the
+\fB-Tpost\fR option to the \fBtroff\fR call. Older versions of the \fBeqn\fR
+and \fBpic\fR preprocessors need to know the resolution that \fBtroff\fR will
+be using to format the \fIfiles\fR. If those are the versions installed on your
+system, use the \fB-r720\fR option with \fBeqn\fR and \fB-T720\fR with
+\fBpic\fR.
+.sp
+.LP
+\fBdpost\fR makes no assumptions about resolutions. The first \fBx res\fR
+command sets the resolution used to translate the input \fIfiles\fR, the
+\fBDESC.out\fR file, usually \fB/usr/lib/font/devpost/DESC.out\fR, defines the
+resolution used in the binary font files, and the PostScript prologue is
+responsible for setting up an appropriate user coordinate system.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR copies of each page. By default only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Sets the text encoding level to \fInum\fR. The recognized choices are 0, 1, and
+2. The size of the output file and print time should decrease as \fInum\fR
+increases. Level 2 encoding will typically be about 20 percent faster than
+level 0, which is the default and produces output essentially identical to
+previous versions of \fBdpost\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Magnify each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin, which is located near the upper left corner of each page. The
+default magnification is \fB1.0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default, \fInum\fR is set to \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Print those pages for which numbers are given in the comma-separated
+\fIlist\fR. The list contains single numbers \fIN\fR and ranges
+\fIN1\fR\fB\(mi\fR\fIN2.\fR A missing \fIN1\fR means the lowest numbered page,
+a missing \fIN2\fR means the highest. The page range is an expression of
+logical pages rather than physical sheets of paper. For example, if you are
+printing two logical pages to a sheet, and you specified a range of \fB4\fR,
+then two sheets of paper would print, containing four page layouts. If you
+specified a page range of \fB 3-4\fR, when requesting two logical pages to a
+sheet; then \fIonly\fR page 3 and page 4 layouts would print, and they would
+appear on one physical sheet of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI mode\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR in either portrait or landscape \fImode\fR. Only the first
+character of \fImode\fR is significant. The default \fImode\fR is portrait.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Set the line width used to implement \fBtroff\fR graphics commands to \fInum\fR
+points, where a point is approximately 1/72 of an inch. By default, \fInum\fR
+is set to \fB0.3\fR points.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed near the upper left corner of the page,
+with positive x to the right and positive y down the page. Positive \fInum\fR
+moves everything right. The default offset is \fB0\fR inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves text up the page. The default offset is \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fI dir\fR\fR
+.ad
+.RS 11n
+.rt
+Use \fIdir\fR as the font directory. The default \fIdir\fR is
+\fB/usr/lib/font\fR, and \fBdpost\fR reads binary font files from directory
+\fB/usr/lib/font/devpost\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fI dir\fR\fR
+.ad
+.RS 11n
+.rt
+Use \fIdir\fR as the host resident font directory. Files in this directory
+should be complete PostScript font descriptions, and must be assigned a name
+that corresponds to the appropriate two-character \fBtroff\fR font name. Each
+font file is copied to the output file only when needed and at most once during
+each job. There is no default directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fI file\fR\fR
+.ad
+.RS 11n
+.rt
+Use \fBfile\fR as the PostScript prologue which, by default, is
+\fB/usr/lib/lp/postscript/dpost.ps\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR\fR
+.ad
+.RS 11n
+.rt
+Disables PostScript picture inclusion. A recommended option when \fBdpost\fR is
+run by a spooler in a networked environment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fI name\fR\fR
+.ad
+.RS 11n
+.rt
+Use font files for device \fIname\fR as the best description of available
+PostScript fonts. By default, \fIname\fR is set to \fBpost\fR and \fBdpost\fR
+reads binary files from \fB/usr/lib/font/devpost\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the \fBdpost\fR command.
+.sp
+.LP
+If the old versions of \fBeqn\fR and \fBpic\fR are installed on your system,
+you can obtain the best possible looking output by issuing a command line such
+as the following:
+
+.sp
+.in +2
+.nf
+example% \fBpic \fR\fB-T720\fR\fB \fR\fBfile\fR\fB | tbl | eqn \fR\fB-r720\fR\fB | troff \fR\fB-mm\fR\fB \fR\fB-Tpost\fR\fB | dpost\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Otherwise,
+
+.sp
+.in +2
+.nf
+example% \fBpic \fR\fBfile\fR\fB | tbl | eqn | troff \fR\fB-mm\fR\fB \fR\fB-Tpost\fR\fB | dpost\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+should give the best results.
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/font/devpost/*.out\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/font/devpost/charlib/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/color.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/draw.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/macros/pictures\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/macros/color\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1), \fBpostio\fR(1),
+\fBpostmd\fR(1), \fBpostprint\fR(1), \fBpostreverse\fR(1), \fBposttek\fR(1),
+\fBtroff\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+Output files often do not conform to Adobe's file structuring conventions.
+Piping the output of \fBdpost\fR through \fBpostreverse\fR(1) should produce a
+minimally conforming PostScript file.
+.sp
+.LP
+Although \fBdpost\fR can handle files formatted for any device, emulation is
+expensive and can easily double the print time and the size of the output file.
+No attempt has been made to implement the character sets or fonts available on
+all devices supported by \fBtroff\fR. Missing characters will be replaced by
+white space, and unrecognized fonts will usually default to one of the Times
+fonts (that is, \fBR\fR, \fBI\fR, \fBB\fR, or \fBBI\fR).
+.sp
+.LP
+An \fBx res\fR command must precede the first \fBx init\fR command, and all
+the input \fIfiles\fR should have been prepared for the same output device.
+.sp
+.LP
+Use of the \fB-T\fR option is not encouraged. Its only purpose is to enable the
+use of other PostScript font and device description files, that perhaps use
+different resolutions, character sets, or fonts.
+.sp
+.LP
+Although level 0 encoding is the only scheme that has been thoroughly tested,
+level 2 is fast and may be worth a try.
diff --git a/usr/src/man/man1/du.1 b/usr/src/man/man1/du.1
new file mode 100644
index 0000000000..80f8ccf148
--- /dev/null
+++ b/usr/src/man/man1/du.1
@@ -0,0 +1,314 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH du 1 "6 Feb 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+du \- summarize disk usage
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/du\fR [\fB-dorx\fR] [\fB-a\fR | \fB-s\fR] [\fB-h\fR | \fB-k\fR | \fB-m\fR] [\fB-H\fR | \fB-L\fR]
+ [\fIfile\fR ...]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/du\fR [\fB-dorx\fR] [\fB-a\fR | \fB-s\fR] [\fB-h\fR | \fB-k\fR | \fB-m\fR] [\fB-H\fR | \fB-L\fR]
+ [\fIfile\fR ...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdu\fR utility writes to standard output the size of the file space
+allocated to, and the size of the file space allocated to each subdirectory of,
+the file hierarchy rooted in each of the specified files. The size of the file
+space allocated to a file of type directory is defined as the sum total of
+space allocated to all files in the file hierarchy rooted in the directory plus
+the space allocated to the directory itself. This sum will include the space
+allocated to any extended attributes encountered.
+.sp
+.LP
+Files with multiple links will be counted and written for only one entry. The
+directory entry that is selected in the report is unspecified. By default, file
+sizes are written in 512-byte units, rounded up to the next 512-byte unit.
+.SS "/usr/xpg4/bin/du"
+.sp
+.LP
+When \fBdu\fR cannot obtain file attributes or read directories (see
+\fBstat\fR(2)), it will report an error condition and the final exit status
+will be affected.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for \fB/usr/bin/du\fR and
+\fB/usr/xpg4/bin/du\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+In addition to the default output, report the size of each file not of type
+directory in the file hierarchy rooted in the specified file. Regardless of the
+presence of the \fB-a\fR option, non-directories given as \fIfile\fR operands
+will always be listed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Do not cross filesystem boundaries. For example, the command, \fBdu -d /\fR
+reports usage only on the root partition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+All sizes are scaled to a human readable format, for example, \fB14K\fR,
+\fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by repetitively dividing
+by \fB1024\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+If a symbolic link to a directory is specified on the command line, process the
+symbolic link by using the directory which the symbolic link references, rather
+than the link itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+Write the files sizes in units of 1024 bytes, rather than the default 512-byte
+units.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Process symbolic links by using the file or directory which the symbolic link
+references, rather than the link itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Write the files sizes in units of megabytes, rather than the default 512-byte
+units.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Do not add child directories' usage to a parent's total. Without this option,
+the usage listed for a particular directory is the space taken by the files in
+that directory, as well as the files in all directories beneath it. This option
+does nothing if \fB-s\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Generate diagnostic messages about unreadable directories and files whose
+status cannot be obtained. /usr/bin/du is silent if these conditions arise and
+\fB-r\fR is not specified. \fB/usr/xpg4/bin/du\fR acts as though \fB-r\fR is
+always specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Instead of the default output, report only the total sum for each of the
+specified files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+When evaluating file sizes, evaluate only those files that have the same device
+as the file specified by the file operand.
+.RE
+
+.sp
+.LP
+Specifying more than one of the options in the mutually exclusive pair,
+\fB-H\fR and \fB-L\fR, is not considered an error. The last option specified
+determines the output format.
+.sp
+.LP
+Specifying more than one of the options in the mutually exclusive set of
+options \fB-h\fR, \fB-k\fR, and \fB-m\fR is not considered an error. The last
+option specified determines the output format.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+The path name of a file whose size is to be written. If no \fIfile\fR is
+specified, the current directory is used.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The output from \fBdu\fR consists of the amount of the space allocated to a
+file and the name of the file.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBdu\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBdu\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fI\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/du"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStable
+.TE
+
+.SS "/usr/xpg4/bin/du"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBls\fR(1), \fBstat\fR(2), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBfsattr\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Basic Administration\fR
+.SH NOTES
+.sp
+.LP
+A file with two or more links is counted only once. If, however, there are
+links between files in different directories where the directories are on
+separate branches of the file system hierarchy, \fBdu\fR will count the excess
+files more than once.
+.sp
+.LP
+Files containing holes will result in an incorrect block count.
diff --git a/usr/src/man/man1/dump.1 b/usr/src/man/man1/dump.1
new file mode 100644
index 0000000000..0b7bb18627
--- /dev/null
+++ b/usr/src/man/man1/dump.1
@@ -0,0 +1,371 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dump 1 "6 Sep 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+dump \- dump selected parts of an object file
+.SH SYNOPSIS
+.LP
+.nf
+\fBdump\fR [\fB-aCcfghLorstV\fR [\fB-p\fR]] [\fB-T\fR \fIindex\fR [\fI,\fR \fIindexn\fR]] \fIfilename\fR...
+.fi
+
+.LP
+.nf
+\fBdump\fR [\fB-afhorstL\fR [\fB-p\fR] [v]] \fIfilename\fR...
+.fi
+
+.LP
+.nf
+\fBdump\fR [\fB-hsr\fR [\fB-p\fR] [\fB-d\fR \fInumber\fR [\fI,\fR \fInumbern\fR]]] \fIfilename\fR...
+.fi
+
+.LP
+.nf
+\fBdump\fR [\fB-hsrt\fR [\fB-p\fR] [\fB-n\fR \fIname\fR]] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBdump\fR utility dumps selected parts of each of its object \fIfile\fR
+arguments.
+.sp
+.LP
+The \fBdump\fR utility is best suited for use in shell scripts, whereas the
+\fBelfdump\fR(1) command is recommended for more human-readable output.
+.SH OPTIONS
+.sp
+.LP
+This utility will accept both object files and archives of object files. It
+processes each file argument according to one or more of the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps the archive header of each member of an archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps the string table(s).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps decoded C++ symbol table names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps each file header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps the global symbols in the symbol table of an archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps the section headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps dynamic linking information and static shared library information, if
+available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps each program execution header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps relocation information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps section contents in hexadecimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps symbol table entries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fIindex\fR\fR
+.ad
+.br
+.na
+\fB\fB-T\fR \fIindex1\fR,\fIindex2\fR\fR
+.ad
+.RS 20n
+.rt
+Dumps only the indexed symbol table entry defined by \fIindex\fR or a range of
+entries defined by \fIindex1\fR\fB,\fR\fIindex2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 20n
+.rt
+Prints version information.
+.RE
+
+.sp
+.LP
+The following modifiers are used in conjunction with the options listed above
+to modify their capabilities.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fInumber\fR\fR
+.ad
+.br
+.na
+\fB\fB-d\fR \fInumber1\fR,\fInumber2\fR\fR
+.ad
+.RS 22n
+.rt
+Dumps the section number indicated by \fInumber\fR or the range of sections
+starting at \fInumber1\fR and ending at \fInumber2\fR. This modifier can be
+used with \fB-h\fR, \fB-s\fR, and \fB-r\fR. When \fB-d\fR is used with \fB-h\fR
+or \fB-s\fR, the argument is treated as the number of a section or range of
+sections. When \fB-d\fR is used with \fB-r\fR, the argument is treated as the
+number of the section or range of sections to which the relocation applies. For
+example, to print out all relocation entries associated with the \fB\&.text\fR
+section, specify the number of the section as the argument to \fB-d\fR. If
+\fB\&.text\fR is section number 2 in the file, \fBdump\fR \fB-r\fR \fB-d\fR
+\fB2\fR will print all associated entries. To print out a specific relocation
+section, use \fBdump \fR\fB-s\fR\fB \fR\fB-n\fR\fB \fR\fIname\fR for raw data
+output, or \fBdump \fR\fB-sv\fR\fB \fR\fB-n\fR\fB \fR\fIname\fR for interpreted
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-n\fR\fB \fR\fIname\fR\fR
+.ad
+.RS 22n
+.rt
+Dumps information pertaining only to the named entity. This modifier can be
+used with \fB-h\fR, \fB-s\fR, \fB-r\fR, and \fB-t\fR. When \fB-n\fR is used
+with \fB-h\fR or \fB-s\fR, the argument will be treated as the name of a
+section. When \fB-n\fR is used with \fB-t\fR or \fB-r\fR, the argument will be
+treated as the name of a symbol. For example, \fBdump\fR \fB-t\fR \fB-n\fR
+\fB\&.text\fR will dump the symbol table entry associated with the symbol whose
+name is \fB\&.text\fR, where \fBdump\fR \fB-h\fR \fB-n\fR \fB .text\fR will
+dump the section header information for the \fB\&.text\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 22n
+.rt
+Suppresses printing of the headings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 22n
+.rt
+Dumps information in symbolic representation rather than numeric. This modifier
+can be used with
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+(date, user id, group id)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+(class, data, type, machine, version, flags)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+(type, flags)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+(value)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+(type, flags)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+(name, type)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+(interpret section contents wherever possible)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+(type, bind)
+.RE
+
+When \fB-v\fR is used with \fB-s\fR, all sections that can be interpreted, such
+as the string table or symbol table, will be interpreted. For example,
+\fBdump\fR \fB-sv\fR \fB-n\fR .symtab \fIfilename\fR.\|.\|.\| will produce the
+same formatted output as \fBdump\fR \fB-tv\fR \fIfilename\fR.\|.\|.\|, but
+\fBdump\fR \fB-s\fR \fB-n\fR .symtab \fIfilename\fR.\|.\|.\| will print raw
+data in hexadecimal. Without additional modifiers, \fBdump\fR \fB-sv\fR
+\fIfilename\fR... will dump all sections in the files, interpreting all those
+that it can and dumping the rest (such as \fB\&.text\fR or \fB\&.data\fR) as
+raw data.
+.RE
+
+.sp
+.LP
+The \fBdump\fR utility attempts to format the information it dumps in a
+meaningful way, printing certain information in character, hexadecimal, octal,
+or decimal representation as appropriate.
+.SH SEE ALSO
+.sp
+.LP
+\fBelfdump\fR(1), \fBnm\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/dumpcs.1 b/usr/src/man/man1/dumpcs.1
new file mode 100644
index 0000000000..abd053d38e
--- /dev/null
+++ b/usr/src/man/man1/dumpcs.1
@@ -0,0 +1,113 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH dumpcs 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+dumpcs \- show codeset table for the current locale
+.SH SYNOPSIS
+.LP
+.nf
+\fBdumpcs\fR [\fB-0123vw\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBdumpcs\fR shows a list of printable characters for the user's current
+locale, along with their hexadecimal code values. The display device is assumed
+to be capable of displaying characters for a given locale. With no option,
+\fBdumpcs\fR displays the entire list of printable characters for the current
+locale.
+.sp
+.LP
+With one or more numeric options specified, it shows \fBEUC\fR codeset(s) for
+the current locale according to the numbers specified, and in order of codeset
+number. Each non-printable character is represented by an asterisk "*" and
+enough \fBASCII\fR space character(s) to fill that codeset's column width.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-0\fR \fR
+.ad
+.RS 7n
+.rt
+Show \fBASCII\fR (or \fBEUC\fR primary) codeset.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR \fR
+.ad
+.RS 7n
+.rt
+Show \fBEUC\fR codeset 1, if used for the current locale.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-2\fR \fR
+.ad
+.RS 7n
+.rt
+Show \fBEUC\fR codeset 2, if used for the current locale.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-3\fR \fR
+.ad
+.RS 7n
+.rt
+Show \fBEUC\fR codeset 3, if used for the current locale.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fR
+.ad
+.RS 7n
+.rt
+"Verbose". Normally, ranges of non-printable characters are collapsed into a
+single line. This option produces one line for each non-printable character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fR
+.ad
+.RS 7n
+.rt
+Replace code values with corresponding wide character values (process codes).
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+The environment variables \fBLC_CTYPE\fR and \fBLANG\fR control the character
+classification throughout \fBdumpcs\fR. On entry to \fBdumpcs\fR, these
+environment variables are checked in that order. This implies that a new
+setting for \fBLANG\fR does not override the setting of \fBLC_CTYPE\fR. When
+none of the values is valid, the character classification defaults to the
+POSIX.1 "C" locale.
+.SH SEE ALSO
+.sp
+.LP
+\fBlocaledef\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBdumpcs\fR can only handle \fBEUC\fR locales.
diff --git a/usr/src/man/man1/echo.1 b/usr/src/man/man1/echo.1
new file mode 100644
index 0000000000..d882199654
--- /dev/null
+++ b/usr/src/man/man1/echo.1
@@ -0,0 +1,421 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH echo 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+echo \- echo arguments
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/echo\fR [\fIstring\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBecho\fR utility writes its arguments, separated by BLANKs and terminated
+by a NEWLINE, to the standard output. If there are no arguments, only the
+NEWLINE character is written.
+.sp
+.LP
+\fBecho\fR is useful for producing diagnostics in command files, for sending
+known data into a pipe, and for displaying the contents of environment
+variables.
+.sp
+.LP
+The C shell, the Korn shell, and the Bourne shell all have \fBecho\fR built-in
+commands, which, by default, is invoked if the user calls \fBecho\fR without a
+full pathname. See \fBshell_builtins\fR(1). \fBsh\fR's \fBecho\fR, \fBksh\fR's
+\fBecho\fR, \fBksh93\fR's \fBecho\fR, and \fB/usr/bin/echo\fR understand the
+back-slashed escape characters, except that \fBsh\fR's \fBecho\fR does not
+understand \fB\ea\fR as the alert character. In addition, \fBksh\fR's and
+\fBksh93\fR's \fBecho\fR does not have an \fB-n\fR option. \fBsh\fR's
+\fBecho\fR and \fB/usr/bin/echo\fR have an \fB-n\fR option if the \fBSYSV3\fR
+environment variable is set (see \fBENVIRONMENT VARIABLES\fR below).
+\fBcsh\fR's \fBecho\fR and \fB/usr/ucb/echo\fR, on the other hand, have an
+\fB-n\fR option, but do not understand the back-slashed escape characters.
+\fBsh\fR and \fBksh\fR determine whether \fB/usr/ucb/echo\fR is found first in
+the \fBPATH\fR and, if so, they adapt the behavior of the \fBecho\fR builtin to
+match \fB/usr/ucb/echo\fR.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR\fR
+.ad
+.RS 10n
+.rt
+A string to be written to standard output. If any operand is "\fB-n\fR", it is
+treated as a string, not an option. The following character sequences is
+recognized within any of the arguments:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ea\fR\fR
+.ad
+.RS 8n
+.rt
+Alert character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eb\fR\fR
+.ad
+.RS 8n
+.rt
+Backspace.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ec\fR\fR
+.ad
+.RS 8n
+.rt
+Print line without new-line. All characters following the \fB\ec\fR in the
+argument are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ef\fR\fR
+.ad
+.RS 8n
+.rt
+Form-feed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\en\fR\fR
+.ad
+.RS 8n
+.rt
+New-line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\er\fR\fR
+.ad
+.RS 8n
+.rt
+Carriage return.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\et\fR\fR
+.ad
+.RS 8n
+.rt
+Tab.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ev\fR\fR
+.ad
+.RS 8n
+.rt
+Vertical tab.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\e\fR\fR
+.ad
+.RS 8n
+.rt
+Backslash.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e0\fR\fIn\fR\fR
+.ad
+.RS 8n
+.rt
+Where \fIn\fR is the 8-bit character whose \fBASCII\fR code is the 1-, 2- or
+3-digit octal number representing that character.
+.RE
+
+.RE
+
+.SH USAGE
+.sp
+.LP
+Portable applications should not use \fB-n\fR (as the first argument) or escape
+sequences.
+.sp
+.LP
+The \fBprintf\fR(1) utility can be used portably to emulate any of the
+traditional behaviors of the \fBecho\fR utility as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The Solaris 2.6 operating environment or compatible version's
+\fB/usr/bin/echo\fR is equivalent to:
+.sp
+.in +2
+.nf
+\fBprintf "%b\en" "$*"\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fB/usr/ucb/echo\fR is equivalent to:
+.sp
+.in +2
+.nf
+if [ "X$1" = "X-n" ]
+
+then
+
+ shift
+
+ printf "%s" "$*"
+
+else
+
+ printf "%s\en" "$*"
+
+fi
+.fi
+.in -2
+
+.RE
+.sp
+.LP
+New applications are encouraged to use \fBprintf\fR instead of \fBecho\fR.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRFinding how far below root your current directory is located
+.sp
+.LP
+You can use \fBecho\fR to determine how many subdirectories below the root
+directory (\fB/\fR) is your current directory, as follows:
+
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Echo your current-working-directory's full pathname.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Pipe the output through \fBtr\fR to translate the path's embedded
+slash-characters into space-characters.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Pipe that output through \fBwc\fR \fB-w\fR for a count of the names in your
+path.
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/echo $PWD | tr '/' ' ' | wc -w\fR
+.fi
+.in -2
+.sp
+
+.RE
+.sp
+.LP
+See \fBtr\fR(1) and \fBwc\fR(1) for their functionality.
+
+.sp
+.LP
+Below are the different flavors for echoing a string without a NEWLINE:
+.LP
+\fBExample 2 \fR/usr/bin/echo
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/echo "$USER's current directory is $PWD\ec"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRsh/ksh shells
+.sp
+.in +2
+.nf
+example$ \fBecho "$USER's current directory is $PWD\ec"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRcsh shell
+.sp
+.in +2
+.nf
+example% \fBecho -n "$USER's current directory is $PWD"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fR/usr/ucb/echo
+.sp
+.in +2
+.nf
+example% \fB/usr/ucb/echo -n "$USER's current directory is $PWD"\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBecho\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSYSV3\fR\fR
+.ad
+.RS 9n
+.rt
+This environment variable is used to provide compatibility with INTERACTIVE
+UNIX System and SCO UNIX installation scripts. It is intended for compatibility
+only and should not be used in new scripts. This variable is applicable only
+for Solaris x86 platforms, not Solaris SPARC systems.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following error values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBprintf\fR(1), \fBshell_builtins\fR(1), \fBtr\fR(1),
+\fBwc\fR(1), \fBecho\fR(1B), \fBascii\fR(5), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+When representing an 8-bit character by using the escape convention
+\fB\e0\fR\fIn\fR, the \fIn\fR must \fBalways\fR be preceded by the digit zero
+(\fB0\fR).
+.sp
+.LP
+For example, typing: \fBecho 'WARNING:\e\|07'\fR prints the phrase
+\fBWARNING:\fR and sounds the "bell" on your terminal. The use of single (or
+double) quotes (or two backslashes) is required to protect the "\|\e" that
+precedes the "07".
+.sp
+.LP
+Following the \fB\e0\fR, up to three digits are used in constructing the octal
+output character. If, following the \fB\e0\fR\fIn\fR, you want to echo
+additional digits that are not part of the octal representation, you must use
+the full 3-digit \fIn\fR. For example, if you want to echo "ESC 7" you must use
+the three digits "033" rather than just the two digits "33" after the
+\fB\e\|0\fR\&.
+.sp
+.in +2
+.nf
+2 digits Incorrect: echo "\e0337" | od -xc
+ produces: df0a (hex)
+ 337 (ascii)
+3 digits Correct: echo "\e00337" | od -xc
+ produces: lb37 0a00 (hex)
+ 033 7 (ascii)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+For the octal equivalents of each character, see \fBascii\fR(5).
diff --git a/usr/src/man/man1/ed.1 b/usr/src/man/man1/ed.1
new file mode 100644
index 0000000000..6217a7cd4b
--- /dev/null
+++ b/usr/src/man/man1/ed.1
@@ -0,0 +1,1342 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2003, Sun Microsystems, Inc. Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ed 1 "10 Dec 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+ed, red \- text editor
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ed\fR [\fB-s\fR | \fB-\fR] [\fB-p\fR \fIstring\fR] [\fB-x\fR] [\fB-C\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ed\fR [\fB-s\fR | \fB-\fR] [\fB-p\fR \fIstring\fR] [\fB-x\fR] [\fB-C\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/ed\fR [\fB-s\fR | \fB-\fR] [\fB-p\fR \fIstring\fR] [\fB-x\fR] [\fB-C\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/red\fR [\fB-s\fR | \fB-\fR] [\fB-p\fR \fIstring\fR] [\fB-x\fR] [\fB-C\fR] [\fIfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBed\fR utility is the standard text editor. If \fIfile\fR is specified,
+\fBed\fR simulates an \fBe\fR command (see below) on the named file. That is,
+the file is read into \fBed\fR's buffer so that it can be edited.
+.sp
+.LP
+The \fBed\fR utility operates on a copy of the file it is editing. Changes made
+to the copy have no effect on the file until a \fBw\fR (write) command is
+given. The copy of the text being edited resides in a temporary file called the
+\fIbuffer\fR. There is only one buffer.
+.sp
+.LP
+The \fBred\fR utility is a restricted version of \fBed\fR. It will only allow
+editing of files in the current directory. \fBred\fR prohibits executing shell
+commands via \fB!\fR\fIshell command\fR. Attempts to bypass these restrictions
+result in an error message (\fIrestricted shell\fR).
+.sp
+.LP
+Both \fBed\fR and \fBred\fR support the \fBfspec\fR(4) formatting capability.
+The default terminal mode is either \fBstty\fR \fB-tabs\fR or \fBstty tab3\fR,
+where tab stops are set at eight columns (see \fBstty\fR(1)). If, however, the
+first line of \fIfile\fR contains a format specification, that specification
+will override the default mode. For example, tab stops would be set at 5, 10,
+and 15, and a maximum line length of 72 would be imposed if the first line of
+\fIfile\fR contains
+.sp
+.in +2
+.nf
+\fB<:t5,10,15 s72:>\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Commands to \fBed\fR have a simple and regular structure: zero, one, or two
+\fIaddresses\fR followed by a single-character \fIcommand\fR, 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.
+.sp
+.LP
+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 \fBed\fR is accepting text, it is said to be in \fIinput mode\fR. In this
+mode, \fBno\fR commands are recognized; all input is merely collected. Leave
+input mode by typing a period (\fB\&.\fR) at the beginning of a line, followed
+immediately by a carriage return.
+.SS "/usr/bin/ed"
+.sp
+.LP
+If \fBed\fR executes commands with arguments, it uses the default shell
+\fB/usr/bin/sh\fR (see \fBsh\fR(1)).
+.SS "/usr/xpg4/bin/ed and /usr/xpg6/bin/ed"
+.sp
+.LP
+If \fBed\fR executes commands with arguments, it uses \fB/usr/xpg4/bin/sh\fR
+(see \fBksh\fR(1)).
+.SS "Regular Expressions"
+.sp
+.LP
+The \fBed\fR utility supports a limited form of \fIregular expression\fR
+notation. Regular expressions are used in addresses to specify lines and in
+some commands (for example, \fBs\fR) to specify portions of a line that are to
+be substituted. To understand addressing in \fBed\fR, it is necessary to know
+that at any time there is a \fIcurrent line\fR. 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.
+.sp
+.LP
+Internationalized Basic Regular Expressions are used for all system-supplied
+locales. See \fBregex\fR(5).
+.SS "ed Commands"
+.sp
+.LP
+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 one(s) are used.
+.sp
+.LP
+Typically, addresses are separated from each other by a comma (\fB,\fR). They
+may also be separated by a semicolon (\fB;\fR). In the latter case, the first
+address is calculated, the current line (\fB\&.\fR) is set to that value, and
+then the second address is 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 in the
+buffer that follows the line corresponding to the first address.
+.sp
+.LP
+For \fB/usr/xpg6/gbin/ed\fR, the address can be omitted on either side of the
+comma or semicolon separator, in which case the resulting address pairs are as
+follows:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+SpecifiedResulting
+_
+,1 , $
+_
+, addr1 , addr
+_
+addr ,addr , addr
+_
+;1 ; $
+_
+; addr1 ; addr
+_
+addr ;addr ; addr
+.TE
+
+.sp
+.LP
+Any <\fIblank\fR>s included between addresses, address separators, or address
+offsets are ignored.
+.sp
+.LP
+In the following list of \fBed\fR commands, the parentheses shown prior to the
+command are \fInot\fR part of the address. Rather, the parentheses show the
+default address(es) for the command.
+.sp
+.LP
+Each address component can be preceded by zero or more blank characters. The
+command letter can be preceded by zero or more blank characters. If a suffix
+letter (\fBl\fR, \fBn\fR, or \fBp\fR) is given, it must immediately follow the
+command.
+.sp
+.LP
+The \fBe\fR, \fBE\fR, \fBf\fR, \fBr\fR, and \fBw\fR commands take an optional
+\fIfile\fR parameter, separated from the command letter by one or more blank
+characters.
+.sp
+.LP
+If changes have been made in the buffer since the last \fBw\fR command that
+wrote the entire buffer, \fBed\fR warns the user if an attempt is made to
+destroy the editor buffer via the \fBe\fR or \fBq\fR commands. The \fBed\fR
+utility writes the string:
+.sp
+.in +2
+.nf
+"?\en"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+(followed by an explanatory message if \fIhelp mode\fR has been enabled via the
+\fBH\fR command) to standard output and continues in command mode with the
+current line number unchanged. If the \fBe\fR or \fBq\fR command is repeated
+with no intervening command, \fBed\fR takes effect.
+.sp
+.LP
+If an end-of-file is detected on standard input when a command is expected, the
+\fBed\fR utility acts as if a \fBq\fR command had been entered.
+.sp
+.LP
+It is generally illegal for more than one command to appear on a line. However,
+any command (except \fBe\fR, \fBf\fR, \fBr\fR, or \fBw\fR) may be suffixed by
+\fBl\fR, \fBn\fR, or \fBp\fR in which case the current line is either listed,
+numbered or written, respectively, as discussed below under the \fBl\fR,
+\fBn\fR, and \fBp\fR commands.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.)a\fR\fR
+.ad
+.br
+.na
+\fB<\fItext\fR> \fR
+.ad
+.br
+.na
+\fB\fB\&.\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBa\fRppend command accepts zero or more lines of text and appends it
+after the addressed line in the buffer. The current line (\fB\&.\fR) is left at
+the last inserted line, or, if there were none, 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. The maximum number of characters that may be
+entered from a terminal is 256 per line (including the new-line character).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)c\fR\fR
+.ad
+.br
+.na
+\fB<\fItext\fR>\fR
+.ad
+.br
+.na
+\fB\fB\&.\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBc\fRhange command deletes the addressed lines from the buffer, then
+accepts zero or more lines of text that replaces these lines in the buffer. The
+current line (\fB\&.\fR) is left at the last line input, or, if there were
+none, at the first line that was not deleted. If the lines deleted were
+originally at the end of the buffer, the current line number will be set to the
+address of the new last line. If no lines remain in the buffer, the current
+line number will be set to 0.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg4/bin/ed\fR\fR
+.ad
+.RS 20n
+.rt
+Address 0 is not legal for this command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg6/bin/ed\fR\fR
+.ad
+.RS 20n
+.rt
+Address 0 is valid for this command. It is interpreted as if the address 1 were
+specified.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBC\fR\fR
+.ad
+.RS 11n
+.rt
+Same as the \fBX\fR command, described later, except that \fBed\fR assumes all
+text read in for the \fBe\fR and \fBr\fR commands is encrypted unless a null
+key is typed in.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)d\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBd\fRelete 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. If no lines remain in the buffer, the current line number will be set to
+0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR \fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBe\fRdit command deletes the entire contents of the buffer and then reads
+the contents of \fIfile\fR into the buffer. The current line (\fB\&.\fR) is set
+to the last line of the buffer. If \fIfile\fR is not given, the currently
+remembered file name, if any, is used (see the \fBf\fR command). The number of
+bytes read will be written to standard output, unless the \fB-s\fR option was
+specified, in the following format:
+.sp
+\fB"%d\en"\fR <\fInumber of bytes read\fR>
+.sp
+\fIfile\fR is remembered for possible use as a default file name in subsequent
+\fBe\fR, \fBE\fR, \fBr\fR, and \fBw\fR commands. If \fIfile\fR is replaced by
+\fB!\fR, the rest of the line is taken to be a shell ( \fBsh\fR(1)) command
+whose output is to be read. Such a shell command is \fInot\fR remembered as the
+current file name. See also DIAGNOSTICS below. All marks are discarded upon
+the completion of a successful \fBe\fR command. If the buffer has changed since
+the last time the entire buffer was written, the user is warned, as described
+previously.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBE\fR \fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBE\fRdit command is like \fBe\fR, except that the editor does not check
+to see if any changes have been made to the buffer since the last \fBw\fR
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fR \fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+If \fIfile\fR is given, the \fBf\fR command changes the currently remembered
+path name to \fIfile\fR. Whether the name is changed or not, the \fBf\fR
+command then writes the (possibly new) currently remembered path name to the
+standard output in the following format:
+.sp
+\fB"%s\en"\fR\fIpathname\fR
+.sp
+The current line number is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(1,$)g/\fR\fIRE\fR\fB/\fR\fIcommand list\fR\fR
+.ad
+.RS 26n
+.rt
+In the \fBg\fRlobal command, the first step is to mark every line that matches
+the given \fIRE\fR. Then, for every such line, the given \fIcommand list\fR is
+executed with the current line (\fB\&.\fR) initially set to that line. When the
+\fBg\fR command completes, the current line number has the value assigned by
+the last command in the command list. If there were no matching lines, the
+current line number is not changed. A single command or the first of a list of
+commands appears on the same line as the global command. All lines of a
+multi-line list except the last line must be ended with a backslash
+(\fB\e\fR\|); \fBa\fR, \fBi\fR, and \fBc\fR commands and associated input are
+permitted. The \fB\&.\fR terminating input mode may be omitted if it would be
+the last line of the \fIcommand list\fR. An empty \fIcommand list\fR is
+equivalent to the \fBp\fR command. The \fBg\fR, \fBG\fR, \fBv\fR, \fBV\fR, and
+\fB!\fR commands are \fInot\fR permitted in the \fIcommand list\fR. See also
+the NOTES and the last paragraph before FILES below. Any character other than
+space or newline can be used instead of a slash to delimit the \fIRE\fR. Within
+the \fIRE\fR, the \fIRE\fR delimiter itself can be used as a literal character
+if it is preceded by a backslash.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(1,$)G/\fR\fIRE\fR\fB/\fR\fR
+.ad
+.RS 26n
+.rt
+In the interactive \fBG\fRlobal command, the first step is to mark every line
+that matches the given \fIRE\fR. Then, for every such line, that line is
+written to standard output, the current line (\fB\&.\fR) is changed to that
+line, and any \fIone\fR command (other than one of the \fBa\fR, \fBc\fR,
+\fBi\fR, \fBg\fR, \fBG\fR, \fBv\fR, and \fBV\fR commands) may be input and is
+executed. After the execution of that command, the next marked line is written,
+and so on. A new-line acts as a null command. An \fB&\fR causes the
+re-execution of the most recent non-null command executed within the current
+invocation of \fBG\fR. \fBNote:\fR The commands input as part of the execution
+of the \fBG\fR command may address and affect \fBany\fR lines in the buffer.
+The final value of the current line number is the value set by the last command
+successfully executed. (Notice that the last command successfully executed is
+the \fBG\fR command itself if a command fails or the null command is
+specified.) If there were no matching lines, the current line number is not
+changed. The \fBG\fR command can be terminated by a \fBSIGINT\fR signal. The
+\fBG\fR command can be terminated by an interrupt signal (ASCII DEL or BREAK).
+Any character other than space or newline can be used instead of a slash to
+delimit the \fIRE\fR. Within the \fIRE\fR, the \fIRE\fR delimiter itself can be
+used as a literal character if it is preceded by a backslash.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBhelp\fR command gives a short error message that explains the reason for
+the most recent \fB?\fR diagnostic. The current line number is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBH\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBHelp\fR command causes \fBed\fR to enter a mode in which error messages
+are written for all subsequent \fB?\fR diagnostics. It also explains the
+previous \fB?\fR if there was one. The \fBH\fR command alternately turns this
+mode on and off; it is initially off. The current line number is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)i\fR\fR
+.ad
+.br
+.na
+\fB<\fItext\fR>\fR
+.ad
+.br
+.na
+\fB\fB\&.\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBinsert\fR command accepts zero or more lines of text and inserts it
+before the addressed line in the buffer. The current line (\fB\&.\fR) is left
+at the last inserted line, or, if there were none, at the addressed line. This
+command differs from the \fBa\fR command only in the placement of the input
+text. The maximum number of characters that may be entered from a terminal is
+256 per line (including the new-line character).
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg4/bin/ed\fR\fR
+.ad
+.RS 20n
+.rt
+Address 0 is not legal for this command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg6/bin/ed\fR\fR
+.ad
+.RS 20n
+.rt
+Address 0 is valid for this command. It is interpreted as if the address 1 were
+specified.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.+1)j\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBj\fRoin command joins contiguous lines by removing the appropriate
+new-line characters. If exactly one address is given, this command does
+nothing. If lines are joined, the current line number is set to the address of
+the joined line. Otherwise, the current line number is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.)k\fR\fIx\fR\fR
+.ad
+.RS 26n
+.rt
+The mar\fBk\fR command marks the addressed line with name \fIx\fR, which must
+be an ASCII lower-case letter (\fBa\fR\fB-\fR\fBz\fR). The address \fI a\'x\fR
+then addresses this line. The current line (\fB\&.\fR) is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)l\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBl\fR command writes to standard output the addressed lines in a visually
+unambiguous form. The characters ( \fB\e\e\fR, \fB\ea\fR, \fB\eb\fR, \fB\ef\fR,
+\fB\er\fR, \fB\et\fR, \fB\ev\fR) are written as the corresponding escape
+sequence. The \fB\en\fR in that table is not applicable. Non-printable
+characters not in the table are written as one three-digit octal number (with a
+preceding backslash character) for each byte in the character, with the most
+significant byte first.
+.sp
+Long lines are folded, with the point of folding indicated by writing
+backslash/newline character. The length at which folding occurs is unspecified,
+but should be appropriate for the output device. The end of each line is marked
+with a \fB$\fR. When using the \fB/usr/xpg6/bin/ed\fR command, the end of each
+line is marked with a \fB$\fR due to folding, and \fB$\fR characters within the
+text are written with a preceding backslash. An \fBl\fR command can be appended
+to any other command other than \fBe\fR, \fBE\fR, \fBf\fR, \fBq\fR, \fBQ\fR,
+\fBr\fR, \fBw\fR, or \fB!\fR. The current line number is set to the address of
+the last line written.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)m\fR\fIa\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBm\fRove command repositions the addressed line(s) after the line
+addressed by \fIa\fR. Address 0 is legal for \fIa\fR and causes the addressed
+line(s) to be moved to the beginning of the file. It is an error if address
+\fIa\fR falls within the range of moved lines. The current line (\fB\&.\fR) is
+left at the last line moved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)n\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBn\fRumber command writes the addressed lines, preceding each line by its
+line number and a tab character. The current line (\fB\&.\fR) is left at the
+last line written. The \fBn\fR command may be appended to any command other
+than \fBe\fR, \fBE\fR, \fBf\fR, \fBq\fR, \fBQ\fR, \fBr\fR, \fBw\fR, or \fB!\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)p\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBp\fRrint command writes the addressed lines to standard output. The
+current line (\fB\&.\fR) is left at the last line written. The \fBp\fR command
+may be appended to any command other than \fBe\fR, \fBE\fR, \fBf\fR, \fBq\fR,
+\fBQ\fR, \fBr\fR, \fBw\fR, or \fB!\fR. For example, \fBdp\fR deletes the
+current line and writes the new current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBP\fR command causes \fBed\fR to prompt with an asterisk (\fB*\fR) (or
+\fIstring\fR, if \fB-p\fR is specified) for all subsequent commands. The
+\fBP\fR command alternatively turns this mode on and off; it is initially on if
+the \fB-p\fR option is specified, otherwise off. The current line is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBq\fRuit command causes \fBed\fR to exit. If the buffer has changed since
+the last time the entire buffer was written, the user is warned. See
+DIAGNOSTICS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBQ\fR\fR
+.ad
+.RS 26n
+.rt
+The editor exits without checking if changes have been made in the buffer since
+the last \fBw\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB($)r\fR \fIfile\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBr\fRead command reads the contents of \fIfile\fR into the buffer. If
+\fIfile\fR is not given, the currently remembered file name, if any, is used
+(see the \fBe\fR and \fBf\fR commands). The currently remembered file name is
+\fBnot\fR changed unless \fIfile\fR is the very first file name mentioned since
+\fBed\fR was invoked. Address 0 is legal for \fBr\fR and causes the file to be
+read in at the beginning of the buffer. If the read is successful and the
+\fB-s\fR option was not specified, the number of characters read is written to
+standard output in the following format:
+.sp
+.in +2
+.nf
+\fB%d\en\fR, <\fInumber of bytes read\fR>
+.fi
+.in -2
+.sp
+
+The current line (\fB\&.\fR) is set to the last line read. If \fIfile\fR is
+replaced by \fB!\fR, the rest of the line is taken to be a shell command (see
+\fBsh\fR(1)) whose output is to be read. For example, \fB$r !ls\fR appends the
+current directory to the end of the file being edited. Such a shell command is
+\fBnot\fR remembered as the current file name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)s/\fR\fIRE\fR\fB/\fR\fIreplacement\fR\fB/\fR\fR
+.ad
+.br
+.na
+\fB\fB(.,.)s/\fR\fIRE\fR\fB/\fR\fIreplacement\fR\fB/\fR\fIcount\fR,
+\fIcount\fR=[\fB1-2047\fR]\fR
+.ad
+.br
+.na
+\fB\fB(.,.)s/\fR\fIRE\fR\fB/\fR\fIreplacement\fR\fB/g\fR\fR
+.ad
+.br
+.na
+\fB\fB(.,.)s/\fR\fIRE\fR\fB/\fR\fIreplacement\fR\fB/l\fR\fR
+.ad
+.br
+.na
+\fB\fB(.,.)s/\fR\fIRE\fR\fB/\fR\fIreplacement\fR\fB/n\fR\fR
+.ad
+.br
+.na
+\fB\fB(.,.)s/\fR\fIRE\fR\fB/\fR\fIreplacement\fR\fB/p\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBs\fRubstitute command searches each addressed line for an occurrence of
+the specified \fIRE\fR. Zero or more substitution commands can be specified. In
+each line in which a match is found, all (non-overlapped) matched strings are
+replaced by the \fIreplacement\fR if the global replacement indicator \fBg\fR
+appears after the command. If the global indicator does not appear, only the
+first occurrence of the matched string is replaced. If a number \fIcount\fR
+appears after the command, only the \fIcount\fR-th occurrence of the matched
+string on each addressed line is replaced. It is an error if the substitution
+fails on \fBall\fR addressed lines. Any character other than space or new-line
+may be used instead of the slash (\fB/\fR) to delimit the \fIRE\fR and the
+\fIreplacement\fR. The current line (\fB\&.\fR) is left at the last line on
+which a substitution occurred. Within the \fIRE\fR, the \fIRE\fR delimiter
+itself can be used as a literal character if it is preceded by a backslash. See
+also the last paragraph before FILES below.
+.sp
+An ampersand (\fB&\fR) appearing in the \fIreplacement\fR is replaced by the
+string matching the \fIRE\fR on the current line. The special meaning of
+\fB&\fR in this context may be suppressed by preceding it by \fB\e\fR\|. As a
+more general feature, the characters \fB\e\fR\fIn\fR, where \fIn\fR is a digit,
+are replaced by the text matched by the \fIn\fR-th regular subexpression of the
+specified \fIRE\fR enclosed between \fB\e(\fR and \fB\e)\fR\&. When nested
+parenthesized subexpressions are present, \fIn\fR is determined by counting
+occurrences of \fB\e(\fR starting from the left. When the character \fB%\fR is
+the only character in the \fIreplacement\fR, the \fIreplacement\fR used in the
+most recent substitute command is used as the \fIreplacement\fR in the current
+substitute command. If there was no previous substitute command, the use of
+\fB%\fR in this manner is an error. The \fB%\fR loses its special meaning when
+it is in a replacement string of more than one character or is preceded by a
+\fB\e\fR\|. For each backslash (\e) encountered in scanning \fIreplacement\fR
+from beginning to end, the following character loses its special meaning (if
+any). It is unspecified what special meaning is given to any character other
+than \fB&\fR, \fB\e\fR, \fB%\fR, or digits.
+.sp
+A line may be split by substituting a new-line character into it. The new-line
+in the \fIreplacement\fR must be escaped by preceding it by \fB\e\fR\&. Such
+substitution cannot be done as part of a \fBg\fR or \fBv\fR command list. The
+current line number is set to the address of the last line on which a
+substitution is performed. If no substitution is performed, the current line
+number is unchanged. If a line is split, a substitution is considered to have
+been performed on each of the new lines for the purpose of determining the new
+current line number. A substitution is considered to have been performed even
+if the replacement string is identical to the string that it replaces.
+.sp
+The substitute command supports the following indicators:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcount\fR\fR
+.ad
+.RS 9n
+.rt
+Substitute for the \fIcount\fRth occurrence only of the \fIRE\fR found on each
+addressed line. \fIcount\fR must be between \fB1\fR-\fB2047\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 9n
+.rt
+Globally substitute for all non-overlapping instances of the \fIRE\fR rather
+than just the first one. If both \fBg\fR and \fIcount\fR are specified, the
+results are unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 9n
+.rt
+Write to standard output the final line in which a substitution was made. The
+line is written in the format specified for the \fBl\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBn\fR\fR
+.ad
+.RS 9n
+.rt
+Write to standard output the final line in which a substitution was made. The
+line is written in the format specified for the \fBn\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 9n
+.rt
+Write to standard output the final line in which a substitution was made. The
+line will be written in the format specified for the \fBp\fR command.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.,.)t\fR\fIa\fR\fR
+.ad
+.sp .6
+.RS 4n
+This command acts just like the \fBm\fR command, except that a \fIcopy\fR of
+the addressed lines is placed after address \fBa\fR (which may be 0). The
+current line (\fB\&.\fR) is left at the last line copied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBu\fRndo command nullifies the effect of the most recent command that
+modified anything in the buffer, namely the most recent \fBa\fR, \fBc\fR,
+\fBd\fR, \fBg\fR, \fBi\fR, \fBj\fR, \fBm\fR, \fBr\fR, \fBs\fR, \fBt\fR,
+\fBu\fR, \fBv\fR, \fBG\fR, or \fBV\fR command. All changes made to the buffer
+by a \fBg\fR, \fBG\fR, \fBv\fR, or \fBV\fR global command is undone as a single
+change.If no changes were made by the global command (such as with \fBg/\fR
+\fIRE\fR\fB/p\fR), the \fBu\fR command has no effect. The current line number
+is set to the value it had immediately before the command being undone
+started.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(1,$)v/\fR\fIRE\fR\fB/\fR\fIcommand list\fR\fR
+.ad
+.sp .6
+.RS 4n
+This command is the same as the global command \fBg\fR, except that the lines
+marked during the first step are those that do \fBnot\fR match the \fIRE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(1,$)V/\fR\fIRE\fR\fB/\fR\fR
+.ad
+.sp .6
+.RS 4n
+This command is the same as the interactive global command \fBG\fR, except that
+the lines that are marked during the first step are those that do \fBnot\fR
+match the \fIRE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(1,$)w\fR \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBw\fRrite command writes the addressed lines into \fIfile\fR. If
+\fIfile\fR does not exist, it is created with mode \fB666\fR (readable and
+writable by everyone), unless your file creation mask dictates otherwise. See
+the description of the \fBumask\fR special command on \fBsh\fR(1). The
+currently remembered file name is \fBnot\fR changed unless \fIfile\fR is the
+very first file name mentioned since \fBed\fR was invoked. If no file name is
+given, the currently remembered file name, if any, is used (see the \fBe\fR and
+\fBf\fR commands). The current line (\fB\&.\fR) is unchanged. If the command is
+successful, the number of characters written is printed, unless the \fB-s\fR
+option is specified in the following format:
+.sp
+.in +2
+.nf
+\fB"%d\en",\fR<\fInumber of bytes written\fR>
+.fi
+.in -2
+.sp
+
+If \fIfile\fR is replaced by \fB!\fR, the rest of the line is taken to be a
+shell (see \fBsh\fR(1)) command whose standard input is the addressed lines.
+Such a shell command is \fInot\fR remembered as the current path name. This
+usage of the write command with \fB!\fR is to be considered as a ``last \fBw\fR
+command that wrote the entire buffer''.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(1,$)W\fR \fIfile\fR\fR
+.ad
+.RS 19n
+.rt
+This command is the same as the \fBw\fRrite command above, except that it
+appends the addressed lines to the end of \fIfile\fR if it exists. If
+\fIfile\fR does not exist, it is created as described above for the \fBw\fR
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX\fR\fR
+.ad
+.RS 19n
+.rt
+An educated guess is made to determine whether text read for the \fBe\fR and
+\fBr\fR commands is encrypted. A null key turns off encryption. Subsequent
+\fBe\fR, \fBr\fR, and \fBw\fR commands will use this key to encrypt or decrypt
+the text. An explicitly empty key turns off encryption. Also, see the \fB-x\fR
+option of \fBed\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB($)=\fR\fR
+.ad
+.RS 19n
+.rt
+The line number of the addressed line is written to standard output in the
+following format:
+.sp
+.in +2
+.nf
+\fB"%d\en"\fR<\fIline number\fR>
+.fi
+.in -2
+.sp
+
+The current line number is unchanged by this command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIshell command\fR\fR
+.ad
+.RS 19n
+.rt
+The remainder of the line after the \fB!\fR is sent to the UNIX system shell
+(see \fBsh\fR(1)) to be interpreted as a command. Within the text of that
+command, the unescaped character \fB%\fR is replaced with the remembered file
+name. If a \fB!\fR appears as the first character of the shell command, it is
+replaced with the text of the previous shell command. Thus, \fB!!\fR repeats
+the last shell command. If any replacements of \fB%\fR or \fB!\fR are
+performed, the modified line is written to the standard output before
+\fIcommand\fR is executed. The \fB!\fR command will write:
+.sp
+\fB"!\en"\fR
+.sp
+to standard output upon completion, unless the \fB-s\fR option is specified.
+The current line number is unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(.+1)\fR<new-line>\fR
+.ad
+.RS 19n
+.rt
+An address alone on a line causes the addressed line to be written. A new-line
+alone is equivalent to \fB\&.+1p\fR. It is useful for stepping forward through
+the buffer. The current line number will be set to the address of the written
+line.
+.RE
+
+.sp
+.LP
+If an interrupt signal (ASCII DEL or BREAK) is sent, \fBed\fR writes a
+"\fB?\en\fR" and returns to \fBits\fR command level.
+.sp
+.LP
+The \fBed\fR utility takes the standard action for all signals with the
+following exceptions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSIGINT\fR\fR
+.ad
+.RS 10n
+.rt
+The \fBed\fR utility interrupts its current activity, writes the string
+"\fB?\en\fR" to standard output, and returns to command mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSIGHUP\fR\fR
+.ad
+.RS 10n
+.rt
+If the buffer is not empty and has changed since the last write, the \fBed\fR
+utility attempts to write a copy of the buffer in a file. First, the file named
+\fBed.hup\fR in the current directory is used. If that fails, the file named
+\fBed.hup\fR in the directory named by the \fBHOME\fR environment variable is
+used. In any case, the \fBed\fR utility exits without returning to command
+mode.
+.RE
+
+.sp
+.LP
+Some size limitations are in effect: 512 characters in a line, 256 characters
+in a global command list, and 255 characters in the path name of a file
+(counting slashes). The limit on the number of lines depends on the amount of
+user memory. Each line takes 1 word.
+.sp
+.LP
+When reading a file, \fBed\fR discards \fBASCII\fR and \fBNUL\fR characters.
+.sp
+.LP
+If a file is not terminated by a new-line character, \fBed\fR adds one and puts
+out a message explaining what it did.
+.sp
+.LP
+If the closing delimiter of an \fBRE\fR or of a replacement string (for
+example, \fB/\fR) would be the last character before a new-line, that delimiter
+may be omitted, in which case the addressed line is written. The following
+pairs of commands are equivalent:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs/s1/s2\fR\fR
+.ad
+.RS 11n
+.rt
+\fBs/s1/s2/p\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg/s1\fR\fR
+.ad
+.RS 11n
+.rt
+\fBg/s1/p\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?s1\fR\fR
+.ad
+.RS 11n
+.rt
+\fB?s1?\fR
+.RE
+
+.sp
+.LP
+If an invalid command is entered, \fBed\fR writes the string:
+.sp
+.LP
+\fB"?\en"\fR
+.sp
+.LP
+(followed by an explanatory message if \fIhelp mode\fR has been enabled by the
+\fBH\fR command) to standard output and continues in command mode with the
+current line number unchanged.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 13n
+.rt
+Encryption option. The same as the \fB-x\fR option, except that \fBed\fR
+simulates a \fBC\fR command. The \fBC\fR command is like the \fBX\fR command,
+except that all text read in is assumed to have been encrypted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-p\fR\fIstring\fR \fR
+.ad
+.RS 13n
+.rt
+Allows the user to specify a prompt string. By default, there is no prompt
+string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR | \fB-;\fR\fR
+.ad
+.RS 13n
+.rt
+Suppresses the writing of character counts by \fBe\fR, \fBr\fR, and \fBw\fR
+commands, of diagnostics from \fBe\fR and \fBq\fR commands, and of the \fB!\fR
+prompt after a \fB!\fR\fIshell command\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 13n
+.rt
+Encryption option. When \fB-x\fR is used, \fBed\fR simulates an \fBX\fR command
+and prompts the user for a key. The \fBX\fR command makes an educated guess to
+determine whether text read in is encrypted or not. The temporary buffer file
+is encrypted also, using a transformed version of the key typed in for the
+\fB-x\fR option. See NOTES.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+If \fIfile\fR is specified, \fBed\fR simulates an \fBe\fR command on the file
+named by the path name \fIfile\fR before accepting commands from the standard
+input.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBed\fR and
+\fBred\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
+bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBed\fR: \fBHOME\fR, \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_COLLATE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion without any file or command errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$TMPDIR\fR\fR
+.ad
+.RS 12n
+.rt
+If this environment variable is not \fINULL\fR, its value is used in place of
+\fB/var/tmp\fR as the directory name for the temporary work file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/tmp\fR\fR
+.ad
+.RS 12n
+.rt
+If \fB/var/tmp\fR exists, it is used as the directory name for the temporary
+work file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp\fR\fR
+.ad
+.RS 12n
+.rt
+If the environment variable \fBTMPDIR\fR does not exist or is \fINULL,\fR and
+if \fB/var/tmp\fR does not exist, then \fB/tmp\fR is used as the directory name
+for the temporary work file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBed.hup\fR\fR
+.ad
+.RS 12n
+.rt
+Work is saved here if the terminal is hung up.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/ed, /usr/bin/red"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/ed"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SS "/usr/xpg6/bin/ed"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbfs\fR(1), \fBedit\fR(1), \fBex\fR(1), \fBgrep\fR(1), \fBksh\fR(1),
+\fBsed\fR(1), \fBsh\fR(1), \fBstty\fR(1), \fBumask\fR(1), \fBvi\fR(1),
+\fBfspec\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
+\fBregex\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 9n
+.rt
+for command errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fIfile\fR\fR
+.ad
+.RS 9n
+.rt
+for an inaccessible file. Use the \fBh\fRelp and \fBH\fRelp commands for
+detailed explanations.
+.RE
+
+.sp
+.LP
+If changes have been made in the buffer since the last \fBw\fR command that
+wrote the entire buffer, \fBed\fR warns the user if an attempt is made to
+destroy \fBed\fR's buffer via the \fBe\fR or \fBq\fR commands. It writes
+\fB?\fR and allows one to continue editing. A second \fBe\fR or \fBq\fR command
+at this point will take effect. The \fB-s\fR command-line option inhibits this
+feature.
+.SH NOTES
+.sp
+.LP
+The \fB-\fR option, although it continues to be supported, has been replaced in
+the documentation by the \fB-s\fR option that follows the \fBCommand Syntax
+Standard\fR (see \fBIntro\fR(1)).
+.sp
+.LP
+A \fB!\fR command cannot be subject to a \fBg\fR or a \fBv\fR command.
+.sp
+.LP
+The \fB!\fR command and the \fB!\fR escape from the \fBe\fR, \fBr\fR, and
+\fBw\fR commands cannot be used if the editor is invoked from a restricted
+shell (see \fBsh\fR(1)).
+.sp
+.LP
+The sequence \fB\en\fR in an \fBRE\fR does not match a new-line character.
+.sp
+.LP
+If the editor input is coming from a command file (for example, \fBed\fR
+\fIfile\fR \fB<\fR \fIed_cmd_file\fR), the editor exits at the first failure.
+.sp
+.LP
+Loading an alternate \fBmalloc()\fR library using the environment variable
+\fBLD_PRELOAD\fR can cause problems for \fB/usr/bin/ed\fR.
diff --git a/usr/src/man/man1/egrep.1 b/usr/src/man/man1/egrep.1
new file mode 100644
index 0000000000..3bc038fa91
--- /dev/null
+++ b/usr/src/man/man1/egrep.1
@@ -0,0 +1,395 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH egrep 1 "24 Mar 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+egrep \- search a file for a pattern using full regular expressions
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/egrep\fR [\fB-bchilnsv\fR] \fB-e\fR \fIpattern_list\fR [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/egrep\fR [\fB-bchilnsv\fR] \fB-f\fR \fIfile\fR [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/egrep\fR [\fB-bchilnsv\fR] \fIpattern\fR [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/egrep\fR [\fB-bchilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fB-f\fR \fIfile\fR]
+ [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/egrep\fR [\fB-bchilnqsvx\fR] [\fB-e\fR \fIpattern_list\fR] \fB-f\fR \fIfile\fR
+ [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/egrep\fR [\fB-bchilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBegrep\fR (\fIexpression grep\fR) utility searches files for a pattern of
+characters and prints all lines that contain that pattern. \fBegrep\fR uses
+full regular expressions (expressions that have string values that use the full
+set of alphanumeric and special characters) to match the patterns. It uses a
+fast deterministic algorithm that sometimes needs exponential space.
+.sp
+.LP
+If no files are specified, \fBegrep\fR assumes standard input. Normally, each
+line found is copied to the standard output. The file name is printed before
+each line found if there is more than one input file.
+.SS "/usr/bin/egrep"
+.sp
+.LP
+The \fB/usr/bin/egrep\fR utility accepts full regular expressions as described
+on the \fBregexp\fR(5) manual page, except for \fB\e(\fR and \fB\e)\fR,
+\fB\e(\fR and \fB\e)\fR, \fB\e{\fR and \fB\e}\fR, \fB\e<\fR and \fB\e>\fR, and
+\fB\en\fR, and with the addition of:
+.RS +4
+.TP
+1.
+A full regular expression followed by \fB+\fR that matches one or more
+occurrences of the full regular expression.
+.RE
+.RS +4
+.TP
+2.
+A full regular expression followed by \fB?\fR that matches 0 or 1
+occurrences of the full regular expression.
+.RE
+.RS +4
+.TP
+3.
+Full regular expressions separated by | or by a \fBNEWLINE\fR that match
+strings that are matched by any of the expressions.
+.RE
+.RS +4
+.TP
+4.
+A full regular expression that can be enclosed in parentheses \fB()\fRfor
+grouping.
+.RE
+.sp
+.LP
+Be careful using the characters \fB$\fR, \fB*\fR, \fB[\fR, \fB^\fR, |, \fB(\fR,
+\fB)\fR, and \fB\e\fR in \fIfull regular expression\fR, because they are also
+meaningful to the shell. It is safest to enclose the entire \fIfull regular
+expression\fR in single quotes (\fBa\'\fR\fBa\'\fR).
+.sp
+.LP
+The order of precedence of operators is \fB[\|]\fR, then \fB*\|?\|+\fR, then
+concatenation, then | and NEWLINE.
+.SS "/usr/xpg4/bin/egrep"
+.sp
+.LP
+The \fB/usr/xpg4/bin/egrep\fR utility uses the regular expressions described in
+the \fBEXTENDED REGULAR EXPRESSIONS\fR section of the \fBregex\fR(5) manual
+page.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/egrep\fR and
+\fB/usr/xpg4/bin/egrep\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 19n
+.rt
+Precede each line by the block number on which it was found. This can be useful
+in locating block numbers by context (first block is 0).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 19n
+.rt
+Print only a count of the lines that contain the pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIpattern_list\fR\fR
+.ad
+.RS 19n
+.rt
+Search for a \fIpattern_list\fR (\fIfull regular expression\fR that begins with
+a \fB\(mi\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.RS 19n
+.rt
+Take the list of \fIfull\fR \fIregular\fR \fIexpressions\fR from \fIfile\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 19n
+.rt
+Suppress printing of filenames when searching multiple files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 19n
+.rt
+Ignore upper/lower case distinction during comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 19n
+.rt
+Print the names of files with matching lines once, separated by NEWLINEs. Does
+not repeat the names of files when the pattern is found more than once.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 19n
+.rt
+Precede each line by its line number in the file (first line is 1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 19n
+.rt
+Work silently, that is, display nothing except error messages. This is useful
+for checking the error status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 19n
+.rt
+Print all lines except those that contain the pattern.
+.RE
+
+.SS "/usr/xpg4/bin/egrep"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/egrep\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 6n
+.rt
+Quiet. Does not write anything to the standard output, regardless of matching
+lines. Exits with zero status if an input line is selected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Consider only input lines that use all characters in the line to match an
+entire fixed string or regular expression to be matching lines.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be searched for the patterns. If no \fIfile\fR
+operands are specified, the standard input is used.
+.RE
+
+.SS "/usr/bin/egrep"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specify a pattern to be used during the search for input.
+.RE
+
+.SS "/usr/xpg4/bin/egrep"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specify one or more patterns to be used during the search for input. This
+operand is treated as if it were specified as \fB-e\fR\fIpattern_list.\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBegrep\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBegrep\fR: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
+\fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+If any matches are found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+If no matches are found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+For syntax errors or inaccessible files (even if matches were found).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/egrep"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot Enabled
+.TE
+
+.SS "/usr/xpg4/bin/egrep"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBfgrep\fR(1), \fBgrep\fR(1), \fBsed\fR(1), \fBsh\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBregex\fR(5), \fBregexp\fR(5),
+\fBXPG4\fR(5)
+.SH NOTES
+.sp
+.LP
+Ideally there should be only one \fBgrep\fR command, but there is not a single
+algorithm that spans a wide enough range of space-time trade-offs.
+.sp
+.LP
+Lines are limited only by the size of the available virtual memory.
+.SS "/usr/xpg4/bin/egrep"
+.sp
+.LP
+The \fB/usr/xpg4/bin/egrep\fR utility is identical to \fB/usr/xpg4/bin/grep\fR
+\fB-E\fR. See \fBgrep\fR(1). Portable applications should use
+\fB/usr/xpg4/bin/grep\fR \fB-E\fR.
diff --git a/usr/src/man/man1/eject.1 b/usr/src/man/man1/eject.1
new file mode 100644
index 0000000000..877c7c0e64
--- /dev/null
+++ b/usr/src/man/man1/eject.1
@@ -0,0 +1,258 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH eject 1 "8 Sep 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+eject \- eject media such as CD-ROM and floppy from drive
+.SH SYNOPSIS
+.LP
+.nf
+\fBeject\fR [\fB-dflqt\fR] [ [\fIdevice\fR | \fInickname\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBeject\fR utility is used for those removable media devices that do not
+have a manual eject button, or for those that might be locked due to, for
+instance, being mounted. The device may be specified by its name or by a
+nickname. If no device is specified, the default device is used.
+.sp
+.LP
+Only devices that support \fBeject\fR under program control respond to this
+command.
+.sp
+.LP
+When \fBeject\fR is used on media that can only be ejected manually, it does
+everything except remove the media, including unmounting the file system if it
+is mounted. In this case, \fBeject\fR displays a message that the media can now
+be manually ejected.
+.sp
+.LP
+Do not physically eject media from a device that contains mounted file systems.
+\fBeject\fR automatically searches for any mounted file systems that reside on
+the device, and attempts to umount them prior to ejecting the media. See
+\fBmount\fR(1M). If the unmount operation fails, \fBeject\fR prints a warning
+message and exits. The \fB-f\fR option can be used to specify an eject even if
+the device contains mounted partitions.
+.sp
+.LP
+If you have inserted a floppy diskette, you might need to use \fBvolcheck\fR(1)
+before ejecting the media to inform the system the floppy's presence.
+.sp
+.LP
+Pressing the physical media eject button located on some drives' front panel
+has the same effect as invoking \fBeject\fR for the respective drive. Not all
+drives have this capability.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Display the name of the default device to be ejected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Force the device to eject even if it is busy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Display paths and nicknames of ejectable devices.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 6n
+.rt
+Query to see if the media is present.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Issues the drive a CD-ROM tray close command.
+.sp
+Not all devices support this command.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevice\fR\fR
+.ad
+.RS 12n
+.rt
+Specifies which device to \fBeject\fR, by the name it appears in the directory
+\fB/dev\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fInickname\fR\fR
+.ad
+.RS 12n
+.rt
+Specifies which device to \fBeject\fR, by its nickname as known to this
+command.
+.sp
+Volume label or device type (for example, cdrom or floppy0) can be used as a
+nickname.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fREjecting Media
+.sp
+.LP
+The following example ejects media by its volume label:
+
+.sp
+.in +2
+.nf
+example> \fBeject \&'My Pictures\&'\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fREjecting a Floppy Disk
+.sp
+.LP
+The following example ejects a floppy disk from the first floppy drive:
+
+.sp
+.in +2
+.nf
+example> \fBeject floppy0\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit codes are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+The operation was successful or, with the \fB-q\fR option, the media \fIis\fR
+in the drive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+The operation was unsuccessful or, with the \fB-q\fR option, the media is
+\fInot\fR in the drive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid options were specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+An \fBioctl()\fR request failed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 5n
+.rt
+Manually ejectable media is now okay to remove.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/diskette0\fR\fR
+.ad
+.RS 18n
+.rt
+default diskette file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/sr0\fR\fR
+.ad
+.RS 18n
+.rt
+default \fBCD-ROM\fR file (deprecated)
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBvolcheck\fR(1), \fBmount\fR(1M), \fBrmmount\fR(1M), \fBioctl\fR(2),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/elfdump.1 b/usr/src/man/man1/elfdump.1
new file mode 100644
index 0000000000..3c6d773acf
--- /dev/null
+++ b/usr/src/man/man1/elfdump.1
@@ -0,0 +1,654 @@
+'\" te
+.\" Copyright (c) 2009 by Sun Microsystems, Inc.
+.\" All rights reserved.
+.\" The contents of this file are subject to the
+.\" terms of the Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License. You can
+.\" obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations
+.\" under the License. When distributing Covered Code, include this CDDL HEADER
+.\" in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the fields
+.\" enclosed by brackets "[]" replaced with your own identifying information:
+.\" Portions Copyright [yyyy] [name of copyright owner]
+.TH elfdump 1 "3 Apr 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+elfdump \- dumps selected parts of an object file
+.SH SYNOPSIS
+.LP
+.nf
+\fBelfdump\fR [\fB-cCdegGhHiklmnPrsSuvy\fR] [\fB-p | -w file\fR] [\fB-I\fR \fIindex-expr\fR]
+ [\fB-N\fR \fIname\fR] [\fB-O\fR \fIosabi\fR] [\fB-T\fR \fItype\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBelfdump\fR utility symbolically dumps selected parts of the specified
+object file(s). The options allow specific portions of the file to be
+displayed.
+.sp
+.LP
+The \fBelfdump\fR utility is similar in function to the \fBdump\fR(1) utility.
+The \fBdump\fR utility offers an older and less user-friendly interface than
+\fBelfdump\fR, although \fBdump\fR might be more appropriate for certain uses
+such as in shell scripts.
+.sp
+.LP
+Archive files, produced by \fBar\fR(1), can also be inspected with
+\fBelfdump\fR. In this case, each object within the archive is processed using
+the options supplied.
+.sp
+.LP
+\fBelfdump\fR can display the ELF header, program header array, and section
+header array for any ELF object. It is also able to display the data found in
+the following types of sections:
+.sp
+.in +2
+.nf
+Category Option ELF Section Type
+Dynamic -d SHT_DYNAMIC
+Global Offset Table (GOT) -G Special. See below.
+Group -g SHT_GROUP
+Hardware/Software
+ Capabilities -H SHT_SUNW_cap
+Hash Table -h SHT_HASH
+Interpreter -i Special, see below.
+Move -m SHT_SUNW_move
+Note -n SHT_NOTE
+Relocation -r SHT_RELA
+ SHT_REL
+Stack Unwind/Exceptions -u Special. See below.
+Syminfo -y SHT_SUNW_syminfo
+Symbol Sort -S SHT_SUNW_symsort
+ SHT_SUNW_tlssort
+Symbol Table -s SHT_SYMTAB
+ SHT_DYNSYM
+ SHT_SUNW_LDYNSYM
+ SHT_SUNW_versym
+Versioning -v SHT_SUNW_verdef
+ SHT_SUNW_verneed
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Interpreter and global offset table sections do not have a special ELF section
+type, but are instead implemented as \fBSHT_PROGBITS\fR sections with well
+known names (\fB\&.interp\fR and \fB\&.got\fR respectively). \fBelfdump\fR is
+able to recognize and display these special sections.
+.sp
+.LP
+Sections used for stack unwinding and exception handling can have the ELF
+section type \fBSHT_PROGBITS\fR, or \fBSHT_AMD64_UNWIND\fR, depending on the
+compiler and platform involved. These sections are recognized by name:
+\fB\&.eh_frame\fR, \fB\&.eh_frame_hdr\fR, and \fB\&.exception_ranges\fR.
+.sp
+.LP
+When run without options to narrow the information displayed, \fBelfdump\fR
+displays all available information for each object.
+.sp
+.LP
+For a complete description of the displayed information, refer to the \fILinker
+and Libraries Guide\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps section header information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 18n
+.rt
+Demangles C++ symbol names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.dynamic\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the \fBELF\fR header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.group\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.got\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.hash\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.SUNW_cap\fR hardware and software capabilities
+section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.interp\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIindex-expr\fR\fR
+.ad
+.RS 18n
+.rt
+Qualifies the sections or program headers to examine with a specific index or
+index range. For example, the third section header in a file can be displayed
+using:
+.sp
+.in +2
+.nf
+example% \fBelfdump -c -I 3 \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+An \fIindex-expr\fR can be a single non-negative integer value that specifies a
+specific item, as shown in the previous example. Alternatively, an
+\fIindex-expr\fR can consist of two such values separated by a colon (:),
+indicating a range of items. The following example displays the third, fourth,
+and fifth program headers in a file:
+.sp
+.in +2
+.nf
+example% \fBelfdump -p -I 3:5 \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+When specifying an index range, the second value can be omitted to indicate the
+final item in the file. For example, the following statement lists all section
+headers from the tenth to the end:
+.sp
+.in +2
+.nf
+example% \fBelfdump -c -I 10: \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 18n
+.rt
+Calculates the \fBELF\fR checksum. See \fBgelf_checksum\fR(3ELF).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+Displays long section names without truncation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.SUNW_move\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of \fB\&.note\fR sections. By default, \fBelfdump\fR
+displays this data without interpretation in hexadecimal form. Core files are
+an exception. A subset of the core file notes described in \fBcore\fR(4) are
+interpreted by \fBelfdump\fR and displayed in a high level format: NT_PRSTATUS,
+NT_PRPSINFO, NT_PLATFORM, NT_AUXV, NT_ASRS, NT_PSTATUS, NT_PSINFO, NT_PRCRED,
+NT_UTSNAME, NT_LWPSTATUS, NT_LWPSINFO, NT_PRPRIV, NT_PRPRIVINFO, NT_CONTENT,
+and NT_ZONENAME.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIname\fR\fR
+.ad
+.RS 18n
+.rt
+Qualifies the sections or program headers to examine with a specific name. For
+example, in a file that contains more than one symbol table, the
+\fB\&.dynsym\fR symbol table can be displayed by itself using:
+.sp
+.in +2
+.nf
+example% \fBelfdump -N .dynsym \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+ELF program headers do not have names. If the \fB-p\fR option is specified,
+\fIname\fR refers to the program header type, and the behavior of the \fB-N\fR
+option is identical to that of the \fB-T\fR option. For example, the program
+header that identifies an interpreter can be displayed using:
+.sp
+.in +2
+.nf
+example% \fBelfdump -p -N PT_INTERP \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIosabi\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the Operating System ABI to apply when interpreting the object.
+\fIosabi\fR can be the name or value of any of the \fBELFOSABI_\fR constants
+found in \fB/usr/include/sys/elf.h\fR. For convenience, the \fBELFOSABI_\fR
+prefix may be omitted from these names. Two \fIosabi\fR values are fully
+supported: \fBsolaris\fR is the native ABI of the Solaris operating system.
+\fBnone\fR is the generic ELF ABI. Support for other operating system ABIs may
+be incomplete or missing. Items for which strings are unavailable are displayed
+in numeric form.
+.sp
+If \fB-O\fR is not used, and the object ELF header specifies a non-generic ABI,
+the ABI specified by the object is used. If the object specifies the generic
+ELF ABI, \fBelfdump\fR searches for a \fB\&.note.ABI-tag\fR section, and if
+found, identifies the object as having the \fBlinux\fR ABI. Otherwise, an
+object that specifies the generic ELF ABI is assumed to conform to the
+\fBsolaris\fR ABI.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the program headers. Individual program headers can be specified using
+the matching options (\fB-I\fR, \fB-N\fR, \fB-T\fR). See Matching Options for
+additional information.
+.sp
+The \fB-p\fR and \fB-w\fR options are mutually exclusive. Only one of these
+options can be used in a given \fBelfdump\fR invocation
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 18n
+.rt
+Generate and use alternative section header information based on the
+information from the program headers, ignoring any section header information
+contained in the file. If the file has no section headers a warning message is
+printed and this option is automatically selected. Section headers are not used
+by the system to execute a program. As such, a malicious program can have its
+section headers stripped or altered to provide misleading information. In
+contrast the program headers must be accurate for the program to be runnable.
+The use of synthetic section header information derived from the program
+headers allows files with altered section headers to be examined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.rel\fR[\fBa\fR] relocation sections.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.SUNW_ldynsym\fR, \fB\&.dynsym\fR, and
+\fB\&.symtab\fR symbol table sections. For archives, the archive symbol table
+is also dumped. Individual sections can be specified with the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR). An archive symbol table can be specified using
+the special section name \fB-N\fR \fBARSYM\fR.
+.sp
+In the case of core files, the \fBshndx\fR field has the value "\fBunknown\fR"
+since the field does not contain the valid values.
+.sp
+In addition to the standard symbol table information, the version definition
+index of the symbol is also provided under the \fBver\fR heading.
+.sp
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.SUNW_ldynsym\fR and \fB\&.dynsym\fR symbol
+table sections sorted in the order given by the \fB\&.SUNW_dynsymsort\fR and
+\fB\&.SUNW_dyntlssort\fR symbol sort sections. Thread Local Storage (TLS)
+symbols are sorted by offset. Regular symbols are sorted by address. Symbols
+not referenced by the sort sections are not displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItype\fR\fR
+.ad
+.RS 18n
+.rt
+Qualifies the sections or program headers to examine with a specific type. For
+example, in a file that contains more than one symbol table, the
+\fB\&.dynsym\fR symbol table can be displayed by itself using:
+.sp
+.in +2
+.nf
+example% \fBelfdump -T SHT_DYNSYM \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+The value of \fItype\fR can be a numeric value, or any of the \fBSHT_\fR
+symbolic names defined in \fB/usr/include/sys/elf.h\fR. The \fBSHT_\fR prefix
+is optional, and \fItype\fR is case insensitive. Therefore, the above example
+can also be written as:
+.sp
+.in +2
+.nf
+example% \fBelfdump -T dynsym \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+If the \fB-p\fR option is specified, \fItype\fR refers to the program header
+type, which allows for the display of specific program headers. For example,
+the program header that identifies an interpreter can be displayed using:
+.sp
+.in +2
+.nf
+example% \fBelfdump -p -T PT_INTERP \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+The value of \fItype\fR can be a numeric value, or any of the \fBPT_\fR
+symbolic names defined in \fB/usr/include/sys/elf.h\fR. The \fBPT_\fR prefix is
+optional, and \fItype\fR is case insensitive. Therefore, the above example can
+also be written as:
+.sp
+.in +2
+.nf
+example% \fBelfdump -p -T interp \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of sections used for stack frame unwinding and exception
+processing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.SUNW\fR\fI_version\fR version sections.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIfile\fR\fR
+.ad
+.RS 18n
+.rt
+Writes the contents of sections which are specified with the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR) to the named file. For example, extracting the
+\fB\&.text\fR section of a file can be carried out with:
+.sp
+.in +2
+.nf
+example% \fBelfdump -w text.out -N .text \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR, \fB-T\fR).
+.sp
+The \fB-p\fR and \fB-w\fR options are mutually exclusive. Only one of these
+options can be used in a given \fBelfdump\fR invocation
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 18n
+.rt
+Dumps the contents of the \fB\&.SUNW_syminfo\fR section.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+The name of the specified object file.
+.RE
+
+.SH USAGE
+.SS "Matching Options"
+.sp
+.LP
+The options \fB-I\fR, \fB-N\fR, and \fB-T\fR are collectively referred to as
+the \fBmatching options\fR. These options are used to narrow the range of
+program headers or sections to examine, by index, name, or type.
+.sp
+.LP
+The exact interpretation of the matching options depends on the other options
+used:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When used with the \fB-p\fR option, the matching options reference program
+headers. \fB-I\fR refers to program header indexes. \fB-T\fR refers to program
+header types. As program headers do not have names, the \fB-N\fR option behaves
+identically to \fB-T\fR for program headers.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The matching options are used to select sections by index, name, or type when
+used with any of the options \fB-c\fR, \fB-g\fR, \fB-m\fR, \fB-n\fR, \fB-r\fR,
+\fB-s\fR, \fB-S\fR, \fB-u\fR, or \fB-w\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If matching options are used alone without any of the options \fB-c\fR,
+\fB-g\fR, \fB-m\fR, \fB-n\fR, \fB-p\fR\fB-r\fR, \fB-s\fR, \fB-S\fR, \fB-u\fR,
+or \fB-w\fR, then \fBelfdump\fR examines each object, and displays the contents
+of any sections matched.
+.RE
+.sp
+.LP
+Any number and type of matching option can be mixed in a given invocation of
+\fBelfdump\fR. In this case, \fBelfdump\fR displays the superset of all items
+matched by any of the matching options used. This feature allows for the
+selection of complex groupings of items using the most convenient form for
+specifying each item.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBliblddbg.so\fR\fR
+.ad
+.RS 15n
+.rt
+linker debugging library
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBdump\fR(1), \fBnm\fR(1), \fBpvs\fR(1), \fBelf\fR(3ELF),
+\fBcore\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/elfedit.1 b/usr/src/man/man1/elfedit.1
new file mode 100644
index 0000000000..2fb4add659
--- /dev/null
+++ b/usr/src/man/man1/elfedit.1
@@ -0,0 +1,1142 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems Inc. All
+.\" Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH elfedit 1 "28 Jan 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+elfedit \- examine or edit ELF files
+.SH SYNOPSIS
+.LP
+.nf
+\fBelfedit\fR [\fB-adr\fR] [\fB-e\fR \fIcmd\fR] [\fB-L\fR \fIpath\fR] [\fB-o\fR \fBdefault\fR | \fBsimple\fR | \fBnum\fR]
+ [\fIinfile\fR] [\fIoutfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBelfedit\fR is a tool for examining or modifying the contents of an existing
+ELF object. Specifically, \fBelfedit\fR is used to modify the ELF metadata
+contained in the object. Access is provided to most of the ELF data contained
+in an object, including the ELF header, section header table, program header
+table, dynamic section, hardware and software capabilities, string tables, and
+symbol tables.
+.SS "Syntax"
+.sp
+.LP
+\fBelfedit\fR processes commands from the command line (\fB-e\fR option) or
+from standard input. If standard input is a terminal, \fBelfedit\fR provides
+terminal editing capabilities, as well as extensive command completion. ELF
+uses many standard symbolic names for special integer values and bit masks.
+\fBelfedit\fR is aware of most possible completions for such names. You can
+press TAB at any point while entering an \fBelfedit\fR command to cause
+\fBelfedit\fR to display a usage message and any known completions for the text
+at the current cursor.
+.sp
+.LP
+\fBelfedit\fR functionality is organized in the form of modules. Each module
+delivers a set of commands, focused on related functionality. A command is
+specified by combining the module and command names with a colon (\fB:\fR)
+delimiter, with no intervening white space. For example, \fBdyn:runpath\fR
+refers to the \fBrunpath\fR command provided by the \fBdyn\fR module. Module
+names must be unique. The command names within a given module are unique within
+that module, but the same command names can be used in more than one module.
+.sp
+.LP
+Some modules designate one of their commands to be the default command for that
+module. This command is run when the user specifies only a module name. Most
+\fBelfedit\fR modules supply a command named dump, which produces the same
+information displayed by the \fBelfdump\fR utility for the part of the ELF file
+covered by the module. It is common for a module to specify dump as its default
+command.
+.sp
+.LP
+The syntax used to execute an \fBelfedit\fR command is intended to be familiar
+to anyone who uses UNIX command line utilities. It consists of white space
+delimited tokens. The first token is the command name. Options, which are
+arguments that start with the hyphen (\fB-\fR) character follow the command.
+Plain arguments (operands) follow the options. There can be \fB0\fR or more
+options and operands for a given command, but if they are present, options
+always precede plain arguments. The special option, \fB--\fR, (two hyphens) can
+be used to delimit the end of the options. When it is encountered, any
+remaining arguments are considered to be plain arguments even if they start
+with a \fB-\fR.
+.sp
+.LP
+The interpretation of the characters in an \fBelfedit\fR token depends on the
+style of quoting used:
+.sp
+.ne 2
+.mk
+.na
+\fBUnquoted\fR
+.ad
+.RS 17n
+.rt
+Outside of single (') or double (") quotes, backslash (\) acts as an escape
+character. When a backslash character is seen, \fBelfedit\fR ignores it, and
+treats the character following it literally (even if the following character is
+itself a backslash). This feature can be used to insert a white space character
+into a string argument to a command without having it split the string into two
+separate tokens. Similarly, it can be used to insert a quote or backslash as a
+literal character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSingle Quotes\fR
+.ad
+.RS 17n
+.rt
+Within single quotes ('), white space characters do not delimit tokens, and are
+interpreted as literal characters within the token. Double quote (") and
+backslash (\) characters are interpreted as literal characters, and have no
+special meaning.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBDouble Quotes\fR
+.ad
+.RS 17n
+.rt
+Within double quotes ("), white space characters do not delimit tokens. Single
+quote characters are interpreted literally and do not have a quoting function.
+Backslash (\) is an escape character which operates similarly to the way it is
+used in the C programming language within a string literal:
+.sp
+.ne 2
+.mk
+.na
+\fB\a\fR
+.ad
+.RS 8n
+.rt
+alert (bell)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\b\fR
+.ad
+.RS 8n
+.rt
+backspace
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\f\fR
+.ad
+.RS 8n
+.rt
+form feed
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\n\fR
+.ad
+.RS 8n
+.rt
+newline
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\r\fR
+.ad
+.RS 8n
+.rt
+return
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\t\fR
+.ad
+.RS 8n
+.rt
+horizontal tab
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\v\fR
+.ad
+.RS 8n
+.rt
+vertical tab
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\\\fR
+.ad
+.RS 8n
+.rt
+backslash
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\'\fR
+.ad
+.RS 8n
+.rt
+single quote
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\"\fR
+.ad
+.RS 8n
+.rt
+double quote
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\ooo\fR
+.ad
+.RS 8n
+.rt
+An octal constant, where ooo is one to three octal digits (0...7)
+.RE
+
+Any other character following a backslash is an error.
+.RE
+
+.sp
+.LP
+The core commands belong to an internal module named \fBsys\fR. All other
+modules are packaged as dynamically loadable sharable objects. \fBelfedit\fR
+loads modules on demand, when a command that requires it is executed, or as the
+result of executing the \fBsys:load\fR command. Due to its special built in
+status, and because its commands are used heavily, \fBelfedit\fR allows you to
+specify commands from the \fBsys\fR module without including the \fBsys:\fR
+prefix, for example, \fBload\fR rather than \fBsys:load\fR. To access a command
+from any other module, you must specify the full \fImodule\fR\fB:\fR\fIcmd\fR
+form.
+.sp
+.LP
+\fBelfedit\fR is delivered with the following standard modules:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcap\fR\fR
+.ad
+.RS 11n
+.rt
+Capabilities Section
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdyn\fR\fR
+.ad
+.RS 11n
+.rt
+Dynamic Section
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBehdr\fR\fR
+.ad
+.RS 11n
+.rt
+ELF Header
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBphdr\fR\fR
+.ad
+.RS 11n
+.rt
+Program Header Array
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshdr\fR\fR
+.ad
+.RS 11n
+.rt
+Section Header Array
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstr\fR\fR
+.ad
+.RS 11n
+.rt
+String Table Section
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsym\fR\fR
+.ad
+.RS 11n
+.rt
+Symbol Table Section
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsyminfo\fR\fR
+.ad
+.RS 11n
+.rt
+\fBSyminfo\fR Section
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsys\fR\fR
+.ad
+.RS 11n
+.rt
+Core built in \fBelfedit\fR commands
+.RE
+
+.SS "Status And Command Documentation"
+.sp
+.LP
+Status And Command Documentation
+.sp
+.LP
+The status (\fBsys:status\fR) command displays information about the current
+\fBelfedit\fR session:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Input and output files
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Option setting
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Module search path
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Modules loaded
+.RE
+.sp
+.LP
+Included with every \fBelfedit\fR module is extensive online documentation for
+every command, in a format similar to UNIX manual pages. The \fBhelp\fR
+(\fBsys:help\fR) command is used to display this information. To learn more
+about \fBelfedit\fR, start \fBelfedit\fR and use the help command without
+arguments:
+.sp
+.in +2
+.nf
+% elfedit
+> help
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBelfedit\fR displays a welcome message with more information about
+\fBelfedit\fR, and on how to use the help system.
+.sp
+.LP
+To obtain summary information for a module:
+.sp
+.in +2
+.nf
+> help module
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To obtain the full documentation for a specific command provided by a module:
+.sp
+.in +2
+.nf
+> help module:command
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Using the \fBdyn\fR module and \fBdyn:runpath\fR commands as examples:
+.sp
+.in +2
+.nf
+> help dyn
+> help dyn:runpath
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+help (\fBsys:help\fR) can be used to obtain help on itself:
+.sp
+.in +2
+.nf
+> help help
+.fi
+.in -2
+.sp
+
+.SS "Module Search Path"
+.sp
+.LP
+\fBelfedit\fR modules are implemented as sharable objects which are loaded on
+demand. When a module is required, \fBelfedit\fR searches a module path in
+order to locate the sharable object that implements the module. The path is a
+sequence of directory names delimited by colon (\fB:\fR) characters. In
+addition to normal characters, the path can also contain any of the following
+tokens:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%i\fR\fR
+.ad
+.RS 6n
+.rt
+Expands to the current instruction set architecture (ISA) name (\fBsparc\fR,
+\fBsparcv9\fR, \fBi386\fR, \fBamd64\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%I\fR\fR
+.ad
+.RS 6n
+.rt
+Expands to the 64-bit ISA. This is the same thing as \fB%i\fR for 64-bit
+versions of \fBelfedit\fR, but expands to the empty string for 32-bit versions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%o\fR\fR
+.ad
+.RS 6n
+.rt
+Expands to the old value of the path being modified. This is useful for
+appending or prepending directories to the default path.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%r\fR\fR
+.ad
+.RS 6n
+.rt
+Root of file system tree holding the \fBelfedit\fR program, assuming that
+\fBelfedit\fR is installed as \fBusr/bin/elfedi\fRt within the tree. On a
+standard system, this is simply the standard system root directory (\fB/\fR).
+On a development system, where the copy of \fBelfedit\fR can be installed
+elsewhere, the use of \fB%r\fR can be used to ensure that the matching set of
+modules are used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 6n
+.rt
+Expands to a single \fB%\fR character
+.RE
+
+.sp
+.LP
+The default module search path for \fBelfedit\fR is:
+.sp
+.in +2
+.nf
+%r/usr/lib/elfedit/%I
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Expanding the tokens, this is:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/elfedit\fR\fR
+.ad
+.RS 28n
+.rt
+32-bit \fBelfedit\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/elfedit/sparcv9\fR\fR
+.ad
+.RS 28n
+.rt
+64-bit \fBelfedit\fR (\fBsparc\fR)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/elfedit/amd64\fR\fR
+.ad
+.RS 28n
+.rt
+64-bit \fBelfedit\fR (\fBx86\fR)
+.RE
+
+.sp
+.LP
+The default search path can be changed by setting the \fBELFEDIT_PATH\fR
+environment variable, or by using the \fB-L\fR command line option. If you
+specify both, the \fB-L\fR option supersedes the environment variable.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 29n
+.rt
+Enable \fBautoprint\fR mode. When \fBautoprint\fR is enabled, \fBelfedit\fR
+prints the modified values that result when the ELF file is modified. This
+output is shown in the current output style, which can be changed using the
+\fB-o\fR option. The default output style is the style used by the
+\fBelfdump\fR(1) utility. \fBautoprint\fR mode is the default when
+\fBelfedit\fR is used interactively (when \fBstdin\fR and \fBstdout\fR are
+terminals). Therefore, the \fB-a\fR option only has meaning when \fBelfedit\fR
+is used in non-interactive contexts. To disable \fBautoprint\fR in an
+interactive session, use the \fBelfedit\fR command:
+.sp
+.in +2
+.nf
+> set a off
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 29n
+.rt
+If set, this option causes \fBelfedit\fR to issue informational messages
+describing its internal operations and details of the ELF object being
+processed. This can be useful when a deep understanding of the operation being
+carried out is desired.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIcmd\fR\fR
+.ad
+.RS 29n
+.rt
+Specifies an edit command. Multiple \fB-e\fR options can be specified. If edit
+commands are present on the command line, \fBelfedit\fR operates in batch mode.
+After opening the file, \fBelfedit\fR executes each command in the order given,
+after which the modified file is saved and \fBelfedit\fR exits. Batch mode is
+useful for performing simple operations from shell scripts and makefiles.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fIpath\fR\fR
+.ad
+.RS 29n
+.rt
+Sets default path for locating \fBelfedit\fR modules. Modules are described in
+\fBModule Search Path\fR section of this manual page..
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fBdefault\fR | \fBsimple\fR | \fBnum\fR\fR
+.ad
+.RS 29n
+.rt
+The style used to display ELF data. This option establishes the current style
+for the session. It can be changed from within the \fBelfedit\fR session by
+using the set (\fBsys:set\fR) command, or by providing \fB-o\fR options to the
+individual commands executed within the session.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefault\fR\fR
+.ad
+.RS 11n
+.rt
+The default style is to display output in a format intended for human viewing.
+This style is similar to that used by the \fBelfdump\fR utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnum\fR\fR
+.ad
+.RS 11n
+.rt
+Integer values are always shown in integer form. Strings are shown as the
+integer offset into the containing string table.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsimple\fR\fR
+.ad
+.RS 11n
+.rt
+When displaying strings from within the ELF file, only the string is displayed.
+Integer values are displayed as symbolic constants if possible, and in integer
+form otherwise. No titles, headers, or other supplemental output is shown.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 29n
+.rt
+Read-only mode. The input file is opened for read-only access, and the results
+of the edit session are not saved. \fBelfedit\fR does not allow the
+\fIoutfile\fR argument when \fB-r\fR is specified. Read-only mode is highly
+recommended when there is no intention to modify the file. In addition to
+providing extra protection against accidental modification, it allows for the
+examination of files for which the user does not have write permission.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinfile\fR\fR
+.ad
+.RS 11n
+.rt
+Input file containing an ELF object to process.
+.sp
+This can be an executable (\fBET_EXEC\fR), shared object (\fBET_DYN\fR), or
+relocatable object file, (\fBET_REL\fR). Archives are not directly supported.
+To edit an object in an archive, you must extract the object, edit the copy,
+and then insert it back into the archive.
+.sp
+If no \fIinfile\fR is present, \fBelfedit\fR runs in a limited mode that only
+allows executing commands from the \fBsys:\fR module. This mode is primarily to
+allow access to the command documentation available from the help
+(\fBsys:help\fR) command.
+.sp
+If \fIinfile\fR is present, and no \fIoutfile\fR is given, \fBelfedit\fR edits
+the file in place, and writes the results into the same file, causing the
+original file contents to be overwritten. It is usually recommended that
+\fBelfedit\fR not be used in this mode, and that an output file be specified.
+Once the resulting file has been tested and validated, it can be moved into the
+place of the original file.
+.sp
+The \fB-r\fR option can be used to open \fIinfile\fR for read-only access. This
+can be useful for examining an existing file that you do not wish to modify.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoutfile\fR\fR
+.ad
+.RS 11n
+.rt
+Output file. If both \fIinfile\fR and \fIoutfile\fR are present, \fIinfile\fR
+is opened for read-only access, and the modified object contents are written to
+\fIoutfile\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+When supported by the system, \fBelfedit\fR runs as a 64-bit application,
+capable of processing files greater than or equal to 2 Gbytes (2^31 bytes).
+.sp
+.LP
+At startup, \fBelfedit\fR uses \fBlibelf\fR to open the input file and cache a
+copy of its contents in memory for editing. It can then execute one or more
+commands. A session finishes by optionally writing the modified object to the
+output file, and then exiting.
+.sp
+.LP
+If no \fIinfile\fR is present, \fBelfedit\fR runs in a limited mode that only
+allows executing commands from the \fBsys\fR module. This mode is primarily to
+allow access to the command documentation available from the help
+(\fBsys:help\fR) command.
+.sp
+.LP
+If one or more \fB-e\fR options are specified, the commands they supply are
+executed in the order given. \fBelfedit\fR adds implicit calls to write
+(\fBsys:write\fR) and quit (\fBsys:qui\fRt) immediately following the given
+commands, causing the output file to be written and the \fBelfedit\fR process
+to exit. This form of use is convenient in shell scripts and makefiles.
+.sp
+.LP
+If no \fB-e\fR options are specified, \fBelfedit\fR reads commands from
+\fBstdin\fR and executes them in the order given. The caller must explicitly
+issue the write (\fBsys:write\fR) and quit (\fBsys:quit\fR) commands to save
+their work and exit when running in this mode.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+A fatal error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+In the following examples, interactive use of \fBelfedit\fR is shown with the
+shell prompt (\fB%\fR) and the \fBelfedit\fR prompt (\fB>\fR). Neither of these
+characters should be entered by the user.
+.LP
+\fBExample 1 \fRChanging the Runpath of an Executable
+.sp
+.LP
+The following example presupposes an executable named \fBprog\fR, installed in
+a bin directory that has an adjacent lib directory for sharable objects. The
+following command sets the \fBrunpath\fR of that executable to the \fBlib\fR
+directory:
+
+.sp
+.in +2
+.nf
+elfedit -e 'dyn:runpath $ORIGIN/../lib'
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The use of single quotes with the argument to the \fB-e\fR option is necessary
+to ensure that the shell passes the entire command as a single argument to
+\fBelfedit\fR.
+
+.sp
+.LP
+Alternatively, the same operation can be done using \fBelfedit\fR in its
+non-batch mode:
+
+.sp
+.in +2
+.nf
+% elfedit prog
+> dyn:runpath $ORIGIN/../lib
+ index tag value
+ [30] RUNPATH 0x3e6 $ORIGIN/../lib
+> write
+> quit
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The addition or modification of elements such as \fBrunpath\fR or needed
+entries might only be achievable when \fBpadding\fR exists within the objects.
+See \fBNotes\fR.
+
+.LP
+\fBExample 2 \fRRemoving a Hardware Capability Bit
+.sp
+.LP
+Objects that require optional hardware support to run are built with a
+capability section that contains a mask of bits specifying which capabilities
+they need. The runtime linker (\fBld.so.1\fR) checks this mask against the
+attributes of the running system to determine whether a given object is able to
+be run by the current system. Programs that require abilities not available on
+the system are prevented from running.
+
+.sp
+.LP
+This check prevents a naive program that does not explicitly check for the
+hardware support it requires from crashing in a confusing manner. However, it
+can be inconvenient for a program that is written to explicitly check the
+system capabilities at runtime. Such a program might have optimized code to use
+when the hardware supports it while providing a generic fallback version that
+can be run, albeit more slowly, otherwise. In this case, the hardware
+compatibility mask prevents such a program from running on the older hardware.
+In such a case, removing the relevant bit from the mask allows the program to
+run.
+
+.sp
+.LP
+The following example removes the \fBAV_386_SSE\fR3 hardware capability from an
+x86 binary that uses the SSE3 CPU extension. This transfers responsibility for
+validating the ability to use SSE3 from the runtime linker to the program
+itself:
+
+.sp
+.in +2
+.nf
+elfedit -e 'cap:hw1 -and -cmp sse3' prog
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRReading Information From an Object
+.sp
+.LP
+\fBelfedit\fR can be used to extract specific targeted information from an
+object. The following shell command reads the number of section headers
+contained in the file \fB/usr/bin/ls\fR:
+
+.sp
+.in +2
+.nf
+% SHNUM=`elfedit -r -onum -e 'ehdr:e_shnum' /usr/bin/ls`
+% echo $SHNUM
+29
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+You might get a different value, depending on the version of Solaris and type
+of machine that you are using. The \fB-r\fR option causes the file to be opened
+read-only, allowing a user with ordinary access permissions to open the file,
+and protecting against accidental damage to an important system executable. The
+\fBnum\fR output style is used in order to obtain only the desired value,
+without any extraneous text.
+
+.sp
+.LP
+Similarly, the following extracts the symbol type of the symbol \fBunlink\fR
+from the C runtime library:
+
+.sp
+.in +2
+.nf
+% TYPE=`elfedit -r -osimple -e 'sym:st_type unlink' /lib/libc.so`
+% echo $TYPE
+STT_FUNC
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBELFEDIT_PATH\fR\fR
+.ad
+.RS 16n
+.rt
+Alters the default module search path. Module search paths are discussed in the
+\fBModule Search Path\fR section of this manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOEXEC_64\fR\fR
+.ad
+.RS 16n
+.rt
+Suppresses the automatic execution of the 64-bit \fBelfedit\fR. By default, the
+64-bit version of \fBelfedit\fR runs if the system is 64-bit capable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPAGER\fR\fR
+.ad
+.RS 16n
+.rt
+Interactively delivers output from \fBelfedit\fR to the screen. If not set,
+\fBmore\fR is used. See \fBmore\fR(1).
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/elfedit\fR\fR
+.ad
+.RS 20n
+.rt
+Default directory for \fBelfedit\fR modules that are loaded on demand to supply
+editing commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.teclarc\fR\fR
+.ad
+.RS 20n
+.rt
+Personal \fBtecla\fR customization file for command line editing. See
+\fBtecla\fR(5).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdump\fR(1), \fBelfdump\fR(1), \fBld.so.1\fR(1), \fBmore\fR(1), \fBnm\fR(1),
+\fBpvs\fR(1), \fBelf\fR(3ELF), \fBlibelf\fR(3LIB), \fBtecla\fR(5),
+\fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.SH WARNINGS
+.sp
+.LP
+\fBelfedit\fR is designed to be a tool for testing and development of the ELF
+system. It offers the ability to examine and change nearly every piece of ELF
+metadata in the object. It quietly allows edits that can produce an invalid or
+unusable ELF file. The user is expected to have knowledge of the ELF format and
+of the rules and conventions that govern them. The \fILinker and Libraries
+Guide\fR can be helpful when using \fBelfedit\fR.
+.sp
+.LP
+\fBelfedit\fR allows the user to alter the ELF metadata in an object, but
+cannot understand or alter the code of the actual program. Setting ELF
+attributes such as types, sizes, alignments, and so forth in a manner that does
+not agree with the actual contents of the file is therefore likely to yield a
+broken and unusable output object. Such changes might be useful for testing of
+linker components, but should be avoided otherwise.
+.sp
+.LP
+Higher level operations, such as the use of the \fBdyn:runpath\fR command to
+change the \fBrunpath\fR of an object, are safe, and can be carried out without
+the sort of risk detailed in this section.
+.SH NOTES
+.sp
+.LP
+Not every ELF operation supported by \fBelfedit\fR can be successfully carried
+out on every ELF object. \fBelfedit\fR is constrained by the existing sections
+found in the file.
+.sp
+.LP
+One area of particular interest is that \fBelfedit\fR might not be able to
+modify the \fBrunpath\fR of a given object. To modify a \fBrunpath\fR, the
+following must be true:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The desired string must already exist in the dynamic string table, or there
+must be enough reserved space within this section for the new string to be
+added. If your object has a string table reservation area, the value of the
+\fB\&.dynamic DT_SUNW_STRPAD\fR element indicates the size of the area. The
+following \fBelfedit\fR command can be used to check this:
+.sp
+.in +2
+.nf
+% elfedit -r -e 'dyn:tag DT_SUNW_STRPAD' file
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The dynamic section must already have a \fBrunpath\fR element, or there must be
+an unused dynamic slot available where one can be inserted. To test for the
+presence of an existing \fBrunpath\fR:
+.sp
+.in +2
+.nf
+% elfedit -r -e 'dyn:runpath' file
+.fi
+.in -2
+.sp
+
+A dynamic section uses an element of type \fBDT_NULL\fR to terminate the array
+found in that section. The final \fBDT_NULL\fR cannot be changed, but if there
+are more than one of these, \fBelfedit\fR can convert one of them into a
+\fBrunpath\fR element. To test for extra dynamic slots:
+.sp
+.in +2
+.nf
+% elfedit -r -e 'dyn:tag DT_NULL' file
+.fi
+.in -2
+.sp
+
+.RE
+.sp
+.LP
+Older objects do not have the extra space necessary to complete such
+operations. The space necessary to do so was introduced in the Solaris Express
+Community Edition release.
+.sp
+.LP
+When an operation fails, the detailed information printed using the \fB-d\fR
+(debug) option can be very helpful in uncovering the reason why.
+.sp
+.LP
+\fBelfedit\fR modules follow a convention by which commands that directly
+manipulate a field in an ELF structure have the same name as the field, while
+commands that implement higher level concepts do not. For instance, the command
+to manipulate the \fBe_flags\fR field in the ELF header is named
+\fBehdr:e_flags\fR. Therefore, you generally find the command to modify ELF
+fields by identifying the module and looking for a command with the name of the
+field.
diff --git a/usr/src/man/man1/elfsign.1 b/usr/src/man/man1/elfsign.1
new file mode 100644
index 0000000000..7a07a4764a
--- /dev/null
+++ b/usr/src/man/man1/elfsign.1
@@ -0,0 +1,483 @@
+'\" te
+.\" Copyright 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced
+.\" with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH elfsign 1 "7 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+elfsign \- sign binaries
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/elfsign\fR sign [\fB-a\fR] [\fB-v\fR] \fB-k\fR \fIprivate_key\fR \fB-c\fR \fIcertificate_file\fR
+ \fB-e\fR \fIelf_object\fR [\fB-F\fR \fIformat\fR] [file]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/elfsign\fR sign [\fB-a\fR] [\fB-v\fR] \fB-c\fR \fIcertificate_file\fR
+ \fB-e\fR \fIelf_object\fR \fB-T\fR \fItoken_label\fR [\fB-P\fR \fIpin_file\fR] [\fB-F\fR \fIformat\fR] [file]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/elfsign\fR verify [\fB-c\fR \fIcertificate_file\fR]
+ [\fB-v\fR] \fB-e\fR \fIelf_object\fR [file]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/elfsign\fR request \fB-r\fR \fIcertificate_request_file\fR
+ {\fB-k\fR \fIprivate_key\fR | \fB-T\fR \fItoken_label\fR}
+.fi
+
+.LP
+.nf
+\fB/usr/bin/elfsign\fR \fIlist\fR \fB-f\fR \fIfield\fR \fB-c\fR \fIcertificate_file\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/elfsign\fR \fIlist\fR \fB-f\fR \fIfield\fR \fB-e\fR \fIelf_object\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist\fR\fR
+.ad
+.RS 11n
+.rt
+Lists on standard output information from a single certificate file or signed
+elf object. The selected field appears on a single line. If the field specified
+does not apply to the named file, the command terminates with no standard
+output. This output of this subcommand is intended for use in scripts and by
+other commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrequest\fR\fR
+.ad
+.RS 11n
+.rt
+Generates a private key and a PKCS#10 certificate request. The PKCS#10
+certificate request for use with the Solaris Cryptographic Framework. If the
+private key is to be created in a token device, elfsign prompts for the PIN
+required to update the token device. The PKCS#10 certificate request should be
+sent to the email address \fIsolaris-crypto-req@sun.com\fR to obtain a
+Certificate.
+.sp
+Users of \fBelfsign\fR must first generate a certificate request and obtain a
+certificate before signing binaries for use with the Solaris Cryptographic
+Framework.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsign\fR\fR
+.ad
+.RS 11n
+.rt
+Signs the elf object, using the given private key and certificate file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverify\fR\fR
+.ad
+.RS 11n
+.rt
+Verifies an existing signed object. Uses the certificate given or searches for
+an appropriate certificate in \fB/etc/crypto/certs\fR if \fB-c\fR is not given.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Generates a signed \fBELF\fR Sign Activation (\fB\&.esa\fR) file. This option
+is used when a cryptographic provider has nonretail export approval for
+unrestricted use and desires retail approval by restricting which export
+sensitive callers (for example, IPsec) can use the provider. This option
+assumes that the provider binary has previously been signed with a restricted
+certificate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcertificate_file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the path to an X.509 certificate in PEM/PKCS#7 or ASN.1 BER format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIelf_object\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the path to the object to be signed or verified.
+.sp
+The \fB-e\fR option can be specified multiple times for signing or verifying
+multiple objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIformat\fR\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBsign\fR subcommand, specifies the format of the signature. The valid
+format options are
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsa_md5_sha1\fR\fR
+.ad
+.RS 16n
+.rt
+Default format Solaris 10 and updates, The \fBrsa_md5_sha1\fR format is
+Obsolete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsa_sha1\fR\fR
+.ad
+.RS 16n
+.rt
+Default format for this release.
+.RE
+
+Formats other than \fBrsa_md5_sha1\fR include an informational timestamp with
+the signature indicating when the signature was applied. This timestamp is not
+cryptographically secure, nor is it used as part of verification.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfield\fR\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBlist\fR subcommand, specifies what field should appear in the
+output.
+.sp
+The valid field specifiers for a certifiicate file are:
+.sp
+.ne 2
+.mk
+.na
+\fBsubject\fR
+.ad
+.RS 11n
+.rt
+Subject DN (Distinguished Name)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBissuer\fR
+.ad
+.RS 11n
+.rt
+Issuer DN
+.RE
+
+The valid field specifiers for an elf object are:
+.sp
+.ne 2
+.mk
+.na
+\fBformat\fR
+.ad
+.RS 10n
+.rt
+Format of the signature
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsigner\fR
+.ad
+.RS 10n
+.rt
+Subject DN of the certificate used to sign the object
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBtime\fR
+.ad
+.RS 10n
+.rt
+Time the signature was applied, in the locale's default format
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIprivate_key\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the location of the private key file when not using a PKCS#11 token.
+This file is an RSA Private key file in a Solaris specific format. When used
+with the \fBrequest\fR subcommand, this is the ouput file for the newly
+generated key.
+.sp
+It is an error to specify both the \fB-k\fR and \fB-T\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpin_file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the file which holds the PIN for accessing the token device. If the
+PIN is not provided in a \fIpin_file\fR, \fBelfsign\fR prompts for the PIN.
+.sp
+It is an error to specify the \fB-P\fR option without the \fB-T\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIcertificate_request_file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the path to the certificate request file, which is in PKCS#10 format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItoken_label\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the label of the PCKS#11 token device, as provided by \fBpktool\fR,
+which holds the private key.
+.sp
+It is an error to specify both the \fB-T\fR and \fB-k\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Requests more detailed information. The additional output includes the signer
+and, if the signature format contains it, the time the object was signed. This
+is not stable parseable output.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+One or more elf objects to be signed or verified. At least one elf object must
+be specified either via the -e option or after all other options.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSigning an ELF Object Using a Key/Certificate in a File
+.sp
+.in +2
+.nf
+example$ elfsign sign -k myprivatekey -c mycert -e lib/libmylib.so.1
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRVerifying an \fBelf\fR Object's Signature
+.sp
+.in +2
+.nf
+example$ elfsign verify -c mycert -e lib/libmylib.so.1
+elfsign: verification of lib/libmylib.so.1 passed
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRGenerating a Certificate Request
+.sp
+.in +2
+.nf
+example$ elfsign request -k mykey -r req.pkcs10
+Enter Company Name / Stock Symbol or some other globally
+unique identifier.
+This will be the prefix of the Certificate DN: SUNW
+
+The government of the United States of America restricts the export of
+"open cryptographic interfaces", also known as "crypto-with-a-hole".
+Due to this restriction, all providers for the Solaris cryptographic
+framework must be signed, regardless of the country of origin.
+
+The terms "retail" and "non-retail" refer to export classifications for
+products manufactured in the USA. These terms define the portion of the
+world where the product may be shipped.) Roughly speaking, "retail" is
+worldwide (minus certain excluded nations) and "non-retail" is domestic
+only (plus some highly favored nations).
+If your provider is subject to USA export control, then you
+must obtain an export approval (classification)
+from the government of the USA before exporting your provider.
+It is critical that you specify the obtained (or expected, when
+used during development) classification to the following questions
+so that your provider will be appropriately signed.
+
+Do you have retail export approval for use without restrictions
+based on the caller (for example, IPsec)? [Yes/No] \fBNo\fR
+
+If you have non-retail export approval for unrestricted use of your
+provider by callers, are you also planning to receive retail
+approval by restricting which export sensitive callers
+(for example, IPsec) may use your provider? [Yes/No] \fBNo\fR
+
+[...]
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRDetermining Information About an Object
+.sp
+.in +2
+.nf
+example$ elfsign list -f format -e lib/libmylib.so.1
+rsa_md5_sha1
+
+example$ elfsign list -f signer -e lib/libmylib.so.1
+CN=VENDOR, OU=Software Development, O=Vendor Inc.
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+
+.sp
+.TS
+tab();
+cw(1i) cw(3i) cw(1.5i)
+lw(1i) lw(3i) lw(1.5i)
+.
+VALUEMEANINGSUB-COMMAND
+\fB0\fROperation successfulsign/verify/request
+\fB1\fRInvalid arguments
+\fB2\fRFailed to verify ELF object verify
+3Unable to open ELF objectsign/verify
+4Unable to load or invalid certificatesign/verify
+5T{
+Unable to load private key, private key is invalid, or token label is invalid
+T}sign
+6Failed to add signaturesign
+7T{
+Attempt to verify unsigned object or object not an ELF file
+T}verify
+.TE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/crypto/certs\fR\fR
+.ad
+.RS 21n
+.rt
+Directory searched for the \fBverify\fR subcommand if the \fB-c\fR flag is not
+used
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBelfsign\fR command and subcommands are Committed. While applications
+should not depend on the output format of \fBelfsign\fR, the output format of
+the \fBlist\fR subcommand is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBdate\fR(1), \fBpktool\fR(1), \fBcryptoadm\fR(1M), \fBlibpkcs11\fR(3LIB),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/elfwrap.1 b/usr/src/man/man1/elfwrap.1
new file mode 100644
index 0000000000..4e2b75d33a
--- /dev/null
+++ b/usr/src/man/man1/elfwrap.1
@@ -0,0 +1,217 @@
+'\" te
+.\" Copyright (c) 2008 by Sun Microsystems, Inc. All rights reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH elfwrap 1 "17 March 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+elfwrap \- wrap data in an \fBELF\fR file
+.SH SYNOPSIS
+.LP
+.nf
+\fBelfwrap\fR [\fB-64\fR] [\fB-o\fR \fIrelobj-file\fR] [\fB-z\fR target=\fBsparc\fR | \fBx86\fR]
+\fIdata-file\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBelfwrap\fR utility creates an \fBELF\fR relocatable object file from one
+or more data files. The relocatable object encapsulates each data file within
+an individual section, together with symbols that can be used to reference the
+section. The relocatable object is appropriate for inclusion with a subsequent
+link-edit. Users can reference the encapsulated data using the associated
+symbols.
+.sp
+.LP
+By default, a 32-bit \fBELF\fR relocatable object is created that is
+appropriate for the machine on which \fBelfwrap\fR is executed. The \fB-64\fR
+option can be used to create a 64-bit \fBELF\fR relocatable object. The \fB-z
+target\fR option can be used to create a relocatable object for a specific
+machine type.
+.LP
+Note -
+.sp
+.RS 2
+Any data encapsulated with \fBelfwrap\fR must be in a format appropriate for
+the destination target.
+.RE
+.sp
+.LP
+By default, the relocatable object \fBa.wrap.o\fR is created. The \fB-o\fR
+option can be used to specify an alternative relocatable object name.
+.sp
+.LP
+The \fBbasename\fR(1) of each data file is used to create various pieces of
+\fBELF\fR information. For example, if the input data file is
+\fBISV/isv-data\fR, the following \fBELF\fR information is created within the
+relocatable object.
+.sp
+.ne 2
+.mk
+.na
+\fBAn \fBELF\fR section named \fB\&.isv-data\fR\fR
+.ad
+.sp .6
+.RS 4n
+This section contains the entire contents of the input data file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBAn \fBELF\fR symbol named \fBisv-data_start\fR\fR
+.ad
+.sp .6
+.RS 4n
+This symbol reflects the starting address of the \fB\&.isv-data\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBAn \fBELF\fR symbol named \fBisv-data_end\fR\fR
+.ad
+.sp .6
+.RS 4n
+This symbol reflects the address of the first location after the
+\fB\&.isv-data\fR section.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Create a 64-bit \fBELF\fR relocatable object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIrelobj-file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Produce a relocatable object that is named \fIrelobj-file\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR target=\fBsparc\fR | \fBx86\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the machine type for the output relocatable object. Supported targets
+are \fBsparc\fR and \fBx86\fR. The 32-bit machine type for the specified target
+is used unless the \fB-64\fR option is also present, in which case the
+corresponding 64-bit machine type is used. By default, the relocatable object
+that is generated is 32-bit for the machine one which \fBelfwrap\fR is
+executed.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The following example encapsulates the system \fBpasswd\fR file and the system
+\fBgroup\fR file within a relocatable object \fBpassgroup.o\fR.
+.sp
+.in +2
+.nf
+example% \fBelfwrap -o passgroup.o /etc/passwd /etc/group\fR
+example% \fBelfdump -s passgroup.o | egrep "passwd|group"\fR
+ [2] 0x00000000 0x00000000 SECT LOCL D 0 .passwd
+ [3] 0x00000000 0x00000000 SECT LOCL D 0 .group
+ [7] 0x00000000 0x000002f0 OBJT GLOB D 0 .passwd passwd_start
+ [8] 0x000002f0 0x00000000 OBJT GLOB D 0 .passwd passwd_end
+ [9] 0x00000000 0x00000121 OBJT GLOB D 0 .group group_start
+ [10] 0x00000121 0x00000000 OBJT GLOB D 0 .group group_end
+example% \fBstrings -N.passwd passgroup.o | head -1\fR
+root:x:0:0:Super-User:/:/sbin/sh
+example% \fBstrings -N.group passgroup.o | head -1\fR
+root::0:
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This relocatable object can be referenced from the following user code.
+.sp
+.in +2
+.nf
+example% \fBcat main.c\fR
+#include <stdio.h>
+
+extern char passwd_start, passwd_end;
+
+void main()
+{
+ char *pstart = &passwd_start, *pend = &passwd_end;
+ char *str, *lstr;
+
+ for (lstr = str = pstart; str < pend; str++) {
+ if ((*str == '\n') && (str != (pend - 1))) {
+ (void) printf("%.*s", (++str - lstr), lstr);
+ lstr = str;
+ }
+ }
+}
+example% \fBcc -o main main.c passgroup.o\fR
+example% \fB\&./main\fR
+root:x:0:0:Super-User:/:/sbin/sh
+\&....
+nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/:
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa.wrap.o\fR\fR
+.ad
+.RS 12n
+.rt
+The default relocatable object file created.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBelfdump\fR(1), \fBld\fR(1), \fBstrings\fR(1), \fBelf\fR(3ELF),
+\fBattributes\fR(5), \fBddi_modopen\fR(9F)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/enable.1 b/usr/src/man/man1/enable.1
new file mode 100644
index 0000000000..276d9d4a82
--- /dev/null
+++ b/usr/src/man/man1/enable.1
@@ -0,0 +1,212 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH enable 1 "5 Jun 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+enable, disable \- enable/disable LP printers
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/enable\fR \fIprinter\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/disable\fR [\fB-c\fR | \fB-W\fR] [\fB-r\fR [\fIreason\fR]] \fIprinter\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBenable\fR command activates printers, enabling them to print requests
+submitted by the \fBlp\fR command. \fBenable\fR must be run on the printer
+server.
+.sp
+.LP
+The \fBdisable\fR command deactivates printers, disabling them from printing
+requests submitted by the \fBlp\fR command. By default, any requests that are
+currently printing on \fIprinter\fR are reprinted in their entirety either on
+\fIprinter\fR or another member of the same class of printers. The
+\fBdisable\fR command must be run on the print server.
+.sp
+.LP
+Use \fBlpstat\fR \fB-p\fR to check the status of printers.
+.sp
+.LP
+Generally, \fBenable\fR and \fBdisable\fR are run on the print server to
+control local print queues. Under some configurations, they can also be run on
+client systems when IPP is being used to communicate between client and server.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for use with \fBdisable\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 15n
+.rt
+Cancels any requests that are currently printing on \fIprinter\fR. This option
+cannot be used with the \fB-W\fR option. If the printer is remote, the \fB-c\fR
+option is silently ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fR
+.ad
+.RS 15n
+.rt
+Waits until the request currently being printed is finished before disabling
+\fIprinter\fR. This option cannot be used with the \fB-c\fR option. If the
+printer is remote, the \fB-W\fR option is silently ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR [\fIreason\fR]\fR
+.ad
+.RS 15n
+.rt
+Assigns a \fIreason\fR for the disabling of the printer(s). This \fIreason\fR
+applies to all printers specified. This \fIreason\fR is reported by
+\fBlpstat\fR \fB-p\fR. Enclose \fIreason\fR in quotes if it contains blanks.
+The default reason is \fBunknown reason\fR for the existing printer, and
+\fB"new printer"\fR for a printer added to the system but not yet enabled.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported for both \fBenable\fR and \fBdisable\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprinter\fR\fR
+.ad
+.RS 11n
+.rt
+The name of the printer to be enabled or disabled. Specify \fIprinter\fR using
+atomic or URI-style (\fIscheme\fR\fB://\fR\fIendpoint\fR) names. See
+\fBprinters.conf\fR(4) regarding the naming conventions for destinations.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/printers.conf\fR\fR
+.ad
+.RS 24n
+.rt
+System printer configuration database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.printers\fR\fR
+.ad
+.RS 24n
+.rt
+User-configurable printer database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBou=printers\fR\fR
+.ad
+.RS 24n
+.rt
+LDAP version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.conf.byname\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.org_dir\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS+\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityObsolete
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlp\fR(1), \fBlpstat\fR(1), \fBprinters.conf\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+When IPP is in use, the user is prompted for a passphsrase if the remote print
+service is configured to require authentication.
diff --git a/usr/src/man/man1/encrypt.1 b/usr/src/man/man1/encrypt.1
new file mode 100644
index 0000000000..4e1373f027
--- /dev/null
+++ b/usr/src/man/man1/encrypt.1
@@ -0,0 +1,408 @@
+'\" te
+.\" Copyright 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH encrypt 1 "17 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+encrypt, decrypt \- encrypt or decrypt files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/encrypt\fR \fB-l\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/encrypt\fR \fB-a\fR \fIalgorithm\fR [\fB-v\fR]
+ [\fB-k\fR \fIkey_file\fR | \fB-K\fR \fIkey_label\fR [\fB-T\fR \fItoken_spec\fR]]
+ [\fB-i\fR \fIinput_file\fR] [\fB-o\fR \fIoutput_file\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/decrypt\fR \fB-l\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/decrypt\fR \fB-a\fR \fIalgorithm\fR [\fB-v\fR]
+ [\fB-k\fR \fIkey_file\fR | \fB-K\fR \fIkey_label\fR [\fB-T\fR \fItoken_spec\fR]]
+ [\fB-i\fR \fIinput_file\fR] [\fB-o\fR \fIoutput_file\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This utility encrypts or decrypts the given file or stdin using the algorithm
+specified. If no output file is specified, output is to standard out. If input
+and output are the same file, the encrypted output is written to a temporary
+work file in the same filesystem and then used to replace the original file.
+.sp
+.LP
+On decryption, if the input and output are the same file, the cleartext
+replaces the ciphertext file.
+.sp
+.LP
+The output file of \fBencrypt\fR and the input file for \fBdecrypt\fR contains
+the following information:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Output format version number, 4 bytes in network byte order. The current
+version is 1.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Iterations used in key generation function, 4 bytes in network byte order.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+IV (\fBivlen\fR bytes)[1]. iv data is generated by random bytes equal to one
+block size.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Salt data used in key generation (16 bytes).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Cipher text data.
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIalgorithm\fR\fR
+.ad
+.RS 18n
+.rt
+Specify the name of the algorithm to use during the encryption or decryption
+process. See USAGE, \fBAlgorithms\fR for details.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIinput_file\fR\fR
+.ad
+.RS 18n
+.rt
+Specify the input file. Default is stdin if \fIinput_file\fR is not specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIkey_file\fR\fR
+.ad
+.RS 18n
+.rt
+Specify the file containing the key value for the encryption algorithm. Each
+algorithm has specific key material requirements, as stated in the PKCS#11
+specification. If \fB-k\fR is not specified, \fBencrypt\fR prompts for key
+material using \fBgetpassphrase\fR(3C). The size of the key file determines the
+key length, and passphrases set from the terminal are always used to generate
+128 bit long keys for ciphers with a variable key length.
+.sp
+For information on generating a key file, see the \fBgenkey\fR subcommand in
+\fBpktool\fR(1). Alternatively, \fBdd\fR(1M) can be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR \fIkey_label\fR\fR
+.ad
+.RS 18n
+.rt
+Specify the label of a symmetric token key in a PKCS#11 token.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+Display the list of algorithms available on the system. This list can change
+depending on the configuration of the cryptographic framework. The keysizes are
+displayed in bits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutput_file\fR\fR
+.ad
+.RS 18n
+.rt
+Specify output file. Default is stdout if \fIoutput_file\fR is not specified.
+If stdout is used without redirecting to a file, the terminal window can appear
+to hang because the raw encrypted or decrypted data has disrupted the terminal
+emulation, much like viewing a binary file can do at times.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItoken_spec\fR\fR
+.ad
+.RS 18n
+.rt
+Specify a PKCS#11 token other than the default soft token object store when the
+\fB-K\fR is specified.
+.sp
+\fItoken_spec\fR has the format of:
+.sp
+.in +2
+.nf
+\fItoken_name\fR \fB[:\fR\fImanuf_id\fR \fB[:\fR\fIserial_no\fR\fB]]\fR
+.fi
+.in -2
+.sp
+
+When a token label contains trailing spaces, this option does not require them
+to be typed as a convenience to the user.
+.sp
+Colon separates token identification string. If any of the parts have a literal
+colon (\fB:\fR) character, it must be escaped by a backslash (\fB\e\fR). If a
+colon (\fB:\fR) is not found, the entire string (up to 32 characters) is taken
+as the token label. If only one colon (\fB:\fR) is found, the string is the
+token label and the manufacturer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Display verbose information. See \fBVerbose\fR.
+.RE
+
+.SH USAGE
+.SS "Algorithms"
+.sp
+.LP
+The supported algorithms are displayed with their minimum and maximum key sizes
+in the \fB-l\fR option. These algorithms are provided by the cryptographic
+framework. Each supported algorithm is an alias of the PKCS #11 mechanism that
+is the most commonly used and least restricted version of a particular
+algorithm type. For example, \fBdes\fR is an alias to \fBCKM_DES_CBC_PAD\fR and
+\fBarcfour\fR is an alias to \fBCKM_RC4\fR. Algorithm variants with no padding
+or \fBECB\fR are not supported.
+.sp
+.LP
+These aliases are used with the \fB-a\fR option and are case-sensitive.
+.SS "Passphrase"
+.sp
+.LP
+When the \fB-k\fR option is not used during encryption and decryption tasks,
+the user is prompted for a passphrase. The passphrase is manipulated into a
+more secure key using the PBKDF2 algorithm specified in PKCS #5.
+.sp
+.LP
+When a passphrase is used with encrypt and decrypt, the user entered passphrase
+is turned into an encryption key using the \fBPBKDF2\fR algorithm as defined
+defined in http://www.rsasecurity.com, \fBPKCS #5 v2.0.\fR
+.SS "Verbose"
+.sp
+.LP
+If an input file is provided to the command, a progress bar spans the screen.
+The progress bar denotes every 25% completed with a pipe sign (\fB|\fR). If the
+input is from standard input, a period (\fB\&.\fR) is displayed each time 40KB
+is read. Upon completion of both input methods, \fBDone\fR is printed.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRListing Available Algorithms
+.sp
+.LP
+The following example lists available algorithms:
+
+.sp
+.in +2
+.nf
+example$ encrypt -l
+ Algorithm Keysize: Min Max
+ -----------------------------------
+ aes 128 128
+ arcfour 8 128
+ des 64 64
+ 3des 192 192
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fREncrypting Using AES
+.sp
+.LP
+The following example encrypts using AES and prompts for the encryption key:
+
+.sp
+.in +2
+.nf
+example$ encrypt -a aes -i myfile.txt -o secretstuff
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fREncrypting Using AES with a Key File
+.sp
+.LP
+The following example encrypts using AES after the key file has been created:
+
+.sp
+.in +2
+.nf
+example$ pktool genkey keystore=file keytype=aes keylen=128 \e
+ outkey=key
+example$ encrypt -a aes -k key -i myfile.txt -o secretstuff
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRUsing an In Pipe to Provide Encrypted Tape Backup
+.sp
+.LP
+The following example uses an in pipe to provide encrypted tape backup:
+
+.sp
+.in +2
+.nf
+example$ ufsdump 0f - /var | encrypt -a arcfour \e
+ -k /etc/mykeys/backup.k | dd of=/dev/rmt/0
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRUsing an In Pipe to Restore Tape Backup
+.sp
+.LP
+The following example uses and in pipe to restore a tape backup:
+
+.sp
+.in +2
+.nf
+example$ decrypt -a arcfour -k /etc/mykeys/backup.k \e
+ -i /dev/rmt/0 | ufsrestore xvf -
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fREncrypting an Input File Using the 3DES Algorithm
+.sp
+.LP
+The following example encrypts the \fBinputfile\fR file with the 192-bit key
+stored in the \fBdes3key\fR file:
+
+.sp
+.in +2
+.nf
+example$ encrypt -a 3des -k des3key -i inputfile -o outputfile
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fREncrypting an Input File with a DES token key
+.sp
+.LP
+The following example encrypts the input file file with a DES token key in the
+soft token keystore. The DES token key can be generated with \fBpktool\fR(1):
+
+.sp
+.in +2
+.nf
+example$ encrypt -a des -K mydeskey \e
+ -T "Sun Software PKCS#11 softtoken" -i inputfile \e
+ -o outputfile
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdigest\fR(1), \fBpktool\fR(1), \fBmac\fR(1), \fBdd\fR(1M),
+\fBgetpassphrase\fR(3C), \fBlibpkcs11\fR(3LIB), \fBattributes\fR(5),
+\fBpkcs11_softtoken\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Security Services\fR
+.sp
+.LP
+RSA PKCS#11 v2.11: http://www.rsasecurity.com
+.sp
+.LP
+RSA PKCS#5 v2.0: http://www.rsasecurity.com
diff --git a/usr/src/man/man1/enhance.1 b/usr/src/man/man1/enhance.1
new file mode 100644
index 0000000000..b3ca67cda6
--- /dev/null
+++ b/usr/src/man/man1/enhance.1
@@ -0,0 +1,100 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH enhance 1 "18 May 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+enhance \- enhanced command-line editing facilities
+.SH SYNOPSIS
+.LP
+.nf
+\fBenhance\fR \fIcommand\fR [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBenhance\fR program provides enhanced command-line editing facilities to
+users of third party applications, to which one doesn't have any source code.
+It does this by placing a pseudo-terminal between the application and the real
+terminal. It uses the \fBtecla\fR command-line editing library to read input
+from the real terminal, then forwards each just completed input line to the
+application via the pseudo-terminal. All output from the application is
+forwarded back unchanged to the real terminal.
+.sp
+.LP
+Whenever the application stops generating output for more than a tenth of a
+second, the enhance program treats the latest incomplete output line as the
+prompt, and re-displays any incompleted input line that the user has typed
+after it. The small delay, which is imperceptible to the user, isn't necessary
+for correct operation of the program. It is just an optimization, designed to
+stop the input line from being re-displayed so often that it slows down output.
+.sp
+.LP
+The user-level command-line editing facilities provided by the Tecla library
+are documented in the \fBtecla\fR(5) man page
+.SS "DEFICIENCIES"
+.sp
+.LP
+The one major problem that hasn't been solved yet, is how to deal with
+applications that change whether typed input is echo'd by their controlling
+terminal. For example, programs that ask for a password, such as \fBftp\fR and
+\fBtelnet\fR, temporarily tell their controlling terminal not to echo what the
+user types. Since this request goes to the application side of the pseudo
+terminal, the enhance program has no way of knowing that this has happened, and
+continues to echo typed input to its controlling terminal, while the user types
+their password.
+.sp
+.LP
+Furthermore, before executing the host application, the enhance program
+initially sets the pseudo terminal to \fBnoecho\fR mode, so that everything
+that it sends to the program doesn't get redundantly echoed. If a program that
+switches to \fBnoecho\fR mode explicitly restores echoing afterwards, rather
+than restoring the terminal modes that were previously in force, then
+subsequently, every time that you enter a new input line, a duplicate copy will
+be displayed on the next line.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/libtecla.so\fR\fR
+.ad
+.RS 24n
+.rt
+\fBtecla\fR library
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.teclarc\fR\fR
+.ad
+.RS 24n
+.rt
+\fBtecla\fR personal customization file.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlibtecla\fR(3LIB), \fBattributes\fR(5), \fBtecla\fR(5)
diff --git a/usr/src/man/man1/env.1 b/usr/src/man/man1/env.1
new file mode 100644
index 0000000000..540586ee45
--- /dev/null
+++ b/usr/src/man/man1/env.1
@@ -0,0 +1,231 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH env 1 "2 Jan 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+env \- set environment for command invocation
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/env\fR [\fB-i\fR | \fB-\fR] [\fIname=value\fR]... [\fIutility\fR [\fIarg\fR... ]]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/env\fR [\fB-i\fR | \fB-\fR] [\fIname=value\fR]...
+ [\fIutility\fR [\fIarg\fR... ]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBenv\fR utility obtains the current environment, modifies it according to
+its arguments, then invokes the utility named by the \fIutility\fR operand with
+the modified environment.
+.sp
+.LP
+Optional arguments are passed to \fIutility\fR. If no \fIutility\fR operand is
+specified, the resulting environment is written to the standard output, with
+one \fIname\fR\fB=\fR\fIvalue\fR pair per line.
+.SS "\fB/usr/bin\fR"
+.sp
+.LP
+If \fBenv\fR executes commands with arguments, it uses the default shell
+\fB/usr/bin/sh\fR (see \fBsh\fR(1)).
+.SS "\fB/usr/xpg4/bin\fR"
+.sp
+.LP
+If \fBenv\fR executes commands with arguments, it uses \fB/usr/xpg4/bin/sh\fR
+(see \fBksh\fR(1)).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR | \fB\(mi\fR \fR
+.ad
+.RS 14n
+.rt
+Ignores the environment that would otherwise be inherited from the current
+shell. Restricts the environment for \fIutility\fR to that specified by the
+arguments.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fB=\fR\fIvalue\fR \fR
+.ad
+.RS 15n
+.rt
+Arguments of the form \fIname\fR\fB=\fR\fIvalue\fR modify the execution
+environment, and are placed into the inherited environment before \fIutility\fR
+is invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIutility\fR \fR
+.ad
+.RS 15n
+.rt
+The name of the utility to be invoked. If \fIutility\fR names any of the
+special shell built-in utilities, the results are undefined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIarg\fR \fR
+.ad
+.RS 15n
+.rt
+A string to pass as an argument for the invoked utility.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRInvoking utilities with new PATH values
+.sp
+.LP
+The following utility:
+
+.sp
+.in +2
+.nf
+example% \fBenv -i PATH=/mybin mygrep xyz myfile \fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+invokes the utility \fBmygrep\fR with a new \fBPATH\fR value as the only entry
+in its environment. In this case, \fBPATH\fR is used to locate \fBmygrep\fR,
+which then must reside in \fB/mybin\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBenv\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 8n
+.rt
+Determine the location of the \fIutility\fR. If \fBPATH\fR is specified as a
+\fIname\fR=\fIvalue\fR operand to \fBenv\fR, the value given shall be used in
+the search for \fIutility\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+If \fIutility\fR is invoked, the exit status of \fBenv\fR is the exit status of
+\fIutility\fR. Otherwise, the \fBenv\fR utility returns one of the following
+exit values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 10n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1-125\fR \fR
+.ad
+.RS 10n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR \fR
+.ad
+.RS 10n
+.rt
+\fIutility\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR \fR
+.ad
+.RS 10n
+.rt
+\fIutility\fR could not be found.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+.TE
+
+.SS "/usr/xpg4/bin"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh\fR(1), \fBsh\fR(1), \fBexec\fR(2), \fBprofile\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/eqn.1 b/usr/src/man/man1/eqn.1
new file mode 100644
index 0000000000..36c85cd6b4
--- /dev/null
+++ b/usr/src/man/man1/eqn.1
@@ -0,0 +1,536 @@
+'\" te
+.\" Copyright (C) 2002, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH eqn 1 "12 Jul 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+eqn, neqn, checkeq \- typeset mathematics test
+.SH SYNOPSIS
+.LP
+.nf
+\fBeqn\fR [\fB-d\fR \fIxy\fR] [\fB -f\fR \fIn\fR] [\fB-p\fR \fIn\fR] [\fB -s\fR \fIn\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBneqn\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBcheckeq\fR [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBeqn\fR and \fBneqn\fR are language processors to assist in describing
+equations. \fBeqn\fR is a preprocessor for \fBtroff\fR(1) and is intended for
+devices that can print \fBtroff\fR's output. \fBneqn\fR is a preprocessor for
+\fBnroff\fR(1) and is intended for use with terminals. Usage is almost always:
+.sp
+.in +2
+.nf
+example% \fBeqn file ... | troff\fR
+example% \fBneqn file ... | nroff\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If no \fIfile\fRs are specified, \fBeqn\fR and \fBneqn\fR read from the
+standard input. A line beginning with \fB\&.EQ\fR marks the start of an
+equation. The end of an equation is marked by a line beginning with
+\fB\&.EN\fR. Neither of these lines is altered, so they may be defined in macro
+packages to get centering, numbering, and so on. It is also possible to set
+two characters as ``delimiters''; subsequent text between delimiters is also
+treated as \fBeqn\fR input.
+.sp
+.LP
+\fBcheckeq\fR reports missing or unbalanced delimiters and
+\fB\&.EQ\fR/\fB\&.EN\fR pairs.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fIxy\fR \fR
+.ad
+.RS 9n
+.rt
+Sets equation delimiters set to characters \fIx\fR and \fIy\fR with the
+command-line argument. The more common way to do this is with \fBdelim\fR\fI
+xy\fR between \fB\&.EQ\fR and \fB\&.EN\fR. The left and right delimiters may be
+identical. Delimiters are turned off by \fBdelim\fR \fBoff\fR appearing in the
+text. All text that is neither between delimiters nor between \fB\&.EQ\fR and
+\fB\&.EN\fR is passed through untouched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fIn\fR \fR
+.ad
+.RS 9n
+.rt
+Changes font to \fIn\fR globally in the document. The font can also be changed
+globally in the body of the document by using the \fBgfont\fR\fI n\fR
+directive, where \fIn\fR is the font specification.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fIn\fR \fR
+.ad
+.RS 9n
+.rt
+Reduces subscripts and superscripts by \fIn\fR point sizes from the previous
+size. In the absence of the \fB-p\fR option, subscripts and superscripts are
+reduced by 3 point sizes from the previous size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIn\fR \fR
+.ad
+.RS 9n
+.rt
+Changes point size to \fIn\fR globally in the document. The point size can also
+be changed globally in the body of the document by using the \fBgsize\fR\fI
+n\fR directive, where \fIn\fR is the point size.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 9n
+.rt
+The nroff or troff file processed by \fBeqn\fR or \fBneqn\fR.
+.RE
+
+.SH EQN LANGUAGE
+.sp
+.LP
+The nroff version of this description depicts the output of \fBneqn\fR to the
+terminal screen exactly as \fBneqn\fR is able to display it. To see an
+accurate depiction of the output, view the printed version of this page.
+.sp
+.LP
+Tokens within \fBeqn\fR are separated by braces, double quotes, tildes,
+circumflexes, SPACE, TAB, or NEWLINE characters. Braces {\|} are used for
+grouping. Generally speaking, anywhere a single character like \fIx\fR could
+appear, a complicated construction enclosed in braces may be used instead. A
+tilde (\fB~\fR) represents a full SPACE in the output; a circumflex (\fB^\fR)
+half as much.
+.sp
+.ne 2
+.mk
+.na
+\fBSubscripts and superscripts:\fR
+.ad
+.sp .6
+.RS 4n
+These are produced with the keywords \fBsub\fR and \fBsup\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx sub i\fR\fR
+.ad
+.RS 29n
+.rt
+makes
+.EQ
+delim $$
+.EN
+$x sub i$
+.sp
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa sub i sup 2\fR \fR
+.ad
+.RS 29n
+.rt
+produces
+.EQ
+delim $$
+.EN
+$a sub i sup 2$
+.sp
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe sup {x sup 2 + y sup 2}\fR\fR
+.ad
+.RS 29n
+.rt
+gives e^(x^2+y^2)
+.sp
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBFractions:\fR
+.ad
+.sp .6
+.RS 4n
+Fractions are made with \fBover\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa over b\fR \fR
+.ad
+.RS 13n
+.rt
+yields
+.EQ
+delim $$
+.EN
+$a over b$
+.sp
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSquare Roots:\fR
+.ad
+.sp .6
+.RS 4n
+These are made with \fBsqrt\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1 over sqrt {ax sup 2 +bx+c}\fR \fR
+.ad
+.sp .6
+.RS 4n
+results in
+.EQ
+delim $$
+.EN
+$1 over sqrt {ax sup 2 +bx+c}$
+.sp
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBLimits:\fR
+.ad
+.sp .6
+.RS 4n
+The keywords \fBfrom\fR and \fBto\fR introduce lower and upper limits on
+arbitrary things:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlim from {n\(-> inf } sum from 0 to n x sub i\fR\fR
+.ad
+.sp .6
+.RS 4n
+ makes
+.EQ
+delim $$
+.EN
+$lim from {n\(-> inf } sum from 0 to n x sub i$
+.sp
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBBrackets and Braces:\fR
+.ad
+.sp .6
+.RS 4n
+Left and right brackets, braces, and the like, of the right height are made
+with \fBleft\fR and \fBright\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBleft [ x sup 2 + y sup 2 over alpha right ] ~=~1\fR \fR
+.ad
+.sp .6
+.RS 4n
+produces
+.EQ
+delim $$
+.EN
+$left [ x sup 2 + y sup 2 over alpha right ] ~=~1$
+.sp
+.sp
+The \fBright\fR clause is optional. Legal characters after \fBleft\fR and
+\fBright\fR are braces, brackets, bars, \fBc\fR and \fBf\fR for ceiling and
+floor, and \fB""\fR for nothing at all (useful for a right-side-only bracket).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBVertical piles:\fR
+.ad
+.sp .6
+.RS 4n
+Vertical piles of things are made with \fBpile\fR, \fBlpile\fR, \fBcpile\fR,
+and \fBrpile\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpile {a above b above c}\fR\fR
+.ad
+.RS 28n
+.rt
+ produces
+.EQ
+delim $$
+.EN
+$pile {a above b above c}$
+.sp
+.sp
+There can be an arbitrary number of elements in a pile. \fBlpile\fR
+left-justifies, \fBpile\fR and \fBcpile\fR center, with different vertical
+spacing, and \fBrpile\fR right justifies.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBMatrices:\fR
+.ad
+.sp .6
+.RS 4n
+Matrices are made with \fBmatrix\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmatrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }\fR \fR
+.ad
+.sp .6
+.RS 4n
+produces
+.EQ
+delim $$
+.EN
+$matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$
+.sp
+.sp
+In addition, there is \fBrcol\fR for a right-justified column.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBDiacritical marks:\fR
+.ad
+.sp .6
+.RS 4n
+Diacritical marks are made with \fBdot\fR, \fBdotdot\fR, \fBhat\fR,
+\fBtilde\fR, \fBbar\fR, \fBvec\fR, \fBdyad\fR, and \fBunder\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx dot = f(t) bar\fR\fR
+.ad
+.RS 28n
+.rt
+ is
+.EQ
+delim $$
+.EN
+$x dot = f(t) bar$
+.sp
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBy dotdot bar ~=~ n under\fR\fR
+.ad
+.RS 28n
+.rt
+ is
+.EQ
+delim $$
+.EN
+$y dotdot bar ~=~ n under$
+.sp
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx vec ~=~ y dyad\fR \fR
+.ad
+.RS 28n
+.rt
+is
+.EQ
+delim $$
+.EN
+$x vec ~=~ y dyad$
+.sp
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSizes and Fonts:\fR
+.ad
+.sp .6
+.RS 4n
+Sizes and font can be changed with \fBsize\fR \fIn\fR or \fBsize\fR
+\fB\(+-\fR\fIn,\fR \fBroman\fR, \fBitalic\fR, \fBbold\fR, and \fBfont\fR
+\fIn\fR. Size and fonts can be changed globally in a document by \fBgsize\fR
+\fIn\fR and \fBgfont\fR \fIn\fR, or by the command-line arguments
+\fB-s\fR\fIn\fR and \fB-f\fR\fIn.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSuccessive display arguments:\fR
+.ad
+.sp .6
+.RS 4n
+Successive display arguments can be lined up. Place \fBmark\fR before the
+desired lineup point in the first equation; place \fBlineup\fR at the place
+that is to line up vertically in subsequent equations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBShorthands:\fR
+.ad
+.sp .6
+.RS 4n
+Shorthands may be defined or existing keywords redefined with
+\fBdefine\fR\fI:\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefine\fR\fI thing \fR\fB%\fR\fI replacement \fR\fB%\fR \fR
+.ad
+.sp .6
+.RS 4n
+Defines a new token called \fIthing\fR which will be replaced by
+\fIreplacement\fR whenever it appears thereafter. The \fB%\fR may be any
+character that does not occur in \fIreplacement\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBKeywords and Shorthands:\fR
+.ad
+.sp .6
+.RS 4n
+Keywords like \fBsum\fR \fBint\fR \fBinf\fR and shorthands like \fB>=\fR
+\fB\(->\fR and \fB!=\fR are recognized.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBGreek letters:\fR
+.ad
+.sp .6
+.RS 4n
+Greek letters are spelled out in the desired case, as in \fBalpha\fR or
+\fBGAMMA\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBMathematical words:\fR
+.ad
+.sp .6
+.RS 4n
+Mathematical words like \fBsin\fR,\fB cos\fR, and \fBlog\fR are made Roman
+automatically.
+.RE
+
+.sp
+.LP
+\fBtroff\fR(1) four-character escapes like \(bu (\(bu) can be used anywhere.
+Strings enclosed in double quotes \fB"\fR.\|.\|.\fB"\fR are passed through
+untouched; this permits keywords to be entered as text, and can be used to
+communicate with \fBtroff\fR when all else fails.
+.SH SEE ALSO
+.sp
+.LP
+\fBnroff\fR(1), \fBtbl\fR(1), \fBtroff\fR(1), \fBattributes\fR(5), \fBms\fR(5)
+.SH BUGS
+.sp
+.LP
+To embolden characters such as digits and parentheses, it is necessary to
+quote them, as in `\fBbold "12.3"\fR'.
diff --git a/usr/src/man/man1/exec.1 b/usr/src/man/man1/exec.1
new file mode 100644
index 0000000000..58fb7fc7f0
--- /dev/null
+++ b/usr/src/man/man1/exec.1
@@ -0,0 +1,341 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH exec 1 "8 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+exec, eval, source \- shell built-in functions to execute other commands
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBexec\fR [\fIargument\fR]...
+.fi
+
+.LP
+.nf
+\fBeval\fR [\fIargument\fR]...
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBexec\fR \fIcommand\fR
+.fi
+
+.LP
+.nf
+\fBeval\fR \fIargument\fR...
+.fi
+
+.LP
+.nf
+\fBsource\fR [\fB-h\fR] \fIname\fR
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fB*exec\fR [\fIargument\fR]...
+.fi
+
+.LP
+.nf
+\fB*eval\fR [\fIargument\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB+exec\fR [\fB-c\fR] [\fB-a\fR \fIname\fR] [\fIcommand\fR [\fIargument\fR ... ]]
+.fi
+
+.LP
+.nf
+\fB+eval\fR [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+The \fBexec\fR command specified by the arguments is executed in place of this
+shell without creating a new process. Input/output arguments and appear and, if
+no other arguments are specified, cause the shell input/output to be modified.
+.sp
+.LP
+The \fIargument\fRs to the \fBeval\fR built-in are read as input to the shell
+and the resulting command(s) executed.
+.SS "csh"
+.sp
+.LP
+\fBexec\fR executes \fBcommand\fR in place of the current shell, which
+terminates.
+.sp
+.LP
+\fBeval\fR reads its \fIargument\fRs as input to the shell and executes the
+resulting command(s). This is usually used to execute commands generated as the
+result of command or variable substitution.
+.sp
+.LP
+\fBsource\fR reads commands from \fIname\fR. \fBsource\fR commands can be
+nested, but if they are nested too deeply the shell can run out of file
+descriptors. An error in a sourced file at any level terminates all nested
+\fBsource\fR commands.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Place commands from the file \fIname\fR on the history list without executing
+them.
+.RE
+
+.SS "ksh"
+.sp
+.LP
+With the \fBexec\fR built-in, if \fIarg\fR is specified, the command specified
+by the arguments is executed in place of this shell without creating a new
+process. Input/output arguments can appear and affect the current process. If
+no arguments are specified the effect of this command is to modify file
+descriptors as prescribed by the input/output redirection list. In this case,
+any file descriptor numbers greater than 2 that are opened with this mechanism
+are closed when invoking another program.
+.sp
+.LP
+The arguments to \fBeval\fR are read as input to the shell and the resulting
+command(s) executed.
+.sp
+.LP
+On this man page, \fBksh\fR(1) commands that are preceded by one or two *
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by ** that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+\fBexec\fR is a special built-in command that can be used to manipulate file
+descriptors or to replace the current shell with a new command.
+.sp
+.LP
+If \fIcommand\fR is specified, then the current shell process is replaced by
+\fIcommand\fR rather than running \fIcommand\fR and waiting for it to complete.
+There is no need to use \fBexec\fR to enhance performance since the shell
+implicitly uses the \fBexec\fR mechanism internally whenever possible.
+.sp
+.LP
+If no operands are specified, \fBexec\fR can be used to open or close files, or
+to manipulate file descriptors from \fB0\fR to \fB9\fR in the current shell
+environment using the standard redirection mechanism available with all
+commands. The close-on-exec flags is set on file descriptor numbers greater
+than \fB2\fR that are opened this way so that they are closed when another
+program is invoked.
+.sp
+.LP
+Because \fBexec\fR is a special command, any failure causes the script that
+invokes it to exit. This can be prevented by invoking \fBexec\fR from the
+\fBcommand\fR utility.
+.sp
+.LP
+\fBexec\fR cannot be invoked from a restricted shell to create files or to open
+a file for writing or appending.
+.sp
+.LP
+\fBeval\fR is a shell special built-in command that constructs a command by
+concatenating the \fIargument\fRs together, separating each with a space. The
+resulting string is taken as input to the shell and evaluated in the current
+environment. command words are expanded twice, once to construct
+\fIargument\fR, and again when the shell executes the constructed command. It
+is not an error if \fIargument\fR is not specified.
+.sp
+.LP
+On this manual page, \fBksh93\fR commands that are preceded by one or two
+\fB+\fR symbols are special built-in commands and are treated specially in the
+following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words following a command preceded by \fB++\fR that are in the format of a
+variable assignment are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.SH OPTIONS
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by \fBksh93 exec\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIname\fR\fR
+.ad
+.RS 11n
+.rt
+\fBargv[0]\fR is set to \fIname\fR for command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 11n
+.rt
+Clear all environment variables before executions except variable assignments
+that are part of the current \fBexec\fR command.
+.RE
+
+.SH EXIT STATUS
+.SS "ksh"
+.sp
+.LP
+The following exit values are returned by \fBexec\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 9n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1-125\fR\fR
+.ad
+.RS 9n
+.rt
+A redirection error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 9n
+.rt
+\fIcommand\fR was not found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 9n
+.rt
+\fIcommand\fR was found, but it is not an executable utility.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned by \fBexec\fR. If \fIcommand\fR is
+specified, \fBexec\fR does not return.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion. All I/O redirections were successful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+The following exit values are returned by \fBeval\fR:
+.sp
+.LP
+If \fIargument\fR is not specified, the exit status is \fB0\fR. Otherwise, it
+is the exit status of the command defined by the \fIargument\fR operands.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/exit.1 b/usr/src/man/man1/exit.1
new file mode 100644
index 0000000000..eec29753be
--- /dev/null
+++ b/usr/src/man/man1/exit.1
@@ -0,0 +1,216 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH exit 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+exit, return, goto \- shell built-in functions to enable the execution of the
+shell to advance beyond its sequence of steps
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBexit\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fBreturn\fR [\fIn\fR]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBexit\fR [( \fIexpr\fR )]
+.fi
+
+.LP
+.nf
+\fBgoto\fR \fIlabel\fR
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fB*exit\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fB*return\fR [\fIn\fR]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB+exit\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fB+return\fR [\fIn\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+\fBexit\fR causes the calling shell or shell script to exit with the exit
+status specified by \fIn\fR. If \fIn\fR is omitted the exit status is that of
+the last command executed (an \fBEOF\fR also causes the shell to exit.)
+.sp
+.LP
+\fBreturn\fR causes a function to exit with the return value specified by
+\fIn\fR. If \fIn\fR is omitted, the return status is that of the last command
+executed.
+.SS "csh"
+.sp
+.LP
+\fBexit\fR causes the calling shell or shell script to exit, either with the
+value of the status variable or with the value specified by the expression
+\fBexpr\fR.
+.sp
+.LP
+The \fBgoto\fR built-in uses a specified \fIlabel\fR as a search string amongst
+commands. The shell rewinds its input as much as possible and searches for a
+line of the form \fIlabel\fR\fB:\fR possibly preceded by space or tab
+characters. Execution continues after the indicated line. It is an error to
+jump to a label that occurs between a \fBwhile\fR or \fBfor\fR built-in command
+and its corresponding \fBend\fR.
+.SS "ksh"
+.sp
+.LP
+\fBexit\fR causes the calling shell or shell script to exit with the exit
+status specified by \fIn\fR. The value is the least significant 8 bits of the
+specified status. If \fIn\fR is omitted then the exit status is that of the
+last command executed. When \fBexit\fR occurs when executing a trap, the last
+command refers to the command that executed before the trap was invoked. An
+end-of-file also causes the shell to exit except for a shell which has the
+\fBignoreeof\fR option (See \fBset\fR below) turned on.
+.sp
+.LP
+\fBreturn\fR causes a shell function or \fB\&'.'\fR script to return to the
+invoking script with the return status specified by \fIn\fR. The value is the
+least significant 8 bits of the specified status. If \fIn\fR is omitted then
+the return status is that of the last command executed. If \fBreturn\fR is
+invoked while not in a function or a \fB\&'.'\fR script, then it is the same as
+an \fBexit\fR.
+.sp
+.LP
+On this man page, \fBksh\fR(1) commands that are preceded by one or two \fB*\fR
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by \fB**\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+\fBexit\fR is shell special built-in that causes the shell that invokes it to
+exit. Before exiting the shell, if the \fBEXIT\fR trap is set, it is invoked.
+.sp
+.LP
+If \fIn\fR is specified, it is used to set the exit status.
+.sp
+.LP
+\fBreturn\fR is a shell special built-in that causes the function or dot script
+that invokes it to exit. If \fBreturn\fR is invoked outside of a \fBfunction\fR
+or dot script it is equivalent to \fBexit\fR.
+.sp
+.LP
+If \fBreturn\fR is invoked inside a function defined with the \fBfunction\fR
+reserved word syntax, then any \fBEXIT\fR trap set within the function is
+invoked in the context of the caller before the function returns.
+.sp
+.LP
+If \fIn\fR is specified, it is used to set the exit status.
+.sp
+.LP
+On this manual page, \fBksh93\fR commands that are preceded by one or two
+\fB+\fR symbols are special built-in commands and are treated specially in the
+following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words following a command preceded by \fB++\fR that are in the format of a
+variable assignment are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.SH EXIT STATUS
+.SS "ksh93"
+.sp
+.LP
+If \fIn\fR is specified for \fBexit\fR, the exit status is the least
+significant eight bits of the value of \fIn\fR. Otherwise, the exit status is
+the exit status of preceding command. When invoked inside a trap, the preceding
+command means the command that invoked the trap.
+.sp
+.LP
+If \fIn\fR is specified for \fBreturn\fR, the exit status is the least
+significant eight bits of the value of \fIn\fR. Otherwise, the exit status is
+the exit status of preceding command.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbreak\fR(1), \fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/expand.1 b/usr/src/man/man1/expand.1
new file mode 100644
index 0000000000..59ae4a438e
--- /dev/null
+++ b/usr/src/man/man1/expand.1
@@ -0,0 +1,210 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH expand 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+expand, unexpand \- expand TAB characters to SPACE characters, and vice versa
+.SH SYNOPSIS
+.LP
+.nf
+\fBexpand\fR [\fB-t\fR \fItablist\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBexpand\fR [\fB-\fItabstop\fR\fR] [\fB-\fItab1,\fR\fR \fItab2,.\fR \fI\&.\fR \fI\&.,\fR \fItabn\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBunexpand\fR [\fB-a\fR] [\fB-t\fR \fItablist\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBexpand\fR utility copies \fIfile\fRs (or the standard input) to the
+standard output, with TAB characters expanded to SPACE characters. BACKSPACE
+characters are preserved into the output and decrement the column count for TAB
+calculations. \fBexpand\fR is useful for pre-processing character files (before
+sorting, looking at specific columns, and so forth) that contain TAB
+characters.
+.sp
+.LP
+\fBunexpand\fR copies \fIfile\fRs (or the standard input) to the standard
+output, putting TAB characters back into the data. By default, only leading
+SPACE and TAB characters are converted to strings of tabs, but this can be
+overridden by the \fB-a\fR option (see the OPTIONS section below).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for \fBexpand\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItablist\fR \fR
+.ad
+.RS 26n
+.rt
+Specifies the tab stops. The argument \fItablist\fR must consist of a single
+positive decimal integer or multiple positive decimal integers, separated by
+blank characters or commas, in ascending order. If a single number is given,
+tabs will be set \fItablist\fR column positions apart instead of the default
+\fB8\fR. If multiple numbers are given, the tabs will be set at those specific
+column positions.
+.sp
+Each tab-stop position \fIN\fR must be an integer value greater than zero, and
+the list must be in strictly ascending order. This is taken to mean that, from
+the start of a line of output, tabbing to position \fIN\fR causes the next
+character output to be in the (\fIN\fR+1)th column position on that line.
+.sp
+In the event of \fBexpand\fR having to process a tab character at a position
+beyond the last of those specified in a multiple tab-stop list, the tab
+character is replaced by a single space character in the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fItabstop\fR \fR
+.ad
+.RS 26n
+.rt
+Specifies as a single argument, sets TAB characters \fItabstop\fR SPACE
+characters apart instead of the default \fB8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fItab1\fR\fI,\|tab2,...,tabn\fR \fR
+.ad
+.RS 26n
+.rt
+Sets TAB characters at the columns specified by
+\fB-\fR\fItab1,tab2,...,\|tabn\fR
+.RE
+
+.sp
+.LP
+The following options are supported for \fBunexpand\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fR
+.ad
+.RS 15n
+.rt
+Inserts TAB characters when replacing a run of two or more SPACE characters
+would produce a smaller output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItablist\fR \fR
+.ad
+.RS 15n
+.rt
+Specifies the tab stops. The option-argument \fItablist\fR must be a single
+argument consisting of a single positive decimal integer or multiple positive
+decimal integers, separated by blank characters or commas, in ascending order.
+If a single number is given, tabs will be set \fItablist\fR column positions
+apart instead of the default \fB8\fR. If multiple numbers are given, the tabs
+will be set at those specific column positions. Each tab-stop position \fIN\fR
+must be an integer value greater than zero, and the list must be in strictly
+ascending order. This is taken to mean that, from the start of a line of
+output, tabbing to position \fIN\fR will cause the next character output to be
+in the (\fIN\fR+1)th column position on that line. When the \fB-t\fR option is
+not specified, the default is the equivalent of specifying \fB-t\fR \fB8\fR
+(except for the interaction with \fB-a\fR, described below).
+.sp
+No space-to-tab character conversions occur for characters at positions beyond
+the last of those specified in a multiple tab-stop list.
+.sp
+When \fB-t\fR is specified, the presence or absence of the \fB-a\fR option is
+ignored; conversion will not be limited to the processing of leading blank
+characters.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following ooperand is supported for \fBexpand\fR and \fBunexpand\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIfile\fR\fR \fR
+.ad
+.RS 9n
+.rt
+The path name of a text file to be used as input.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBexpand\fR and \fBunexpand\fR: \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtabs\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/expr.1 b/usr/src/man/man1/expr.1
new file mode 100644
index 0000000000..8943b918d7
--- /dev/null
+++ b/usr/src/man/man1/expr.1
@@ -0,0 +1,422 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH expr 1 "29 Aug 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+expr \- evaluate arguments as an expression
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/expr\fR \fIargument\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/expr\fR \fIargument\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/expr\fR \fIargument\fR...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/expr, /usr/xpg4/bin/expr"
+.sp
+.LP
+The \fBexpr\fR utility evaluates the expression and writes the result to
+standard output. The character \fB0\fR is written to indicate a zero value and
+nothing is written to indicate a null string.
+.SS "/usr/xpg6/bin/expr"
+.sp
+.LP
+The \fBexpr\fR utility evaluates the expression and writes the result to
+standard output followed by a NEWLINE. If there is no result from \fBexpr\fR
+processing, a NEWLINE is written to standard output.
+.SH OPERANDS
+.sp
+.LP
+The \fIargument\fR operand is evaluated as an expression. Terms of the
+expression must be separated by blanks. Characters special to the shell must be
+escaped (see \fBsh\fR(1)). Strings containing blanks or other special
+characters should be quoted. The length of the expression is limited to
+\fBLINE_MAX\fR (2048 characters).
+.sp
+.LP
+The operators and keywords are listed below. The list is in order of increasing
+precedence, with equal precedence operators grouped within \fB{\|}\fR symbols.
+All of the operators are left-associative.
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpr\fR \fB\e|\fR \fIexpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns the evaluation of the first \fIexpr\fR if it is neither \fINULL\fR nor
+\fB0\fR; otherwise, returns the evaluation of the second \fIexpr\fR if it is
+not \fINULL\fR; otherwise, \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpr\fR \fB\e&\fR \fIexpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns the first \fIexpr\fR if neither \fIexpr\fR is \fINULL\fR or \fB0\fR,
+otherwise returns \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpr\fR{ \fB=\fR, \fB\e>\fR, \fB\e>=\fR, \fB\e<\fR, \fB\e<=\fR, \fB!=\fR}
+\fIexpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns the result of an integer comparison if both arguments are integers,
+otherwise returns the result of a string comparison using the locale-specific
+coalition sequence. The result of each comparison will be \fB1\fR if the
+specified relationship is \fBTRUE\fR, \fB0\fR if the relationship is
+\fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpr \fR{ \fB+\fR, \fB\(mi \fR} \fIexpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Addition or subtraction of integer-valued arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpr \fR{ \fB\e*\fR, \fB/\fR, \fB%\fR} \fIexpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Multiplication, division, or remainder of the integer-valued arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpr\fR \fB:\fR \fIexpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+The matching operator \fB:\fR (colon) compares the first argument with the
+second argument, which must be an internationalized basic regular expression
+(BRE), except that all patterns are anchored to the beginning of the string.
+That is, only sequences starting at the first character of a string are matched
+by the regular expression. See \fBregex\fR(5) and NOTES. Normally, the
+\fB/usr/bin/expr\fR matching operator returns the number of bytes matched and
+the \fB/usr/xpg4/bin/expr\fR matching operator returns the number of characters
+matched (\fB0\fR on failure). If the second argument contains at least one BRE
+sub-expression [\e(...\e)], the matching operator returns the string
+corresponding to \e1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinteger\fR \fR
+.ad
+.sp .6
+.RS 4n
+An argument consisting only of an (optional) unary minus followed by digits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR \fR
+.ad
+.sp .6
+.RS 4n
+A string argument that cannot be identified as an \fIinteger\fR argument or as
+one of the expression operator symbols.
+.RE
+
+.SS "Compatibility Operators (x86 only)"
+.sp
+.LP
+The following operators are included for compatibility with INTERACTIVE UNIX
+System only and are not intended to be used by non- INTERACTIVE UNIX System
+scripts:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindex\fR \fIstring character-list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Report the first position in which any one of the bytes in \fIcharacter-list\fR
+matches a byte in \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlength\fR \fIstring\fR\fR
+.ad
+.sp .6
+.RS 4n
+Return the length (that is, the number of bytes) of \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsubstr\fR \fIstring integer-1 integer-2\fR\fR
+.ad
+.sp .6
+.RS 4n
+Extract the substring of \fIstring\fR starting at position \fIinteger-1\fR and
+of length \fIinteger-2\fR bytes. If \fIinteger-1\fR has a value greater than
+the number of bytes in \fIstring\fR, \fBexpr\fR returns a null string. If you
+try to extract more bytes than there are in string, \fBexpr\fR returns all the
+remaining bytes from \fIstring\fR. Results are unspecified if either
+\fIinteger-1\fR or \fIinteger-2\fR is a negative value.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAdding an integer to a shell variable
+.sp
+.LP
+Add 1 to the shell variable \fBa\fR:
+
+.sp
+.in +2
+.nf
+example$ \fBa=`expr\| $a\| +\| 1`\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRReturning a path name segment
+.sp
+.LP
+The following example emulates \fBbasename\fR(1), returning the last segment of
+the path name \fB$a\fR. For \fB$a\fR equal to either \fB/usr/abc/file\fR or
+just \fBfile\fR, the example returns \fBfile\fR. (Watch out for \fB/\fR alone
+as an argument: \fBexpr\fR takes it as the division operator. See NOTES below.)
+
+.sp
+.in +2
+.nf
+example$ \fBexpr $a : '.*/\e(.*\e)' \e| $a\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing // characters to simplify the expression
+.sp
+.LP
+Here is a better version of the previous example. The addition of the \fB//\fR
+characters eliminates any ambiguity about the division operator and simplifies
+the whole expression.
+
+.sp
+.in +2
+.nf
+example$ \fBexpr //$a : '.*/\e(.*\e)'\fR
+.fi
+.in -2
+.sp
+
+.SS "/usr/bin/expr"
+.LP
+\fBExample 4 \fRReturning the number of bytes in a variable
+.sp
+.in +2
+.nf
+example$ \fBexpr "$VAR" : '.*'\fR
+.fi
+.in -2
+.sp
+
+.SS "/usr/xpg4/bin/expr"
+.LP
+\fBExample 5 \fRReturning the number of characters in a variable
+.sp
+.in +2
+.nf
+example$ \fBexpr "$VAR" : '.*'\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBexpr\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+As a side effect of expression evaluation, \fBexpr\fR returns the following
+exit values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+If the expression is neither \fINULL\fR nor \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 7n
+.rt
+If the expression is either \fINULL\fR or \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR \fR
+.ad
+.RS 7n
+.rt
+For invalid expressions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>2\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbasename\fR(1), \fBed\fR(1), \fBsh\fR(1), \fBIntro\fR(3),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBregex\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsyntax error\fR\fR
+.ad
+.RS 24n
+.rt
+Operator and operand errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnon-numeric argument\fR\fR
+.ad
+.RS 24n
+.rt
+Arithmetic is attempted on such a string.
+.RE
+
+.SH NOTES
+.sp
+.LP
+After argument processing by the shell, \fBexpr\fR cannot tell the difference
+between an operator and an operand except by the value. If \fB$a\fR is an
+\fB=\fR, the command:
+.sp
+.in +2
+.nf
+example$ \fBexpr $a = '='\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+looks like:
+.sp
+.in +2
+.nf
+example$ \fBexpr = = =\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+as the arguments are passed to \fBexpr\fR (and they are all taken as the
+\fB=\fR operator). The following works:
+.sp
+.in +2
+.nf
+example$ \fBexpr X$a = X=\fR
+.fi
+.in -2
+.sp
+
+.SS "Regular Expressions"
+.sp
+.LP
+Unlike some previous versions, \fBexpr\fR uses Internationalized Basic Regular
+Expressions for all system-provided locales. Internationalized Regular
+Expressions are explained on the \fBregex\fR(5) manual page.
diff --git a/usr/src/man/man1/exstr.1 b/usr/src/man/man1/exstr.1
new file mode 100644
index 0000000000..7b223c94f1
--- /dev/null
+++ b/usr/src/man/man1/exstr.1
@@ -0,0 +1,404 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1990, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH exstr 1 "5 Jul 1990" "SunOS 5.11" "User Commands"
+.SH NAME
+exstr \- extract strings from source files
+.SH SYNOPSIS
+.LP
+.nf
+\fBexstr\fR \fIfilename\fR...
+.fi
+
+.LP
+.nf
+\fBexstr\fR \fB-e\fR \fIfilename\fR...
+.fi
+
+.LP
+.nf
+\fBexstr\fR \fB-r\fR [\fB-d\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBexstr\fR utility is used to extract strings from C-language source files
+and replace them by calls to the message retrieval function (see
+\fBgettxt\fR(3C)). This utility will extract all character strings surrounded
+by double quotes, not just strings used as arguments to the \fBprintf\fR
+command or the \fBprintf\fR routine. In the first form, \fBexstr\fR finds all
+strings in the source files and writes them on the standard output. Each string
+is preceded by the source file name and a colon (\fB:\fR).
+.sp
+.LP
+The first step is to use \fBexstr\fR \fB-e\fR to extract a list of strings and
+save it in a file. Next, examine this list and determine which strings can be
+translated and subsequently retrieved by the message retrieval function. Then,
+modify this file by deleting lines that can't be translated and, for lines that
+can be translated, by adding the message file names and the message numbers as
+the fourth (\fImsgfile\fR) and fifth (\fImsgnum\fR) entries on a line. The
+message files named must have been created by \fBmkmsgs\fR(1) and exist in
+\fB/usr/lib/locale/\fR\fBlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB \fR. (The
+directory \fBlocale\fR corresponds to the language in which the text strings
+are written; see \fBsetlocale\fR(3C)). The message numbers used must correspond
+to the sequence numbers of strings in the message files.
+.sp
+.LP
+Now use this modified file as input to \fBexstr\fR \fB-r\fR to produce a new
+version of the original C-language source file in which the strings have been
+replaced by calls to the message retrieval function \fBgettxt\fR(). The
+\fImsgfile\fR and \fImsgnum\fR fields are used to construct the first argument
+to \fBgettxt\fR(). The second argument to \fBgettxt\fR() is printed if the
+message retrieval fails at run-time. This argument is the null string, unless
+the \fB-d\fR option is used.
+.sp
+.LP
+This utility cannot replace strings in all instances. For example, a static
+initialized character string cannot be replaced by a function call. A second
+example is that a string could be in a form of an escape sequence which could
+not be translated. In order not to break existing code, the files created by
+invoking \fBexstr\fR \fB-e\fR must be examined and lines containing strings not
+replaceable by function calls must be deleted. In some cases the code may
+require modifications so that strings can be extracted and replaced by calls to
+the message retrieval function.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fR
+.ad
+.RS 7n
+.rt
+Extract a list of strings from the named C-language source files, with
+positional information. This list is produced on standard output in the
+following format:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile:line:position:msgfile:msgnum:string\fR \fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.sp .6
+.RS 4n
+the name of a C-language source file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIline\fR \fR
+.ad
+.sp .6
+.RS 4n
+line number in the file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIposition\fR \fR
+.ad
+.sp .6
+.RS 4n
+character position in the line
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgfile\fR \fR
+.ad
+.sp .6
+.RS 4n
+null
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgnum\fR \fR
+.ad
+.sp .6
+.RS 4n
+null
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR \fR
+.ad
+.sp .6
+.RS 4n
+the extracted text string
+.RE
+
+Normally you would redirect this output into a file. Then you would edit this
+file to add the values you want to use for \fImsgfile\fR and \fImsgnum\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgfile\fR \fR
+.ad
+.RS 12n
+.rt
+the file that contains the text strings that will replace \fIstring\fR. A file
+with this name must be created and installed in the appropriate place by the
+\fBmkmsgs\fR(1) utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgnum\fR \fR
+.ad
+.RS 12n
+.rt
+the sequence number of the string in \fImsgfile\fR.
+.RE
+
+The next step is to use \fBexstr\fR \fB-r\fR to replace \fIstring\fRs in
+\fBfile\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fR
+.ad
+.RS 7n
+.rt
+Replace strings in a C-language source file with function calls to the message
+retrieval function \fBgettxt\fR().
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fR
+.ad
+.RS 7n
+.rt
+This option is used together with the \fB-r\fR option. If the message retrieval
+fails when \fBgettxt\fR() is invoked at run-time, then the extracted string is
+printed. You would use the capability provided by \fBexstr\fR on an application
+program that needs to run in an international environment and have messages
+print in more than one language. \fBexstr\fR replaces text strings with
+function calls that point at strings in a message data base. The data base used
+depends on the run-time value of the \fBLC_MESSAGES\fR environment variable
+(see \fBenviron\fR(5)).
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRThe following examples show uses of exstr
+.sp
+.LP
+Assume that the file \fBexample.c\fR contains two strings:
+
+.sp
+.in +2
+.nf
+main()
+
+{
+
+ printf("This is an example\en");
+
+ printf("Hello world!\en");
+
+}\fI\fR
+.fi
+.in -2
+
+.sp
+.LP
+The \fBexstr\fR utility, invoked with the argument \fBexample.c\fR extracts
+strings from the named file and prints them on the standard output.
+
+.sp
+.in +2
+.nf
+example% \fBexstr example.c\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the following output:
+
+.sp
+.in +2
+.nf
+example.c:This is an example\en
+example.c:Hello world!\en
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBexstr\fR utility, invoked with the \fB-e\fR option and the argument
+\fBexample.c\fR, and redirecting output to the file \fBexample.stringsout\fR
+
+.sp
+.in +2
+.nf
+example% \fBexstr -e example.c > example.stringsout\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the following output in the file \fBexample.stringsout\fR
+
+.sp
+.in +2
+.nf
+example.c:3:8:::This is an example\en
+example.c:4:8:::Hello world!\en
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+You must edit \fBexample.stringsout\fR to add the values you want to use for
+the \fImsgfile\fR and \fImsgnum\fR fields before these strings can be replaced
+by calls to the retrieval function. If \fBUX\fR is the name of the message
+file, and the numbers \fB1\fR and \fB2\fR represent the sequence number of the
+strings in the file, here is what \fBexample.stringsout\fR looks like after you
+add this information:
+
+.sp
+.in +2
+.nf
+example.c:3:8:UX:1:This is an example\en
+example.c:4:8:UX:2:Hello world!\en
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBexstr\fR utility can now be invoked with the \fB-r\fR option to replace
+the strings in the source file by calls to the message retrieval function
+\fBgettxt()\fR.
+
+.sp
+.in +2
+.nf
+example% \fBexstr -r example.c <example.stringsout >intlexample.c\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the following output:
+
+.sp
+.in +2
+.nf
+\fBextern char *gettxt();
+
+main()
+
+{
+
+ printf(gettxt("UX:1", ""));
+
+ printf(gettxt("UX:2", ""));
+
+}\fR\fI\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example:
+
+.sp
+.in +2
+.nf
+example% \fBexstr -rd example.c <example.stringsout >intlexample.c\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+uses the extracted strings as a second argument to \fBgettxt()\fR:
+
+.sp
+.in +2
+.nf
+extern char *gettxt();
+
+main()
+
+{
+
+ printf(gettxt("UX:1", "This is an example\en"));
+
+ printf(gettxt("UX:2", "Hello world!\en"));
+
+}\fI\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fR\fIlocale\fR\fB/LC_MESSAGES/* \fR\fR
+.ad
+.sp .6
+.RS 4n
+files created by \fBmkmsgs\fR(1)
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgettxt\fR(1), \fBmkmsgs\fR(1), \fBprintf\fR(1), \fBsrchtxt\fR(1),
+\fBgettxt\fR(3C), \fBprintf\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5),
+\fBenviron\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+The error messages produced by \fBexstr\fR are intended to be self-explanatory.
+They indicate errors in the command line or format errors encountered within
+the input file.
diff --git a/usr/src/man/man1/factor.1 b/usr/src/man/man1/factor.1
new file mode 100644
index 0000000000..5d758e67d0
--- /dev/null
+++ b/usr/src/man/man1/factor.1
@@ -0,0 +1,81 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH factor 1 "31 Jan 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+factor \- obtain the prime factors of a number
+.SH SYNOPSIS
+.LP
+.nf
+\fBfactor\fR [\fIinteger\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBfactor\fR writes to standard input all prime factors for any positive
+integer less than or equal to 10^14. The prime factors are written the proper
+number of times.
+.sp
+.LP
+If \fBfactor\fR is used \fIwithout\fR an argument, it waits for an integer to
+be entered. After entry of the integer, it factors it, writes its prime factors
+the proper number of times, and then waits for another integer. \fBfactor\fR
+exits if a 0 or any non-numeric character is entered.
+.sp
+.LP
+If \fBfactor\fR is invoked \fIwith\fR an argument (\fIinteger\fR), it writes
+the integer, factors it and writes all the prime factors as described above,
+and then exits. If the argument is 0 or non-numeric, \fBfactor\fR writes a 0
+and then exits.
+.sp
+.LP
+The maximum time to factor an integer is proportional to sqrt(n), where \fIn\fR
+is the integer which is entered. \fBfactor\fR will take this time when \fIn\fR
+is prime or the square of a prime.
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinteger\fR\fR
+.ad
+.RS 11n
+.rt
+Any positive integer less than or equal to 10^14.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBfactor\fR prints the error message \fBOuch!\fR for input out of range or for
+garbage input.
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/fdformat.1 b/usr/src/man/man1/fdformat.1
new file mode 100644
index 0000000000..2cf2115889
--- /dev/null
+++ b/usr/src/man/man1/fdformat.1
@@ -0,0 +1,534 @@
+'\" te
+.\" Copyright 2001, Sun Microsystems, Inc All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH fdformat 1 "28 Feb 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+fdformat \- format floppy diskette or PCMCIA memory card
+.SH SYNOPSIS
+.LP
+.nf
+\fBfdformat\fR [\fB-dDeEfHlLmMUqvx\fR] [\fB-b\fR \fIlabel\fR] [\fB-B\fR \fIfilename\fR]
+ [\fB-t\fR \fIdostype\fR] [\fIdevname\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBfdformat\fR utility has been superseded by \fBrmformat\fR(1), which
+provides most but not all of \fBfdformat\fR's functionality.
+.sp
+.LP
+\fBfdformat\fR is used to format diskettes and \fBPCMCIA\fR memory cards. All
+new blank diskettes or \fBPCMCIA\fR memory cards must be formatted before they
+can be used.
+.sp
+.LP
+\fBfdformat\fR formats and verifies the media and indicates whether any bad
+sectors were encountered. All existing data on the diskette or \fBPCMCIA\fR
+memory card, if any, is destroyed by formatting. If no device name is given,
+\fBfdformat\fR uses the diskette as a default.
+.sp
+.LP
+By default, \fBfdformat\fR uses the configured capacity of the drive to format
+the diskette. A \fB3.5\fR inch high-density drive uses diskettes with a
+formatted capacity of \fB1.44MB\fR. A \fB5.25\fR inch high-density drive uses
+diskettes with a formatted capacity of \fB1.2MB\fR. In either case, a density
+option does not have to be specified to \fBfdformat\fR. However, a density
+option must be specified when using a diskette with a lower capacity than the
+drive's default. Use the \fB-H\fR option to format high-density diskettes
+(\fB1.44MB\fR capacity) in an extra-high-density (\fBED\fR) drive. Use the
+\fB-D\fR option, the \fB-l\fR option, or the \fB-L\fR option to format double-
+density (or low-density) diskettes (\fB720KB\fR capacity) in an \fBHD\fR or
+\fBED\fR drive. To format medium-density diskettes (\fB1.2MB\fR capacity), use
+the \fB-M\fR option with \fB-t\fR \fBnec\fR (this is the same as using the
+\fB-m\fR option with \fB-t\fR \fBnec\fR).
+.sp
+.LP
+Extended density uses double-sided, extended-density or extra-high-density
+(\fBDS\fR/\fBED\fR) diskettes. Medium and high densities use the same media:
+double-sided, high-density (\fBDS\fR/\fBHD\fR) diskettes. Double (low) density
+uses double-sided, double-density (\fBDS\fR/\fBDD\fR
+.sp
+.LP
+\fBD\fR) diskettes. Substituting diskettes of one density for diskettes of
+either a higher or lower density generally does not work. Data integrity cannot
+be assured whenever a diskette is formatted to a capacity not matching its
+density.
+.sp
+.LP
+A \fBPCMCIA\fR memory card with densities from \fB512KB\fR to \fB64MB\fR may be
+formatted.
+.sp
+.LP
+\fBfdformat\fR writes new identification and data fields for each sector on all
+tracks unless the \fB-x\fR option is specified. For diskettes, each sector is
+verified if the \fB-v\fR option is specified.
+.sp
+.LP
+After formatting and verifying, \fBfdformat\fR writes an operating-system label
+on block \fB0\fR. Use the \fB-t\fR \fBdos\fR option (same as the \fB-d\fR
+option) to put an \fBMS-DOS\fR file system on the diskette or \fBPCMCIA\fR
+memory card after the format is done. Use the \fB-t\fR \fBnec\fR option with
+the \fB-M\fR option (same as the \fB-m\fR option) to put an \fBNEC-DOS\fR file
+system on a diskette. Otherwise, \fBfdformat\fR writes a \fBSunOS\fR label in
+block \fB0\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIlabel\fR\fR
+.ad
+.RS 15n
+.rt
+Labels the media with volume label. A SunOS volume label is restricted to 8
+characters. A \fBDOS\fR volume label is restricted to 11 upper-case characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+Installs special boot loader in filename on an \fBMS-DOS\fR diskette. This
+option is only meaningful when the \fB-d\fR option (or \fB-t\fR \fBdos\fR) is
+also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 15n
+.rt
+Formats a \fB720KB\fR (3.5 inch) or \fB360KB\fR (5.25 inch) double-density
+diskette (same as the \fB-l\fR or \fB-L\fR options). This is the default for
+double-density type drives. It is needed if the drive is a high- or
+extended-density type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 15n
+.rt
+Ejects the diskette when done. This feature is not available on all systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.RS 15n
+.rt
+Formats a \fB2.88MB\fR (3.5 inch) extended-density diskette. This is the
+default for extended-density type drives.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Forces formatting, that is, this option does not ask for confirmation before
+starting format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 15n
+.rt
+Formats a \fB1.44MB\fR (3.5 inch) or \fB1.2MB\fR (5.25 inch) high-density
+diskette. This is the default for high-density type drives; it is needed if the
+drive is the extended-density type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.RS 15n
+.rt
+Writes a \fB1.2MB\fR (3.5 inch) medium-density format on a high-density
+diskette (use only with the -t nec option). This is the same as using \fB-m\fR.
+.sp
+This feature is not available on all systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 15n
+.rt
+Quiet; does not print status messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fBdos\fR\fR
+.ad
+.RS 15n
+.rt
+Installs an \fBMS-DOS\fR file system and boot sector formatting. This is
+equivalent to the \fBDOS\fR format command or the \fB-d\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fBnec\fR\fR
+.ad
+.RS 15n
+.rt
+Installs an \fBNEC-DOS\fR file system and boot sector on the disk after
+formatting. This should be used only with the \fB-M\fR option. This feature is
+not available on all systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.RS 15n
+.rt
+Performs \fBumount\fR on any file systems and then formats. See
+\fBmount\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 15n
+.rt
+Verifies each block of the diskette after the format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Skips the format and only writes a SunOS label or an \fBMS-DOS\fR file system.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevname\fR\fR
+.ad
+.RS 11n
+.rt
+Replaces \fIdevname\fR with \fBrdiskette0\fR (systems without volume
+management) or \fBfloppy0\fR (systems with volume management) to use the first
+drive or rdiskette1 (systems without volume management) or \fBfloppy1\fR
+(systems with volume management) to use the second drive. If \fIdevname\fR is
+omitted, the first drive, if one exists, is used. For \fBPCMCIA\fR memory
+cards, replace \fIdevname\fR with the device name for the \fBPCMCIA\fR memory
+card which resides in \fB/dev/rdsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR or
+/dev/dsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR. If \fIdevname\fR is omitted, the
+default diskette drive, if one exists, is used.
+.sp
+If devname is omitted, the default diskette drive, if one exists, will be used.
+\fIN\fR represents a decimal number and can be specified as follows:
+.sp
+.ne 2
+.mk
+.na
+\fBc\fIN\fR\fR
+.ad
+.RS 6n
+.rt
+Controller \fIN\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBt\fIN\fR\fR
+.ad
+.RS 6n
+.rt
+Technology type \fIN\fR:
+.sp
+.in +2
+.nf
+
+0x1 ROM
+0x2 OTPROM
+0x3 EPROM
+0x4 EEPROM
+0x5 FLASH
+0x6 SRAM
+0x7 DRAM
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBd\fIN\fR\fR
+.ad
+.RS 6n
+.rt
+Technology region in type \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBs\fIN\fR\fR
+.ad
+.RS 6n
+.rt
+Slice \fIN\fR.
+.RE
+
+The following options are provided for compatibility with previous versions of
+\fBfdformat\fR. Their use is discouraged.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Formats an \fBMS-DOS\fR floppy diskette or \fBPCMCIA\fR memory card (same as
+\fB-t\fR \fBdos\fR). This is equivalent to the \fBMS-DOS FORMAT\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Formats a \fB720KB\fR (3.5 inch) or \fB360KB\fR (5.25 inch) double-density
+diskette (same as \fB-D\fR or \fB-L\fR). This is the default for double-density
+type drives; it is needed if the drive is the high- or extended-density type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Formats a \fB720KB\fR (3.5 inch) or \fB360KB\fR (5.25 inch) double-density
+diskette (same as \fB-l\fR or \fB-D\fR). This is the default for double-density
+type drives.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Writes a \fB1.2 MB\fR (3.5 inch) medium- density format on a high-density
+diskette (use only with the \fB-t\fR \fBnec\fR option). This is the same as
+using \fB-M\fR. This feature is not available on all systems.
+.RE
+
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/diskette0\fR
+.ad
+.RS 24n
+.rt
+Directory providing block device access for the media in floppy drive \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/diskette0\fR
+.ad
+.RS 24n
+.rt
+Directory providing character device access for the media in floppy drive
+\fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/aliases/floppy0\fR
+.ad
+.RS 24n
+.rt
+Symbolic link to the character device for the media in floppy drive \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/rdiskette\fR
+.ad
+.RS 24n
+.rt
+Directory providing character device access for the media in the primary floppy
+drive, usually drive \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/dsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
+.ad
+.RS 24n
+.rt
+Directory providing block device access for the \fBPCMCIA\fR memory card. See
+OPERANDS for a description of \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/rdsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
+.ad
+.RS 24n
+.rt
+Directory providing character device access for the \fBPCMCIA\fR memory card.
+See OPERANDS for a description of \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/aliases/pcmem\fIS\fR\fR
+.ad
+.RS 24n
+.rt
+Symbolic link to the character device for the \fBPCMCIA\fR memory card in
+socket \fIS\fR where \fIS\fR represents a \fBPCMCIA\fR socket number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/rdsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
+.ad
+.RS 24n
+.rt
+Directory providing character device access for the \fBPCMCIA\fR memory card.
+See OPERANDS for a description of \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB/dev/dsk/c\fIN\fRt\fIN\fRd\fIN\fRs\fIN\fR\fR
+.ad
+.RS 24n
+.rt
+Directory providing block device access for the \fBPCMCIA\fR memory card. See
+OPERANDS for a description of \fIN\fR.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcpio\fR(1), \fBeject\fR(1), \fBrmformat\fR(1), \fBtar\fR(1),
+\fBvolcheck\fR(1), \fBvolrmmount\fR(1), \fBmount\fR(1M), \fBnewfs\fR(1M),
+\fBprtvtoc\fR(1M), \fBattributes\fR(5), \fBpcfs\fR(7FS)
+.SS "x86 Only"
+.sp
+.LP
+\fBfd\fR(7D)
+.SH NOTES
+.sp
+.LP
+A diskette or \fBPCMCIA\fR memory card containing a \fBufs\fR file system
+created on a SPARC based system (by using \fBfdformat\fR and \fBnewfs\fR(1M)),
+is not identical to a diskette or \fBPCMCIA\fR memory card containing a ufs
+file system created on an x86 based system. Do not interchange ufs diskettes or
+memory cards between these platforms. Use \fBcpio\fR(1) or \fBtar\fR(1) to
+transfer files on diskettes or memory cards between them. A diskette or
+\fBPCMCIA\fR memory card formatted using the \fB-t\fR \fBdos\fR option (or
+\fB-d\fR) for \fBMS-DOS\fR does not have the necessary system files, and is
+therefore not bootable. Trying to boot from it on a \fBPC\fR produces the
+following message:
+.sp
+.in +2
+.nf
+Non-System disk or disk error.
+Replace and strike any key when ready
+.fi
+.in -2
+.sp
+
+.SH BUGS
+.sp
+.LP
+Currently, bad sector mapping is not supported on floppy diskettes or
+\fBPCMCIA\fR memory cards. Therefore, a diskette or memory card is unusable if
+\fBfdformat\fR finds an error (bad sector).
diff --git a/usr/src/man/man1/fgrep.1 b/usr/src/man/man1/fgrep.1
new file mode 100644
index 0000000000..fd428f4dda
--- /dev/null
+++ b/usr/src/man/man1/fgrep.1
@@ -0,0 +1,339 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH fgrep 1 "24 Mar 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+fgrep \- search a file for a fixed-character string
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/fgrep\fR [\fB-bchilnsvx\fR] \fB-e\fR \fIpattern_list\fR [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/fgrep\fR [\fB-bchilnsvx\fR] \fB-f\fR \fIfile\fR [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/fgrep\fR [\fB-bchilnsvx\fR] \fIpattern\fR [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/fgrep\fR [\fB-bchilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fB-f\fR \fIfile\fR]
+ [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/fgrep\fR [\fB-bchilnqsvx\fR] [\fB-e\fR \fIpattern_list\fR] \fB-f\fR \fIfile\fR
+ [\fIfile...\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/fgrep\fR [\fB-bchilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBfgrep\fR (fast \fBgrep\fR) utility searches files for a character string
+and prints all lines that contain that string. \fBfgrep\fR is different from
+\fBgrep\fR(1) and from \fBegrep\fR(1) because it searches for a string, instead
+of searching for a pattern that matches an expression. \fBfgrep\fR uses a fast
+and compact algorithm.
+.sp
+.LP
+The characters \fB$\fR, \fB*\fR, \fB[\fR, \fB^\fR, |, \fB(\fR, \fB)\fR, and
+\fB\e\fR are interpreted literally by \fBfgrep\fR, that is, \fBfgrep\fR does
+not recognize full regular expressions as does \fBegrep\fR. These characters
+have special meaning to the shell. Therefore, to be safe, enclose the entire
+\fIstring\fR within single quotes (\fBa\'\fR).
+.sp
+.LP
+If no files are specified, \fBfgrep\fR assumes standard input. Normally, each
+line that is found is copied to the standard output. The file name is printed
+before each line that is found if there is more than one input file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/fgrep\fR and
+\fB/usr/xpg4/bin/fgrep\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 19n
+.rt
+Precedes each line by the block number on which the line was found. This can be
+useful in locating block numbers by context. The first block is 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 19n
+.rt
+Prints only a count of the lines that contain the pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIpattern_list\fR\fR
+.ad
+.RS 19n
+.rt
+Searches for a \fIstring\fR in \fIpattern-list\fR. This is useful when the
+\fIstring\fR begins with a \fB\(mi\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIpattern-file\fR\fR
+.ad
+.RS 19n
+.rt
+Takes the list of patterns from \fIpattern-file\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 19n
+.rt
+Suppresses printing of files when searching multiple files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 19n
+.rt
+Ignores upper/lower case distinction during comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 19n
+.rt
+Prints the names of files with matching lines once, separated by new-lines.
+Does not repeat the names of files when the pattern is found more than once.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 19n
+.rt
+Precedes each line by its line number in the file. The first line is 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 19n
+.rt
+Works silently, that is, displays nothing except error messages. This is useful
+for checking the error status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 19n
+.rt
+Prints all lines except those that contain the pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 19n
+.rt
+Prints only lines that are matched entirely.
+.RE
+
+.SS "/usr/xpg4/bin/fgrep"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/fgrep\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 6n
+.rt
+Quiet. Does not write anything to the standard output, regardless of matching
+lines. Exits with zero status if an input line is selected.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+Specifies a path name of a file to be searched for the patterns. If no
+\fIfile\fR operands are specified, the standard input will be used.
+.RE
+
+.SS "/usr/bin/fgrep"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies a pattern to be used during the search for input.
+.RE
+
+.SS "/usr/xpg4/bin/fgrep"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies one or more patterns to be used during the search for input. This
+operand is treated as if it were specified as \fB-e\fR \fIpattern_list\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBfgrep\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBfgrep\fR: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
+\fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+If any matches are found
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+If no matches are found
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+For syntax errors or inaccessible files, even if matches were found.
+.RE
+
+.SS "/usr/xpg4/bin/fgrep"
+.sp
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBed\fR(1), \fBegrep\fR(1), \fBgrep\fR(1), \fBsed\fR(1), \fBsh\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBXPG4\fR(5)
+.SH NOTES
+.sp
+.LP
+Ideally, there should be only one \fBgrep\fR command, but there is not a single
+algorithm that spans a wide enough range of space-time tradeoffs.
+.sp
+.LP
+Lines are limited only by the size of the available virtual memory.
+.SS "/usr/xpg4/bin/fgrep"
+.sp
+.LP
+The \fB/usr/xpg4/bin/fgrep\fR utility is identical to \fB/usr/xpg4/bin/grep\fR
+\fB-F\fR (see \fBgrep\fR(1)). Portable applications should use
+\fB/usr/xpg4/bin/grep\fR \fB-F\fR.
diff --git a/usr/src/man/man1/file.1 b/usr/src/man/man1/file.1
new file mode 100644
index 0000000000..6e445f1bf7
--- /dev/null
+++ b/usr/src/man/man1/file.1
@@ -0,0 +1,326 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH file 1 "15 May 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+file \- determine file type
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] \fB-f\fR \fIffile\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/file\fR \fB-i\fR [\fB-h\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/file\fR \fB-i\fR [\fB-h\fR] \fB-f\fR \fIffile\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/file\fR \fB-c\fR [\fB-d\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/file\fR [\fB-dh\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR] \fB-f\fR \fIffile\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/file\fR \fB-i\fR [\fB-h\fR] [\fB-f\fR \fIffile\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/file\fR \fB-i\fR [\fB-h\fR] \fB-f\fR \fIffile\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/file\fR \fB-c\fR [\fB-d\fR] [\fB-m\fR \fImfile\fR] [\fB-M\fR \fIMfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBfile\fR utility performs a series of tests on each file supplied by
+\fIfile\fR and, optionally, on each file listed in \fIffile\fR in an attempt to
+classify it. If the file is not a regular file, its file type is identified.
+The file types directory, \fBFIFO\fR, block special, and character special are
+identified as such. If the file is a regular file and the file is zero-length,
+it is identified as an empty file.
+.sp
+.LP
+If \fIfile\fR appears to be a text file, \fBfile\fR examines the first 512
+bytes and tries to determine its programming language. If \fIfile\fR is a
+symbolic link, by default the link is followed and \fBfile\fR tests the file to
+which the symbolic link refers.
+.sp
+.LP
+If \fIfile\fR is a relocatable object, executable, or shared object, \fBfile\fR
+prints out information about the file's execution requirements. This
+information includes the machine class, byte-ordering, static/dynamic linkage,
+and any software or hardware capability requirements. If \fIfile\fR is a
+runtime linking configuration file, \fBfile\fR prints information about the
+target platform, including the machine class and byte-ordering.
+.sp
+.LP
+By default, \fBfile\fR will try to use the localized magic file
+\fB/usr/lib/locale/\fIlocale\fR/LC_MESSAGES/magic\fR, if it exists, to identify
+files that have a magic number. For example, in the Japanese locale, \fBfile\fR
+will try to use \fB/usr/lib/locale/ja/LC_MESSAGES/magic\fR. If a localized
+magic file does not exist, \fBfile\fR will utilize \fB/etc/magic\fR. A magic
+number is a numeric or string constant that indicates the file type. See
+\fBmagic\fR(4) for an explanation of the format of \fB/etc/magic\fR.
+.sp
+.LP
+If \fIfile\fR does not exist, cannot be read, or its file status could not be
+determined, it is not considered an error that affects the exit status. The
+output will indicate that the file was processed, but that its type could not
+be determined.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 12n
+.rt
+Checks the magic file for format errors. For reasons of efficiency, this
+validation is normally not carried out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 12n
+.rt
+Applies any position-sensitive and context-sensitive default system tests to
+the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIffile\fR\fR
+.ad
+.RS 12n
+.rt
+\fIffile\fR contains a list of the files to be examined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 12n
+.rt
+When a symbolic link is encountered, this option identifies the file as a
+symbolic link. If \fB-h\fR is not specified and \fIfile\fR is a symbolic link
+that refers to a non-existent file, the \fBfile\fR utility identifies the file
+as a symbolic link, as if \fB-h\fR had been specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 12n
+.rt
+If a file is a regular file, this option does not attempt to classify the type
+of file further, but identifies the file as a "regular file".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImfile\fR\fR
+.ad
+.RS 12n
+.rt
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/file\fR\fR
+.ad
+.RS 22n
+.rt
+Uses \fImfile\fR as an alternate magic file, instead of \fB/etc/magic\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg4/bin/file\fR\fR
+.ad
+.RS 22n
+.rt
+Specifies the name of a file containing position-sensitive tests that are
+applied to a file in order to classify it (see \fBmagic\fR(4)). If the \fB-m\fR
+option is specified without specifying the \fB-d\fR option or the \fB-M\fR
+option, position-sensitive default system tests are applied after the
+position-sensitive tests specified by the \fB-m\fR option.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fIMfile\fR\fR
+.ad
+.RS 12n
+.rt
+Specifies the name of a file containing position-sensitive tests that are
+applied to a file in order to classify it (see \fBmagic\fR(4)). No
+position-sensitive default system tests nor context-sensitive default system
+tests are applied unless the \fB-d\fR option is also specified.
+.RE
+
+.sp
+.LP
+If the \fB-M\fR option is specified with the \fB-d\fR option, the \fB-m\fR
+option, or both, or if the \fB-m\fR option is specified with the \fB-d\fR
+option, the concatenation of the position-sensitive tests specified by these
+options is applied in the order specified by the appearance of these options.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be tested.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBfile\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDetermining if an Argument is a Binary Executable Files
+.sp
+.LP
+The following example determine if an argument is a binary executable file:
+
+.sp
+.in +2
+.nf
+file "$1" | grep \(miFq executable &&
+ printf "%s is executable.\n" "$1"
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBfile\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/magic\fR\fR
+.ad
+.RS 14n
+.rt
+\fBfile\fR's magic number file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcrle\fR(1), \fBelfdump\fR(1), \fBls\fR(1), \fBmagic\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/filebench.1 b/usr/src/man/man1/filebench.1
new file mode 100644
index 0000000000..8a9e793729
--- /dev/null
+++ b/usr/src/man/man1/filebench.1
@@ -0,0 +1,186 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH filebench 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+filebench \- framework of workloads to measure and compare filesystem
+performance
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/benchmarks/filebench/bin/filebench\fR \fIprofile\fR
+.fi
+
+.LP
+.nf
+\fB/usr/benchmarks/filebench/bin/filebench\fR \fB-c\fR \fIstats_dir...\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBfilebench\fR runs workloads to measure and compare filesystem performance.
+.sp
+.LP
+Full documentation can be found at the performance community at:
+http://www.opensolaris.org
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIstats_dir...\fR\fR
+.ad
+.RS 19n
+.rt
+Generates a HTML file (\fBindex.html\fR) that is a comparison of the specified
+directories. \fIstats_dir\fR specifies the directory or directories in which
+the results are stored.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprofile\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies the name of the configuration file ending in \fB\&.prof\fR. The
+configuration file specifies:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+what workloads to run,
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+what parameters to run,
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the directory path on which to operate, and
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the directory path in which to store the results.
+.RE
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRRunning the Multi-stream Sequential Read Workload
+.sp
+.LP
+The following example runs the workloads described in the configuration file
+named \fBsqread.prof\fR:
+
+.sp
+.in +2
+.nf
+# filebench sqread
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRComparing Multiple Runs
+.sp
+.LP
+The following example compares the results of two previous runs.
+
+.sp
+.LP
+This example assumes that the results from the two previous \fBfilebench\fR
+runs were located in the directories:
+\fB/stats/wombat-zfs-noel-Jun_27_2007-15h_45m_33s\fR and
+\fB/stats/wombat-ufs-noel-Jun_27_2007-15h_52m_11s\fR.
+
+.sp
+.LP
+This example generates a HTML file named \fBindex.html\fR in your current
+working directory.
+
+.sp
+.in +2
+.nf
+# filebench -c /stats/wombat-zfs-noel-Jun_27_2007-15h_45m_33s \e
+ /stats/wombat-ufs-noel-Jun_27_2007-15h_52m_11s
+.fi
+.in -2
+.sp
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/filesync.1 b/usr/src/man/man1/filesync.1
new file mode 100644
index 0000000000..98b034d447
--- /dev/null
+++ b/usr/src/man/man1/filesync.1
@@ -0,0 +1,672 @@
+'\" te
+.\" Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH filesync 1 "6 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+filesync \- synchronize ordinary, directory or special files
+.SH SYNOPSIS
+.LP
+.nf
+\fBfilesync\fR [\fB-aehmnqvy\fR] [\fB-o\fR src | dst]
+ [\fB-f\fR src | dst | old | new] [\fB-r\fR \fIdirectory\fR]...
+.fi
+
+.LP
+.nf
+\fBfilesync\fR [\fB-aehmnqvy\fR] \fB-s\fR \fIsource-dir\fR \fB-d\fR \fIdest-dir\fR \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBfilesync\fR utility \fIsynchronizes\fR files between multiple computer
+systems, typically a server and a portable computer. \fBfilesync\fR
+synchronizes ordinary, directory or special files. Although intended for use on
+nomadic systems, \fBfilesync\fR is useful for backup and file replication on
+more permanently connected systems.
+.sp
+.LP
+If files are synchronized between systems, the corresponding files on each of
+the systems are \fIidentical\fR. Changing a file on one or both of the systems
+causes the files to become different (not synchronized). In order to make the
+files identical again, the differences between the files must be
+\fIreconciled\fR. See \fBReconciling and Synchronizing Files\fR for specific
+details about how \fBfilesync\fR reconciles and synchronizes files.
+.sp
+.LP
+There are two forms of the \fBfilesync\fR command. The first form of
+\fBfilesync\fR is invoked without file arguments. This form of \fBfilesync\fR
+reconciles differences between the files and systems specified in the
+\fB$HOME/.packingrules\fR file. \fB$HOME/.packingrules\fR is a packing rules
+list for \fBfilesync\fR and \fBcachefspack\fR, and contains a list of files to
+be kept synchronized. See \fBpackingrules\fR(4) and \fBcachefspack\fR(1M).
+.sp
+.LP
+The second form of \fBfilesync\fR copies specific files from a directory on the
+source system to a directory on the destination system. In addition, this form
+of \fBfilesync\fR adds the file or files specified as arguments
+(\fIfilename\fR) to \fB$HOME/.packingrules\fR. See \fB-s\fR and \fB-d\fR for
+information about specifying directories on source and destination systems. See
+\fBOPERANDS\fR for details about specifying file (\fIfilename\fR) arguments.
+.sp
+.LP
+Multiple \fBfilesync\fR commands are cumulative (that is, the specified files
+are added to the already existing packing rules file list). See \fBMultiple
+filesync Commands\fR.
+.SS "Reconciling and Synchronizing Files"
+.sp
+.LP
+\fBfilesync\fR synchronizes files between computer systems by performing the
+following two tasks:
+.RS +4
+.TP
+1.
+\fBfilesync\fR examines the directories and files specified in the packing
+rules file on both systems, and determines whether or not they are identical.
+Any file that differs requires reconciliation.
+.sp
+\fBfilesync\fR also maintains a baseline summary in the
+\fB$HOME/.filesync-base\fR file for all of the files that are being monitored.
+This file lists the names, types, and sizes of all files as of the last
+reconciliation.
+.RE
+.RS +4
+.TP
+2.
+Based on the information contained in the baseline file and the specified
+options (see \fBResolving filesync Conflicts\fR), \fBfilesync\fR determines
+which of the various copies is the correct one, and makes the corresponding
+changes to the other system. Once this has been done, the two copies are,
+again, identical (synchronized).
+.sp
+If a source file has changed and the destination file has not, the changes on
+the source system are propagated to the destination system. If a destination
+file has changed and the corresponding source file has not, the changes on the
+destination file are propagated to the source system. If both systems have
+changed (and the files are not still identical) a warning message will be
+printed out, asking the user to resolve the conflict manually. See
+\fBResolving filesync Conflicts\fR.
+.RE
+.SS "Resolving filesync Conflicts"
+.sp
+.LP
+In cases where files on both sides have changed, \fBfilesync\fR attempts to
+determine which version should be chosen. If \fBfilesync\fR cannot
+automatically determine which version should be selected, it prints out a
+warning message and leaves the two incompatible versions of the file
+unreconciled.
+.sp
+.LP
+In these cases, you must either resolve the differences manually, or tell
+\fBfilesync\fR how to choose which file should win. Use the \fB-o\fR and
+\fB-f\fR options to tell \fBfilesync\fR how to resolve conflicts (see
+\fBOPTIONS\fR).
+.sp
+.LP
+Alternatively, for each conflicting file, you can examine the two versions,
+determine which one should be kept, and manually bring the two versions into
+agreement (by copying, deleting, or changing the ownership or protection to be
+correct). You can then re-run \fBfilesync\fR to see whether or not any other
+conflicts remain.
+.SS "Packing Rules File"
+.sp
+.LP
+The packing rules file \fB$HOME/.packingrules\fR contains a list of files to be
+kept synchronized. The syntax of this file is described in
+\fBpackingrules\fR(4).
+.sp
+.LP
+The \fB$HOME/.packingrules\fR file is automatically created if users invoke
+\fBfilesync\fR with filename arguments. By using \fBfilesync\fR options, users
+can augment the packing rules in \fB$HOME/.packingrules\fR.
+.sp
+.LP
+Many users choose to create the packing rules file manually and edit it by
+hand. Users can edit \fB$HOME/.packingrules\fR (using any editor) to
+permanently change the \fB$HOME/.packingrules\fR file, or to gain access to
+more powerful options that are not available from the command line (such as
+\fBIGNORE\fR commands). It is much easier to enter complex wildcard expressions
+by editing the \fB$HOME/.packingrules\fR file.
+.SS "Baseline File"
+.sp
+.LP
+\fB$HOME/.filesync-base\fR is the \fBfilesync\fR baseline summary file.
+\fBfilesync\fR uses the information in \fB$HOME/.filesync-base\fR to identify
+the differences between files during the reconciliation and synchronization
+process. Users do not create or edit the baseline file. It is created
+automatically by \fBfilesync\fR and records the last known state of agreement
+between all of the files being maintained.
+.SS "Multiple filesync Commands"
+.sp
+.LP
+Over a period of time, the set of files you want to keep synchronized can
+change. It is common, for instance, to want to keep files pertaining to only a
+few active projects on your notebook. If you continue to keep files associated
+with every project you have ever worked on synchronized, your notebook's disk
+will fill up with old files. Each \fBfilesync\fR command will waste a lot of
+time updating files you no longer care about.
+.sp
+.LP
+If you delete the files from your notebook, \fBfilesync\fR will want to perform
+the corresponding deletes on the server, which would not be what you wanted.
+Rather, you would like a way to tell \fBfilesync\fR to stop synchronizing some
+of the files. There are two ways to do this:
+.RS +4
+.TP
+1.
+Edit \fB$HOME/.packingrules\fR. Delete the rules for the files that you
+want to delete.
+.RE
+.RS +4
+.TP
+2.
+Delete \fB$HOME/.packingrules\fR. Use the \fBfilesync\fR command to specify
+the files that you want synchronized.
+.RE
+.sp
+.LP
+Either way works, and you can choose the one that seems easiest to you. For
+minor changes, it is probably easier to just edit \fB$HOME/.packingrules\fR.
+For major changes it is probably easier to start from scratch.
+.sp
+.LP
+Once \fBfilesync\fR is no longer synchronizing a set of files, you can delete
+them from your notebook without having any effect on the server.
+.SS "Nomadic Machines"
+.sp
+.LP
+When using \fBfilesync\fR to keep files synchronized between nomadic machines
+and a server, store the packing rules and baseline files on the nomadic
+machines, not the server. If, when logged into your notebook, the \fBHOME\fR
+environment variable does not normally point to a directory on your notebook,
+you can use the \fBFILESYNC\fR environment variable to specify an alternate
+location for the packing rules and baseline files.
+.sp
+.LP
+Each nomadic machine should carry its own packing rules and baseline file.
+Incorrect file synchronization can result if a server carries a baseline file
+and multiple nomadic machines attempt to reconcile against the server's
+baseline file. In this case, a nomadic machine could be using a baseline file
+that does not accurately describe the state of its files. This might result in
+incorrect reconciliations.
+.sp
+.LP
+To safeguard against the dangers associated with a single baseline file being
+shared by more than two machines, \fBfilesync\fR adds a default rule to each
+new packing rules file. This default rule prevents the packing rules and
+baseline files from being copied.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 28n
+.rt
+Force the checking of Access Control Lists (\fBACL\fRs ) and attempt to make
+them agree for all new and changed files. If it is not possible to set the
+\fBACL\fR for a particular file, \fBfilesync\fR stops \fBACL\fR synchronization
+for that file.
+.sp
+Some file systems do not support \fBACL\fRs . It is not possible to synchronize
+\fBACL\fRs between file systems that support \fBACL\fRs and those that do not;
+attempting to do so will result in numerous error messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI dest-dir\fR\fR
+.ad
+.RS 28n
+.rt
+Specify the directory on the destination system into which \fIfilename\fR is to
+be copied. Use with the \fB-s\fR\fI source-dir\fR option and the \fIfilename\fR
+operand. See \fB-s\fR and \fBOPERANDS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 28n
+.rt
+Flag all differences. It may not be possible to resolve all conflicts involving
+modes and ownership (unless \fBfilesync\fR is being run with root privileges).
+If you cannot change the ownership or protections on a file, \fBfilesync\fR
+will normally ignore conflicts in ownership and protection. If you specify the
+\fB-e\fR (everything must agree) flag, however, \fBfilesync\fR will flag these
+differences.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-f\fR\fB src\fR | \fBdst\fR | \fBold\fR | \fBnew\fR\fR
+.ad
+.RS 28n
+.rt
+The \fB-f\fR option tells \fBfilesync\fR how to resolve conflicting changes. If
+a file has been changed on both systems, and an \fB-f\fR option has been
+specified, \fBfilesync\fR will retain the changes made on the favored system
+and discard the changes made on the unfavored system.
+.sp
+Specify \fB-f\fR \fBsrc\fR to favor the source-system file. Specify \fB-f\fR
+\fBdst\fR to favor the destination-system file. Specify \fB-f\fR \fBold\fR to
+favor the older version of the file. Specify \fB-f\fR \fBnew\fR to favor the
+newer version of the file.
+.sp
+It is possible to specify the \fB-f\fR and \fB-o\fR options in combination
+if they both specify the same preference (\fBsrc \fRand\fB dst\fR). If
+\fB-f\fR and \fB-o\fR conflict, the \fB-f\fR option is ignored. See the
+\fB-o\fR option description.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 28n
+.rt
+Halt on error. Normally, if \fBfilesync\fR encounters a read or write error
+while copying files, it notes the error and the program continues, in an
+attempt to reconcile other files. If the \fB-h\fR option is specified,
+\fBfilesync\fR will immediately halt when one of these errors occurs and will
+not try to process any more files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 28n
+.rt
+Ensure that both copies of the file have the same modification time. The
+modification time for newly copied files is set to the time of reconciliation
+by default. File changes are ordered by increasing modification times so that
+the propagated files have the same relative modification time ordering as the
+original changes. Users should be warned that there is usually some time skew
+between any two systems, and transferring modification times from one system
+to another can occasionally produce strange results.
+.sp
+There are instances in which using \fBfilesync\fR to update some (but not all)
+files in a directory will confuse the \fBmake\fR program. If, for instance,
+\fBfilesync\fR is keeping \fB\&.c\fR files synchronized, but ignoring
+\fB\&.o\fR files, a changed \fB\&.c\fR file may show up with a modification
+time prior to a \fB\&.o\fR file that was built from a prior version of the
+\fB\&.c\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 28n
+.rt
+Do not really make the changes. If the \fB-n\fR option is specified,
+\fBfilesync\fR determines what changes have been made to files, and what
+reconciliations are required and displays this information on the standard
+output. No changes are made to files, including the packing rules file.
+.sp
+Specifying both the \fB-n\fR and \fB-o\fR options causes \fBfilesync\fR to
+analyze the prevailing system and report the changes that have been made on
+that system. Using \fB-n\fR and \fB-o\fR in combination is useful if your
+machine is disconnected (and you cannot access the server) but you want to know
+what changes have been made on the local machine. See the \fB-o\fR option
+description.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-o\fR\fB src | dst\fR\fR
+.ad
+.RS 28n
+.rt
+The \fB-o\fR option forces a one-way reconciliation, favoring either the source
+system (\fBsrc\fR) or destination system (\fBdst\fR).
+.sp
+Specify \fB-o\fR \fBsrc\fR to propagate changes only from the source system to
+the destination system. Changes made on the destination system are ignored.
+\fBfilesync\fR aborts if it cannot access a source or destination directory.
+.sp
+Specify \fB-o\fR \fBdst\fR to propagate changes only from the destination
+system to the source system. Changes made on the source system are ignored.
+\fBfilesync\fR aborts if it cannot access a source or destination directory.
+.sp
+Specifying \fB-n\fR with the \fB-o\fR option causes \fBfilesync\fR to analyze
+the prevailing system and reports on what changes have been made on that
+system. Using \fB-n\fR and \fB-o\fR in combination is useful if a machine is
+disconnected (and there is no access to the server), but you want to know what
+changes have been made on the local machine. See the \fB-n\fR option
+description.
+.sp
+It is possible to specify the \fB-o\fR and \fB-f\fR options in combination if
+they both specify the same preference (\fBsrc\fR or \fBdst\fR). If \fB-o\fR and
+\fB-f\fR options conflict, the \fB-f\fR option will be ignored. See the
+\fB-f\fR option description.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 28n
+.rt
+Suppress the standard \fBfilesync\fR messages that describe each reconciliation
+action as it is performed.
+.sp
+The standard \fBfilesync\fR message describes each reconciliation action in the
+form of a UNIX shell command (for example, \fBmv\fR, \fBln\fR, \fBcp\fR,
+\fBrm\fR, \fBchmod\fR, \fBchown\fR, \fBchgrp\fR, \fBsetfacl\fR, and so forth).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fI directory\fR\fR
+.ad
+.RS 28n
+.rt
+Limit the reconciliation to \fIdirectory\fR. Specify multiple directories with
+multiple \fB-r\fR specifications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI source-dir\fR\fR
+.ad
+.RS 28n
+.rt
+Specify the directory on the source system from which the \fIfilename\fR to be
+copied is located. Use with the \fB-d\fR\fI dest-dir\fR option and the
+\fIfilename\fR operand. See the \fB-d\fR option description and
+\fBOPERANDS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 28n
+.rt
+Display additional information about each file comparison as it is made on the
+standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 28n
+.rt
+Bypass safety check prompts. Nomadic machines occasionally move between
+domains, and many of the files on which \fBfilesync\fR operates are expected to
+be accessed by NFS. There is a danger that someday \fBfilesync\fR will be
+asked to reconcile local changes against the wrong file system or server. This
+could result in a large number of inappropriate copies and deletions. To
+prevent such a mishap, \fBfilesync\fR performs a few safety checks prior to
+reconciliation. If large numbers of files are likely to be deleted, or if high
+level directories have changed their I-node numbers, \fBfilesync\fR prompts
+for a confirmation before reconciliation. If you know that this is likely, and
+do not want to be prompted, use the \fB-y\fR (yes) option to automatically
+confirm these prompts.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+The name of the ordinary file, directory, symbolic link, or special file in the
+specified source directory (\fIsource-dir\fR) to be synchronized. Specify
+multiple files by separating each filename by spaces. Use the \fIfilename\fR
+operand with the \fB-s\fR and \fB-d\fR options. See \fBOPTIONS\fR.
+.sp
+If \fIfilename\fR is an ordinary file, that ordinary file will be replicated
+(with the same \fIfilename\fR) in the specified destination directory
+(\fIdest-dir\fR).
+.sp
+If \fIfilename\fR is a directory, that directory and all of the files and
+subdirectories under it will be replicated (recursively) in the specified
+destination directory (\fIdest-dir\fR).
+.sp
+If \fIfilename\fR is a symbolic link, a copy of that symbolic link will be
+replicated in the specified destination directory (\fIdest-dir\fR).
+.sp
+If \fIfilename\fR is a special file, a special file with the same major or
+minor device numbers will be replicated in the specified destination directory.
+(\fIdest-dir).\fR Only super-users can use \fBfilesync\fR to create special
+files.
+.sp
+Files created in the destination directory (\fIdest-dir\fR) will have the same
+owner, group and other permissions as the files in the source directory.
+.sp
+If \fIfilename\fR contains escaped shell wildcard characters, the wildcard
+characters are stored in \fB$HOME/.packingrules\fR and evaluated each time
+\fBfilesync\fR is run.
+.sp
+For example, the following would make sure that the two specified files,
+currently in \fB$RHOME\fR, were replicated in \fB$HOME\fR:
+.sp
+.in +2
+.nf
+\fBfilesync \fR\fB-s\fR\fB $RHOME \fR\fB-d\fR\fB $HOME a.c \|b.c\fR
+.fi
+.in -2
+.sp
+
+The following example would ensure that all of the \fB*.c\fR files in
+\fB$RHOME\fR were replicated in \fB$HOME\fR, even if those files were not
+created until later.
+.sp
+.in +2
+.nf
+\fBfilesync \fR\fB-s\fR\fB $RHOME \fR\fB-d\fR\fB $HOME '*.c'\fR
+.fi
+.in -2
+.sp
+
+If any of the destination files already exist, \fBfilesync\fR ensures that
+they are identical and issues warnings if they are not.
+.sp
+Once files have been copied, the distinction between the source and destination
+is a relatively arbitrary one (except for its use in the \fB-o\fR and \fB-f\fR
+switches).
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFILESYNC\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies the default location of the \fBfilesync\fR packing rules and baseline
+files. The default value for this variable is \fB$HOME\fR. The suffixes
+\fB\&.packingrules\fR and \fB\&.filesync-base\fR will be appended to form the
+names of the packing rules and baseline files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR\fR
+.ad
+.RS 15n
+.rt
+Determines how diagnostic and informative messages are presented. In the "C"
+locale, the messages are presented in the default form found in the program
+itself (in most cases, U.S. English).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+Normally, if all files are already up-to-date, or if all files were
+successfully reconciled, \fBfilesync\fR will exit with a status of \fB0\fR.
+However, if either the \fB-n\fR option was specified or any errors occurred,
+the exit status will be the logical OR of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 7n
+.rt
+No conflicts, all files up to date.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 7n
+.rt
+Some resolvable conflicts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 7n
+.rt
+Some conflicts requiring manual resolution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 7n
+.rt
+Some specified files did not exist.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB8\fR\fR
+.ad
+.RS 7n
+.rt
+Insufficient permission for some files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB16\fR\fR
+.ad
+.RS 7n
+.rt
+Errors accessing packing rules or baseline file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR\fR
+.ad
+.RS 7n
+.rt
+Invalid arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB64\fR\fR
+.ad
+.RS 7n
+.rt
+Unable to access either or both of the specified \fBsrc\fR or \fBdst\fR
+directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB128\fR\fR
+.ad
+.RS 7n
+.rt
+Miscellaneous other failures.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.packingrules\fR\fR
+.ad
+.RS 24n
+.rt
+list of files to be kept synchronized
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.filesync-base\fR\fR
+.ad
+.RS 24n
+.rt
+baseline summary file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcachefspack\fR(1M), \fBpackingrules\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/find.1 b/usr/src/man/man1/find.1
new file mode 100644
index 0000000000..06703ab991
--- /dev/null
+++ b/usr/src/man/man1/find.1
@@ -0,0 +1,1075 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c)
+.\" 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH find 1 "15 Aug 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+find \- find files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/find\fR [\fB-H\fR | \fB-L\fR] \fIpath\fR... \fIexpression\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/find\fR [\fB-H\fR | \fB-L\fR] \fIpath\fR... \fIexpression\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBfind\fR utility recursively descends the directory hierarchy for each
+\fIpath\fR seeking files that match a Boolean \fIexpression\fR written in the
+primaries specified below.
+.sp
+.LP
+\fBfind\fR is able to descend to arbitrary depths in a file hierarchy and does
+not fail due to path length limitations (unless a \fIpath\fR operand specified
+by the application exceeds \fIPATH_MAX\fR requirements).
+.sp
+.LP
+\fBfind\fR detects infinite loops; that is, entering a previously visited
+directory that is an ancestor of the last file encountered.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the file information and file type evaluated for each symbolic link
+encountered on the command line to be those of the file referenced by the link,
+and not the link itself. If the referenced file does not exist, the file
+information and type is for the link itself. File information for all symbolic
+links not on the command line is that of the link itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the file information and file type evaluated for each symbolic link to
+be those of the file referenced by the link, and not the link itself. See
+\fBNOTES\fR.
+.RE
+
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fR and
+\fB-L\fRis not considered an error. The last option specified determines the
+behavior of the utility.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath\fR\fR
+.ad
+.RS 14n
+.rt
+A pathname of a starting point in the directory hierarchy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression\fR\fR
+.ad
+.RS 14n
+.rt
+The first argument that starts with a \fB\(mi\fR, or is a \fB!\fR or a \fB(\fR,
+and all subsequent arguments are interpreted as an \fIexpression\fR made up of
+the following primaries and operators. In the descriptions, wherever \fIn\fR is
+used as a primary argument, it is interpreted as a decimal integer optionally
+preceded by a plus (\fB+\fR) or minus (\fB\(mi\fR) sign, as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB+\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+more than \fIn\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+exactly \fIn\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB-\fIn\fR\fR
+.ad
+.RS 6n
+.rt
+less than \fIn\fR
+.RE
+
+.RE
+
+.SS "Expressions"
+.sp
+.LP
+Valid expressions are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-acl\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file have additional ACLs defined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-amin\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+File was last accessed \fIn\fR minutes ago.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-atime\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file was accessed \fIn\fR days ago. The access time of directories
+in \fIpath\fR is changed by \fBfind\fR itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-cmin\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+File's status was last changed \fIn\fR minutes ago.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-cpio\fR \fIdevice\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format
+(5120-byte records).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ctime\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file's status was changed \fIn\fR days ago.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-depth\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Causes descent of the directory hierarchy to be done so that all
+entries in a directory are acted on before the directory itself. This can be
+useful when \fBfind\fR is used with \fBcpio\fR(1) to transfer files that are
+contained in directories without write permission.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-exec\fR \fIcommand\fR\fR
+.ad
+.RS 17n
+.rt
+True if the executed command returns a zero value as exit status. The end of
+command must be punctuated by an escaped semicolon (\fB;\fR). A command
+argument \fB{}\fR is replaced by the current pathname. If the last argument to
+\fB-exec\fR is \fB{}\fR and you specify \fB+\fR rather than the semicolon
+(\fB;\fR), the command is invoked fewer times, with \fB{}\fR replaced by groups
+of pathnames. If any invocation of the command returns a non-zero value as exit
+status, find returns a non-zero exit status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-follow\fR\fR
+.ad
+.RS 17n
+.rt
+Always true and always evaluated no matter where it appears in
+\fIexpression\fR. The behavior is unspecified if \fB-follow\fR is used when the
+\fBfind\fR command is invoked with either the \fB-H\fR or the \fB-L\fR option.
+Causes symbolic links to be followed. When following symbolic links, \fBfind\fR
+keeps track of the directories visited so that it can detect infinite loops.
+For example, such a loop would occur if a symbolic link pointed to an ancestor.
+This expression should not be used with the find-type \fBl\fR expression. See
+\fBNOTES\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-fstype\fR \fItype\fR\fR
+.ad
+.RS 17n
+.rt
+True if the filesystem to which the file belongs is of type \fItype\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-group\fR \fIgname\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file belongs to the group \fIgname\fR. If \fIgname\fR is numeric
+and does not appear in the \fB/etc/group\fR file, or in the
+\fBNIS\fR/\fBNIS+\fR tables, it is taken as a group \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-inum\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file has inode number \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-links\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file has \fIn\fR links.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-local\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file system type is not a remote file system type as defined in the
+\fB/etc/dfs/fstypes\fR file. \fBnfs\fR is used as the default remote filesystem
+type if the \fB/etc/dfs/fstypes\fR file is not present. The \fB-local\fR option
+descends the hierarchy of non-local directories. See \fBEXAMPLES\fR for an
+example of how to search for local files without descending.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ls\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Prints current pathname together with its associated statistics.
+These include (respectively):
+.RS +4
+.TP
+.ie t \(bu
+.el o
+inode number
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+size in kilobytes (1024 bytes)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+protection mode
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+number of hard links
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+user
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+group
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+size in bytes
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+modification time.
+.RE
+If the file is a special file, the size field instead contains the major and
+minor device numbers.
+.sp
+If the file is a symbolic link, the pathname of the linked-to file is printed
+preceded by `\fB\(->\fR\&'. The format is identical to that of \fBls\fR
+\fB-gilds\fR (see \fBls\fR(1B)).
+.sp
+Formatting is done internally, without executing the \fBls\fR program.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-mmin\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+File's data was last modified \fIn\fR minutes ago.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-mount\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Restricts the search to the file system containing the directory
+specified. Does not list mount points to other file systems.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-mtime\fR \fIn\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file's data was modified \fIn\fR days ago.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-name\fR \fIpattern\fR\fR
+.ad
+.RS 17n
+.rt
+True if \fIpattern\fR matches the basename of the current file name. Normal
+shell file name generation characters (see \fBsh\fR(1)) can be used. A
+backslash (\fB\|\e\|\fR) is used as an escape character within the pattern. The
+pattern should be escaped or quoted when \fBfind\fR is invoked from the shell.
+.sp
+Unless the character '\fB\&.\fR' is explicitly specified in the beginning of
+\fIpattern\fR, a current file name beginning with '\fB\&.\fR' does not match
+\fIpattern\fR when using \fB/usr/bin/find\fR. \fB/usr/xpg4/bin/find\fR does not
+make this distinction; wildcard file name generation characters can match file
+names beginning with '\fB\&.\fR'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ncpio\fR \fIdevice\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR
+format (5120 byte records).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-newer\fR \fIfile\fR\fR
+.ad
+.RS 17n
+.rt
+True if the current file has been modified more recently than the argument
+\fIfile\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-nogroup\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file belongs to a group not in the \fB/etc/group\fR file, or in the
+\fBNIS\fR/\fBNIS+\fR tables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-nouser\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file belongs to a user not in the \fB/etc/passwd\fR file, or in the
+\fBNIS\fR/\fBNIS+\fR tables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ok\fR \fIcommand\fR\fR
+.ad
+.RS 17n
+.rt
+Like \fB-exec\fR, except that the generated command line is printed with a
+question mark first, and is executed only if the response is affirmative.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-perm\fR [\fB-\fR]\fImode\fR\fR
+.ad
+.RS 17n
+.rt
+The \fImode\fR argument is used to represent file mode bits. It is identical in
+format to the symbolic mode operand, \fIsymbolic_mode_list\fR, described in
+\fBchmod\fR(1), and is interpreted as follows. To start, a template is assumed
+with all file mode bits cleared. An \fIop\fR symbol of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 8n
+.rt
+Set the appropriate mode bits in the template
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 8n
+.rt
+Clear the appropriate bits
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR\fR
+.ad
+.RS 8n
+.rt
+Set the appropriate mode bits, without regard to the contents of the file mode
+creation mask of the process
+.RE
+
+The \fIop\fR symbol of \fB\(mi\fR cannot be the first character of \fImode\fR,
+to avoid ambiguity with the optional leading hyphen. Since the initial mode is
+all bits off, there are no symbolic modes that need to use \fB\(mi\fR as the
+first character.
+.sp
+If the hyphen is omitted, the primary evaluates as true when the file
+permission bits exactly match the value of the resulting template.
+.sp
+Otherwise, if \fImode\fR is prefixed by a hyphen, the primary evaluates as true
+if at least all the bits in the resulting template are set in the file
+permission bits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-perm\fR [\fB-\fR]\fIonum\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file permission flags exactly match the octal number \fIonum\fR
+(see \fBchmod\fR(1)). If \fIonum\fR is prefixed by a minus sign (\fB\(mi\fR),
+only the bits that are set in \fIonum\fR are compared with the file permission
+flags, and the expression evaluates true if they match.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-print\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Causes the current pathname to be printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-prune\fR\fR
+.ad
+.RS 17n
+.rt
+Always yields true. Does not examine any directories or files in the directory
+structure below the \fIpattern\fR just matched. (See EXAMPLES). If \fB-depth\fR
+is specified, \fB-prune\fR has no effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-size\fR \fIn\fR[\fBc\fR]\fR
+.ad
+.RS 17n
+.rt
+True if the file is \fIn\fR blocks long (512 bytes per block). If \fIn\fR is
+followed by a \fBc\fR, the size is in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-type\fR \fIc\fR\fR
+.ad
+.RS 17n
+.rt
+True if the type of the file is \fIc\fR, where \fIc\fR is \fBb\fR, \fBc\fR,
+\fBd\fR, \fBD\fR, \fBf\fR, \fBl\fR, \fBp\fR, or \fBs\fR for block special file,
+character special file, directory, door, plain file, symbolic link, fifo (named
+pipe), or socket, respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-user\fR \fIuname\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file belongs to the user \fIuname\fR. If \fIuname\fR is numeric and
+does not appear as a login name in the \fB/etc/passwd\fR file, or in the
+\fBNIS\fR/\fBNIS+\fR tables, it is taken as a user \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-xdev\fR\fR
+.ad
+.RS 17n
+.rt
+Same as the \fB-mount\fR primary.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-xattr\fR\fR
+.ad
+.RS 17n
+.rt
+True if the file has extended attributes.
+.RE
+
+.SS "Complex Expressions"
+.sp
+.LP
+The primaries can be combined using the following operators (in order of
+decreasing precedence):
+.sp
+.ne 2
+.mk
+.na
+\fB1)\fB(\fR\fIexpression\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+True if the parenthesized expression is true (parentheses are special to the
+shell and must be escaped).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB2)\fB!\fR\fIexpression\fR\fR
+.ad
+.sp .6
+.RS 4n
+The negation of a primary (\fB!\fR is the unary \fInot\fR operator).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB3) \fIexpression\fR\fB[\fR\fB-a\fR\fB]\fR \fIexpression\fR\fR
+.ad
+.sp .6
+.RS 4n
+Concatenation of primaries (the \fIand\fR operation is implied by the
+juxtaposition of two primaries).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB4) \fIexpression\fR\fB\fR\fB-o\fR\fIexpression\fR\fR
+.ad
+.sp .6
+.RS 4n
+Alternation of primaries (\fB-o\fR is the \fIor\fR operator).
+.RE
+
+.sp
+.LP
+When you use \fBfind\fR in conjunction with \fBcpio\fR, if you use the \fB-L\fR
+option with \fBcpio\fR, you must use the \fB-L\fR option or the \fB-follow\fR
+primitive with \fBfind\fR and vice versa. Otherwise the results are
+unspecified.
+.sp
+.LP
+If no \fIexpression\fR is present, \fB-print\fR is used as the expression.
+Otherwise, if the specified expression does not contain any of the primaries
+\fB-exec\fR, \fB-ok\fR, \fB-ls\fR, or \fB-print\fR, the specified expression is
+effectively replaced by:
+.sp
+.LP
+(\fIspecified\fR) \fB-print\fR
+.sp
+.LP
+The \fB-user\fR, \fB-group\fR, and \fB-newer\fR primaries each evaluate their
+respective arguments only once. Invocation of \fIcommand\fR specified by
+\fB-exec\fR or \fB-ok\fR does not affect subsequent primaries on the same file.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBfind\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRWriting Out the Hierarchy Directory
+.sp
+.LP
+The following commands are equivalent:
+
+.sp
+.in +2
+.nf
+example% \fBfind .\fR
+example% \fBfind . -print\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+They both write out the entire directory hierarchy from the current directory.
+
+.LP
+\fBExample 2 \fRRemoving Files
+.sp
+.LP
+The following comand removes all files in your home directory named \fBa.out\fR
+or \fB*.o\fR that have not been accessed for a week:
+
+.sp
+.in +2
+.nf
+example% \fBfind $HOME \e( -name a.out -o -name '*.o' \e) \e
+ -atime +7 -exec rm {} \e;\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrinting All File Names But Skipping SCCS Directories
+.sp
+.LP
+The following command recursively print all file names in the current directory
+and below, but skipping \fBSCCS\fR directories:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -name SCCS -prune -o -print\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRPrinting all file names and the SCCS directory name
+.sp
+.LP
+Recursively print all file names in the current directory and below, skipping
+the contents of \fBSCCS\fR directories, but printing out the \fBSCCS\fR
+directory name:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -print -name SCCS -prune\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRTesting for the Newer File
+.sp
+.LP
+The following command is basically equivalent to the \fB-nt\fR extension to
+\fBtest\fR(1):
+
+.sp
+.in +2
+.nf
+example$ \fBif [ -n "$(find
+file1 -prune -newer file2)" ]; then
+
+printf %s\e\en "file1 is newer than file2"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRSelecting a File Using 24-hour Mode
+.sp
+.LP
+The descriptions of \fB-atime\fR, \fB-ctime\fR, and \fB-mtime\fR use the
+terminology \fIn\fR ``24-hour periods''. For example, a file accessed at 23:59
+is selected by:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -atime -1 -print\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+at 00:01 the next day (less than 24 hours later, not more than one day ago).
+The midnight boundary between days has no effect on the 24-hour calculation.
+
+.LP
+\fBExample 7 \fRPrinting Files Matching a User's Permission Mode
+.sp
+.LP
+The following command recursively print all file names whose permission mode
+exactly matches read, write, and execute access for user, and read and execute
+access for group and other:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -perm u=rwx,g=rx,o=rx\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The above could alternatively be specified as follows:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -perm a=rwx,g-w,o-w\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRPrinting Files with Write Access for \fBother\fR
+.sp
+.LP
+The following command recursively print all file names whose permission
+includes, but is not limited to, write access for other:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -perm -o+w\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRPrinting Local Files without Descending Non-local Directories
+.sp
+.in +2
+.nf
+example% \fBfind . ! -local -prune -o -print\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 10 \fRPrinting the Files in the Name Space Possessing Extended
+Attributes
+.sp
+.in +2
+.nf
+example% \fBfind . -xattr\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBfind\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 8n
+.rt
+Determine the location of the \fIutility_name\fR for the \fB-exec\fR and
+\fB-ok\fR primaries.
+.RE
+
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All \fIpath\fR operands were traversed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 20n
+.rt
+Password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 20n
+.rt
+Group file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/dfs/fstypes\fR\fR
+.ad
+.RS 20n
+.rt
+File that registers distributed file system packages
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBcpio\fR(1), \fBsh\fR(1), \fBtest\fR(1), \fBls\fR(1B),
+\fBacl\fR(2), \fBstat\fR(2), \fBumask\fR(2), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBfsattr\fR(5), \fBlargefile\fR(5), \fBlocale\fR(5),
+\fBstandards\fR(5)
+.SH WARNINGS
+.sp
+.LP
+The following options are obsolete and will not be supported in future
+releases:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-cpio\fR \fIdevice\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR format
+(5120-byte records).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ncpio\fR \fIdevice\fR\fR
+.ad
+.RS 17n
+.rt
+Always true. Writes the current file on \fIdevice\fR in \fBcpio\fR \fB-c\fR
+format (5120-byte records).
+.RE
+
+.SH NOTES
+.sp
+.LP
+When using \fBfind\fR to determine files modified within a range of time, use
+the \fB-mtime\fR argument \fBbefore\fR the \fB-print\fR argument. Otherwise,
+\fBfind\fR gives all files.
+.sp
+.LP
+Some files that might be under the Solaris root file system are actually mount
+points for virtual file systems, such as \fBmntfs\fR or \fBnamefs\fR. When
+comparing against a \fBufs\fR file system, such files are not selected if
+\fB-mount\fR or \fB-xdev\fR is specified in the \fBfind\fR expression.
+.sp
+.LP
+Using the \fB-L\fR or \fB-follow\fR option is not recommended when descending a
+file-system hierarchy that is under the control of other users. In particular,
+when using \fB-exec\fR, symbolic links can lead the \fBfind\fR command out of
+the hierarchy in which it started. Using \fB-type\fR is not sufficient to
+restrict the type of files on which the \fB-exec\fR command operates, because
+there is an inherent race condition between the type-check performed by the
+\fBfind\fR command and the time the executed command operates on the file
+argument.
diff --git a/usr/src/man/man1/finger.1 b/usr/src/man/man1/finger.1
new file mode 100644
index 0000000000..9af0320f24
--- /dev/null
+++ b/usr/src/man/man1/finger.1
@@ -0,0 +1,337 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1980 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved.
+.TH finger 1 "6 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+finger \- display information about local and remote users
+.SH SYNOPSIS
+.LP
+.nf
+\fBfinger\fR [\fB-bfhilmpqsw\fR] [\fIusername\fR]...
+.fi
+
+.LP
+.nf
+\fBfinger\fR [\fB-l\fR]
+ [\fIusername@hostname\fR 1 [\fI@hostname\fR 2 \fI\&..\fR \fI\&.@hostname\fR n]...]
+.fi
+
+.LP
+.nf
+\fBfinger\fR [\fB-l\fR] [\fI@hostname\fR 1 [\fI@hostname\fR 2 \fI\&..\fR \fI\&.@hostname\fR n]...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+By default, the \fBfinger\fR command displays in multi-column format the
+following information about each logged-in user:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+user name
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+user's full name
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+terminal name (prepended with a `*\|' (asterisk) if write-permission is
+denied)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+idle time
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+login time
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+host name, if logged in remotely
+.RE
+.sp
+.LP
+Idle time is in minutes if it is a single integer, in hours and minutes if a
+`:\|' (colon) is present, or in days and hours if a `d' is present.
+.sp
+.LP
+When one or more \fIusername\fR arguments are given, more detailed information
+is given for each \fIusername\fR specified, whether they are logged in or not.
+\fIusername\fR must be that of a local user, and may be a first or last name,
+or an account name. Information is presented in multi-line format as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the user name and the user's full name
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the user's home directory and login shell
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+time the user logged in if currently logged in, or the time the user last
+logged in; and the terminal or host from which the user logged in
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+last time the user received mail, and the last time the user read mail
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the first line of the \fB$HOME/.project\fR file, if it exists
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the contents of the \fB$HOME/.plan\fR file, if it exists
+.RE
+.sp
+.LP
+Note: when the comment (GECOS) field in \fB/etc/passwd\fR includes a comma,
+\fBfinger\fR does not display the information following the comma.
+.sp
+.LP
+If the arguments
+\fIusername@hostname\fR1[\fI@hostname\fR2\fI\|.\|.\|.@hostname\fRn] or
+\fI@hostname\fR1[\fI@hostname\fR2\fI\|.\|.\|.@hostname\fRn] are used, the
+request is sent first to \fBhostname\fRn and forwarded through each
+\fBhostname\fRn-1 to \fBhostname\fR1. The program uses the \fBfinger user
+information protocol\fR (see RFC 1288) to query that remote host for
+information about the named user (if \fIusername\fR is specified), or about
+each logged-in user. The information displayed is server dependent.
+.sp
+.LP
+As required by RFC 1288, \fBfinger\fR passes only printable, 7-bit \fBASCII\fR
+data. This behavior may be modified by a system administrator by using the
+\fBPASS\fR option in \fB/etc/default/finger\fR. Specifying \fBPASS=low\fR
+allows all characters less than decimal 32 ASCII. Specifying \fBPASS=high\fR
+allows all characters greater than decimal 126 \fBASCII\fR. \fBPASS=low,high\fR
+or \fBPASS=high,low\fR allows both characters less than 32 and greater than 126
+to pass through.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported, except that the \fIusername@hostname\fR
+form supports only the \fB-l\fR option:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fR
+.ad
+.RS 7n
+.rt
+Suppresses printing the user's home directory and shell in a long format
+printout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 7n
+.rt
+Suppresses printing the header that is normally printed in a non-long format
+printout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fR
+.ad
+.RS 7n
+.rt
+Suppresses printing of the \fB\&.project\fR file in a long format printout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fR
+.ad
+.RS 7n
+.rt
+Forces "idle" output format, which is similar to short format except that only
+the login name, terminal, login time, and idle time are printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fR
+.ad
+.RS 7n
+.rt
+Forces long output format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fR
+.ad
+.RS 7n
+.rt
+Matches arguments only on user name (not first or last name).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fR
+.ad
+.RS 7n
+.rt
+Suppresses printing of the \fB\&.plan\fR file in a long format printout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR \fR
+.ad
+.RS 7n
+.rt
+Forces quick output format, which is similar to short format except that only
+the login name, terminal, and login time are printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 7n
+.rt
+Forces short output format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fR
+.ad
+.RS 7n
+.rt
+Suppresses printing the full name in a short format printout.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.plan \fR \fR
+.ad
+.RS 24n
+.rt
+user's plan
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.project\fR \fR
+.ad
+.RS 24n
+.rt
+user's projects
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/default/finger\fR \fR
+.ad
+.RS 24n
+.rt
+\fBfinger\fR options file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 24n
+.rt
+password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/lastlog\fR \fR
+.ad
+.RS 24n
+.rt
+time of last login
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR \fR
+.ad
+.RS 24n
+.rt
+accounting
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpasswd\fR(1), \fBwho\fR(1), \fBwhois\fR(1), \fBpasswd\fR(4),
+\fBattributes\fR(5)
+.sp
+.LP
+Zimmerman, D., \fIThe Finger User Information Protocol\fR, RFC 1288, Center for
+Discrete Mathematics and Theoretical Computer Science (DIMACS), Rutgers
+University, December 1991.
+.SH NOTES
+.sp
+.LP
+The \fBfinger user information protocol\fR limits the options that may be used
+with the remote form of this command.
diff --git a/usr/src/man/man1/fmt.1 b/usr/src/man/man1/fmt.1
new file mode 100644
index 0000000000..824b8cfe96
--- /dev/null
+++ b/usr/src/man/man1/fmt.1
@@ -0,0 +1,107 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH fmt 1 "9 May 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+fmt \- simple text formatters
+.SH SYNOPSIS
+.LP
+.nf
+\fBfmt\fR [\fB-cs\fR] [\fB-w\fR \fIwidth\fR | \fB-width\fR] [\fIinputfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBfmt\fR is a simple text formatter that fills and joins lines to produce
+output lines of (up to) the number of characters specified in the \fB-w\fR\fI
+width\fR option. The default \fIwidth\fR is \fB72\fR. \fBfmt\fR concatenates
+the \fIinputfile\fRs listed as arguments. If none are given, \fBfmt\fR formats
+text from the standard input.
+.sp
+.LP
+Blank lines are preserved in the output, as is the spacing between words.
+\fBfmt\fR does not fill nor split lines beginning with a `\fB\&.\fR' (dot), for
+compatibility with \fBnroff\fR(1). Nor does it fill or split a set of
+contiguous non-blank lines which is determined to be a mail header, the first
+line of which must begin with "\fBFrom\fR".
+.sp
+.LP
+Indentation is preserved in the output, and input lines with differing
+indentation are not joined (unless \fB-c\fR is used).
+.sp
+.LP
+\fBfmt\fR can also be used as an in-line text filter for \fBvi\fR(1). The
+\fBvi\fR command:
+.sp
+.LP
+\fB!}fmt\fR
+.sp
+.LP
+reformats the text between the cursor location and the end of the paragraph.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 21n
+.rt
+Crown margin mode. Preserve the indentation of the first two lines within a
+paragraph, and align the left margin of each subsequent line with that of the
+second line. This is useful for tagged paragraphs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 21n
+.rt
+Split lines only. Do not join short lines to form longer ones. This prevents
+sample lines of code, and other such formatted text, from being unduly
+combined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fI width\fR | \fB-\fR\fIwidth\fR\fR
+.ad
+.RS 21n
+.rt
+Fill output lines to up to \fIwidth\fR columns.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinputfile\fR\fR
+.ad
+.RS 13n
+.rt
+Input file.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for a description of the \fBLC_CTYPE\fR environment
+variable that affects the execution of \fBfmt\fR.
+.SH SEE ALSO
+.sp
+.LP
+\fBnroff\fR(1), \fBvi\fR(1), \fBattributes\fR(5), \fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fB-\fR\fIwidth\fR option is acceptable for \fBBSD\fR compatibility, but it
+may go away in future releases.
diff --git a/usr/src/man/man1/fmtmsg.1 b/usr/src/man/man1/fmtmsg.1
new file mode 100644
index 0000000000..119c293e1e
--- /dev/null
+++ b/usr/src/man/man1/fmtmsg.1
@@ -0,0 +1,583 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1994, Sun Microsystems, Inc. All Rights Reserved
+.\" 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH fmtmsg 1 "20 Jul 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+fmtmsg \- display a message on stderr or system console
+.SH SYNOPSIS
+.LP
+.nf
+\fBfmtmsg\fR [\fB-c\fR \fIclass\fR] [\fB-u\fR \fIsubclass\fR] [\fB-l\fR \fIlabel\fR] [\fB-s\fR \fIseverity\fR]
+ [\fB-t\fR \fItag\fR] [\fB-a\fR \fIaction\fR] \fItext\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Based on a message's classification component, the \fBfmtmsg\fR utility either
+writes a formatted message to \fBstderr\fR or writes a formatted message to the
+console.
+.sp
+.LP
+A formatted message consists of up to five standard components (see environment
+variable \fBMSGVERB\fR in the ENVIRONMENT VARIABLES section of this page). The
+classification and subclass components are not displayed as part of the
+standard message, but rather define the source of the message and direct the
+display of the formatted message.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIclass\fR \fR
+.ad
+.RS 16n
+.rt
+Describes the source of the message. Valid keywords are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhard\fR \fR
+.ad
+.RS 9n
+.rt
+The source of the condition is hardware.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsoft\fR \fR
+.ad
+.RS 9n
+.rt
+The source of the condition is software.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfirm\fR \fR
+.ad
+.RS 9n
+.rt
+The source of the condition is firmware.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIsubclass\fR \fR
+.ad
+.RS 16n
+.rt
+A list of keywords (separated by commas) that further defines the message and
+directs the display of the message. Valid keywords are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBappl\fR \fR
+.ad
+.RS 12n
+.rt
+The condition originated in an application. This keyword should not be used in
+combination with either \fButil\fR or \fBopsys\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fButil\fR \fR
+.ad
+.RS 12n
+.rt
+The condition originated in a utility. This keyword should not be used in
+combination with either \fBappl\fR or \fBopsys\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBopsys\fR \fR
+.ad
+.RS 12n
+.rt
+The message originated in the kernel. This keyword should not be used in
+combination with either \fBappl\fR or \fButil\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrecov\fR \fR
+.ad
+.RS 12n
+.rt
+The application will recover from the condition. This keyword should not be
+used in combination with \fBnrecov\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnrecov\fR \fR
+.ad
+.RS 12n
+.rt
+The application will not recover from the condition. This keyword should not be
+used in combination with \fBrecov\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprint\fR \fR
+.ad
+.RS 12n
+.rt
+Print the message to the standard error stream \fBstderr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBconsole\fR \fR
+.ad
+.RS 12n
+.rt
+Write the message to the system console. \fBprint\fR, \fBconsole\fR, or both
+may be used.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlabel\fR \fR
+.ad
+.RS 16n
+.rt
+Identifies the source of the message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIseverity\fR \fR
+.ad
+.RS 16n
+.rt
+Indicates the seriousness of the error. The keywords and definitions of the
+standard levels of \fIseverity\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhalt\fR \fR
+.ad
+.RS 9n
+.rt
+The application has encountered a severe fault and is halting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerror\fR\fR
+.ad
+.RS 9n
+.rt
+The application has detected a fault.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwarn\fR\fR
+.ad
+.RS 9n
+.rt
+The application has detected a condition that is out of the ordinary and might
+be a problem.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinfo\fR \fR
+.ad
+.RS 9n
+.rt
+The application is providing information about a condition that is not in
+error.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItag\fR \fR
+.ad
+.RS 16n
+.rt
+The string containing an identifier for the message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIaction\fR \fR
+.ad
+.RS 16n
+.rt
+A text string describing the first step in the error recovery process. This
+string must be written so that the entire \fIaction\fR argument is interpreted
+as a single argument. \fBfmtmsg\fR precedes each action string with the \fBTO
+FIX:\fR prefix.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItext\fR \fR
+.ad
+.RS 16n
+.rt
+A text string describing the condition. Must be written so that the entire
+\fItext\fR argument is interpreted as a single argument.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRStandard message format
+.sp
+.LP
+The following example of \fBfmtmsg\fR produces a complete message in the
+standard message format and displays it to the standard error stream.
+
+.sp
+.in +2
+.nf
+example% \fBfmtmsg -c soft -u recov,print,appl -l UX:cat \e
+ -s error -t UX:cat:001 -a "refer to manual" "invalid syntax"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+UX:cat: ERROR: invalid syntax
+TO FIX: refer to manual UX:cat:138
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing MSGVERB
+.sp
+.LP
+When the environment variable \fBMSGVERB\fR is set as follows:
+
+.sp
+.in +2
+.nf
+\fBMSGVERB=severity:text:action\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and Example 1 is used, \fBfmtmsg\fR produces:
+
+.sp
+.in +2
+.nf
+ERROR: invalid syntax
+TO FIX: refer to manual
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing SEV_LEVEL
+.sp
+.LP
+When the environment variable \fBSEV_LEVEL\fR is set as follows:
+
+.sp
+.in +2
+.nf
+\fBSEV_LEVEL=note,5,NOTE\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the following \fBfmtmsg\fR command:
+
+.sp
+.in +2
+.nf
+example% \fBfmtmsg -c soft -u print -l UX:cat -s note \e
+ -a "refer to manual" "invalid syntax"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+NOTE: invalid syntax
+TO FIX: refer to manual
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and displays the message on \fBstderr\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+The environment variables \fBMSGVERB\fR and \fBSEV_LEVEL\fR control the
+behavior of \fBfmtmsg\fR. \fBMSGVERB\fR is set by the administrator in the
+\fB/etc/profile\fR for the system. Users can override the value of
+\fBMSGVERB\fR set by the system by resetting \fBMSGVERB\fR in their own
+\fB\&.profile\fR files or by changing the value in their current shell session.
+\fBSEV_LEVEL\fR can be used in shell scripts.
+.sp
+.LP
+\fBMSGVERB\fR tells \fBfmtmsg\fR which message components to select when
+writing messages to \fBstderr\fR. The value of \fBMSGVERB\fR is a
+colon-separated list of optional keywords. \fBMSGVERB\fR can be set as follows:
+.sp
+.in +2
+.nf
+\fBMSGVERB=[\fIkeyword\fR[:\fIkeyword\fR[:...]]]
+export MSGVERB\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Valid \fIkeyword\fRs are: \fBlabel\fR, \fBseverity\fR, \fBtext\fR,
+\fBaction\fR, and \fBtag\fR. If \fBMSGVERB\fR contains a keyword for a
+component and the component's value is not the component's null value,
+\fBfmtmsg\fR includes that component in the message when writing the message to
+\fBstderr\fR. If \fBMSGVERB\fR does not include a keyword for a message
+component, that component is not included in the display of the message. The
+keywords may appear in any order. If \fBMSGVERB\fR is not defined, if its value
+is the null string, if its value is not of the correct format, or if it
+contains keywords other than the valid ones listed above, \fBfmtmsg\fR selects
+all components.
+.sp
+.LP
+\fBMSGVERB\fR affects only which message components are selected for display.
+All message components are included in console messages.
+.sp
+.LP
+\fBSEV_LEVEL\fR defines severity levels and associates print strings with them
+for use by \fBfmtmsg\fR. The standard severity levels shown below cannot be
+modified. Additional severity levels can be defined, redefined, and removed.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+(no severity is used)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+\fBHALT\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR \fR
+.ad
+.RS 6n
+.rt
+\fBERROR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR \fR
+.ad
+.RS 6n
+.rt
+\fBWARNING\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR \fR
+.ad
+.RS 6n
+.rt
+\fBINFO\fR
+.RE
+
+.sp
+.LP
+\fBSEV_LEVEL\fR is set as follows:
+.sp
+.LP
+\fIdescription\fR is a comma-separated list containing three fields:
+.sp
+.in +2
+.nf
+\fBSEV_LEVEL= [\fIdescription\fR[:\fIdescription\fR[:...]]]
+export SEV_LEVEL\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fIdescription\fR=\fIseverity_keyword\fR, \fIlevel\fR, \fIprintstring\fR
+.sp
+.LP
+\fIseverity_keyword\fR is a character string used as the keyword with the
+\fB-s\fR \fIseverity\fR option to \fBfmtmsg\fR.
+.sp
+.LP
+\fIlevel\fR is a character string that evaluates to a positive integer (other
+than \fB0\fR, \fB1\fR, \fB2\fR, \fB3\fR, or \fB4\fR, which are reserved for the
+standard severity levels). If the keyword \fIseverity_keyword\fR is used,
+\fIlevel\fR is the severity value passed on to \fBfmtmsg\fR(3C).
+.sp
+.LP
+\fIprintstring\fR is the character string used by \fBfmtmsg\fR in the standard
+message format whenever the severity value \fIlevel\fR is used.
+.sp
+.LP
+If \fBSEV_LEVEL\fR is not defined, or if its value is null, no severity levels
+other than the defaults are available. If a \fIdescription\fR in the colon
+separated list is not a comma separated list containing three fields, or if the
+second field of a comma separated list does not evaluate to a positive integer,
+that \fIdescription\fR in the colon separated list is ignored.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+All the requested functions were executed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 7n
+.rt
+The command contains a syntax error, an invalid option, or an invalid argument
+to an option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR \fR
+.ad
+.RS 7n
+.rt
+The function executed with partial success, however the message was not
+displayed on \fBstderr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR \fR
+.ad
+.RS 7n
+.rt
+The function executed with partial success; however, the message was not
+displayed on the system console.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR \fR
+.ad
+.RS 7n
+.rt
+No requested functions were executed successfully.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaddseverity\fR(3C), \fBfmtmsg\fR(3C), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/fold.1 b/usr/src/man/man1/fold.1
new file mode 100644
index 0000000000..78ee6b5654
--- /dev/null
+++ b/usr/src/man/man1/fold.1
@@ -0,0 +1,220 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH fold 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+fold \- filter for folding lines
+.SH SYNOPSIS
+.LP
+.nf
+\fBfold\fR [\fB-bs\fR] [\fB-w\fR \fIwidth\fR | \fB-width\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBfold\fR utility is a filter that will fold lines from its input files,
+breaking the lines to have a maximum of \fIwidth\fR column positions (or bytes,
+if the \fB-b\fR option is specified). Lines will be broken by the insertion of
+a NEWLINE character such that each output line (referred to later in this
+section as a segment) is the maximum width possible that does not exceed the
+specified number of column positions (or bytes). A line will not be broken in
+the middle of a character. The behavior is undefined if \fIwidth\fR is less
+than the number of columns any single character in the input would occupy.
+.sp
+.LP
+If the CARRIAGE-RETURN, BACKSPACE, or TAB characters are encountered in the
+input, and the \fB-b\fR option is not specified, they will be treated
+specially:
+.sp
+.ne 2
+.mk
+.na
+\fBBACKSPACE \fR
+.ad
+.RS 20n
+.rt
+The current count of line width will be decremented by one, although the count
+never will become negative. \fBfold\fR will not insert a NEWLINE character
+immediately before or after any BACKSPACE character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBCARRIAGE-RETURN \fR
+.ad
+.RS 20n
+.rt
+The current count of line width will be set to \fB0\fR. \fBfold\fR will not
+insert a NEWLINE character immediately before or after any CARRIAGE-RETURN
+character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBTAB \fR
+.ad
+.RS 20n
+.rt
+Each TAB character encountered will advance the column position pointer to the
+next tab stop. Tab stops will be at each column position \fIn\fR such that
+\fIn\fR modulo 8 equals 1.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fR
+.ad
+.RS 20n
+.rt
+Counts \fIwidth\fR in bytes rather than column positions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 20n
+.rt
+If a segment of a line contains a blank character within the first \fIwidth\fR
+column positions (or bytes), breaks the line after the last such blank
+character meeting the width constraints. If there is no blank character meeting
+the requirements, the \fB-s\fR option will have no effect for that output
+segment of the input line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIwidth\fR\fB|\fR\fB-\fR\fIwidth\fR \fR
+.ad
+.RS 20n
+.rt
+Specifies the maximum line length, in column positions (or bytes if \fB-b\fR is
+specified). If \fIwidth\fR is not a positive decimal number, an error is
+returned. The default value is 80.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIfile\fR\fR \fR
+.ad
+.RS 9n
+.rt
+A path name of a text file to be folded. If no \fIfile\fR operands are
+specified, the standard input will be used.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSubmitting a file of possibly long lines to the line printer
+.sp
+.LP
+An example invocation that submits a file of possibly long lines to the line
+printer (under the assumption that the user knows the line width of the printer
+to be assigned by \fBlp\fR(1)):
+
+.sp
+.in +2
+.nf
+example% \fBfold -w 132 bigfile | lp\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBfold\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+All input files were processed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcut\fR(1), \fBpr\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBfold\fR and \fBcut\fR(1) can be used to create text files out of files with
+arbitrary line lengths. \fBfold\fR should be used when the contents of long
+lines need to be kept contiguous. \fBcut\fR should be used when the number of
+lines (or records) needs to remain constant.
+.sp
+.LP
+\fBfold\fR is frequently used to send text files to line printers that
+truncate, rather than fold, lines wider than the printer is able to print
+(usually 80 or 132 column positions).
+.sp
+.LP
+\fBfold\fR may not work correctly if underlining is present.
diff --git a/usr/src/man/man1/ftp.1 b/usr/src/man/man1/ftp.1
new file mode 100644
index 0000000000..519a4b2bfd
--- /dev/null
+++ b/usr/src/man/man1/ftp.1
@@ -0,0 +1,1399 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ftp 1 "6 Jun 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+ftp \- file transfer program
+.SH SYNOPSIS
+.LP
+.nf
+\fBftp\fR [\fB-adfginpstvx\fR] [\fB-m\fR \fIGSS Mech\fR] [\fB-T\fR \fItimeout\fR]
+ [\fIhostname\fR [\fIport\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBftp\fR command is the user interface to the \fBInternet\fR standard File
+Transfer Protocol (\fBFTP\fR). \fBftp\fR transfers files to and from a remote
+network site.
+.sp
+.LP
+The host and optional port with which \fBftp\fR is to communicate can be
+specified on the command line. If this is done, \fBftp\fR immediately attempts
+to establish a connection to an \fBFTP\fR server on that host. Otherwise,
+\fBftp\fR enters its command interpreter and awaits instructions from the user.
+When \fBftp\fR is awaiting commands from the user, it displays the prompt
+\fBftp>\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options can be specified at the command line, or to the command
+interpreter:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 14n
+.rt
+Uses \fBGSSAPI\fR authentication \fBonly\fR. If the authentication fails, this
+option closes the connection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 14n
+.rt
+Enables debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 14n
+.rt
+Forwards local security credentials to the remote server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 14n
+.rt
+Disables filename "globbing".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 14n
+.rt
+Turns off interactive prompting during multiple file transfers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies the \fBGSS\fR-\fBAPI\fR mechanism to use. The default is to use the
+kerberos_v5 mechanism. Supported alternatives are defined in
+\fB/etc/gss/mech\fR (see \fBmech\fR(4)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 14n
+.rt
+Does not attempt "auto-login" upon initial connection. If auto-login is not
+disabled, \fBftp\fR checks the \fB\&.netrc\fR file in the user's home directory
+for an entry describing an account on the remote machine. If no entry exists,
+\fBftp\fR prompts for the login name of the account on the remote machine (the
+default is the login name on the local machine), and, if necessary, prompts for
+a password and an account with which to login.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 14n
+.rt
+Enables passive mode for data transfers. This command is useful when connecting
+to a remote host from behind a connection filtering firewall.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 14n
+.rt
+Skips the \fBSYST\fR command that is sent by default to all remote servers upon
+connection. The system command is what enables the automatic use of binary mode
+rather than the protocol default ascii mode.
+.sp
+As some older servers cannot handle the \fBftp\fR command, this directive is
+provided to allow inter-operability with these servers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 14n
+.rt
+Enables packet tracing (unimplemented).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItimeout\fR\fR
+.ad
+.RS 14n
+.rt
+Enables global connection timer, specified in seconds (decimal). There is a
+timer for the control connection that is reset when anything is sent to the
+server and disabled while the client is prompting for user input. Another
+independent timer is used to monitor incoming or outgoing data connections.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 14n
+.rt
+Shows all responses from the remote server, as well as report on data transfer
+statistics. This is turned on by default if \fBftp\fR is running interactively
+with its input coming from the user's terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 14n
+.rt
+Attempts to use \fBGSSAPI\fR for authentication and encryption. Data and
+Command channel protection is set to "\fBprivate\fR".
+.RE
+
+.sp
+.LP
+The following commands can be specified to the command interpreter:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.sp .6
+.RS 4n
+[ \fIcommand\fR ] Runs \fIcommand\fR as a shell command on the local machine.
+If no \fIcommand\fR is given, invokes an interactive shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR \fImacro-name\fR [ \fIargs\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Executes the macro \fImacro-name\fR that was defined with the \fBmacdef\fR
+command. Arguments are passed to the macro unglobbed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBaccount\fR [ \fIpasswd\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Supplies a supplemental password required by a remote system for access to
+resources once a login has been successfully completed. If no argument is
+included, the user is prompted for an account password in a non-echoing input
+mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBappend\fR \fIlocal-file\fR [ \fIremote-file\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Appends a local file to a file on the remote machine. If \fIremote-file\fR is
+not specified, the local file name is used, subject to alteration by any
+\fBntrans\fR or \fBnmap\fR settings. File transfer uses the current settings
+for "representation type", "file structure", and "transfer mode".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBascii\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the "representation type" to "network \fBASCII\fR". This is the default
+type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbell\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sounds a bell after each file transfer command is completed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbinary\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the "representation type" to "image".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbye\fR\fR
+.ad
+.sp .6
+.RS 4n
+Terminates the \fBFTP\fR session with the remote server and exit \fBftp\fR. An
+\fBEOF\fR also terminates the session and exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcase\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles remote computer file name case mapping during \fBmget\fR commands. When
+\fBcase\fR is on (default is off), remote computer file names with all letters
+in upper case are written in the local directory with the letters mapped to
+lower case.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR \fIremote-directory\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes the working directory on the remote machine to \fIremote-directory\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcdup\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes the remote machine working directory to the parent of the current
+remote machine working directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclear\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the protection level on data transfers to "\fBclear\fR". If no \fBADAT\fR
+command succeeded, then this is the default protection level.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Terminates the \fBFTP\fR session with the remote server, and return to the
+command interpreter. Any defined macros are erased.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles RETURN stripping during "network \fBASCII\fR" type file retrieval.
+Records are denoted by a RETURN/\fBLINEFEED\fR sequence during "network
+\fBASCII\fR" type file transfer. When \fBcr\fR is on (the default), RETURN
+characters are stripped from this sequence to conform with the UNIX system
+single \fBLINEFEED\fR record delimiter. Records on non-UNIX-system remote hosts
+can contain single \fBLINEFEED\fR characters; when an "network \fBASCII\fR"
+type transfer is made, these \fBLINEFEED\fR characters can be distinguished
+from a record delimiter only when \fBcr\fR is off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdelete\fR \fIremote-file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Deletes the file \fIremote-file\fR on the remote machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdebug\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles debugging mode. When debugging is on, \fBftp\fR prints each command
+sent to the remote machine, preceded by the string \fB->\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdir\fR [ \fIremote-directory\fR [ \fIlocal-file\fR ]]\fR
+.ad
+.sp .6
+.RS 4n
+Prints a listing of the directory contents in the directory,
+\fIremote-directory\fR, and, optionally, placing the output in
+\fIlocal-file\fR. If no directory is specified, the current working directory
+on the remote machine is used. If no local file is specified, or
+\fIlocal-file\fR is \fB\(mi\fR, output is sent to the terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisconnect\fR\fR
+.ad
+.sp .6
+.RS 4n
+A synonym for \fBclose\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBform\fR [ \fIformat-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets the carriage control format subtype of the "representation type" to
+\fIformat-name\fR. The only valid \fIformat-name\fR is \fBnon-print\fR, which
+corresponds to the default "non-print" subtype.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBget\fR \fIremote-file\fR [ \fIlocal-file\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Retrieves the \fIremote-file\fR and store it on the local machine. If the local
+file name is not specified, it is given the same name it has on the remote
+machine, subject to alteration by the current \fBcase\fR, \fBntrans\fR, and
+\fBnmap\fR settings. The current settings for "representation type", "file
+structure", and "transfer mode" are used while transferring the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBglob\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles filename expansion, or "globbing", for \fBmdelete\fR, \fBmget\fR and
+\fBmput\fR. If globbing is turned off, filenames are taken literally.
+.sp
+Globbing for \fBmput\fR is done as in \fBsh\fR(1). For \fBmdelete\fR and
+\fBmget\fR, each remote file name is expanded separately on the remote machine,
+and the lists are not merged.
+.sp
+Expansion of a directory name is likely to be radically different from
+expansion of the name of an ordinary file: the exact result depends on the
+remote operating system and \fBFTP\fR server, and can be previewed with the
+command, \fBmls\fR \fIremote-files\fR \(mi.
+.sp
+\fBmget\fR and \fBmput\fR are not meant to transfer entire directory subtrees
+of files. You can do this by transferring a \fBtar\fR(1) archive of the subtree
+(using a "representation type" of "image" as set by the \fBbinary\fR command).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhash\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles hash-sign (\fB#\fR) printing for each data block transferred. The size
+of a data block is 8192 bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhelp\fR [ \fIcommand\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Prints an informative message about the meaning of \fIcommand\fR. If no
+argument is given, \fBftp\fR prints a list of the known commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlcd\fR [ \fIdirectory\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Changes the working directory on the local machine. If no \fIdirectory\fR is
+specified, the user's home directory is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBls\fR [ \fB-al\fR | \fIremote-directory\fR [ \fIlocal-file\fR ]]\fR
+.ad
+.sp .6
+.RS 4n
+By default, prints an abbreviated listing of the contents of a directory on the
+remote machine. This default behavior can be changed to make \fBls\fR a synonym
+of the \fBdir\fR command. This change can be achieved by setting
+\fBFTP_LS_SENDS_NLST\fR to '\fBno\fR' in \fB/etc/default/ftp\fR or in the
+environment. See \fBftp\fR(4) for details.
+.sp
+The \fB-a\fR option lists all entries, including those that begin with a dot
+(\fB\&.\fR), which are normally not listed. The \fB-l\fR option lists files 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 rather than a
+size. If the file is a symbolic link, the filename is printed followed by
+"\fB\(->\fR" and the pathname of the referenced file.
+.sp
+If \fIremote-directory\fR is left unspecified, the current working directory is
+used.
+.sp
+If no local file is specified, or if \fIlocal-file\fR is \fB\(mi\fR, the output
+is sent to the terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmacdef\fR \fImacro-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Defines a macro. Subsequent lines are stored as the macro \fImacro-name\fR. A
+null line (consecutive \fBNEWLINE\fR characters in a file or RETURN characters
+from the terminal) terminates macro input mode. There is a limit of 16 macros
+and 4096 total characters in all defined macros. Macros remain defined until a
+\fBclose\fR command is executed.
+.sp
+The macro processor interprets \fB$\fR and \fB\e\fR as special characters. A
+\fB$\fR followed by a number (or numbers) is replaced by the corresponding
+argument on the macro invocation command line. A \fB$\fR followed by an \fBi\fR
+signals that macro processor that the executing macro is to be looped. On the
+first pass, \fB$i\fR is replaced by the first argument on the macro invocation
+command line; on the second pass, it is replaced by the second argument, and so
+on. A \fB\e\fR followed by any character is replaced by that character. Use the
+\fB\e\fR to prevent special treatment of the \fB$\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmdelete\fR \fIremote-files\fR\fR
+.ad
+.sp .6
+.RS 4n
+Deletes the \fIremote-files\fR on the remote machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmdir\fR \fIremote-files local-file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Like \fBdir\fR, except multiple remote files can be specified. If interactive
+prompting is on, \fBftp\fR prompts the user to verify that the last argument is
+indeed the target local file for receiving \fBmdir\fR output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmget\fR \fIremote-files\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands the \fIremote-files\fR on the remote machine and do a \fBget\fR for
+each file name thus produced. See \fBglob\fR for details on the filename
+expansion. Resulting file names are processed according to \fBcase\fR,
+\fBntrans\fR, and \fBnmap\fR settings. Files are transferred into the local
+working directory, which can be changed with \fBlcd\fR \fIdirectory\fR. New
+local directories can be created with \fB! mkdir\fR \fIdirectory\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmkdir\fR \fIdirectory-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Makes a directory on the remote machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmls\fR \fIremote-files local-file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Like \fBls\fR(1), except multiple remote files can be specified. If interactive
+prompting is on, \fBftp\fR prompts the user to verify that the last argument is
+indeed the target local file for receiving \fBmls\fR output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmode\fR [ \fImode-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets the "transfer mode" to \fImode-name\fR. The only valid \fImode-name\fR is
+\fBstream\fR, which corresponds to the default "stream" mode. This
+implementation only supports \fBstream\fR, and requires that it be specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmput\fR \fIlocal-files\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands wild cards in the list of local files given as arguments and do a
+\fBput\fR for each file in the resulting list. See \fBglob\fR for details of
+filename expansion. Resulting file names are processed according to
+\fBntrans\fR and \fBnmap\fR settings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnlist\fR [ \fB-al\fR | \fIremote-directory\fR [ \fIlocal-file\fR ]]\fR
+.ad
+.sp .6
+.RS 4n
+Prints an abbreviated listing of the contents of a directory on the remote
+machine, listing only those files that can be retrieved by the \fBget\fR
+command, unless the \fB-a\fR or \fB-l\fR option is used. If
+\fIremote-directory\fR is left unspecified, the current working directory is
+used.
+.sp
+The \fB-a\fR option lists all entries, including those that begin with a dot
+(\fB\&.\fR), which are normally not listed. The \fB-l\fR option lists files in
+long format the same way it does when used with the \fBls\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnmap\fR [ \fIinpattern outpattern\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets or unsets the filename mapping mechanism. If no arguments are specified,
+the filename mapping mechanism is unset. If arguments are specified, remote
+filenames are mapped during \fBmput\fR commands and \fBput\fR commands issued
+without a specified remote target filename. If arguments are specified, local
+filenames are mapped during \fBmget\fR commands and \fBget\fR commands issued
+without a specified local target filename.
+.sp
+This command is useful when connecting to a non-UNIX-system remote host with
+different file naming conventions or practices. The mapping follows the pattern
+set by \fIinpattern\fR and \fIoutpattern\fR. \fIinpattern\fR is a template for
+incoming filenames (which can have already been processed according to the
+\fBntrans\fR and \fBcase\fR settings). Variable templating is accomplished by
+including the sequences \fB$1\fR, \fB$2\fR, .\|.\|.\|, \fB$9\fR in
+\fIinpattern\fR. Use \fB\e\fR to prevent this special treatment of the \fB$\fR
+character. All other characters are treated literally, and are used to
+determine the \fBnmap\fR \fIinpattern\fR variable values.
+.sp
+For example, given \fIinpattern\fR \fB$1.$2\fR and the remote file name
+\fBmydata.data\fR, \fB$1\fR would have the value \fBmydata\fR, and \fB$2\fR
+would have the value \fBdata\fR.
+.sp
+The \fIoutpattern\fR determines the resulting mapped filename. The sequences
+\fB$1\fR, \fB$2\fR, .\|.\|.\|, \fB$9\fR are replaced by any value resulting
+from the \fIinpattern\fR template. The sequence \fB$0\fR is replaced by the
+original filename. Additionally, the sequence [\fI\|seq1\|\fR,\fI\|seq2\|\fR]
+is replaced by \fIseq1\fR if \fIseq1\fR is not a null string; otherwise it is
+replaced by \fIseq2\fR.
+.sp
+For example, the command \fBnmap $1.$2.$3 [$1,$2].[$2,file]\fR would yield the
+output filename \fBmyfile.data\fR for input filenames \fBmyfile.data\fR and
+\fBmyfile.data.old\fR, \fBmyfile.file\fR for the input filename \fBmyfile\fR,
+and \fBmyfile.myfile\fR for the input filename \fB\&.myfile\fR. \fBSPACE\fR
+characters can be included in \fIoutpattern\fR, as in the example \fBnmap $1 |
+sed "s/ *$//" > $1\fR. Use the \fB\e\fR character to prevent special treatment
+of the \fB$\fR, \fB[\fR, \fB]\fR, and \fB,\fR, characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBntrans\fR [ \fIinchars\fR [ \fIoutchars\fR ] ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets or unsets the filename character translation mechanism. If no arguments
+are specified, the filename character translation mechanism is unset. If
+arguments are specified, characters in remote filenames are translated during
+\fBmput\fR commands and \fBput\fR commands issued without a specified remote
+target filename, and characters in local filenames are translated during
+\fBmget\fR commands and \fBget\fR commands issued without a specified local
+target filename.
+.sp
+This command is useful when connecting to a non-UNIX-system remote host with
+different file naming conventions or practices. Characters in a filename
+matching a character in \fIinchars\fR are replaced with the corresponding
+character in \fIoutchars\fR. If the character's position in \fIinchars\fR is
+longer than the length of \fIoutchars\fR, the character is deleted from the
+file name.
+.sp
+Only 16 characters can be translated when using the \fBntrans\fR command under
+\fBftp\fR. Use \fBcase\fR (described above) if needing to convert the entire
+alphabet.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBopen\fR \fIhost\fR [ \fIport\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Establishes a connection to the specified \fIhost\fR \fBFTP\fR server. An
+optional port number can be supplied, in which case, \fBftp\fR attempts to
+contact an \fBFTP\fR server at that port. If the \fIauto-login\fR option is on
+(default setting), \fBftp\fR also attempts to automatically log the user in to
+the \fBFTP\fR server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpassive\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles passive mode. When passive mode is turned on, the ftp client sends the
+\fBPASV\fR command requesting that the \fBFTP\fR server open a port for the
+data connection and return the address of that port. The remote server listens
+on that port and the client connects to it. When passive mode is turned off,
+the ftp client sends the \fBPORT\fR command to the server specifying an address
+for the remote server to connect back to. Passive mode is useful when the
+connections to the ftp client are controlled, for example, when behind a
+firewall. When connecting to an IPv6-enabled \fBFTP\fR server, \fBEPSV\fR can
+be used in place of \fBPASV\fR and \fBEPRT\fR in place of \fBPORT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprivate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the protection level on data transfers to "\fBprivate\fR". Data
+transmissions are confidentiality\(em and integrity\(emprotected by encryption.
+If no \fBADAT\fR command succeeded, then the only possible level is "clear".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprompt\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles interactive prompting. Interactive prompting occurs during multiple
+file transfers to allow the user to selectively retrieve or store files. By
+default, prompting is turned on. If prompting is turned off, any \fBmget\fR or
+\fBmput\fR transfers all files, and any \fBmdelete\fR deletes all files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprotect\fR \fIprotection-level\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the protection level on data transfers to \fIprotection-level\fR. The
+valid protection levels are "\fBclear\fR" for unprotected data transmissions,
+"\fBsafe\fR" for data transmissions that are integrity-protected by
+cryptographic checksum, and "\fBprivate\fR" for data transmissions that are
+confidentiality\(em and integrity\(em protected by encryption. If no \fBADAT\fR
+command succeeded, then the only possible level is "\fBclear\fR". If no level
+is specified, the current level is printed. The default protection level is
+"\fBclear\fR".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBproxy\fR \fIftp-command\fR\fR
+.ad
+.sp .6
+.RS 4n
+Executes an \fBFTP\fR command on a secondary control connection. This command
+allows simultaneous connection to two remote \fBFTP\fR servers for transferring
+files between the two servers. The first \fBproxy\fR command should be an
+\fBopen\fR, to establish the secondary control connection. Enter the command
+\fBproxy\fR \fB?\fR to see other \fBFTP\fR commands executable on the secondary
+connection.
+.sp
+The following commands behave differently when prefaced by \fBproxy\fR:
+\fBopen\fR does not define new macros during the auto-login process,
+\fBclose\fR does not erase existing macro definitions, \fBget\fR and \fBmget\fR
+transfer files from the host on the primary control connection to the host on
+the secondary control connection, and \fBput\fR, \fBmputd\fR, and \fBappend\fR
+transfer files from the host on the secondary control connection to the host on
+the primary control connection.
+.sp
+Third party file transfers depend upon support of the \fBPASV\fR command by the
+server on the secondary control connection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBput\fR \fIlocal-file\fR [ \fIremote-file\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Stores a local file on the remote machine. If \fIremote-file\fR is left
+unspecified, the local file name is used after processing according to any
+\fBntrans\fR or \fBnmap\fR settings in naming the remote file. File transfer
+uses the current settings for "representation type", "file structure", and
+"transfer mode".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpwd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the name of the current working directory on the remote machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquit\fR\fR
+.ad
+.sp .6
+.RS 4n
+A synonym for \fBbye\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquote\fR \fIarg1 arg2\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+Sends the arguments specified, verbatim, to the remote \fBFTP\fR server. A
+single \fBFTP\fR reply code is expected in return. (The \fBremotehelp\fR
+command displays a list of valid arguments.)
+.sp
+\fBquote\fR should be used only by experienced users who are familiar with the
+FTP protocol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrecv\fR \fIremote-file\fR [ \fIlocal-file\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+ A synonym for \fBget\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreget\fR \fIremote-file\fR [ \fIlocal-file\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+The \fBreget\fR command acts like \fBget\fR, except that if \fIlocal-file\fR
+exists and is smaller than \fIremote-file\fR, \fIlocal-file\fR is presumed to
+be a partially transferred copy of \fIremote-file\fR and the transfer is
+continued from the apparent point of failure. This command is useful when
+transferring large files over networks that are prone to dropping connections.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBremotehelp\fR [ \fIcommand-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Requests help from the remote \fBFTP\fR server. If a \fIcommand-name\fR is
+specified it is supplied to the server as well.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrename\fR \fIfrom to\fR\fR
+.ad
+.sp .6
+.RS 4n
+Renames the file \fIfrom\fR on the remote machine to have the name \fIto\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreset\fR\fR
+.ad
+.sp .6
+.RS 4n
+Clears reply queue. This command re-synchronizes command/reply sequencing with
+the remote \fBFTP\fR server. Resynchronization can be necessary following a
+violation of the \fBFTP\fR protocol by the remote server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrestart\fR [ \fImarker\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Restarts the immediately following \fBget\fR or \fBput\fR at the indicated
+marker. On UNIX systems, \fImarker\fR is usually a byte offset into the file.
+When followed by an \fBmget\fR, the \fBrestart\fR applies to the first
+\fBget\fR performed. Specifying a \fImarker\fR of \fB0\fR clears the restart
+marker. If no argument is specified, the current restart status is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrmdir\fR \fIdirectory-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Deletes a directory on the remote machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrunique\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles storing of files on the local system with unique filenames. If a file
+already exists with a name equal to the target local filename for a \fBget\fR
+or \fBmget\fR command, a \fB\&.1\fR is appended to the name. If the resulting
+name matches another existing file, a \fB\&.2\fR is appended to the original
+name. If this process continues up to \fB\&.99\fR, an error message is printed,
+and the transfer does not take place. The generated unique filename is
+reported. \fBrunique\fR does not affect local files generated from a shell
+command. The default value is off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsafe\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the protection level on data transfers to "\fBsafe\fR". Data transmissions
+are integrity-protected by cryptographic checksum. If no \fBADAT\fR command
+succeeded, then the only possible level is "\fBclear\fR".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsend\fR \fIlocal-file\fR [ \fIremote-file\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A synonym for \fBput\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsendport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles the use of \fBPORT\fR commands. By default, \fBftp\fR attempts to use a
+\fBPORT\fR command when establishing a connection for each data transfer. The
+use of \fBPORT\fR commands can prevent delays when performing multiple file
+transfers. If the \fBPORT\fR command fails, \fBftp\fR uses the default data
+port. When the use of \fBPORT\fR commands is disabled, no attempt is made to
+use \fBPORT\fR commands for each data transfer. This is useful when connected
+to certain \fBFTP\fR implementations that ignore \fBPORT\fR commands but
+incorrectly indicate they have been accepted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsite\fR \fIarg1\fR [ \fIarg2\fR ] ...\fR
+.ad
+.sp .6
+.RS 4n
+Sends the arguments specified, verbatim, to the remote \fBFTP\fR server as a
+\fBSITE\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+Show the current status of \fBftp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstruct\fR [ \fIstruct-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets the file structure to \fIstruct-name\fR. The only valid \fIstruct-name\fR
+is \fBfile\fR, which corresponds to the default "file" structure. The
+implementation only supports \fBfile\fR, and requires that it be specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsunique\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles storing of files on remote machine under unique file names. The remote
+\fBFTP\fR server must support the \fBSTOU\fR command for successful completion.
+The remote server reports the unique name. Default value is off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtcpwindow\fR [ \fIsize\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets the \fBTCP\fR window size to be used for data connections. Specifying a
+size of \fB0\fR stops the explicit setting of the \fBTCP\fR window size on data
+connections. If no argument is specified, the current setting is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtenex\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the "representation type" to that needed to talk to \fBTENEX\fR machines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrace\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles packet tracing (unimplemented).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype\fR [ \fItype-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Sets the "representation type" to \fItype-name\fR. The valid \fItype-name\fRs
+are \fBascii\fR for "network \fBASCII\fR", \fBbinary\fR or \fBimage\fR for
+"image", and \fBtenex\fR for "local byte size" with a byte size of 8 (used to
+talk to \fBTENEX\fR machines). If no type is specified, the current type is
+printed. The default type is "network \fBASCII\fR".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuser\fR \fIuser-name\fR [ \fIpassword\fR [ \fIaccount\fR ]]\fR
+.ad
+.sp .6
+.RS 4n
+Identify yourself to the remote \fBFTP\fR server. If the password is not
+specified and the server requires it, \fBftp\fR prompts the user for it (after
+disabling local echo). If an account field is not specified, and the \fBFTP\fR
+server requires it, the user is prompted for it. If an account field is
+specified, an account command is relayed to the remote server after the login
+sequence is completed if the remote server did not require it for logging in.
+Unless \fBftp\fR is invoked with "auto-login" disabled, this process is done
+automatically on initial connection to the \fBFTP\fR server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggles verbose mode. In verbose mode, all responses from the \fBFTP\fR server
+are displayed to the user. In addition, if verbose mode is on, when a file
+transfer completes, statistics regarding the efficiency of the transfer are
+reported. By default, verbose mode is on if \fBftp\fR's commands are coming
+from a terminal, and off otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR [ \fIcommand\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A synonym for \fBhelp\fR.
+.RE
+
+.sp
+.LP
+Command arguments which have embedded spaces can be quoted with quote (\fB"\fR)
+marks.
+.sp
+.LP
+If any command argument which is not indicated as being optional is not
+specified, \fBftp\fR prompts for that argument.
+.SH ABORTING A FILE TRANSFER
+.sp
+.LP
+To abort a file transfer, use the terminal interrupt key. Sending transfers is
+immediately halted. Receiving transfers are halted by sending an \fBFTP\fR
+protocol \fBABOR\fR command to the remote server, and discarding any further
+data received. The speed at which this is accomplished depends upon the remote
+server's support for \fBABOR\fR processing. If the remote server does not
+support the \fBABOR\fR command, an \fBftp>\fR prompt does not appear until the
+remote server has completed sending the requested file.
+.sp
+.LP
+The terminal interrupt key sequence is ignored when \fBftp\fR has completed any
+local processing and is awaiting a reply from the remote server. A long delay
+in this mode can result from the \fBABOR\fR processing described above, or from
+unexpected behavior by the remote server, including violations of the ftp
+protocol. If the delay results from unexpected remote server behavior, the
+local \fBftp\fR program must be killed by hand.
+.SH FILE NAMING CONVENTIONS
+.sp
+.LP
+Local files specified as arguments to \fBftp\fR commands are processed
+according to the following rules.
+.sp
+.ne 2
+.mk
+.na
+\fB1)\fR
+.ad
+.RS 6n
+.rt
+If the file name \fB\(mi\fR is specified, the standard input (for reading) or
+standard output (for writing) is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB2)\fR
+.ad
+.RS 6n
+.rt
+If the first character of the file name is \fB|\fR, the remainder of the
+argument is interpreted as a shell command. \fBftp\fR then forks a shell, using
+\fBpopen\fR(3C) with the argument supplied, and reads (writes) from the
+standard output (standard input) of that shell. If the shell command includes
+SPACE characters, the argument must be quoted; for example \fB"| ls
+\fR\fB-lt\fR\fB"\fR. A particularly useful example of this mechanism is:
+\fB"dir | more"\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB3)\fR
+.ad
+.RS 6n
+.rt
+Failing the above checks, if globbing is enabled, local file names are expanded
+according to the rules used in the \fBsh\fR(1); see the \fBglob\fR command. If
+the \fBftp\fR command expects a single local file (for example, \fBput\fR),
+only the first filename generated by the globbing operation is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB4)\fR
+.ad
+.RS 6n
+.rt
+For \fBmget\fR commands and \fBget\fR commands with unspecified local file
+names, the local filename is the remote filename, which can be altered by a
+\fBcase\fR, \fBntrans\fR, or \fBnmap\fR setting. The resulting filename can
+then be altered if \fBrunique\fR is on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB5)\fR
+.ad
+.RS 6n
+.rt
+For \fBmput\fR commands and \fBput\fR commands with unspecified remote file
+names, the remote filename is the local filename, which can be altered by a
+\fBntrans\fR or \fBnmap\fR setting. The resulting filename can then be altered
+by the remote server if \fBsunique\fR is on.
+.RE
+
+.SH FILE TRANSFER PARAMETERS
+.sp
+.LP
+The \fBFTP\fR specification specifies many parameters which can affect a file
+transfer.
+.sp
+.LP
+The "representation type" can be one of "network \fBASCII\fR", "\fBEBCDIC\fR",
+"image", or "local byte size" with a specified byte size (for PDP-10's and
+PDP-20's mostly). The "network \fBASCII\fR" and "\fBEBCDIC\fR" types have a
+further subtype which specifies whether vertical format control (\fBNEWLINE\fR
+characters, form feeds, and so on) are to be passed through ("non-print"),
+provided in \fBTELNET\fR format ("\fBTELNET\fR format controls"), or provided
+in \fBASA\fR (\fBFORTRAN\fR) ("carriage control (\fBASA\fR)") format. \fBftp\fR
+supports the "network \fBASCII\fR" (subtype "non-print" only) and "image"
+types, plus "local byte size" with a byte size of 8 for communicating with
+\fBTENEX\fR machines.
+.sp
+.LP
+The "file structure" can be one of \fBfile\fR (no record structure),
+\fBrecord\fR, or \fBpage\fR. \fBftp\fR supports only the default value, which
+is \fBfile\fR.
+.sp
+.LP
+The "transfer mode" can be one of \fBstream\fR, \fBblock\fR, or
+\fBcompressed\fR. \fBftp\fR supports only the default value, which is
+\fBstream\fR.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBftp\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.sp
+.LP
+The \fBftp\fR command is IPv6-enabled. See \fBip6\fR(7P).
+.SH FILES
+.sp
+.LP
+\fB~/.netrc\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBls\fR(1), \fBrcp\fR(1), \fBsh\fR(1), \fBtar\fR(1), \fBin.ftpd\fR(1M),
+\fBpopen\fR(3C), \fBftp\fR(4), \fBftpusers\fR(4), \fBmech\fR(4),
+\fBnetrc\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5), \fBip6\fR(7P)
+.sp
+.LP
+Allman, M., Ostermann, S., and Metz, C. \fIRFC 2428, FTP Extensions for IPv6
+and NATs\fR. The Internet Society. September 1998.
+.sp
+.LP
+Lunt, S. J. \fIRFC 2228, FTP Security Extensions\fR. Internet Draft. November
+1993.
+.sp
+.LP
+Postel, Jon, and Joyce Reynolds. \fIRFC 959, File Transfer Protocol (FTP )\fR.
+Network Information Center. October 1985.
+.sp
+.LP
+Piscitello, D. \fIRFC 1639, FTP Operation Over Big Address Records (FOOBAR)\fR.
+Network Working Group. June 1994.
+.SH NOTES
+.sp
+.LP
+Failure to log in can arise from an explicit denial by the remote \fBFTP\fR
+server because the account is listed in \fB/etc/ftpusers\fR. See
+\fBin.ftpd\fR(1M) and \fBftpusers\fR(4).
+.sp
+.LP
+Correct execution of many commands depends upon proper behavior by the remote
+server.
+.sp
+.LP
+An error in the treatment of carriage returns in the 4.2 \fBBSD\fR code
+handling transfers with a "representation type" of "network \fBASCII\fR" has
+been corrected. This correction can result in incorrect transfers of binary
+files to and from 4.2 \fBBSD\fR servers using a "representation type" of
+"network \fBASCII\fR". Avoid this problem by using the "image" type.
diff --git a/usr/src/man/man1/ftpcount.1 b/usr/src/man/man1/ftpcount.1
new file mode 100644
index 0000000000..ea27f879ad
--- /dev/null
+++ b/usr/src/man/man1/ftpcount.1
@@ -0,0 +1,110 @@
+'\" te
+.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ftpcount 1 "25 Apr 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+ftpcount \- show current number of users in each FTP Server class
+.SH SYNOPSIS
+.LP
+.nf
+\fBftpcount\fR [\fB-v\fR] [\fB-V\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Use the \fBftpcount\fR command to show the current number of users logged in
+and the login limit for each FTP Server class defined in the \fBftpaccess\fR(4)
+file.
+.SH OPTIONS
+.sp
+.LP
+The \fBftpcount\fR command supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Display the user counts for FTP Server classes defined in virtual host
+\fBftpaccess\fR(4) files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Display program copyright and version information, then terminate.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/var/run/ftp.pids-\fIclassnames\fR\fR
+.sp
+.LP
+\fB/etc/ftpd/ftpaccess\fR
+.sp
+.LP
+\fB/etc/ftpd/ftpservers\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBftpwho\fR(1), \fBin.ftpd\fR(1M), \fBftpaccess\fR(4), \fBftpservers\fR(4),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+For separate class counts to be kept, class names defined in complete virtual
+host \fBftpaccess\fR files must be unique.
diff --git a/usr/src/man/man1/ftpwho.1 b/usr/src/man/man1/ftpwho.1
new file mode 100644
index 0000000000..7ae2c3915e
--- /dev/null
+++ b/usr/src/man/man1/ftpwho.1
@@ -0,0 +1,110 @@
+'\" te
+.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ftpwho 1 "25 Apr 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+ftpwho \- show current process information for each FTP Server user
+.SH SYNOPSIS
+.LP
+.nf
+\fBftpwho\fR [\fB-v\fR] [\fB-V\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Use the \fBftpwho\fR command to show the current process information for each
+user logged in to the FTP Server. This information is in addition to
+information displayed by the \fBftpcount\fR(1) command.
+.SH OPTIONS
+.sp
+.LP
+The \fBftpwho\fR command supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Display the current process information and user counts for FTP Server classes
+defined in virtual host \fBftpaccess\fR(4) files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Display the program copyright and version information, then terminate.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/ftpd/ftpaccess\fR
+.sp
+.LP
+\fB/var/run/ftp.pids-\fIclassname\fR\fR
+.sp
+.LP
+\fB/etc/ftpd/ftpservers\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityExternal
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBftpcount\fR(1), \fBps\fR(1), \fBin.ftpd\fR(1M), \fBftpaccess\fR(4),
+\fBftpservers\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+For separate class counts to be kept, class names defined in complete virtual
+host \fBftpaccess\fR files must be unique.
diff --git a/usr/src/man/man1/gcore.1 b/usr/src/man/man1/gcore.1
new file mode 100644
index 0000000000..14b46767d3
--- /dev/null
+++ b/usr/src/man/man1/gcore.1
@@ -0,0 +1,179 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH gcore 1 "19 Jun 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+gcore \- get core images of running processes
+.SH SYNOPSIS
+.LP
+.nf
+\fBgcore\fR [\fB-pgF\fR] [\fB-o\fR \fIfilename\fR] [\fB-c\fR \fIcontent\fR] \fIprocess-id\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgcore\fR utility creates a core image of each specified process. By
+default, the name of the core image file for the process whose process \fBID\fR
+is \fIprocess-id\fR is \fBcore.\fR\fIprocess-id\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcontent\fR\fR
+.ad
+.RS 15n
+.rt
+Produces core image files with the specified content. The content description
+uses the same tokens as in \fBcoreadm\fR(1M). The \fB-c\fR option does not
+apply to cores produced due to the \fB-p\fR or \fB-g\fR flags.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 15n
+.rt
+Force. Grabs the target process even if another process has control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 15n
+.rt
+Produces core image files in the global core file repository with the global
+content as configured by \fBcoreadm\fR(1M). The command fails if the user does
+not have permissions to the global core file repository.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-o\fR \fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+Substitutes \fIfilename\fR in place of \fBcore\fR as the first part of the name
+of the core image files. \fIfilename\fR can contain the same tokens to be
+expanded as the paths in \fBcoreadm\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 15n
+.rt
+Produces a core image file in the process-specific location with the
+process-specific content for each process as configured by \fBcoreadm\fR(1M).
+The command fails if the user does not have permissions to the per-process core
+file repository.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprocess-id\fR\fR
+.ad
+.RS 14n
+.rt
+process \fBID\fR
+.RE
+
+.SH USAGE
+.sp
+.LP
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only if the primary controlling process, typically a debugger, has
+stopped the victim process and the primary controlling process is doing nothing
+at the moment of application of the \fBproc\fR tool in question.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+On success.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+On failure, such as non-existent process \fBID\fR.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fBcore.\fR\fB\fIprocess-id\fR\fR\fR
+.ad
+.RS 19n
+.rt
+core images
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command syntax is Evolving. The Output Formats are Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBkill\fR(1), \fBcoreadm\fR(1M), \fBsetrlimit\fR(2), \fBcore\fR(4),
+\fBproc\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBgcore\fR is unaffected by the \fBsetrlimit\fR(2) system call using the
+\fBRLIMIT_CORE\fR value.
diff --git a/usr/src/man/man1/gencat.1 b/usr/src/man/man1/gencat.1
new file mode 100644
index 0000000000..6ebe2f7ce7
--- /dev/null
+++ b/usr/src/man/man1/gencat.1
@@ -0,0 +1,254 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH gencat 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+gencat \- generate a formatted message catalog
+.SH SYNOPSIS
+.LP
+.nf
+\fBgencat\fR \fIcatfile\fR \fImsgfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgencat\fR command merges the message text source file(s) \fImsgfile\fR
+into a formatted message database \fIcatfile\fR. The database \fIcatfile\fR is
+created if it does not already exist. If \fIcatfile\fR does exist, its
+messages are included in the new \fIcatfile\fR. If set and message numbers
+collide, the new message-text defined in \fImsgfile\fR replaces the old message
+text currently contained in \fIcatfile\fR. The message text source file (or set
+of files) input to \fBgencat\fR can contain either set and message numbers or
+simply message numbers, in which case the set \fBNL_SETD\fR (see
+\fBnl_types.h\fR(3HEAD)) is assumed.
+.SS "Message Text Source File Format"
+.sp
+.LP
+The format of a message text source file is defined as follows. Note that the
+fields of a message text source line are separated by a single \fBASCII\fR
+space or tab character. Any other \fBASCII\fR spaces or tabs are considered as
+part of the subsequent field.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$set\fR \fIn comment\fR \fR
+.ad
+.RS 22n
+.rt
+Where \fIn\fR specifies the set identifier of the following messages until the
+next \fB$set\fR, \fB$delset\fR, or end-of-file appears. \fIn\fR must be a
+number in the range (\fB1\fR-{\fBNL_SETMAX\fR}). Set identifiers within a
+single source file need not be contiguous. Any string following the set
+identifier is treated as a comment. If no \fB$set\fR directive is specified in
+a message text source file, all messages are located in the default message set
+\fBNL_SETD\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$delset\fR \fIn comment\fR \fR
+.ad
+.RS 22n
+.rt
+Deletes message set \fIn\fR from an existing message catalog. Any string
+following the set number is treated as a comment. (\fBNote:\fR if \fIn\fR is
+not a valid set it is ignored.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fIcomment\fR \fR
+.ad
+.RS 22n
+.rt
+A line beginning with a dollar symbol \fB$\fR followed by an \fBASCII\fR space
+or tab character is treated as a comment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIm\fR \fImessage-text\fR \fR
+.ad
+.RS 22n
+.rt
+The \fIm\fR denotes the message identifier, a number in the range
+(\fB1\fR-{\fBNL_MSGMAX\fR}). The \fImessage-text\fR is stored in the message
+catalog with the set identifier specified by the last \fB$set\fR directive, and
+with message identifier \fIm\fR. If the \fImessage-text\fR is empty, and an
+\fBASCII\fR space or tab field separator is present, an empty string is stored
+in the message catalog. If a message source line has a message number, but
+neither a field separator nor \fImessage-text\fR, the existing message with
+that number (if any) is deleted from the catalog. Message identifiers need not
+be contiguous. The length of \fImessage-text\fR must be in the range
+(\fB0\fR-{\fBNL_TEXTMAX\fR}).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$quote\fR \fIc\fR \fR
+.ad
+.RS 22n
+.rt
+This line specifies an optional quote character \fIc\fR, which can be used to
+surround \fImessage-text\fR so that trailing spaces or null (empty) messages
+are visible in a message source line. By default, or if an empty \fB$quote\fR
+directive is supplied, no quoting of \fImessage-text\fR will be recognized.
+.RE
+
+.sp
+.LP
+Empty lines in a message text source file are ignored.
+.sp
+.LP
+Text strings can contain the special characters and escape sequences defined in
+the following table:
+.sp
+
+.sp
+.TS
+tab() box;
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+DescriptionSymbolSequence
+newlineNL(LF)\en
+horizontal tabHT\et
+vertical tabVT\ev
+backspaceBS\eb
+carriage returnCR\er
+form feedFF \ef
+backslash\e\e\e
+bit patternddd\eddd
+.TE
+
+.sp
+.LP
+The escape sequence \fB\e\fR\fIddd\fR consists of backslash followed by 1, 2 or
+3 octal digits, which are taken to specify the value of the desired character.
+If the character following a backslash is not one of those specified, the
+backslash is ignored.
+.sp
+.LP
+Backslash followed by an \fBASCII\fR newline character is also used to continue
+a string on the following line. Thus, the following two lines describe a single
+message string:
+.sp
+.in +2
+.nf
+1 This line continues \e
+to the next line
+.fi
+.in -2
+
+.sp
+.LP
+which is equivalent to:
+.sp
+.in +2
+.nf
+ 1 This line continues to the next line
+.fi
+.in -2
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcatfile\fR \fR
+.ad
+.RS 12n
+.rt
+A path name of the formatted message catalog. If \(mi is specified, standard
+output is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgfile\fR \fR
+.ad
+.RS 12n
+.rt
+A path name of a message text source file. If \(mi is specified for an instance
+of \fImsgfile\fR, standard input is used. The format of message text source
+files is defined in \fBMessage Text Source File Format\fR.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgencat\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmkmsgs\fR(1), \fBcatgets\fR(3C), \fBcatopen\fR(3C), \fBgettxt\fR(3C),
+\fBnl_types.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/genmsg.1 b/usr/src/man/man1/genmsg.1
new file mode 100644
index 0000000000..9e2246ce2a
--- /dev/null
+++ b/usr/src/man/man1/genmsg.1
@@ -0,0 +1,664 @@
+'\" te
+.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH genmsg 1 "14 May 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+genmsg \- generate a message source file by extracting messages from source
+files
+.SH SYNOPSIS
+.LP
+.nf
+\fBgenmsg\fR [\fB-abdfrntx\fR] [\fB-c\fR \fImessage-tag\fR] [\fB-g\fR \fIproject-file\fR]
+ [\fB-l\fR \fIproject-file\fR] [\fB-m\fR \fIprefix\fR] [\fB-M\fR \fIsuffix\fR]
+ [\fB-o\fR \fImessage-file\fR] [\fB-p\fR \fIpreprocessor\fR] [\fB-s\fR \fIset-tags\fR] \fI file\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgenmsg\fR utility extracts message strings with calls to
+\fBcatgets\fR(3C) from source files and writes them in a format suitable for
+input to \fBgencat\fR(1).
+.SS "Invocation"
+.sp
+.LP
+\fBgenmsg\fR reads one or more input files and, by default, generates a message
+source file whose name is composed of the first input file name with
+\fB\&.msg\fR. If the \fB-o\fR option is specified, \fBgenmsg\fR uses the option
+argument for its output file.
+.sp
+
+.sp
+.TS
+tab() box;
+lw(3.58i) |lw(1.92i)
+lw(3.58i) |lw(1.92i)
+.
+\fICommand\fR\fIOutput File\fR
+_
+\fBgenmsg prog.c\fRprog.c.msg
+\fBgensmg main.c util.c tool.c\fRmain.c.msg
+\fBgenmsg -o prog.msg mail.c util.c\fRprog.msg
+.TE
+
+.sp
+.LP
+\fBgenmsg\fR also allows you to invoke a preprocessor to solve the dependencies
+of macros and define statements for the \fBcatgets\fR(3C) calls.
+.SS "Auto Message Numbering"
+.sp
+.LP
+\fBgenmsg\fR replaces message numbers with the calculated numbers based upon
+the project file if the message numbers are \fB-1\fR, and it generates copies
+of the input files with the new message numbers and a copy of the project file
+with the new maximum message numbers.
+.sp
+.LP
+A project file is a database that stores a list of set numbers with their
+maximum message numbers. Each line in a project file is composed of a set
+number and its maximum message number:
+.sp
+.ne 2
+.mk
+.na
+\fB\fISet_number\fR\fR
+.ad
+.RS 14n
+.rt
+\fIMaximum_message_number\fR
+.RE
+
+.sp
+.LP
+In a project file, a line beginning with a number sign (\fB#\fR) or an
+\fBASCII\fR space is considered as a comment and ignored.
+.sp
+.LP
+\fBgenmsg\fR also has the reverse operation to replace all message numbers with
+\fB-1\fR.
+.SS "Comment Extraction"
+.sp
+.LP
+\fBgenmsg\fR allows you to comment about messages and set numbers to inform the
+translator how the messages should be translated. It extracts the comment,
+which is surrounded with the comment indicators and has the specified tag
+inside the comment, from the input file and writes it with a dollar (\fB$\fR)
+prefix in the output file. \fBgenmsg\fR supports the C and C++ comment
+indicators, '\fB/*\fR', '\fB*/\fR', and '\fB//\fR'.
+.SS "Testing"
+.sp
+.LP
+\fBgenmsg\fR generates two kinds of messages for testing, prefixed messages and
+long messages. Prefixed messages allow you to check that your program is
+retrieving the messages from the message catalog. Long messages allow you to
+check the appearance of your window program's initial size and position.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 19n
+.rt
+Append the output into the message file \fImessage-file\fR that is specified by
+the \fB-o\fR option. If two different messages that have the same set and
+message number are found, the message in the specified message file is kept and
+the other message in the input file is discarded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 19n
+.rt
+Place the extracted comment after the corresponding message in the output file.
+This option changes the placement behavior of the \fB-s\fR or \fB-c\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI message-tag\fR\fR
+.ad
+.RS 19n
+.rt
+Extract message comments having \fImessage-tag\fR inside them from the input
+files and write them with a '\fB$\fR' prefix as a comment in the output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 19n
+.rt
+Include an original text of a message as a comment to be preserved along with
+its translations. With this option, the translator can see the original
+messages even after they are replaced with their translations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 19n
+.rt
+Overwrite the input files and the project file when used with the \fB-l\fR or
+\fB-r\fR option. With the \fB-r\fR option, \fBgenmsg\fR overwrites only the
+input files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fI project-file\fR\fR
+.ad
+.RS 19n
+.rt
+Generate \fIproject-file\fR that has a list of set numbers and their maximum
+message numbers in the input files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI project-file\fR\fR
+.ad
+.RS 19n
+.rt
+Replace message numbers with the calculated numbers based upon
+\fIproject-file\fR if the message numbers are \fB-1\fR in the input files, and
+then generate copies of the input files with the new message numbers and a copy
+of \fIproject-file\fR with the new maximum message numbers. If
+\fIproject-file\fR is not found, \fBgenmsg\fR uses the maximum message number
+in the input file as a base number and generates \fIproject-file\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI prefix\fR\fR
+.ad
+.RS 19n
+.rt
+Fill in the message with \fIprefix\fR. This option is useful for testing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fI suffix\fR\fR
+.ad
+.RS 19n
+.rt
+Fill in the message with \fIsuffix\fR. This option is useful for testing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 19n
+.rt
+Add comment lines to the output file indicating the file name and line number
+in the input files where each extracted string is encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI message-file\fR\fR
+.ad
+.RS 19n
+.rt
+Write the output to \fImessage-file\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI preprocessor\fR\fR
+.ad
+.RS 19n
+.rt
+Invoke \fIpreprocessor\fR to preprocess macros and define statements for the
+\fBcatgets\fR(3C) calls. \fBgenmsg\fR first invokes the option argument as a
+preprocesser and then starts the normal process against the output from the
+preprocessor. \fBgenmsg\fR initiates this process for all the input files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 19n
+.rt
+Replace message numbers with \fB-1\fR. This is the reverse operation of the
+\fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI set-tag\fR\fR
+.ad
+.RS 19n
+.rt
+Extract set number comments having \fIset-tag\fR inside them from the input
+files and write them with a '\fB$\fR' prefix as a comment in the output file.
+If multiple comments are specified for one set number, the first one is
+extracted and the rest of them are discarded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 19n
+.rt
+Generate a message that is three times as long as the original message. This
+option is useful for testing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 19n
+.rt
+Suppress warning messages about message and set number range checks and
+conflicts.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+An input source file.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAssigning Message Numbers and Generating New Files
+.sp
+.LP
+Suppose that you have the following source and project files:
+
+.sp
+.in +2
+.nf
+example% cat test.c
+printf(catgets(catfd, 1, -1, "line too long\en"));
+printf(catgets(catfd, 2, -1, "invalid code\en"));
+
+example% cat proj
+1 10
+2 20
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% genmsg \fB-l\fR proj test.c
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would assign the calculated message numbers based upon \fBproj\fR and generate
+the following files:
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtest.c.msg\fR\fR
+.ad
+.RS 14n
+.rt
+Message file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBproj.new\fR\fR
+.ad
+.RS 14n
+.rt
+Updated project file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtest.c.new\fR\fR
+.ad
+.RS 14n
+.rt
+New source file
+.RE
+
+.sp
+.in +2
+.nf
+example% cat test.c.msg
+$quote "
+$set 1
+11 "line too long\en"
+$set 2
+21 "invalid code\en"
+
+example% cat proj.new
+1 11
+2 21
+
+example% cat test.c.new
+printf(catgets(catfd, 1, 11, "line too long\en"));
+printf(catgets(catfd, 2, 21, "invalid code\en"));
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRExtracting Comments Into a File
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% genmsg \fB-s\fR SET \fB-c\fR MSG test.c
+example% cat test.c
+/* SET: tar messages */
+/* MSG: don't translate "tar". */
+catgets(catfd, 1, 1, "tar: tape write error");
+// MSG: don't translate "tar" and "\fB-I\fR".
+catgets(catfd, 1, 2, "tar: missing argument for \fB-I\fR flag");
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would extract the comments and write them in the following output file:
+
+.sp
+.in +2
+.nf
+example% cat test.c.msg
+$ /* SET: tar messages */
+$set 1
+$ /* MSG: don't translate "tar". */
+1 "tar: tape write error"
+$ // MSG: don't translate "tar" and "-I".
+2 "tar: missing argument for -I flag"
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRGenerating Test Messages
+.sp
+.LP
+The following command:
+
+.sp
+.in +2
+.nf
+example% genmsg \fB-m\fR PRE: \fB-M\fR :FIX test.c
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+might generate the following messages for testing:
+
+.sp
+.in +2
+.nf
+example% cat test.c.msg
+1 "PRE:OK:FIX"
+2 "PRE:Cancel:FIX"
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRParsing a Macro and Writing the Extracted Messages
+.sp
+.LP
+Given the following input:
+
+.sp
+.in +2
+.nf
+example% cat example.c
+#include <nl_types.h>
+#define MSG1 "message1"
+#define MSG2 "message2"
+#define MSG3 "message3"
+#define MSG(n) catgets(catd, 1, n, MSG ## n)
+void
+main(int argc, char **argv)
+{
+nl_catd catd = catopen(argv[0], NL_CAT_LOCALE);
+(void) printf("%s0\en, MSG(1));
+(void) printf("%s0\en, MSG(2));
+(void) printf("%s0\en, MSG(3));
+(void) catclose(catd);
+}
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command:
+
+.sp
+.in +2
+.nf
+example% genmsg \fB-p\fR "cc \fB-E\fR" \fB-o\fR example.msg example.c
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would parse the \fBMSG\fR macros and write the extracted messages in
+\fBexample.msg\fR.
+
+.LP
+\fBExample 5 \fRAssigning Calculated Message Numbers
+.sp
+.LP
+Suppose that you have the following header, source, and project files:
+
+.sp
+.in +2
+.nf
+example% cat ../inc/msg.h
+#define WARN_SET 1
+#define ERR_SET 2
+#define WARN_MSG(id, msg) catgets(catd, WARN_SET, (id), (msg))
+#define ERR_MSG(id, msg) catgets(catd, ERR_SET, (id), (msg))
+example% example.c
+#include "msg.h"
+printf("%s, WARN_MSG(-1, "Warning error"));
+printf("%s, ERR_MSG(-1, "Fatal error"));
+example % proj
+1 10
+2 10
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% genmsg \fB-f\fR -p "cc \fB-E\fR \fB-I\fR../inc" \fB-l\fR proj \e
+ \fB-o\fR example.msg example.c
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would assign each of the \fB-1\fR message numbers a calculated number based
+upon \fBproj\fR and would overwrite the results to \fBexample.c\fR and
+\fBproj\fR. Also, this command writes the extracted messages in
+\fBexample.msg\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgenmsg\fR: \fBLC_MESSAGES\fR and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgencat\fR(1), \fBcatgets\fR(3C), \fBcatopen\fR(3C), \fBattributes\fR(5),
+\fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBgenmsg\fR does not handle pointers or variables in the \fBcatgets\fR(3C)
+call. For example:
+.sp
+.in +2
+.nf
+
+const int set_num = 1;
+extern int msg_num(const char *);
+const char *msg = "Hello";
+catgets(catd, set_num, msg_num(msg), msg);
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When the auto message numbering is turned on with a preprocessor, if there are
+multiple \fB-1's\fR in the \fBcatgets\fR(3C) line, \fBgenmsg\fR replaces all of
+the \fB-1's\fR in the line with a calculated number. For example, given the
+input:
+.sp
+.in +2
+.nf
+#define MSG(id, msg) catgets(catd, 1, (id), (msg))
+if (ret == -1) printf("%s, MSG(-1, "Failed"));
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the command
+.sp
+.in +2
+.nf
+genmsg \fB-l\fR proj \fB-p\fR "cc \fB-E\fR"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would produce:
+.sp
+.in +2
+.nf
+ #define MSG(id, msg) catgets(catd, 1, (id), (msg))
+ if (ret == 1) printf("%s, MSG(1, "Failed"));
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The workaround would be to split it into two lines as follows:
+.sp
+.in +2
+.nf
+ if (ret == -1)
+ printf("%s, MSG(-1, "Failed"));
+.fi
+.in -2
+.sp
+
diff --git a/usr/src/man/man1/getconf.1 b/usr/src/man/man1/getconf.1
new file mode 100644
index 0000000000..0d50a5321e
--- /dev/null
+++ b/usr/src/man/man1/getconf.1
@@ -0,0 +1,789 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getconf 1 "1 Sep 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+getconf \- get configuration values
+.SH SYNOPSIS
+.SS "/usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf"
+.LP
+.nf
+\fB/usr/bin/getconf\fR [\fB-v\fR \fIspecification\fR] \fIsystem_var\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/getconf\fR [\fB-v\fR \fIspecification\fR] \fIpath_var\fR \fIpathname\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/getconf\fR \fB-a\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/getconf\fR [\fB-v\fR \fIspecification\fR] \fIsystem_var\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/getconf\fR [\fB-v\fR \fIspecification\fR] \fIpath_var\fR \fIpathname\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/getconf\fR \fB-a\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/getconf\fR [\fB-v\fR \fIspecification\fR] \fIsystem_var\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/getconf\fR [\fB-v\fR \fIspecification\fR] \fIpath_var\fR \fIpathname\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/getconf\fR \fB-a\fR
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBgetconf\fR [\fB-abdlpqrtw\fR] [\fB-c\fR RE] [\fB-n\fR RE] [\fB-s\fR RE] [\fB-v\fR \fIname\fR][\fIname\fR [\fIpath\fR [\fIvalue\fR]] ...]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf"
+.sp
+.LP
+In the first synopsis form, the \fBgetconf\fR utility writes to the standard
+output the value of the variable specified by \fIsystem_var\fR, in accordance
+with \fIspecification\fR if the \fB-v\fR option is used.
+.sp
+.LP
+In the second synopsis form, \fBgetconf\fR writes to the standard output the
+value of the variable specified by \fIpath_var\fR for the path specified by
+\fIpathname\fR, in accordance with \fIspecification\fR if the \fB-v\fR option
+is used.
+.sp
+.LP
+In the third synopsis form, \fBconfig\fR writes to the standard output the
+names of the current system configuration variables.
+.sp
+.LP
+The value of each configuration variable is determined as if it were obtained
+by calling the function from which it is defined to be available. The value
+reflects conditions in the current operating environment.
+.SS "ksh93"
+.sp
+.LP
+The \fBgetconf\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBgetconf\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/getconf\fR or
+\fB/usr/bin/getconf\fR executable.
+.sp
+.LP
+\fBgetconf\fR displays the system configuration value for \fIname\fR. If
+\fIname\fR is a filesystem specific variable, the value is determined relative
+to path, or, the current directory, if path is omitted. If \fIvalue\fR is
+specified, \fBgetconf\fR attempts to change the process local value to
+\fIvalue\fR. \fB-\fR can be used in place of path when it is not relevant. Only
+writable variables can be set. \fBreadonly\fR variables cannot be changed.
+.sp
+.LP
+The current value for \fIname\fR is written to the standard output. If
+\fIname\fR is valid but undefined, \fBundefined\fR is written to the standard
+output. If \fIname\fR is invalid or an error occurs in determining its value, a
+diagnostic is written to standard error and \fBgetconf\fR exits with a
+\fBnon-zero\fR exit status.
+.sp
+.LP
+More than one variable can be set or queried by providing the \fIname path
+value\fR 3-tuple for each variable, specifying \fB-\fR for value when querying.
+.sp
+.LP
+If no operands are specified, all known variables are written in
+\fIname\fR\fB=\fR\fIvalue\fR form to the standard output, one per line. Only
+one of \fB--call\fR, \fB--name\fR or \fB--standard\fR can be specified.
+.SH OPTIONS
+.SS "/usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf"
+.sp
+.LP
+The following options are supported by \fB/usr/bin/getconf\fR,
+\fB/usr/xpg4/bin/getconf\fR, and \fB/usr/xpg6/bin/getconf\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 19n
+.rt
+Writes the names of the current system configuration variables to the standard
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fIspecification\fR\fR
+.ad
+.RS 19n
+.rt
+Gives the specification which governs the selection of values for configuration
+variables.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by the \fBgetconf\fR built-in command in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.br
+.na
+\fB\fB--all\fR\fR
+.ad
+.RS 24n
+.rt
+Call the native \fBgetconf -a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.br
+.na
+\fB\fB--base\fR\fR
+.ad
+.RS 24n
+.rt
+List base variable name without \fBcall\fR and standard prefixes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--call=\fR\fIRE\fR\fR
+.ad
+.RS 24n
+.rt
+Display variables with \fBcall\fR prefix that matches \fIRE\fR. The \fBcall\fR
+prefixes are:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBCS\fR
+.sp
+\fBconfstr\fR(3C),
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBPC\fR
+.sp
+\fBpathconf\fR(2)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBSC\fR
+.sp
+\fBsysconf\fR(3C)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBSI\fR
+.sp
+\fBsysinfo\fR(2)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBXX\fR
+.sp
+Constant value
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.br
+.na
+\fB\fB--defined\fR\fR
+.ad
+.RS 24n
+.rt
+Only display defined values when no operands are specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--lowercase\fR\fR
+.ad
+.RS 24n
+.rt
+List variable names in lower case.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.br
+.na
+\fB\fB--name=\fR\fIRE\fR\fR
+.ad
+.RS 24n
+.rt
+Display variables with names that match \fIRE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.br
+.na
+\fB\fB--portable\fR\fR
+.ad
+.RS 24n
+.rt
+Display the named writable variables and values in a form that can be directly
+executed by \fBksh93\fR(1) to set the values. If \fIname\fR is omitted, lists
+all writable variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.br
+.na
+\fB\fB--quote\fR\fR
+.ad
+.RS 24n
+.rt
+Quote values (\fB"..."\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB--readonly\fR\fR
+.ad
+.RS 24n
+.rt
+Display the named \fBreadonly\fR variables in \fIname\fR\fB=\fR\fIvalue\fR
+form. If \fIname\fR is omitted, lists all \fBreadonly\fR variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--standard=\fR\fIRE\fR\fR
+.ad
+.RS 24n
+.rt
+Display variables with standard prefix that matches \fIRE\fR. Use the
+\fB--table\fR option to view all standard prefixes, including local additions.
+.sp
+The standard prefixes available on all systems are:
+.sp
+.in +2
+.nf
+
+AES
+AST
+C
+GNU
+POSIX
+SVID
+XBS5
+XOPEN
+XPG
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.br
+.na
+\fB\fB--table\fR\fR
+.ad
+.RS 24n
+.rt
+Display the internal table that contains the name, standard, standard section,
+and system call symbol prefix for each variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.br
+.na
+\fB\fB--writable\fR\fR
+.ad
+.RS 24n
+.rt
+Display the named writable variables in \fIname\fR\fB=\fR\fIvalue\fR form. If
+\fIname\fR is omitted, lists all writable variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.br
+.na
+\fB\fB--specification=name\fR\fR
+.ad
+.RS 24n
+.rt
+Call the native \fBgetconf -v\fR \fIname\fR.
+.RE
+
+.SH OPERANDS
+.SS "/usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf"
+.sp
+.LP
+The following operands are supported by \fB/usr/bin/getconf\fR,
+\fB/usr/xpg4/bin/getconf\fR, and \fB/usr/xpg6/bin/getconf\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath_var\fR\fR
+.ad
+.RS 12n
+.rt
+A name of a configuration variable whose value is available from the
+\fBpathconf\fR(2) function. All of the values in the following table are
+supported:
+.RE
+
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+LINK_MAXNAME_MAX_POSIX_CHOWN_RESTRICTED
+MAX_CANONPATH_MAX_POSIX_NO_TRUNC
+MAX_INPUTPIPE_BUF_POSIX_VDISABLE
+.TE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpathname\fR\fR
+.ad
+.RS 14n
+.rt
+A path name for which the variable specified by \fIpath_var\fR is to be
+determined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsystem_var\fR\fR
+.ad
+.RS 14n
+.rt
+A name of a configuration variable whose value is available from
+\fBconfstr\fR(3C) or \fBsysconf\fR(3C). All of the values in the following
+table are supported:
+.RE
+
+.sp
+
+.sp
+.TS
+tab();
+lw(2.75i) lw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+ARG_MAXBC_BASE_MAX
+BC_DIM_MAXBC_SCALE_MAX
+BC_STRING_MAXCHAR_BIT
+CHARCLASS_NAME_MAXCHAR_MAX
+CHAR_MINCHILD_MAX
+CLK_TCKCOLL_WEIGHTS_MAX
+CS_PATHEXPR_NEST_MAX
+HOST_NAME_MAXINT_MAX
+INT_MINLFS64_CFLAGS
+LFS64_LDFLAGSLFS64_LIBS
+LFS64_LINTFLAGSLFS_CFLAGS
+LFS_LDFLAGSLFS_LIBS
+LFS_LINTFLAGSLINE_MAX
+LONG_BITLONG_MAX
+LONG_MINMB_LEN_MAX
+NGROUPS_MAXNL_ARGMAX
+NL_LANGMAXNL_MSGMAX
+NL_NMAXNL_SETMAX
+NL_TEXTMAXNZERO
+OPEN_MAXPOSIX2_BC_BASE_MAX
+POSIX2_BC_DIM_MAXPOSIX2_BC_SCALE_MAX
+POSIX2_BC_STRING_MAXPOSIX2_C_BIND
+POSIX2_C_DEVPOSIX2_CHAR_TERM
+POSIX2_COLL_WEIGHTS_MAXPOSIX2_C_VERSION
+POSIX2_EXPR_NEST_MAXPOSIX2_FORT_DEV
+POSIX2_FORT_RUNPOSIX2_LINE_MAX
+POSIX2_LOCALEDEFPOSIX2_RE_DUP_MAX
+POSIX2_SW_DEVPOSIX2_SYMLINKS
+POSIX2_UPEPOSIX2_VERSION
+POSIX_ALLOC_SIZE_MINPOSIX_REC_INCR_XFER_SIZE
+POSIX_REC_MAX_XFER_SIZEPOSIX_REC_MIN_XFER_SIZE
+POSIX_REC_XFER_ALIGNPOSIX_V6_ILP32_OFF32
+POSIX_V6_ILP32_OFF32_CFLAGSPOSIX_V6_ILP32_OFF32_LDFLAGS
+POSIX_V6_ILP32_OFF32_LIBSPOSIX_V6_ILP32_OFFBIG
+POSIX_V6_ILP32_OFFBIG_CFLAGSPOSIX_V6_ILP32_OFFBIG_LDFLAGS
+POSIX_V6_ILP32_OFFBIG_LIBSPOSIX_V6_LP64_OFF64
+POSIX_V6_LP64_OFF64_CFLAGSPOSIX_V6_LP64_OFF64_LDFLAGS
+POSIX_V6_LP64_OFF64_LIBSPOSIX_V6_LPBIG_OFFBIG
+POSIX_V6_LPBIG_OFFBIG_CFLAGSPOSIX_V6_LPBIG_OFFBIG_LDFLAGS
+POSIX_V6_LPBIG_OFFBIG_LIBSPOSIX_V6_WIDTH_RESTRICTED_ENVS
+SYMLINK_MAXSYMLOOP_MAX
+_POSIX2_BC_BASE_MAX_POSIX2_BC_DIM_MAX
+_POSIX2_BC_SCALE_MAX_POSIX2_BC_STRING_MAX
+_POSIX2_CHARCLASS_NAME_MAX_POSIX2_CHAR_TERM
+_POSIX2_COLL_WEIGHTS_MAX_POSIX2_C_BIND
+_POSIX2_C_DEV_POSIX2_C_VERSION
+_POSIX2_EXPR_NEST_MAX_POSIX2_FORT_DEV
+_POSIX2_FORT_RUN_POSIX2_LINE_MAX
+_POSIX2_LOCALEDEF_POSIX2_PBS
+_POSIX2_PBS_ACCOUNTING_POSIX2_PBS_CHECKPOINT
+_POSIX2_PBS_LOCATE_POSIX2_PBS_MESSAGE
+_POSIX2_PBS_TRACK_POSIX2_RE_DUP_MAX
+_POSIX2_SW_DEV_POSIX2_UPE
+_POSIX2_VERSION_POSIX_ADVISORY_INFO
+_POSIX_AIO_LISTIO_MAX_POSIX_AIO_MAX
+_POSIX_ARG_MAX_POSIX_ASYNC_IO
+_POSIX_BARRIERS_POSIX_CHILD_MAX
+_POSIX_CLOCKRES_MIN_POSIX_CLOCK_SELECTION
+_POSIX_CPUTIME_POSIX_DELAYTIMER_MAX
+_POSIX_HOST_NAME_MAX_POSIX_IPV6
+_POSIX_JOB_CONTROL_POSIX_LINK_MAX
+_POSIX_LOGIN_NAME_MAX_POSIX_MAX_CANON
+_POSIX_MAX_INPUT_POSIX_MONOTONIC_CLOCK
+_POSIX_MQ_OPEN_MAX_POSIX_MQ_PRIO_MAX
+_POSIX_NAME_MAX_POSIX_NGROUPS_MAX
+_POSIX_OPEN_MAX_POSIX_PATH_MAX
+_POSIX_PIPE_BUF_POSIX_PRIO_IO
+_POSIX_RAW_SOCKETS_POSIX_READER_WRITER_LOCKS
+_POSIX_REGEXP_POSIX_RE_DUP_MAX
+_POSIX_RTSIG_MAX_POSIX_SAVED_IDS
+_POSIX_SEM_NSEMS_MAX_POSIX_SEM_VALUE_MAX
+_POSIX_SHELL_POSIX_SIGQUEUE_MAX
+_POSIX_SPAWN_POSIX_SPIN_LOCKS
+_POSIX_SPORADIC_SERVER_POSIX_SSIZE_MAX
+_POSIX_SS_REPL_MAX_POSIX_STREAM_MAX
+_POSIX_SYMLINK_MAX_POSIX_SYMLOOP_MAX
+_POSIX_SYNC_IO_POSIX_THREAD_ATTR_STACKADDR
+_POSIX_THREAD_ATTR_STACKSIZE_POSIX_THREAD_CPUTIME
+_POSIX_THREAD_DESTRUCTOR_ITERATIONS_POSIX_THREAD_KEYS_MAX
+_POSIX_THREAD_PRIORITY_SCHEDULING_POSIX_THREAD_PRIO_INHERIT
+_POSIX_THREAD_PRIO_PROTECT_POSIX_THREAD_PROCESS_SHARED
+_POSIX_THREAD_SAFE_FUNCTIONS_POSIX_THREAD_SPORADIC_SERVER
+_POSIX_THREAD_THREADS_MAX_POSIX_TIMEOUTS
+_POSIX_TIMER_MAX_POSIX_TRA_POSIX_TIMER_MAXCE
+_POSIX_TIMESTAMP_RESOLUTION
+_POSIX_TRACE_EVENT_FILTER_POSIX_TRACE_EVENT_NAME_MAX
+_POSIX_TRACE_INHERIT_POSIX_TRACE_LOG
+_POSIX_TRACE_NAME_MAX_POSIX_TRACE_SYS_MAX
+_POSIX_TRACE_USER_EVENT_MAX_POSIX_TTY_NAME_MAX
+_POSIX_TYPED_MEMORY_OBJECTS_POSIX_TZNAME_MAX
+_POSIX_VERSION_POSIX_V6_ILP32_OFF32
+_POSIX_V6_ILP32_OFFBIG_POSIX_V6_LP64_OFF64
+_POSIX_V6_LPBIG_OFFBIG_V6_ILP32_OFF32
+_V6_ILP32_OFFBIG_V6_LP64_OFF64
+_V6_LPBIG_OFFBIGRE_DUP_MAX
+SCHAR_MAXSCHAR_MIN
+SHRT_MAXSHRT_MIN
+SSIZE_MAXSTREAM_MAX
+TMP_MAXTZNAME_MAX
+UCHAR_MAXUINT_MAX
+ULONG_MAXUSHRT_MAX
+WORD_BITXBS5_ILP32_OFF32
+XBS5_ILP32_OFF32_CFLAGSXBS5_ILP32_OFF32_LDFLAGS
+XBS5_ILP32_OFF32_LIBSXBS5_ILP32_OFF32_LINTFLAGS
+XBS5_ILP32_OFFBIGXBS5_ILP32_OFFBIG_CFLAGS
+XBS5_ILP32_OFFBIG_LDFLAGSXBS5_ILP32_OFFBIG_LIBS
+XBS5_ILP32_OFFBIG_LINTFLAGSXBS5_LP64_OFF64
+XBS5_LP64_OFF64_CFLAGSXBS5_LP64_OFF64_LDFLAGS
+XBS5_LP64_OFF64_LIBSXBS5_LP64_OFF64_LINTFLAGS
+XBS5_LPBIG_OFFBIGXBS5_LPBIG_OFFBIG_CFLAGS
+XBS5_LPBIG_OFFBIG_LDFLAGSXBS5_LPBIG_OFFBIG_LIBS
+XBS5_LPBIG_OFFBIG_LINTFLAGS_XOPEN_CRYPT
+_XOPEN_ENH_I18N_XOPEN_IOV_MAX
+_XOPEN_LEGACY_XOPEN_NAME_MAX
+_XOPEN_PATH_MAX_XOPEN_SHM
+_XOPEN_STREAMS_XOPEN_VERSION
+_XOPEN_XCU_VERSION_XOPEN_XPG2
+_XOPEN_XPG3_XOPEN_XPG4
+.TE
+
+.sp
+.LP
+The symbol \fBPATH\fR also is recognized, yielding the same value as the
+\fBconfstr()\fR name value \fBCS_PATH\fR.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of
+\fB/usr/bin/getconf\fR when encountering files greater than or equal to 2 Gbyte
+( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRWriting the Value of a Variable
+.sp
+.LP
+This example illustrates the value of \fB{NGROUPS_MAX}:\fR
+
+.sp
+.in +2
+.nf
+example% \fBgetconf NGROUPS_MAX\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRWriting the Value of a Variable for a Specific Directory
+.sp
+.LP
+This example illustrates the value of \fBNAME_MAX\fR for a specific directory:
+
+.sp
+.in +2
+.nf
+example% \fBgetconf NAME_MAX /usr\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDealing with Unspecified Results
+.sp
+.LP
+This example shows how to deal more carefully with results that might be
+unspecified:
+
+.sp
+.in +2
+.nf
+\fBif value=$(getconf PATH_MAX /usr); then
+if [ "$value" = "undefined" ]; then
+echo PATH_MAX in /usr is infinite.
+else
+echo PATH_MAX in /usr is $value.
+fi
+else
+echo Error in getconf.
+fi\fR
+.fi
+.in -2
+
+.sp
+.LP
+For example:
+
+.sp
+.in +2
+.nf
+\fBsysconf(_SC_POSIX_C_BIND);\fR
+.fi
+.in -2
+
+.sp
+.LP
+and
+
+.sp
+.in +2
+.nf
+\fBsystem("getconf POSIX2_C_BIND");\fR
+.fi
+.in -2
+
+.sp
+.LP
+in a C program could give different answers. The \fBsysconf\fR call supplies a
+value that corresponds to the conditions when the program was either compiled
+or executed, depending on the implementation. The \fBsystem\fR call to
+\fBgetconf\fR always supplies a value corresponding to conditions when the
+program is executed.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgetconf\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+The following environment variable is supported by the \fBksh93\fR built-in
+\fBgetconf\fR command:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB_AST_FEATURES\fR\fR
+.ad
+.RS 17n
+.rt
+Local writable values that are different from the default are stored in the
+\fB_AST_FEATURES\fR environment variable. The \fB_AST_FEATURES\fR value is a
+space-separated list of \fIname path value\fR 3-tuples, where \fIname\fR is the
+system configuration name, \fIpath\fR is the corresponding path, \fB-\fR if no
+path is applicable, and \fIvalue\fR is the system configuration value.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The specified variable is valid and information about its current state was
+written successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in command-line interface is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBsh\fR(1), \fBpathconf\fR(2), \fBsysinfo\fR(2),
+\fBconfstr\fR(3C), \fBsysconf\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/getfacl.1 b/usr/src/man/man1/getfacl.1
new file mode 100644
index 0000000000..58fd3954ce
--- /dev/null
+++ b/usr/src/man/man1/getfacl.1
@@ -0,0 +1,317 @@
+'\" te
+.\" \&.Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getfacl 1 "5 Nov 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+getfacl \- display discretionary file information
+.SH SYNOPSIS
+.LP
+.nf
+\fBgetfacl\fR [\fB-ad\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+For each argument that is a regular file, special file, or named pipe, the
+\fBgetfacl\fR utility displays the owner, the group, and the Access Control
+List (\fBACL\fR). For each directory argument, \fBgetfacl\fR displays the
+owner, the group, and the \fBACL\fR and/or the default \fBACL\fR. Only
+directories contain default \fBACL\fRs.
+.sp
+.LP
+The \fBgetfacl\fR utility may be executed on a file system that does not
+support \fBACL\fRs. It reports the \fBACL\fR based on the base permission bits.
+.sp
+.LP
+With no options specified, \fBgetfacl\fR displays the filename, the file owner,
+the file group owner, and both the \fBACL\fR and the default \fBACL\fR, if it
+exists.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the filename, the file owner, the file group owner, and the \fBACL\fR
+of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the filename, the file owner, the file group owner, and the default
+\fBACL\fR of the file, if it exists.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+The path name of a regular file, special file, or named pipe.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The format for \fBACL\fR output is as follows:
+.sp
+.in +2
+.nf
+# file: filename
+# owner: uid
+# group: gid
+user::perm
+user:uid:perm
+group::perm
+group:gid:perm
+mask:perm
+other:perm
+default:user::perm
+default:user:uid:perm
+default:group::perm
+default:group:gid:perm
+default:mask:perm
+default:other:perm
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When multiple files are specified on the command line, a blank line separates
+the \fBACL\fRs for each file.
+.sp
+.LP
+The \fBACL\fR entries are displayed in the order in which they are evaluated
+when an access check is performed. The default \fBACL\fR entries that may exist
+on a directory have no effect on access checks.
+.sp
+.LP
+The first three lines display the filename, the file owner, and the file group
+owner. Notice that when only the \fB-d\fR option is specified and the file has
+no default \fBACL\fR, only these three lines are displayed.
+.sp
+.LP
+The \fBuser\fR entry without a user \fBID\fR indicates the permissions that
+are granted to the file owner. One or more additional user entries indicate the
+permissions that are granted to the specified users.
+.sp
+.LP
+The \fBgroup\fR entry without a group \fBID\fR indicates the permissions that
+are granted to the file group owner. One or more additional group entries
+indicate the permissions that are granted to the specified groups.
+.sp
+.LP
+The \fBmask\fR entry indicates the \fBACL\fR mask permissions. These are the
+maximum permissions allowed to any user entries except the file owner, and to
+any group entries, including the file group owner. These permissions restrict
+the permissions specified in other entries.
+.sp
+.LP
+The \fBother\fR entry indicates the permissions that are granted to others.
+.sp
+.LP
+The \fBdefault\fR entries may exist only for directories. These entries
+indicate the default entries that are added to a file created within the
+directory.
+.sp
+.LP
+The \fBuid\fR is a login name or a user \fBID\fR if there is no entry for the
+\fBuid\fR in the system password file, \fB/etc/passwd\fR. The \fBgid\fR is a
+group name or a group \fBID\fR if there is no entry for the \fBgid\fR in the
+system group file, \fB/etc/group\fR. The \fBperm\fR is a three character string
+composed of the letters representing the separate discretionary access rights:
+\fBr\fR (read), \fBw\fR (write), \fBx\fR (execute/search), or the place holder
+character \fB\(mi\fR\&. The \fBperm\fR is displayed in the following order:
+\fBrwx\fR. If a permission is not granted by an \fBACL\fR entry, the place
+holder character appears.
+.sp
+.LP
+If you use the \fBchmod\fR(1) command to change the file group owner
+permissions on a file with \fBACL\fR entries, both the file group owner
+permissions and the \fBACL\fR mask are changed to the new permissions. Be aware
+that the new \fBACL\fR mask permissions may change the effective permissions
+for additional users and groups who have \fBACL\fR entries on the file.
+.sp
+.LP
+In order to indicate that the \fBACL\fR mask restricts an \fBACL\fR entry,
+\fBgetfacl\fR displays an additional tab character, pound sign (\fB#\fR), and
+the actual permissions granted, following the entry.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying file information
+.sp
+.LP
+Given file \fBfoo\fR, with an \fBACL\fR six entries long, the command
+
+.sp
+.in +2
+.nf
+host% \fBgetfacl foo\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would print:
+
+.sp
+.in +2
+.nf
+# file: foo
+# owner: shea
+# group: staff
+user::rwx
+user:spy:\|\(mi\|\(mi\|\(mi
+user:mookie:r\|\(mi\|\(mi
+group::r\|\(mi\|\(mi
+mask::rw\|\(mi
+other::\|\(mi\|\(mi\|\(mi
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDisplaying information after chmod command
+.sp
+.LP
+Continue with the above example, after \fBchmod\fR \fB700 foo\fR was issued:
+
+.sp
+.in +2
+.nf
+host% \fBgetfacl foo\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would print:
+
+.sp
+.in +2
+.nf
+# file: foo
+# owner: shea
+# group: staff
+user::rwx
+user:spy:\|\(mi\|\(mi\|\(mi
+user:mookie:r\|\(mi\|\(mi #effective:\|\(mi\|\(mi\|\(mi
+group::\|\(mi\|\(mi\|\(mi
+mask::\|\(mi\|\(mi\|\(mi
+other::\|\(mi\|\(mi\|\(mi
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDisplaying information when ACL contains default entries
+.sp
+.LP
+Given directory \fBdoo\fR, with an \fBACL\fR containing default entries, the
+command
+
+.sp
+.in +2
+.nf
+host% \fBgetfacl -d doo\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would print:
+
+.sp
+.in +2
+.nf
+# file: doo
+# owner: shea
+# group: staff
+default:user::rwx
+default:user:spy:\|\(mi\|\(mi\|\(mi
+default:user:mookie:r\|\(mi\|\(mi
+default:group::r\|\(mi\|\(mi
+default:mask::\|\(mi\|\(mi\|\(mi
+default:other::\|\(mi\|\(mi\|\(mi
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+system password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 15n
+.rt
+group file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBls\fR(1), \fBsetfacl\fR(1), \fBacl\fR(2),
+\fBaclsort\fR(3SEC), \fBgroup\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The output from \fBgetfacl\fR is in the correct format for input to the
+\fBsetfacl\fR \fB-f\fR command. If the output from \fBgetfacl\fR is redirected
+to a file, the file may be used as input to \fBsetfacl\fR. In this way, a user
+may easily assign one file's \fBACL\fR to another file.
diff --git a/usr/src/man/man1/getlabel.1 b/usr/src/man/man1/getlabel.1
new file mode 100644
index 0000000000..a480d8695d
--- /dev/null
+++ b/usr/src/man/man1/getlabel.1
@@ -0,0 +1,110 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getlabel 1 "11 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+getlabel \- display the label of files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/getlabel\fR [\fB-sS\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBgetlabel\fR displays the label that is associated with each \fIfilename\fR.
+When options are not specified, the output format of the label is displayed in
+default format.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Display the label that is associated with \fIfilename\fR in short form.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Display the label that is associated with \fIfilename\fR in long form.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+\fBgetlabel\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Unsuccessful completion due to usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Unable to translate label.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPE ATTRIBUTE VALUE
+_
+Interface Stability See below.
+.TE
+
+.sp
+.LP
+The command line is Committed. The output is Not-an-Interface.
+.SH SEE ALSO
+.sp
+.LP
+\fBsetlabel\fR(1), \fBm_label\fR(3TSOL), \fBlabel_encodings\fR(4),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The functionality described on this manual page is available only if the system
+is configured with Trusted Extensions.
diff --git a/usr/src/man/man1/getopt.1 b/usr/src/man/man1/getopt.1
new file mode 100644
index 0000000000..a9dcefaa02
--- /dev/null
+++ b/usr/src/man/man1/getopt.1
@@ -0,0 +1,148 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getopt 1 "7 Jan 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+getopt \- parse command options
+.SH SYNOPSIS
+.LP
+.nf
+\fBset\fR \fB--\fR ` getopt \fIoptstring\fR $ * `
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgetopts\fR command supersedes \fBgetopt\fR. For more information, see
+NOTES below.
+.sp
+.LP
+\fBgetopt\fR is used to break up options in command lines for easy parsing by
+shell procedures and to check for legal options. \fIoptstring\fR is a string of
+recognized option letters; see \fBgetopt\fR(3C). If a letter is followed by a
+colon (\fB:\fR), the option is expected to have an argument which may or may
+not be separated from it by white space. The special option \fB-\fR is used to
+delimit the end of the options. If it is used explicitly, \fBgetopt\fR
+recognizes it; otherwise, \fBgetopt\fR generates it; in either case,
+\fBgetopt\fR places it at the end of the options. The positional parameters
+(\fB$1 $2\fR .\|.\|.\|) of the shell are reset so that each option is preceded
+by a \fB\(mi\fR and is in its own positional parameter; each option argument is
+also parsed into its own positional parameter.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRProcessing the arguments for a command
+.sp
+.LP
+The following code fragment shows how one might process the arguments for a
+command that can take the options \fB-a\fR or \fB-b\fR, as well as the option
+\fB-o\fR, which requires an argument:
+
+.sp
+.in +2
+.nf
+\fBset -- `getopt abo: $*`
+if [ $? != 0 ]
+then
+ echo $USAGE
+ exit 2
+fi
+for i in $*
+do
+ case $i in
+ -a | -b) FLAG=$i; shift;;
+ -o) OARG=$2; shift 2;;
+ --) shift; break;;
+ esac
+done\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This code accepts any of the following as equivalent:
+
+.sp
+.in +2
+.nf
+\fBcmd -aoarg filename1 filename2
+cmd -a -o arg filename1 filename2
+cmd -oarg -a filename1 filename2
+cmd -a -oarg -- filename1 filename2\fR
+.fi
+.in -2
+.sp
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+CSIenabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBIntro\fR(1), \fBgetopts\fR(1), \fBgetoptcvt\fR(1), \fBsh\fR(1),
+\fBshell_builtins\fR(1), \fBgetopt\fR(3C), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBgetopt\fR prints an error message on the standard error when it encounters
+an option letter not included in \fIoptstring\fR.
+.SH NOTES
+.sp
+.LP
+\fBgetopt\fR will not be supported in the next major release. For this release
+a conversion tool has been provided, namely, \fBgetoptcvt\fR. For more
+information, see \fBgetopts\fR(1) and \fBgetoptcvt\fR(1).
+.sp
+.LP
+Reset \fBoptind\fR to \fB1\fR when rescanning the options.
+.sp
+.LP
+\fBgetopt\fR does not support the part of Rule 8 of the command syntax standard
+(see \fBIntro\fR(1)) that permits groups of option-arguments following an
+option to be separated by white space and quoted. For example,
+.sp
+.in +2
+.nf
+\fBcmd -a -b -o "xxx z yy" filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+is not handled correctly. To correct this deficiency, use the \fBgetopts\fR
+command in place of \fBgetopt\fR.
+.sp
+.LP
+If an option that takes an option-argument is followed by a value that is the
+same as one of the options listed in \fIoptstring\fR (referring to the earlier
+EXAMPLES section, but using the following command line:
+.sp
+.in +2
+.nf
+\fBcmd -o -a filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBgetopt\fR always treats it as an option-argument to \fB-o\fR; it never
+recognizes \fB-a\fR as an option. For this case, the \fBfor\fR loop in the
+example shifts past the \fIfilename\fR argument.
diff --git a/usr/src/man/man1/getoptcvt.1 b/usr/src/man/man1/getoptcvt.1
new file mode 100644
index 0000000000..fd2ae0ef34
--- /dev/null
+++ b/usr/src/man/man1/getoptcvt.1
@@ -0,0 +1,249 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getoptcvt 1 "7 Jan 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+getoptcvt \- convert to getopts to parse command options
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/lib/getoptcvt\fR [\fB-b\fR] \fIfilename\fR
+.fi
+
+.LP
+.nf
+\fB/usr/lib/getoptcvt\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fB/usr/lib/getoptcvt\fR reads the shell script in \fIfilename\fR, converts it
+to use \fBgetopts\fR instead of \fBgetopt\fR, and writes the results on the
+standard output.
+.sp
+.LP
+\fBgetopts\fR is a built-in Bourne shell command used to parse positional
+parameters and to check for valid options. See \fBsh\fR(1). It supports all
+applicable rules of the command syntax standard (see Rules 3-10,
+\fBIntro\fR(1)). It should be used in place of the \fBgetopt\fR command. (See
+the NOTES section below.) The syntax for the shell's built-in \fBgetopts\fR
+command is:
+.sp
+.LP
+\fBgetopts\fR \fIoptstring\fR \fIname\fR [ \fIargument\fR\|.\|.\|.\|]
+.sp
+.LP
+\fIoptstring\fR must contain the option letters the command using \fBgetopts\fR
+will recognize; if a letter is followed by a colon (\fB:\fR), the option is
+expected to have an argument, or group of arguments, which must be separated
+from it by white space.
+.sp
+.LP
+Each time it is invoked, \fBgetopts\fR places the next option in the shell
+variable \fIname\fR and the index of the next argument to be processed in the
+shell variable \fBOPTIND\fR. Whenever the shell or a shell script is invoked,
+\fBOPTIND\fR is initialized to \fB1\fR.
+.sp
+.LP
+When an option requires an option-argument, \fBgetopts\fR places it in the
+shell variable \fBOPTARG\fR.
+.sp
+.LP
+If an illegal option is encountered, \fB?\fR will be placed in \fIname\fR.
+.sp
+.LP
+When the end of options is encountered, \fBgetopts\fR exits with a non-zero
+exit status. The special option \fB \(mi\(mi\fR may be used to delimit the end
+of the options.
+.sp
+.LP
+By default, \fBgetopts\fR parses the positional parameters. If extra arguments
+(\fIargument\fR .\|.\|.) are given on the \fBgetopts\fR command line,
+\fBgetopts\fR parses them instead.
+.sp
+.LP
+So that all new commands will adhere to the command syntax standard described
+in \fBIntro\fR(1), they should use \fBgetopts\fR or \fBgetopt\fR to parse
+positional parameters and check for options that are valid for that command
+(see the NOTES section below).
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Makes the converted script portable to earlier releases of the UNIX system.
+\fB/usr/lib/getoptcvt\fR modifies the shell script in \fIfilename\fR so that
+when the resulting shell script is executed, it determines at run time whether
+to invoke \fBgetopts\fR or \fBgetopt\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRProcessing the arguments for a command
+.sp
+.LP
+The following fragment of a shell program shows how one might process the
+arguments for a command that can take the options \fB-a\fR or \fB-b\fR, as well
+as the option \fB-o\fR, which requires an option-argument:
+
+.sp
+.in +2
+.nf
+while getopts abo: c
+do
+ case $c in
+ a | b) FLAG=$c;;
+ o) OARG=$OPTARG;;
+ \e?) echo $USAGE
+ exit 2;;
+ esac
+done
+shift `expr $OPTIND \(mi 1`
+.fi
+.in -2
+
+.LP
+\fBExample 2 \fREquivalent code expressions
+.sp
+.LP
+This code accepts any of the following as equivalent:
+
+.sp
+.in +2
+.nf
+\fBcmd -a -b -o "xxx z yy" filename
+cmd -a -b -o "xxx z yy" -filename
+cmd -ab -o xxx,z,yy filename
+cmd -ab -o "xxx z yy" filename
+cmd -o xxx,z,yy b a filename\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgetopts\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOPTIND\fR \fR
+.ad
+.RS 11n
+.rt
+This variable is used by \fBgetoptcvt\fR as the index of the next argument to
+be processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOPTARG\fR \fR
+.ad
+.RS 11n
+.rt
+This variable is used by \fBgetoptcvt\fR to store the argument if an option is
+using arguments.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+An option, specified or unspecified by \fIoptstring\fR, was found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+The end of options was encountered or an error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+CSIenabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBIntro\fR(1), \fBgetopts\fR(1), \fBsh\fR(1), \fBshell_builtins\fR(1),
+\fBgetopt\fR(3C), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBgetopts\fR prints an error message on the standard error when it encounters
+an option letter not included in \fIoptstring\fR.
+.SH NOTES
+.sp
+.LP
+Although the following command syntax rule (see \fBIntro\fR(1)) relaxations are
+permitted under the current implementation, they should not be used because
+they may not be supported in future releases of the system. As in the EXAMPLES
+section above, \fB-a\fR and \fB-b\fR are options, and the option \fB-o\fR
+requires an option-argument. The following example violates Rule 5: options
+with option-arguments must not be grouped with other options:
+.sp
+.in +2
+.nf
+example% \fBcmd -aboxxx filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example violates Rule 6: there must be white space after an
+option that takes an option-argument:
+.sp
+.in +2
+.nf
+example% \fBcmd -ab oxxx filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Changing the value of the shell variable \fBOPTIND\fR or parsing different sets
+of arguments may lead to unexpected results.
diff --git a/usr/src/man/man1/getopts.1 b/usr/src/man/man1/getopts.1
new file mode 100644
index 0000000000..a2f8d74058
--- /dev/null
+++ b/usr/src/man/man1/getopts.1
@@ -0,0 +1,954 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getopts 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+getopts \- parse utility options
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/getopts\fR \fIoptstring\fR \fIname\fR [\fIarg\fR...]
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBgetopts\fR \fIoptstring\fR \fIname\fR [\fIargument\fR]...
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBgetopts\fR \fIoptstring\fR \fIname\fR [\fIarg\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBgetopts\fR [\fB-a\fR \fIname\fR] \fIoptstring\fR \fIname\fR [\fIarg\fR]...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/getopts"
+.sp
+.LP
+The \fBgetopts\fR utility can be used to retrieve options and option-arguments
+from a list of parameters.
+.sp
+.LP
+Each time it is invoked, the \fBgetopts\fR utility places the value of the next
+option in the shell variable specified by the \fIname\fR operand and the index
+of the next argument to be processed in the shell variable \fBOPTIND\fR.
+Whenever the shell is invoked, \fBOPTIND\fR is initialized to \fB1\fR.
+.sp
+.LP
+When the option requires an option-argument, the \fBgetopts\fR utility places
+it in the shell variable \fBOPTARG\fR. If no option was found, or if the option
+that was found does not have an option-argument, \fBOPTARG\fR is unset.
+.sp
+.LP
+If an option character not contained in the \fIoptstring\fR operand is found
+where an option character is expected, the shell variable specified by
+\fIname\fR is set to the question-mark \fB(\fR \fB?\fR \fB)\fR character. In
+this case, if the first character in \fIoptstring\fR is a colon (\fB:\fR, the
+shell variable \fBOPTARG\fR is set to the option character found, but no output
+is written to standard error; otherwise, the shell variable \fBOPTARG\fR is
+unset and a diagnostic message is written to standard error. This condition is
+considered to be an error detected in the way arguments were presented to the
+invoking application, but is not an error in \fBgetopts\fR processing.
+.sp
+.LP
+If an option-argument is missing:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the first character of \fIoptstring\fR is a colon, the shell variable
+specified by \fIname\fR is set to the colon character and the shell variable
+\fBOPTARG\fR is set to the option character found.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, the shell variable specified by \fIname\fR is set to the
+question-mark character (\fB?\fR), the shell variable \fBOPTARG\fR is unset,
+and a diagnostic message is written to standard error. This condition is
+considered to be an error detected in the way arguments were presented to the
+invoking application, but is not an error in \fBgetopts\fR processing; a
+diagnostic message is written as stated, but the exit status is zero.
+.RE
+.sp
+.LP
+When the end of options is encountered, the \fBgetopts\fR utility exits with a
+return value greater than zero; the shell variable \fBOPTIND\fR is set to the
+index of the first non-option-argument, where the first \fB\(mi\|\(mi\fR
+argument is considered to be an option-argument if there are no other
+non-option-arguments appearing before it, or the value \fB$#\fR + 1 if there
+are no non-option-arguments; the \fIname\fR variable is set to the
+question-mark character. Any of the following identifies the end of options:
+the special option \fB\(mi\|\(mi\fR, finding an argument that does not begin
+with a \fB\(mi\fR, or encountering an error.
+.sp
+.LP
+The shell variables \fBOPTIND\fR and \fBOPTARG\fR are local to the caller of
+\fBgetopts\fR and are not exported by default.
+.sp
+.LP
+The shell variable specified by the \fIname\fR operand, \fBOPTIND\fR and
+\fBOPTARG\fR affect the current shell execution environment.
+.sp
+.LP
+If the application sets \fBOPTIND\fR to the value 1, a new set of parameters
+can be used: either the current positional parameters or new \fIarg\fR values.
+Any other attempt to invoke \fBgetopts\fR multiple times in a single shell
+execution environment with parameters (positional parameters or \fIarg\fR
+operands) that are not the same in all invocations, or with an \fBOPTIND\fR
+value modified to be a value other than 1, produces unspecified results.
+.SS "sh"
+.sp
+.LP
+\fBgetopts\fR is a built-in Bourne shell command used to parse positional
+parameters and to check for valid options. See \fBsh\fR(1). It supports all
+applicable rules of the command syntax standard (see Rules 3-10,
+\fBIntro\fR(1)). It should be used in place of the \fBgetopt\fR command.
+.sp
+.LP
+\fIoptstring\fR must contain the option letters the command using \fBgetopts\fR
+recognizes. If a letter is followed by a colon, the option is expected to have
+an argument, or group of arguments, which must be separated from it by white
+space.
+.sp
+.LP
+Each time it is invoked, \fBgetopts\fR places the next option in the shell
+variable \fIname\fR and the index of the next argument to be processed in the
+shell variable \fBOPTIND\fR. Whenever the shell or a shell script is invoked,
+\fBOPTIND\fR is initialized to \fB1\fR.
+.sp
+.LP
+When an option requires an option-argument, \fBgetopts\fR places it in the
+shell variable \fBOPTARG\fR.
+.sp
+.LP
+If an illegal option is encountered, \fB?\fR is placed in \fIname\fR.
+.sp
+.LP
+When the end of options is encountered, \fBgetopts\fR exits with a non-zero
+exit status. The special option \fB-\fR can be used to delimit the end of the
+options.
+.sp
+.LP
+By default, \fBgetopts\fR parses the positional parameters. If extra arguments
+(\fIargument\fR .\|.\|.) are specified on the \fBgetopts\fR command line,
+\fBgetopts\fR parses them instead.
+.sp
+.LP
+\fB/usr/lib/getoptcvt\fR reads the shell script in \fIfilename\fR, converts it
+to use \fBgetopts\fR instead of \fBgetopt\fR, and writes the results on the
+standard output.
+.sp
+.LP
+So that all new commands adhere to the command syntax standard described in
+\fBIntro\fR(1), they should use \fBgetopts\fR or \fBgetopt\fR to parse
+positional parameters and check for options that are valid for that command.
+.sp
+.LP
+\fBgetopts\fR prints an error message on the standard error when it encounters
+an option letter not included in \fIoptstring\fR.
+.sp
+.LP
+Although the following command syntax rule (see \fBIntro\fR(1)) relaxations are
+permitted under the current implementation, they should not be used because
+they can not be supported in future releases of the system. As in the EXAMPLES
+section below, \fB-a\fR and \fB-b\fR are options, and the option \fB-o\fR
+requires an option-argument.
+.sp
+.LP
+The following example violates Rule 5: options with option-arguments must not
+be grouped with other options:
+.sp
+.in +2
+.nf
+example% \fBcmd -aboxxx filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example violates Rule 6: there must be white space after an
+option that takes an option-argument:
+.sp
+.in +2
+.nf
+example% \fBcmd -ab oxxx filename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Changing the value of the shell variable \fBOPTIND\fR or parsing different sets
+of arguments can lead to unexpected results.
+.SS "ksh"
+.sp
+.LP
+Checks \fIarg\fR for legal options. If \fIarg\fR is omitted, the positional
+parameters are used. An option argument begins with a \fB+\fR or a
+\fB\(mi\fR\&. An option not beginning with \fB+\fR or \fB\(mi\fR or the
+argument \fB-\fR ends the options. \fIoptstring\fR contains the letters that
+\fBgetopts\fR recognizes. If a letter is followed by a \fB:\fR, that option is
+expected to have an argument. The options can be separated from the argument by
+blanks.
+.sp
+.LP
+\fBgetopts\fR places the next option letter it finds inside variable \fIname\fR
+each time it is invoked with a \fB+\fR prepended when \fIarg\fR begins with a
+\fB+\fR. The index of the next \fIarg\fR is stored in \fBOPTIND\fR. The option
+argument, if any, gets stored in \fBOPTARG\fR.
+.sp
+.LP
+A leading \fB:\fR in \fIoptstring\fR causes \fBgetopts\fR to store the letter
+of an invalid option in \fBOPTARG\fR, and to set \fIname\fR to \fB?\fR for an
+unknown option and to \fB:\fR when a required option is missing. Otherwise,
+\fBgetopts\fR prints an error message. The exit status is \fBnon-zero\fR when
+there are no more options.
+.sp
+.LP
+\fBgetopts\fR supports both traditional single-character short options and long
+options defined by Sun's Command Line Interface Paradigm (\fBCLIP\fR).
+.sp
+.LP
+Each long option is an alias for a short option and is specified in parentheses
+following its equivalent short option. For example, you can specify the long
+option \fBfile\fR as an alias for the short option \fBf\fR using the following
+script line:
+.sp
+.in +2
+.nf
+getopts "f(file)" opt
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Precede long options on the command line with \fB--\fR or \fB++\fR. In the
+example above, \fB--file\fR on the command line would be the equivalent of
+\fB-f\fR, and \fB++file\fR on the command line would be the equivalent of
+\fB+f\fR.
+.sp
+.LP
+Each short option can have multiple long option equivalents, although this is
+in violation of the CLIP specification and should be used with caution. You
+must enclose each long option equivalent parentheses, as follows:
+.sp
+.in +2
+.nf
+getopts "f:(file)(input-file)o:(output-file)"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In the above example, both \fB--file\fR and \fB--input-file\fR are the
+equivalent of \fB-f\fR, and \fB--output-file\fR is the equivalent of \fB-o\fR.
+.sp
+.LP
+The variable name is always set to a short option. When a long option is
+specified on the command line, name is set to the short-option equivalent.
+.sp
+.LP
+For a further discussion of the Korn shell's \fBgetopts\fR built-in command,
+see the previous discussion in the Bourne shell (\fBsh\fR) section of this
+manpage.
+.SS "ksh93"
+.sp
+.LP
+The \fBgetopts\fR utility can be used to retrieve options and arguments from a
+list of arguments specified by \fIarg\fRs or the positional parameters if
+\fIarg\fR is omitted. It can also generate usage messages and a manual page for
+the command based on the information in \fIoptstring\fR.
+.sp
+.LP
+Each time it is invoked, the \fBgetopts\fR utility places the value of the next
+option in the shell variable specified by the \fIname\fR operand and the index
+of the next argument to be processed in the shell variable \fBOPTIND\fR. When
+the shell is invoked \fBOPTIND\fR is initialized to \fB1\fR. When an option
+requires or permits an option argument, \fBgetopts\fR places the option
+argument in the shell variable \fBOPTARG\fR. Otherwise \fBOPTARG\fR is set to
+\fB1\fR when the option is set and \fB0\fR when the option is \fBunset\fR.
+.sp
+.LP
+The \fIoptstring\fR string consists of alphanumeric characters, the special
+characters \fB+\fR, \fB-\fR, \fB?\fR, \fB:\fR, and SPACE or character groups
+enclosed in \fB[...]\fR. Character groups can be nested in \fB{...}\fR. Outside
+of a \fB[...]\fR group, a single NEWLINE followed by zero or more blanks is
+ignored. One or more blank lines separate the options from the command argument
+synopsis.
+.sp
+.LP
+Each \fB[...]\fR group consists of an optional label, optional attributes
+separated by \fB:\fR, and an optional description string following \fB?\fR. The
+characters from the \fB?\fR to the end of the next \fB]\fR are ignored for
+option parsing and short usage messages. They are used for generating verbose
+help or man pages. The \fB:\fR character can not appear in the label. The
+\fB?\fR character must be specified as \fB??\fR in the label and the \fB]\fR
+character must be specified as \fB]]\fR in the description string. Text between
+two \fB\eb\fR (backspace) characters indicates that the text should be
+emboldened when displayed. Text between two \fB\ea\fR (bell) characters
+indicates that the text should be emphasized or italicized when displayed. Text
+between two \fB\ev\fR (vertical tab) characters indicates that the text should
+displayed in a fixed-width font. Text between two \fB\ef\fR (form feed)
+characters is replaced by the output from the shell function whose name is that
+of the enclosed text.
+.sp
+.LP
+All output from this interface is written to the standard error.
+.sp
+.LP
+There are several group types:
+.RS +4
+.TP
+1.
+A group of the form
+.sp
+.in +2
+.nf
+\fB[-[\fR\fIversion\fR][\fIflag\fR[\fInumber\fR\fB]]...[?\fR\fItext\fR\fB]]\fR
+.fi
+.in -2
+.sp
+
+which appears as the first group enables the extended interface.
+.sp
+\fIversion\fR specifies the interface version, currently 1. The latest version
+is assumed if version is omitted. Future enhancements can increment
+\fIversion\fR, but all versions are supported. \fItext\fR typically specifies
+an SCCS or CVS identification string. Zero or more flags with optional number
+values can be specified to control option parsing. The flags are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.RS 5n
+.rt
+Cache this \fIoptstring\fR for multiple passes. Used to optimize built-ins that
+can be called many times within the same process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 5n
+.rt
+Ignore this \fIoptstring\fR when generating help. Used when combining
+\fIoptstring\fR values from multiple passes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 5n
+.rt
+Display only long option names in help messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 5n
+.rt
+The \fB-\fR option character prefix is optional. This supports the obsolete
+\fBps\fR(1) option syntax.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 5n
+.rt
+The number specifies the number of \fB-\fR characters that must prefix long
+option names. The default is \fB2\fR. \fB0\fR, \fB1\fR or \fB2\fR are accepted,
+for example \fBp0\fR for \fBdd\fR(1M) and \fBp1\fR for \fBfind\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 5n
+.rt
+The number specifies the manual page section number, \fB1\fR by default.
+.RE
+
+.RE
+.RS +4
+.TP
+2.
+An option specification of the form
+\fB[\fR\fIoption\fR\fB[!][=\fR\fInumber\fR\fB][:\fR\fIlongname\fR\fB][?\fR\fItext\fR\fB]]\fR.
+In this case the first field is the option character, which is the value
+returned in the name operand when the option is matched. If there is no option
+character then a two or more digit number should be specified. This number is
+returned as the value of the name operand if the long option is matched. If
+option is followed by a \fB!\fR then the option character sense is the inverse
+of the \fIlongname\fR sense. For options that do not take values \fBOPTARG\fR
+is set to \fB0\fR for \fB!\fR inverted option characters and \fB1\fR
+otherwise. \fI=number\fR optionally specifies a number to be returned in the
+\fIname\fR operand instead of the option character. A \fIlongname\fR is
+specified by \fB--longname\fR and is matched by the shortest non-ambiguous
+prefix of all long options. An \fB*\fR in the \fBlongname\fR field indicates
+that only characters up to that point need to match, provided any additional
+characters match exactly. The enclosing \fB[\fR and \fB]\fR can be omitted for
+an option that does not have a \fBlongname\fR or descriptive text.
+.RE
+.RS +4
+.TP
+3.
+An option argument specification. Options that take arguments can be
+followed by \fB:\fR, indicating a string value or \fB#\fR, indicating a numeric
+value, and an option argument specification. An option argument specification
+consists of the option argument name as field 1. The remaining : separated
+fields are a type name and zero or more of the special attribute words
+\fBlistof\fR, \fBoneof\fR, and \fBignorecase\fR. A default option value can be
+specified in the final field as :=default. The option argument specification
+can be followed by a list of option value descriptions enclosed in braces. A
+long option that takes an argument is specified as
+\fB--longname=\fR\fIvalue\fR. If the \fB:\fR or \fB#\fR is followed by \fB?\fR,
+the option argument is optional. If only the option character form is specified
+then the optional argument value is not set if the next argument starts with
+\fB-\fR or \fB+\fR.
+.RE
+.RS +4
+.TP
+4.
+An option value description.
+.RE
+.RS +4
+.TP
+5.
+An argument specification. A list of valid option argument values can be
+specified by enclosing them inside a \fB{...}\fR following the option argument
+specification. Each of the permitted values can be specified with a \fB[...]\fR
+containing the value followed by a description.
+.RE
+.RS +4
+.TP
+6.
+A group of the form \fB[+\fR\fB\e\fR\fIn\fR\fB\&...]\fR displays the
+characters representing \fB\&...\fR in fixed-width font without adding line
+breaks.
+.RE
+.RS +4
+.TP
+7.
+A group of the form \fB[+\fR\fIname\fR\fB?\fR\fItext\fR\fB]\fR specifies a
+section name with descriptive text. If \fIname\fR is omitted, \fItext\fR is
+placed in a new paragraph.
+.RE
+.RS +4
+.TP
+8.
+A group of the form \fB[-\fR\fIname\fR\fB?\fR\fItext\fR\fB]\fR specifies
+entries for the \fBIMPLEMENTATION\fR section.
+.RE
+.sp
+.LP
+If the leading character of \fIoptstring\fR is \fB+\fR, arguments beginning
+with \fB+\fR are also be considered options.
+.sp
+.LP
+A leading \fB:\fR character or a : following a leading \fB+\fR in
+\fIoptstring\fR affects the way errors are handled. If an option character or
+\fBlongname\fR argument not specified in \fIoptstring\fR is encountered when
+processing options, the shell variable whose name is name is set to the \fB?\fR
+character. The shell variable \fBOPTARG\fR is set to the character found. If an
+option argument is missing or has an invalid value, then name is set to the
+\fB:\fR character and the shell variable \fBOPTARG\fR is set to the option
+character found. Without the leading \fB:\fR, \fIname\fR is set to the \fB?\fR
+character, \fBOPTARG\fR is unset, and an error message is written to standard
+error when errors are encountered.
+.sp
+.LP
+The end of options occurs when:
+.RS +4
+.TP
+1.
+The special argument \fB--\fR is encountered.
+.RE
+.RS +4
+.TP
+2.
+An argument that does not begin with a \fB-\fR is encountered.
+.RE
+.RS +4
+.TP
+3.
+A help argument is specified.
+.RE
+.RS +4
+.TP
+4.
+An error is encountered.
+.RE
+.sp
+.LP
+If \fBOPTIND\fR is set to the value \fB1\fR, a new set of arguments can be
+used.
+.sp
+.LP
+\fBgetopts\fR can also be used to generate help messages containing command
+usage and detailed descriptions. Specify \fIargs\fR as:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to generate a usage synopsis.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--??\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to generate a verbose usage message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--??man\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to generate a formatted manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--??api\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to generate an easy to parse usage message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--??html\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to generate a man page in \fBhtml\fR format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--??nroff\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to generate a man page in \fBnroff\fR format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--??usage\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to list the current \fBoptstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--???name\fR\fR
+.ad
+.RS 13n
+.rt
+Use this to list \fBversion=\fR\fIn\fR, where \fIn\fR is greater than \fB0\fR,
+if the option \fIname\fR is recognized by \fBgetopts\fR.
+.RE
+
+.sp
+.LP
+When the end of options is encountered, \fBgetopts\fR exits with a
+\fBnon-zero\fR return value and the variable \fBOPTIND\fR is set to the index
+of the first non-option argument.
+.SH OPTIONS
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIname\fR\fR
+.ad
+.RS 11n
+.rt
+Use \fIname\fR instead of the command name in usage messages.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoptstring\fR\fR
+.ad
+.RS 13n
+.rt
+A string containing the option characters recognised by the utility invoking
+\fBgetopts\fR. If a character is followed by a colon, the option is expected to
+have an argument, which should be supplied as a separate argument. Applications
+should specify an option character and its option-argument as separate
+arguments, but \fBgetopts\fR interprets the characters following an option
+character requiring arguments as an argument whether or not this is done. An
+explicit null option-argument need not be recognised if it is not supplied as a
+separate argument when \fBgetopts\fR is invoked; see \fBgetopt\fR(3C). The
+characters question-mark (\fB?\fR) and colon (\fB:\fR) must not be used as
+option characters by an application. The use of other option characters that
+are not alphanumeric produces unspecified results. If the option-argument is
+not supplied as a separate argument from the option character, the value in
+\fBOPTARG\fR is stripped of the option character and the \fB\(mi\fR\&. The
+first character in \fIoptstring\fR determines how \fBgetopts\fR behaves if an
+option character is not known or an option-argument is missing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 13n
+.rt
+The name of a shell variable that is set by the \fBgetopts\fR utility to the
+option character that was found.
+.RE
+
+.sp
+.LP
+The \fBgetopts\fR utility by default parses positional parameters passed to the
+invoking shell procedure. If \fIarg\fRs are specified, they are parsed instead
+of the positional parameters.
+.SH USAGE
+.sp
+.LP
+Since \fBgetopts\fR affects the current shell execution environment, it is
+generally provided as a shell regular built-in. If it is called in a subshell
+or separate utility execution environment, such as one of the following:
+.sp
+.in +2
+.nf
+ (getopts abc value "$@")
+ nohup getopts ...
+ find . -exec getopts ... \e;
+.fi
+.in -2
+
+.sp
+.LP
+it does not affect the shell variables in the caller's environment.
+.sp
+.LP
+Notice that shell functions share \fBOPTIND\fR with the calling shell even
+though the positional parameters are changed. Functions that want to use
+\fBgetopts\fR to parse their arguments usually want to save the value of
+\fBOPTIND\fR on entry and restore it before returning. However, there are cases
+when a function wants to change \fBOPTIND\fR for the calling shell.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRParsing and Displaying Arguments
+.sp
+.LP
+The following example script parses and displays its arguments:
+
+.sp
+.in +2
+.nf
+aflag=
+bflag=
+while getopts ab: name
+do
+ case $name in
+ a) aflag=1;;
+ b) bflag=1
+ bval="$OPTARG";;
+ ?) printf "Usage: %s: [-a] [-b value] args\en" $0
+ exit 2;;
+ esac
+done
+if [ ! -z "$aflag" ]; then
+ printf "Option -a specified\en"
+fi
+if [ ! -z "$bflag" ]; then
+ printf 'Option -b "%s" specified\en' "$bval"
+fi
+shift $(($OPTIND - 1))
+printf "Remaining arguments are: %s\en" "$*"
+.fi
+.in -2
+
+.LP
+\fBExample 2 \fRProcessing Arguments for a Command with Options
+.sp
+.LP
+The following fragment of a shell program processes the arguments for a command
+that can take the options \fB-a\fR or \fB-b\fR. It also processes the option
+\fB-o\fR, which requires an option-argument:
+
+.sp
+.in +2
+.nf
+while getopts abo: c
+do
+ case $c in
+ a | b) FLAG=$c;;
+ o) OARG=$OPTARG;;
+ \e?) echo $USAGE
+ exit 2;;
+ esac
+done
+shift `expr $OPTIND \(mi 1`
+.fi
+.in -2
+
+.LP
+\fBExample 3 \fREquivalent Code Expressions
+.sp
+.LP
+This code example accepts any of the following as equivalent:
+
+.sp
+.in +2
+.nf
+cmd -a -b -o "xxx z yy" filename
+cmd -a -b -o "xxx z yy" -- filename
+cmd -ab -o xxx,z,yy filename
+cmd -ab -o "xxx z yy" filename
+cmd -o xxx,z,yy -b -a filename
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgetopts\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOPTIND\fR\fR
+.ad
+.RS 10n
+.rt
+This variable is used by \fBgetopts\fR as the index of the next argument to be
+processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOPTARG\fR\fR
+.ad
+.RS 10n
+.rt
+This variable is used by \fBgetopts\fR to store the argument if an option is
+using arguments.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An option, specified or unspecified by \fIoptstring\fR, was found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+The end of options was encountered or an error occurred.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned by \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+A specified option was found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An end of options was encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+A usage or information message was generated.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/getopts, sh, ksh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBIntro\fR(1), \fBgetoptcvt\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBps\fR(1),
+\fBsh\fR(1), \fBgetopt\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+Whenever an error is detected and the first character in the \fIoptstring\fR
+operand is not a colon (\fB:\fR), a diagnostic message is written to standard
+error with the following information in an unspecified format:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The invoking program name is identified in the message. The invoking program
+name is the value of the shell special parameter \fB0\fR at the time the
+\fBgetopts\fR utility is invoked. A name equivalent to
+.sp
+.in +2
+.nf
+\fIbasename\fR "$0"
+.fi
+.in -2
+
+can be used.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If an option is found that was not specified in \fIoptstring\fR, this error is
+identified and the invalid option character is identified in the message.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If an option requiring an option-argument is found, but an option-argument is
+not found, this error is identified and the invalid option character is
+identified in the message.
+.RE
diff --git a/usr/src/man/man1/gettext.1 b/usr/src/man/man1/gettext.1
new file mode 100644
index 0000000000..20560276f8
--- /dev/null
+++ b/usr/src/man/man1/gettext.1
@@ -0,0 +1,185 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH gettext 1 "17 Sep 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+gettext \- retrieve text string from message database
+.SH SYNOPSIS
+.LP
+.nf
+\fBgettext\fR [\fB-d\fR \fItextdomain\fR | \fB-\(midomain\fR=\fItextdomain\fR]
+ [\fItextdomain\fR] \fImsgid\fR
+.fi
+
+.LP
+.nf
+\fBgettext\fR \fB-s\fR [\fB-e\fR] [\fB-n\fR]
+ [\fB-d\fR \fItextdomain\fR | \fB-\(midomain\fR=\fItextdomain\fR] \fImsgid\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgettext\fR utility retrieves a translated text string corresponding to
+string \fImsgid\fR from a message object generated with \fBmsgfmt\fR(1). The
+message object name is derived from the optional argument \fItextdomain\fR if
+present, otherwise from the \fBTEXTDOMAIN\fR environment. If no domain is
+specified, or if a corresponding string cannot be found, \fBgettext\fR prints
+\fImsgid\fR.
+.sp
+.LP
+Ordinarily, \fBgettext\fR looks for its message object in
+\fB/usr/lib/locale/\fIlang\fR/LC_MESSAGES\fR where \fIlang\fR is the locale
+name. If present, the \fBTEXTDOMAINDIR\fR environment variable replaces the
+pathname component up to \fIlang\fR.
+.sp
+.LP
+This command interprets C escape sequences such as \fB\et\fR for tab. Use
+\fB\e\e\fR to print a backslash. To produce a message on a line of its own,
+either enter \fB\en\fR at the end of \fImsgid\fR, or use this command in
+conjunction with \fBprintf\fR(1).
+.sp
+.LP
+When used with the \fB-s\fR option, \fBgettext\fR behaves like \fBecho\fR(1).
+But it does not simply copy its arguments to standard output. Instead, those
+messages found in the selected catalog are translated.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fItextdomain\fR\fR
+.ad
+.br
+.na
+\fB\fB-\(midomain\fR=\fItextdomain\fR\fR
+.ad
+.RS 26n
+.rt
+Retrieves translated messages from the domain \fItextdomain\fR, if
+\fItextdomain\fR is not specified as an operand.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 26n
+.rt
+Enables expansion of some escape sequences if used with the \fB-s\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 26n
+.rt
+Suppresses trailing newline if used with the \fB-s\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 26n
+.rt
+Behaves like \fBecho\fR(1) (see DESCRIPTION above). If the \fB-s\fR option is
+specified, no expansion of C escape sequences is performed and a newline
+character is appended to the output, by default.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fItextdomain\fR\fR
+.ad
+.RS 14n
+.rt
+A domain name used to retrieve the messages. This overrides the specification
+by the \fB-d\fR or \fB-\(midomain\fR options, if present.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgid\fR\fR
+.ad
+.RS 14n
+.rt
+A key to retrieve the localized message.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLANG\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies locale name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies messaging locale, and if present overrides \fBLANG\fR for messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTEXTDOMAIN\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the text domain name, which is identical to the message object
+filename without \fB\&.mo\fR suffix.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTEXTDOMAINDIR\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the pathname to the message database. If present, replaces
+\fB/usr/lib/locale\fR.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBecho\fR(1), \fBmsgfmt\fR(1), \fBprintf\fR(1), \fBgettext\fR(3C),
+\fBsetlocale\fR(3C), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+This is the shell equivalent of the library routine \fBgettext\fR(3C).
diff --git a/usr/src/man/man1/gettxt.1 b/usr/src/man/man1/gettxt.1
new file mode 100644
index 0000000000..9d877fb784
--- /dev/null
+++ b/usr/src/man/man1/gettxt.1
@@ -0,0 +1,182 @@
+'\" te
+.\" Copyright 1989 AT&T All Rights Reserved Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH gettxt 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+gettxt \- retrieve a text string from a message database
+.SH SYNOPSIS
+.LP
+.nf
+\fBgettxt\fR \fImsgfile\fR : \fImsgnum\fR [\fIdflt_msg\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBgettxt\fR retrieves a text string from a message file in the directory
+\fB/usr/lib/locale/\fR\fIlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB \fR. The
+directory name \fIlocale\fR corresponds to the language in which the text
+strings are written; see \fBsetlocale\fR(3C).
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgfile\fR \fR
+.ad
+.RS 13n
+.rt
+Name of the file in the directory
+\fB/usr/lib/locale/\fR\fIlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB \fR to retrieve
+\fImsgnum\fR from. The name of \fImsgfile\fR can be up to 14 characters in
+length, but may not contain either \e0 (null) or the \fBASCII\fR code for
+\fB/\fR (slash) or \fB:\fR (colon).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgnum\fR \fR
+.ad
+.RS 13n
+.rt
+Sequence number of the string to retrieve from \fImsgfile\fR. The strings in
+\fImsgfile\fR are numbered sequentially from \fI1\fR to \fIn\fR, where \fIn\fR
+is the number of strings in the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdflt_msg\fR \fR
+.ad
+.RS 13n
+.rt
+Default string to be displayed if \fBgettxt\fR fails to retrieve \fImsgnum\fR
+from \fImsgfile\fR. Nongraphic characters must be represented as alphabetic
+escape sequences.
+.RE
+
+.sp
+.LP
+The text string to be retrieved is in the file \fImsgfile\fR, created by the
+\fBmkmsgs\fR(1) utility and installed under the directory
+\fB/usr/lib/locale/\fR\fIlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB \fR. You
+control which directory is searched by setting the environment variable
+\fBLC_MESSAGES\fR. If \fBLC_MESSAGES\fR is not set, the environment variable
+\fBLANG\fR will be used. If \fBLANG\fR is not set, the files containing the
+strings are under the directory \fB/usr/lib/locale/C/\fR\fBLC_MESSAGES\fR\fB
+\fR.
+.sp
+.LP
+If \fBgettxt\fR fails to retrieve a message in the requested language, it will
+try to retrieve the same message from
+\fB/usr/lib/locale/C/\fR\fBLC_MESSAGES\fR\fB/ \fR\fImsgfile\fR. If this also
+fails, and if \fIdflt_msg\fR is present and non-null, then it will display the
+value of \fIdflt_msg\fR; if \fIdflt_msg\fR is not present or is null, then it
+will display the string \fBMessage not found!!\fR.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRThe environment variables \fBLANG\fR and \fBLC_MESSAGES\fR.
+.sp
+.LP
+If the environment variables \fBLANG\fR or \fBLC_MESSAGES\fR have not been set
+to other than their default values, the following example:
+
+.sp
+.in +2
+.nf
+\fBexample% gettxt UX:10 "hello world\en"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+will try to retrieve the 10th message from
+\fB/usr/lib/locale/C/UX/\fR\fImsgfile\fR. If the retrieval fails, the message
+"hello world," followed by a newline, will be displayed.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgettxt\fR: \fBLC_CTYPE\fR and
+\fB\fR\fBLC_MESSAGES\fR\fB\&. \fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR \fR
+.ad
+.RS 16n
+.rt
+Determines how \fBgettxt\fR handles characters. When \fBLC_CTYPE\fR is set to a
+valid value, \fBgettxt\fR can display and handle text and filenames containing
+valid characters for that locale. \fBgettxt\fR can display and handle Extended
+Unix Code (EUC) characters where any individual character can be 1, 2, or 3
+bytes wide. \fBgettxt\fR can also handle \fBEUC\fR characters of 1, 2, or more
+column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR \fR
+.ad
+.RS 16n
+.rt
+Determines how diagnostic and informative messages are presented. This includes
+the language and style of the messages, and the correct form of affirmative and
+negative responses. In the "C" locale, the messages are presented in the
+default form found in the program itself (in most cases, U.S. English).
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/C/\fR\fBLC_MESSAGES\fR\fB/* \fR\fR
+.ad
+.sp .6
+.RS 4n
+default message files created by \fBmkmsgs\fR(1)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fR\fIlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB/* \fR\fR
+.ad
+.sp .6
+.RS 4n
+message files for different languages created by \fBmkmsgs\fR(1)
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBexstr\fR(1), \fBmkmsgs\fR(1), \fBsrchtxt\fR(1), \fBgettxt\fR(3C),
+\fBsetlocale\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5)
diff --git a/usr/src/man/man1/getzonepath.1 b/usr/src/man/man1/getzonepath.1
new file mode 100644
index 0000000000..f0cde59c26
--- /dev/null
+++ b/usr/src/man/man1/getzonepath.1
@@ -0,0 +1,99 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH getzonepath 1 "20 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+getzonepath \- display root path of the zone corresponding to the specified
+label
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/getzonepath\fR {\fIsensitivity-label\fR}
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBgetzonepath\fR displays the root pathname of the running labeled zone that
+corresponds to the specified sensitivity label. The returned pathname is
+relative to the caller's root pathname, and has the specified sensitivity
+label.
+.sp
+.LP
+If the caller is in the global zone, the returned pathname is not traversable
+unless the caller's processes have the \fBfile_dac_search\fR privilege.
+.sp
+.LP
+If the caller is in a labeled zone, the caller's label must dominate the
+specified label. Access to files under the returned pathname is restricted to
+read-only operations.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+StabilityCommitted
+.TE
+
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBgetzonepath\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Success
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Usage error
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Failure; error message is the system error number from
+\fBgetzonerootbylabel\fR(3TSOL)
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgetzonerootbylabel\fR(3TSOL), \fBattributes\fR(5)
+.sp
+.LP
+\fIAcquiring a Sensitivity Label\fR in \fISolaris Trusted Extensions
+Developer\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+The functionality described on this manual page is available only if the system
+is configured with Trusted Extensions.
diff --git a/usr/src/man/man1/glob.1 b/usr/src/man/man1/glob.1
new file mode 100644
index 0000000000..70e5975810
--- /dev/null
+++ b/usr/src/man/man1/glob.1
@@ -0,0 +1,26 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1994 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH glob 1 "15 Apr 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+glob \- shell built-in function to expand a word list
+.SH SYNOPSIS
+.SS "csh"
+.LP
+.nf
+\fBglob\fR \fIwordlist\fR
+.fi
+
+.SH DESCRIPTION
+.SS "csh"
+.sp
+.LP
+\fBglob\fR performs filename expansion on \fIwordlist\fR. Like \fBecho\fR(1),
+but no `\fB\e\fR\&' escapes are recognized. Words are delimited by null
+characters in the output.
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBecho\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/gprof.1 b/usr/src/man/man1/gprof.1
new file mode 100644
index 0000000000..d8f24b8cde
--- /dev/null
+++ b/usr/src/man/man1/gprof.1
@@ -0,0 +1,434 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH gprof 1 "8 Feb 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+gprof \- display call-graph profile data
+.SH SYNOPSIS
+.LP
+.nf
+\fBgprof\fR [\fB-abcCDlsz\fR] [\fB-e\fR \fIfunction-name\fR] [\fB-E\fR \fIfunction-name\fR]
+ [\fB-f\fR \fIfunction-name\fR] [\fB-F\fR \fIfunction-name\fR]
+ [\fIimage-file\fR [\fIprofile-file\fR...]]
+ [\fB-n\fR \fInumber of functions\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgprof\fR utility produces an execution profile of a program. The effect
+of called routines is incorporated in the profile of each caller. The profile
+data is taken from the call graph profile file that is created by programs
+compiled with the \fB-xpg\fR option of \fBcc\fR(1), or by the \fB-pg\fR option
+with other compilers, or by setting the \fBLD_PROFILE\fR environment variable
+for shared objects. See \fBld.so.1\fR(1). These compiler options also link in
+versions of the library routines which are compiled for profiling. The symbol
+table in the executable image file \fIimage-file\fR (\fBa.out\fR by default) is
+read and correlated with the call graph profile file \fIprofile-file\fR
+(\fBgmon.out\fR by default).
+.sp
+.LP
+First, execution times for each routine are propagated along the edges of the
+call graph. Cycles are discovered, and calls into a cycle are made to share the
+time of the cycle. The first listing shows the functions sorted according to
+the time they represent, including the time of their call graph descendants.
+Below each function entry is shown its (direct) call-graph children and how
+their times are propagated to this function. A similar display above the
+function shows how this function's time and the time of its descendants are
+propagated to its (direct) call-graph parents.
+.sp
+.LP
+Cycles are also shown, with an entry for the cycle as a whole and a listing of
+the members of the cycle and their contributions to the time and call counts of
+the cycle.
+.sp
+.LP
+Next, a flat profile is given, similar to that provided by \fBprof\fR(1). This
+listing gives the total execution times and call counts for each of the
+functions in the program, sorted by decreasing time. Finally, an index is
+given, which shows the correspondence between function names and call-graph
+profile index numbers.
+.sp
+.LP
+A single function may be split into subfunctions for profiling by means of the
+\fBMARK\fR macro. See \fBprof\fR(5).
+.sp
+.LP
+Beware of quantization errors. The granularity of the sampling is shown, but
+remains statistical at best. It is assumed that the time for each execution of
+a function can be expressed by the total time for the function divided by the
+number of times the function is called. Thus the time propagated along the
+call-graph arcs to parents of that function is directly proportional to the
+number of times that arc is traversed.
+.sp
+.LP
+The profiled program must call \fBexit\fR(2) or return normally for the
+profiling information to be saved in the \fBgmon.out\fR file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 19n
+.rt
+Suppress printing statically declared functions. If this option is given, all
+relevant information about the static function (for instance, time samples,
+calls to other functions, calls from other functions) belongs to the function
+loaded just before the static function in the \fBa.out\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 19n
+.rt
+Brief. Suppress descriptions of each field in the profile.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 19n
+.rt
+Discover the static call-graph of the program by a heuristic which examines the
+text space of the object file. Static-only parents or children are indicated
+with call counts of 0. Note that for dynamically linked executables, the linked
+shared objects' text segments are not examined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 19n
+.rt
+Demangle C++ symbol names before printing them out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 19n
+.rt
+Produce a profile file \fBgmon.sum\fR that represents the difference of the
+profile information in all specified profile files. This summary profile file
+may be given to subsequent executions of \fBgprof\fR (also with \fB-D\fR) to
+summarize profile data across several runs of an \fBa.out\fR file. See also
+the \fB-s\fR option.
+.sp
+As an example, suppose function A calls function B \fBn\fR times in profile
+file \fBgmon.sum\fR, and \fBm\fR times in profile file \fBgmon.out\fR. With
+\fB-D\fR, a new \fBgmon.sum\fR file will be created showing the number of calls
+from A to B as \fBn-m\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fIfunction-name\fR\fR
+.ad
+.RS 19n
+.rt
+Suppress printing the graph profile entry for routine \fIfunction-name\fR and
+all its descendants (unless they have other ancestors that are not suppressed).
+More than one \fB-e\fR option may be given. Only one \fIfunction-name\fR may
+be given with each \fB-e\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fIfunction-name\fR\fR
+.ad
+.RS 19n
+.rt
+Suppress printing the graph profile entry for routine \fIfunction-name\fR (and
+its descendants) as \fB-e\fR, below, and also exclude the time spent in
+\fIfunction-name\fR (and its descendants) from the total and percentage time
+computations. More than one \fB-E\fR option may be given. For example:
+.sp
+\fB-E\fR \fImcount\fR \fB-E\fR \fImcleanup\fR
+.sp
+is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fIfunction-name\fR\fR
+.ad
+.RS 19n
+.rt
+Print the graph profile entry only for routine \fIfunction-name\fR and its
+descendants. More than one \fB-f\fR option may be given. Only one
+\fIfunction-name\fR may be given with each \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fIfunction-name\fR\fR
+.ad
+.RS 19n
+.rt
+Print the graph profile entry only for routine \fIfunction-name\fR and its
+descendants (as \fB-f\fR, below) and also use only the times of the printed
+routines in total time and percentage computations. More than one \fB-F\fR
+option may be given. Only one \fIfunction-name\fR may be given with each
+\fB-F\fR option. The \fB-F\fR option overrides the \fB-E\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 19n
+.rt
+Suppress the reporting of graph profile entries for all local symbols. This
+option would be the equivalent of placing all of the local symbols for the
+specified executable image on the \fB-E\fR exclusion list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 19n
+.rt
+Limits the size of flat and graph profile listings to the top \fBn\fR offending
+functions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 19n
+.rt
+Produce a profile file \fBgmon.sum\fR which represents the sum of the profile
+information in all of the specified profile files. This summary profile file
+may be given to subsequent executions of \fBgprof\fR (also with \fB-s\fR) to
+accumulate profile data across several runs of an \fBa.out\fR file. See also
+the \fB-D\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.RS 19n
+.rt
+Display routines which have zero usage (as indicated by call counts and
+accumulated time). This is useful in conjunction with the \fB-c\fR option for
+discovering which routines were never called. Note that this has restricted use
+for dynamically linked executables, since shared object text space will not be
+examined by the \fB-c\fR option.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPROFDIR\fR\fR
+.ad
+.RS 11n
+.rt
+If this environment variable contains a value, place profiling output within
+that directory, in a file named \fIpid\fR\fB\&.\fR\fIprogramname\fR. \fIpid\fR
+is the process \fBID\fR and \fIprogramname\fR is the name of the program being
+profiled, as determined by removing any path prefix from the \fBargv[0]\fR with
+which the program was called. If the variable contains a null value, no
+profiling output is produced. Otherwise, profiling output is placed in the
+file \fBgmon.out\fR.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa.out\fR\fR
+.ad
+.RS 30n
+.rt
+executable file containing namelist
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgmon.out\fR\fR
+.ad
+.RS 30n
+.rt
+dynamic call-graph and profile
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgmon.sum\fR\fR
+.ad
+.RS 30n
+.rt
+summarized dynamic call-graph and profile
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$PROFDIR/\fR\fIpid\fR\fB\&.\fR\fIprogramname\fR\fR
+.ad
+.RS 30n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcc\fR(1), \fBld.so.1\fR(1), \fBprof\fR(1), \fBexit\fR(2), \fBpcsample\fR(2),
+\fBprofil\fR(2), \fBmalloc\fR(3C), \fBmalloc\fR(3MALLOC), \fBmonitor\fR(3C),
+\fBattributes\fR(5), \fBprof\fR(5)
+.sp
+.LP
+Graham, S.L., Kessler, P.B., McKusick, M.K., \fIgprof: A Call Graph Execution
+Profiler Proceedings of the SIGPLAN '82 Symposium on Compiler Construction\fR,
+\fBSIGPLAN\fR Notices, Vol. 17, No. 6, pp. 120-126, June 1982.
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.SH NOTES
+.sp
+.LP
+If the executable image has been stripped and does not have the \fB\&.symtab\fR
+symbol table, \fBgprof\fR reads the global dynamic symbol tables
+\fB\&.dynsym\fR and \fB\&.SUNW_ldynsym\fR, if present. The symbols in the
+dynamic symbol tables are a subset of the symbols that are found in
+\fB\&.symtab\fR. The \fB\&.dynsym\fR symbol table contains the global symbols
+used by the runtime linker. \fB\&.SUNW_ldynsym\fR augments the information in
+\fB\&.dynsym\fR with local function symbols. In the case where \fB\&.dynsym\fR
+is found and \fB\&.SUNW_ldynsym\fR is not, only the information for the global
+symbols is available. Without local symbols, the behavior is as described for
+the \fB-a\fR option.
+.sp
+.LP
+\fBLD_LIBRARY_PATH\fR must not contain \fB/usr/lib\fR as a component when
+compiling a program for profiling. If \fBLD_LIBRARY_PATH\fR contains
+\fB/usr/lib\fR, the program will not be linked correctly with the profiling
+versions of the system libraries in \fB/usr/lib/libp\fR.
+.sp
+.LP
+The times reported in successive identical runs may show variances because of
+varying cache-hit ratios that result from sharing the cache with other
+processes. Even if a program seems to be the only one using the machine, hidden
+background or asynchronous processes may blur the data. In rare cases, the
+clock ticks initiating recording of the program counter may \fBbeat\fR with
+loops in a program, grossly distorting measurements. Call counts are always
+recorded precisely, however.
+.sp
+.LP
+Only programs that call \fBexit\fR or return from \fBmain\fR are guaranteed to
+produce a profile file, unless a final call to \fBmonitor\fR is explicitly
+coded.
+.sp
+.LP
+Functions such as \fBmcount()\fR, \fB_mcount()\fR, \fBmoncontrol()\fR,
+\fB_moncontrol()\fR, \fBmonitor()\fR, and \fB_monitor()\fR may appear in the
+\fBgprof\fR report. These functions are part of the profiling implementation
+and thus account for some amount of the runtime overhead. Since these
+functions are not present in an unprofiled application, time accumulated and
+call counts for these functions may be ignored when evaluating the performance
+of an application.
+.SS "64-bit profiling"
+.sp
+.LP
+64-bit profiling may be used freely with dynamically linked executables, and
+profiling information is collected for the shared objects if the objects are
+compiled for profiling. Care must be applied to interpret the profile output,
+since it is possible for symbols from different shared objects to have the same
+name. If name duplication occurs in the profile output, the module id prefix
+before the symbol name in the symbol index listing can be used to identify the
+appropriate module for the symbol.
+.sp
+.LP
+When using the \fB-s\fR or \fB-D\fRoption to sum multiple profile files, care
+must be taken not to mix 32-bit profile files with 64-bit profile files.
+.SS "32-bit profiling"
+.sp
+.LP
+32-bit profiling may be used with dynamically linked executables, but care must
+be applied. In 32-bit profiling, shared objects cannot be profiled with
+\fBgprof\fR. Thus, when a profiled, dynamically linked program is executed,
+only the \fBmain\fR portion of the image is sampled. This means that all time
+spent outside of the \fBmain\fR object, that is, time spent in a shared object,
+will not be included in the profile summary; the total time reported for the
+program may be less than the total time used by the program.
+.sp
+.LP
+Because the time spent in a shared object cannot be accounted for, the use of
+shared objects should be minimized whenever a program is profiled with
+\fBgprof\fR. If desired, the program should be linked to the profiled version
+of a library (or to the standard archive version if no profiling version is
+available), instead of the shared object to get profile information on the
+functions of a library. Versions of profiled libraries may be supplied with the
+system in the \fB/usr/lib/libp\fR directory. Refer to compiler driver
+documentation on profiling.
+.sp
+.LP
+Consider an extreme case. A profiled program dynamically linked with the shared
+C library spends 100 units of time in some \fBlibc\fR routine, say,
+\fBmalloc()\fR. Suppose \fBmalloc()\fR is called only from routine \fBB\fR and
+\fBB\fR consumes only 1 unit of time. Suppose further that routine \fBA\fR
+consumes 10 units of time, more than any other routine in the \fBmain\fR
+(profiled) portion of the image. In this case, \fBgprof\fR will conclude that
+most of the time is being spent in \fBA\fR and almost no time is being spent in
+\fBB\fR. From this it will be almost impossible to tell that the greatest
+improvement can be made by looking at routine \fBB\fR and not routine \fBA\fR.
+The value of the profiler in this case is severely degraded; the solution is to
+use archives as much as possible for profiling.
+.SH BUGS
+.sp
+.LP
+Parents which are not themselves profiled will have the time of their profiled
+children propagated to them, but they will appear to be spontaneously invoked
+in the call-graph listing, and will not have their time propagated further.
+Similarly, signal catchers, even though profiled, will appear to be spontaneous
+(although for more obscure reasons). Any profiled children of signal catchers
+should have their times propagated properly, unless the signal catcher was
+invoked during the execution of the profiling routine, in which case all is
+lost.
diff --git a/usr/src/man/man1/grep.1 b/usr/src/man/man1/grep.1
new file mode 100644
index 0000000000..27b799b85f
--- /dev/null
+++ b/usr/src/man/man1/grep.1
@@ -0,0 +1,550 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH grep 1 "26 Feb 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+grep \- search a file for a pattern
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/grep\fR [\fB-bchilnsvw\fR] \fIlimited-regular-expression\fR
+ [\fIfilename\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-bhinsvwx\fR] \fB-e\fR \fIpattern_list\fR...
+ [\fB-f\fR \fIpattern_file\fR]... [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-bhinsvwx\fR]
+ [\fB-e\fR \fIpattern_list\fR]... \fB-f\fR \fIpattern_file\fR... [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-bhinsvwx\fR] \fIpattern\fR
+ [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBgrep\fR utility searches text files for a pattern and prints all lines
+that contain that pattern. It uses a compact non-deterministic algorithm.
+.sp
+.LP
+Be careful using the characters \fB$\fR, \fB*\fR, \fB[\fR, \fB^\fR, \fB|\fR,
+\fB(\fR, \fB)\fR, and \fB\e\fR in the \fIpattern_list\fR because they are also
+meaningful to the shell. It is safest to enclose the entire \fIpattern_list\fR
+in single quotes \fBa\'\fR\&...\fBa\'\fR\&.
+.sp
+.LP
+If no files are specified, \fBgrep\fR assumes standard input. Normally, each
+line found is copied to standard output. The file name is printed before each
+line found if there is more than one input file.
+.SS "/usr/bin/grep"
+.sp
+.LP
+The \fB/usr/bin/grep\fR utility uses limited regular expressions like those
+described on the \fBregexp\fR(5) manual page to match the patterns.
+.SS "/usr/xpg4/bin/grep"
+.sp
+.LP
+The options \fB-E\fR and \fB-F\fR affect the way \fB/usr/xpg4/bin/grep\fR
+interprets \fIpattern_list\fR. If \fB-E\fR is specified,
+\fB/usr/xpg4/bin/grep\fR interprets \fIpattern_list\fR as a full regular
+expression (see \fB-E\fR for description). If \fB-F\fR is specified,
+\fBgrep\fR interprets \fIpattern_list\fR as a fixed string. If neither are
+specified, \fBgrep\fR interprets \fIpattern_list\fR as a basic regular
+expression as described on \fBregex\fR(5) manual page.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/grep\fR and
+\fB/usr/xpg4/bin/grep\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Precedes each line by the block number on which it was found. This can be
+useful in locating block numbers by context (first block is 0).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Prints only a count of the lines that contain the pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Prevents the name of the file containing the matching line from being prepended
+to that line. Used when searching multiple files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Ignores upper/lower case distinction during comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Prints only the names of files with matching lines, separated by NEWLINE
+characters. Does not repeat the names of files when the pattern is found more
+than once.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Precedes each line by its line number in the file (first line is 1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses error messages about nonexistent or unreadable files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Prints all lines except those that contain the pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 6n
+.rt
+Searches for the expression as a word as if surrounded by \fB\e<\fR and
+\fB\e>\fR\&.
+.RE
+
+.SS "/usr/xpg4/bin/grep"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/grep\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIpattern_list\fR\fR
+.ad
+.RS 19n
+.rt
+Specifies one or more patterns to be used during the search for input. Patterns
+in \fIpattern_list\fR must be separated by a NEWLINE character. A null pattern
+can be specified by two adjacent newline characters in \fIpattern_list\fR.
+Unless the \fB-E\fR or \fB-F\fR option is also specified, each pattern is
+treated as a basic regular expression. Multiple \fB-e\fR and \fB-f\fR options
+are accepted by \fBgrep\fR. All of the specified patterns are used when
+matching lines, but the order of evaluation is unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.RS 19n
+.rt
+Matches using full regular expressions. Treats each pattern specified as a full
+regular expression. If any entire full regular expression pattern matches an
+input line, the line is matched. A null full regular expression matches every
+line. Each pattern is interpreted as a full regular expression as described on
+the \fBregex\fR(5) manual page, except for \fB\e(\fR and \fB\e)\fR, and
+including:
+.RS +4
+.TP
+1.
+A full regular expression followed by \fB+\fR that matches one or more
+occurrences of the full regular expression.
+.RE
+.RS +4
+.TP
+2.
+A full regular expression followed by \fB?\fR that matches 0 or 1
+occurrences of the full regular expression.
+.RE
+.RS +4
+.TP
+3.
+Full regular expressions separated by | or by a new-line that match strings
+that are matched by any of the expressions.
+.RE
+.RS +4
+.TP
+4.
+A full regular expression that is enclosed in parentheses \fB()\fR for
+grouping.
+.RE
+The order of precedence of operators is \fB[\|]\fR, then \fB*\|?\|+\fR, then
+concatenation, then | and new-line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIpattern_file\fR\fR
+.ad
+.RS 19n
+.rt
+Reads one or more patterns from the file named by the path name
+\fIpattern_file\fR. Patterns in \fIpattern_file\fR are terminated by a NEWLINE
+character. A null pattern can be specified by an empty line in
+\fIpattern_file\fR. Unless the \fB-E\fR or \fB-F\fR option is also specified,
+each pattern is treated as a basic regular expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 19n
+.rt
+Matches using fixed strings. Treats each pattern specified as a string instead
+of a regular expression. If an input line contains any of the patterns as a
+contiguous sequence of bytes, the line is matched. A null string matches every
+line. See \fBfgrep\fR(1) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 19n
+.rt
+Quiet. Does not write anything to the standard output, regardless of matching
+lines. Exits with zero status if an input line is selected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 19n
+.rt
+Considers only input lines that use all characters in the line to match an
+entire fixed string or regular expression to be matching lines.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be searched for the patterns. If no \fIfile\fR
+operands are specified, the standard input is used.
+.RE
+
+.SS "/usr/bin/grep"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies a pattern to be used during the search for input.
+.RE
+
+.SS "/usr/xpg4/bin/grep"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies one or more patterns to be used during the search for input. This
+operand is treated as if it were specified as \fB-e\fR \fIpattern_list\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fB-e\fR \fIpattern_list\fR option has the same effect as the
+\fIpattern_list\fR operand, but is useful when \fIpattern_list\fR begins with
+the hyphen delimiter. It is also useful when it is more convenient to provide
+multiple patterns as separate arguments.
+.sp
+.LP
+Multiple \fB-e\fR and \fB-f\fR options are accepted and \fBgrep\fR uses all of
+the patterns it is given while matching input text lines. Notice that the order
+of evaluation is not specified. If an implementation finds a null string as a
+pattern, it is allowed to use that pattern first, matching every line, and
+effectively ignore any other patterns.
+.sp
+.LP
+The \fB-q\fR option provides a means of easily determining whether or not a
+pattern (or string) exists in a group of files. When searching several files,
+it provides a performance improvement (because it can quit as soon as it finds
+the first match) and requires less care by the user in choosing the set of
+files to supply as arguments (because it exits zero if it finds a match even if
+\fBgrep\fR detected an access or read error on earlier file operands).
+.SS "Large File Behavior"
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBgrep\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRFinding All Uses of a Word
+.sp
+.LP
+To find all uses of the word "\fBPosix\fR" (in any case) in the file
+\fBtext.mm\fR, and write with line numbers:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/grep -i -n posix text.mm\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRFinding All Empty Lines
+.sp
+.LP
+To find all empty lines in the standard input:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/grep ^$\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/grep -v .\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRFinding Lines Containing Strings
+.sp
+.LP
+All of the following commands print all lines containing strings \fBabc\fR or
+\fBdef\fR or both:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/xpg4/bin/grep 'abc
+def'\fR
+example% \fB/usr/xpg4/bin/grep -e 'abc
+def'\fR
+example% \fB/usr/xpg4/bin/grep -e 'abc' -e 'def'\fR
+example% \fB/usr/xpg4/bin/grep -E 'abc|def'\fR
+example% \fB/usr/xpg4/bin/grep -E -e 'abc|def'\fR
+example% \fB/usr/xpg4/bin/grep -E -e 'abc' -e 'def'\fR
+example% \fB/usr/xpg4/bin/grep -E 'abc
+def'\fR
+example% \fB/usr/xpg4/bin/grep -E -e 'abc
+def'\fR
+example% \fB/usr/xpg4/bin/grep -F -e 'abc' -e 'def'\fR
+example% \fB/usr/xpg4/bin/grep -F 'abc
+def'\fR
+example% \fB/usr/xpg4/bin/grep -F -e 'abc
+def'\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRFinding Lines with Matching Strings
+.sp
+.LP
+Both of the following commands print all lines matching exactly \fBabc\fR or
+\fBdef\fR:
+
+.sp
+.in +2
+.nf
+example% \fB/usr/xpg4/bin/grep -E '^abc$ ^def$'\fR
+example% \fB/usr/xpg4/bin/grep -F -x 'abc def'\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBgrep\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+One or more matches were found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+No matches were found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Syntax errors or inaccessible files (even if matches were found).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/grep"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot Enabled
+.TE
+
+.SS "/usr/xpg4/bin/grep"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBegrep\fR(1), \fBfgrep\fR(1), \fBsed\fR(1), \fBsh\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBregex\fR(5), \fBregexp\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.SS "/usr/bin/grep"
+.sp
+.LP
+Lines are limited only by the size of the available virtual memory. If there is
+a line with embedded nulls, \fBgrep\fR only matches up to the first null. If
+the line matches, the entire line is printed.
+.SS "/usr/xpg4/bin/grep"
+.sp
+.LP
+The results are unspecified if input files contain lines longer than
+\fBLINE_MAX\fR bytes or contain binary data. \fBLINE_MAX\fR is defined in
+\fB/usr/include/limits.h\fR.
diff --git a/usr/src/man/man1/groups.1 b/usr/src/man/man1/groups.1
new file mode 100644
index 0000000000..2df922692e
--- /dev/null
+++ b/usr/src/man/man1/groups.1
@@ -0,0 +1,65 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH groups 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+groups \- print group membership of user
+.SH SYNOPSIS
+.LP
+.nf
+\fBgroups\fR [\fIuser\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The command \fBgroups\fR prints on standard output the groups to which you or
+the optionally specified user belong. Each user belongs to a group specified in
+\fB/etc/passwd\fR and possibly to other groups as specified in
+\fB/etc/group\fR. Note that \fB/etc/passwd\fR specifies the numerical \fBID\fR
+(\fBgid\fR) of the group. The \fBgroups\fR command converts \fBgid\fR to the
+group name in the output.
+.SH EXAMPLES
+.sp
+.LP
+The output takes the following form:
+.sp
+.in +2
+.nf
+example% groups tester01 tester02
+tester01 : staff
+tester02 : staff
+example%
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 15n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgroup\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/hash.1 b/usr/src/man/man1/hash.1
new file mode 100644
index 0000000000..5375800047
--- /dev/null
+++ b/usr/src/man/man1/hash.1
@@ -0,0 +1,199 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH hash 1 "17 Jul 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+hash, rehash, unhash, hashstat \- evaluate the internal hash table of the
+contents of directories
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/hash\fR [\fIutility\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/hash\fR [\fB-r\fR]
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBhash\fR [\fB-r\fR] [\fIname\fR]...
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBrehash\fR
+.fi
+
+.LP
+.nf
+\fBunhash\fR
+.fi
+
+.LP
+.nf
+\fBhashstat\fR
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBhash\fR [\fIname\fR]...
+.fi
+
+.LP
+.nf
+\fBhash\fR [\fB-r\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/hash"
+.sp
+.LP
+The \fB/usr/bin/hash\fR utility affects the way the current shell environment
+remembers the locations of utilities found. Depending on the arguments
+specified, it adds utility locations to its list of remembered locations or it
+purges the contents of the list. When no arguments are specified, it reports on
+the contents of the list. The \fB-r\fR option causes the shell to forget all
+remembered locations.
+.sp
+.LP
+Utilities provided as built-ins to the shell are not reported by \fBhash\fR.
+.SS "sh"
+.sp
+.LP
+For each \fIname\fR, the location in the search path of the command specified
+by \fIname\fR is determined and remembered by the shell. The \fB-r\fR option to
+the \fBhash\fR built-in causes the shell to forget all remembered locations. If
+no arguments are given, \fBhash\fR provides information about remembered
+commands. The \fIHits\fR column of output is the number of times a command has
+been invoked by the shell process. The \fICost\fR column of output is a measure
+of the work required to locate a command in the search path. If a command is
+found in a "relative" directory in the search path, after changing to that
+directory, the stored location of that command is recalculated. Commands for
+which this will be done are indicated by an asterisk (\fB*\fR) adjacent to the
+\fIHits\fR information. \fICost\fR will be incremented when the recalculation
+is done.
+.SS "csh"
+.sp
+.LP
+\fBrehash\fR recomputes the internal hash table of the contents of directories
+listed in the \fBpath\fR environmental variable to account for new commands
+added.
+.sp
+.LP
+\fBunhash\fR disables the internal hash table.
+.sp
+.LP
+\fBhashstat\fR prints a statistics line indicating how effective the internal
+hash table has been at locating commands (and avoiding \fBexec\fRs). An
+\fBexec\fR is attempted for each component of the \fIpath\fR where the hash
+function indicates a possible hit and in each component that does not begin
+with a '\|/\|'.
+.SS "ksh"
+.sp
+.LP
+For each \fIname\fR, the location in the search path of the command specified
+by \fIname\fR is determined and remembered by the shell. The \fB-r\fR option to
+the \fBhash\fR built-in causes the shell to forget all remembered locations. If
+no arguments are given, \fBhash\fR provides information about remembered
+commands.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported by \fBhash\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIutility\fR \fR
+.ad
+.RS 12n
+.rt
+The name of a utility to be searched for and added to the list of remembered
+locations.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The standard output of \fBhash\fR is used when no arguments are specified. Its
+format is unspecified, but includes the pathname of each utility in the list of
+remembered locations for the current shell environment. This list consists of
+those utilities named in previous \fBhash\fR invocations that have been
+invoked, and may contain those invoked and found through the normal command
+search process.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBhash\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR \fR
+.ad
+.RS 9n
+.rt
+Determine the location of \fIutility\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned by \fBhash\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBsh\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/head.1 b/usr/src/man/man1/head.1
new file mode 100644
index 0000000000..1d9399bdad
--- /dev/null
+++ b/usr/src/man/man1/head.1
@@ -0,0 +1,341 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH head 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+head \- display first few lines of files
+.SH SYNOPSIS
+.SS "/usr/bin/head"
+.LP
+.nf
+\fB/usr/bin/head\fR [\fB-number\fR | \fB-n\fR \fInumber\fR] [\fIfilename\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBhead\fR [\fB-qv\fR] [\fB-n\fR \fIlines\fR] [\fB-c\fR \fIchars\fR] [\fB-s\fR \fIskip\fR][\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/head"
+.sp
+.LP
+The \fBhead\fR utility copies the first \fInumber\fR of lines of each
+\fIfilename\fR to the standard output. If no \fIfilename\fR is given,
+\fBhead\fR copies lines from the standard input. The default value of
+\fInumber\fR is \fB10\fR lines.
+.sp
+.LP
+When more than one file is specified, the start of each file looks like:
+.sp
+.in +2
+.nf
+\fB==>\fR \fIfilename\fR \fB<==\fR
+.fi
+.in -2
+
+.sp
+.LP
+Thus, a common way to display a set of short files, identifying each one, is:
+.sp
+.in +2
+.nf
+example% \fBhead -9999 filename1 filename2 ...\fR
+.fi
+.in -2
+.sp
+
+.SS "ksh93"
+.sp
+.LP
+The \fBhead\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBhead\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/head\fR or
+\fB/usr/bin/head\fR executable.
+.sp
+.LP
+\fBhead\fR copies one or more input files to standard output, stopping at a
+designated point for each file or to the end of the file whichever comes first.
+Copying ends at the point indicated by the options. By default, a header of the
+form \fB==> filename <==\fR is output before all but the first file but this
+can be changed with the \fB-q\fR and \fB-v\fR options. If no file is given, or
+if the file is \fB-\fR, \fBhead\fR copies from standard input starting at the
+current location.
+.sp
+.LP
+The option argument for \fB-c\fR and \fB-s\fR can optionally be followed by one
+of the following characters to specify a different unit other than a single
+byte:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBb\fR\fR
+.ad
+.RS 5n
+.rt
+512 bytes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBk\fR\fR
+.ad
+.RS 5n
+.rt
+1-kilobyte
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR\fR
+.ad
+.RS 5n
+.rt
+1-megabyte
+.RE
+
+.sp
+.LP
+For backwards compatibility, \fB-number\fR is equivalent to \fB-n\fR number.
+.SH OPTIONS
+.SS "/usr/bin/head"
+.sp
+.LP
+The following options are supported by \fB/usr/bin/head\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR\fR
+.ad
+.RS 13n
+.rt
+The first \fInumber\fR lines of each input file is copied to standard output.
+The \fInumber\fR option-argument must be a positive decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 13n
+.rt
+The \fInumber\fR argument is a positive decimal integer with the same effect as
+the \fB-n\fR \fInumber\fR option.
+.RE
+
+.sp
+.LP
+If no options are specified, \fBhead\fR acts as if \fB-n\fR \fB10\fR had been
+specified.
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by the head built-in command in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.br
+.na
+\fB\fB--lines=\fR\fIlines\fR\fR
+.ad
+.RS 18n
+.rt
+Copy lines from each file. The default value is \fB10\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--bytes=\fR\fIchars\fR\fR
+.ad
+.RS 18n
+.rt
+Copy \fIchars\fR bytes from each file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.br
+.na
+\fB\fB--quiet|silent\fR\fR
+.ad
+.RS 18n
+.rt
+Never output filename headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--skip=\fR\fIskip\fR\fR
+.ad
+.RS 18n
+.rt
+Skip \fIskip\fR characters or lines from each file before copying.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.br
+.na
+\fB\fB--verbose\fR\fR
+.ad
+.RS 18n
+.rt
+Always output filename headers.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIfilename\fR\fR\fR
+.ad
+.RS 12n
+.rt
+A path name of an input file. If no \fIfile\fR operands are specified, the
+standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBhead\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRWriting the First Ten Lines of All Files
+.sp
+.LP
+The following example writes the first ten lines of all files, except those
+with a leading period, in the directory:
+
+.sp
+.in +2
+.nf
+example% \fBhead *\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBhead\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/head"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBksh93\fR(1), \fBmore\fR(1), \fBpg\fR(1), \fBtail\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/history.1 b/usr/src/man/man1/history.1
new file mode 100644
index 0000000000..78379e90a7
--- /dev/null
+++ b/usr/src/man/man1/history.1
@@ -0,0 +1,1184 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH history 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+history, fc, hist \- process command history list
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/fc\fR [\fB-r\fR] [\fB-e\fR \fIeditor\fR] [\fIfirst\fR [\fIlast\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/fc\fR \fB-l\fR [\fB-nr\fR] [\fIfirst\fR [\fIlast\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/fc\fR \fB-s\fR [\fIold\fR=\fInew\fR] [\fIfirst\fR]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBhistory\fR [\fB-hr\fR] [\fIn\fR]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBfc\fR \fB-e\fR \fB-\fR [\fIold\fR=\fInew\fR] [\fIcommand\fR]
+.fi
+
+.LP
+.nf
+\fBfc\fR \fB-s\fR [\fIold\fR = \fInew\fR] [\fIcommand\fR]
+.fi
+
+.LP
+.nf
+\fBfc\fR [\fB-e\fR \fIename\fR] [\fB-nlr\fR] [\fIfirst\fR [\fIlast\fR]]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBhist\fR [\fB-lnprs\fR] [\fB-e\fR \fIeditor\fR][\fB-N\fR \fInum\fR][\fIfirst\fR[\fIlast\fR]]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/fc"
+.sp
+.LP
+The \fBfc\fR utility lists or edits and reexecutes, commands previously entered
+to an interactive \fBsh\fR.
+.sp
+.LP
+The command history list references commands by number. The first number in the
+list is selected arbitrarily. The relationship of a number to its command does
+not change except when the user logs in and no other process is accessing the
+list, at which time the system can reset the numbering to start the oldest
+retained command at another number (usually 1). When the number reaches the
+value in \fBHISTSIZE\fR or \fB32767\fR (whichever is greater), the shell can
+wrap the numbers, starting the next command with a lower number (usually 1).
+However, despite this optional wrapping of numbers, \fBfc\fR maintains the
+time-ordering sequence of the commands. For example, if four commands in
+sequence are given the numbers 32 766, 32 767, 1 (wrapped), and 2 as they are
+executed, command 32 767 is considered the command previous to 1, even though
+its number is higher.
+.sp
+.LP
+When commands are edited (when the \fB-l\fR option is not specified), the
+resulting lines is entered at the end of the history list and then reexecuted
+by \fBsh\fR. The \fBfc\fR command that caused the editing is not entered into
+the history list. If the editor returns a non-zero exit status, this suppresses
+the entry into the history list and the command reexecution. Any command-line
+variable assignments or redirection operators used with \fBfc\fR affects both
+the \fBfc\fR command itself as well as the command that results, for example:
+.sp
+.in +2
+.nf
+\fBfc -s -- -1 2>/dev/null\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+reinvokes the previous command, suppressing standard error for both \fBfc\fR
+and the previous command.
+.SS "csh"
+.sp
+.LP
+Display the history list. If \fIn\fR is given, display only the \fIn\fR most
+recent events.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Reverse the order of printout to be most recent first rather than oldest first.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Display the history list without leading numbers. This is used to produce files
+suitable for sourcing using the \fB-h\fR option to the \fBcsh\fR built-in
+command, \fBsource\fR(1).
+.RE
+
+.SS "History Substitution:"
+.sp
+.LP
+History substitution allows you to use words from previous command lines in the
+command line you are typing. This simplifies spelling corrections and the
+repetition of complicated commands or arguments. Command lines are saved in the
+history list, the size of which is controlled by the \fBhistory\fR variable.
+The \fBhistory\fR shell variable can be set to the maximum number of command
+lines that is saved in the history file, that is:
+.sp
+.in +2
+.nf
+set history = 200
+.fi
+.in -2
+
+.sp
+.LP
+allows the history list to keep track of the most recent 200 command lines. If
+not set, the C shell saves only the most recent command.
+.sp
+.LP
+A history substitution begins with a \fB!\fR (although you can change this with
+the \fBhistchars\fR variable) and can occur anywhere on the command line;
+history substitutions do not nest. The \fB!\fR can be escaped with \fB\e\fR to
+suppress its special meaning.
+.sp
+.LP
+Input lines containing history substitutions are echoed on the terminal after
+being expanded, but before any other substitutions take place or the command
+gets executed.
+.SS "Event Designators:"
+.sp
+.LP
+An event designator is a reference to a command line entry in the history list.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.sp .6
+.RS 4n
+Start a history substitution, except when followed by a space character, tab,
+newline, \fB=\fR or \fB(\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!!\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the previous command. By itself, this substitution repeats the
+previous command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to command line \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the current command line minus \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIstr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command starting with \fIstr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!?\fR\fIstr\fR\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command containing \fIstr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!?\fR\fIstr\fR\fB?\fR \fIadditional\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command containing \fIstr\fR and append
+\fIadditional\fR to that referenced command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!{\fR\fBcommand\fR\fB}\fR \fIadditional\fR\fR
+.ad
+.sp .6
+.RS 4n
+Refer to the most recent command beginning with \fBcommand\fR and append
+\fIadditional\fR to that referenced command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fIprevious_word\fR\fB^\fR\fIreplacement\fR\fB^\fR\fR
+.ad
+.sp .6
+.RS 4n
+Repeat the previous command line replacing the string \fIprevious_word\fR with
+the string \fIreplacement\fR. This is equivalent to the history substitution:
+.sp
+Repeat the previous command line replacing the string \fIprevious_word\fR with
+the string \fIreplacement\fR. This is equivalent to the history substitution:
+.sp
+.in +2
+.nf
+\fB!:s/\fR\fIprevious_word\fR\fB/\fR\fIreplacement\fR\fB/\fR.
+.fi
+.in -2
+
+To re-execute a specific previous command \fBand\fR make such a substitution,
+say, re-executing command #6:
+.sp
+.in +2
+.nf
+\fB!:6s/\fR\fIprevious_word\fR\fB/\fR\fIreplacement\fR\fB/\fR.
+.fi
+.in -2
+
+.RE
+
+.SS "Word Designators:"
+.sp
+.LP
+A `\fB:\fR' (colon) separates the event specification from the word designator.
+2It can be omitted if the word designator begins with a \fB^\fR, \fB$\fR,
+\fB*\fR, \fB\(mi\fR or \fB%\fR. If the word is to be selected from the previous
+command, the second \fB!\fR character can be omitted from the event
+specification. For instance, \fB!!:1\fR and \fB!:1\fR both refer to the first
+word of the previous command, while \fB!!$\fR and \fB!$\fR both refer to the
+last word in the previous command. Word designators include:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 10n
+.rt
+The entire command line typed so far.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 10n
+.rt
+The first input word (command).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 10n
+.rt
+The \fIn\fR'th argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fR
+.ad
+.RS 10n
+.rt
+The first argument, that is, \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fR
+.ad
+.RS 10n
+.rt
+The last argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fR
+.ad
+.RS 10n
+.rt
+The word matched by (the most recent) \fB?\fR\fIs\fR search.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\(mi\fR\fIy\fR\fR
+.ad
+.RS 10n
+.rt
+A range of words; \fB\(mi\fR\fIy\fR abbreviates \fB0\(mi\fR\fIy\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 10n
+.rt
+All the arguments, or a null value if there is just one word in the event.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB*\fR\fR
+.ad
+.RS 10n
+.rt
+Abbreviates \fIx\fR\fB\(mi$\fR\fI\&.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\(mi\fR\fR
+.ad
+.RS 10n
+.rt
+Like \fIx\fR\fB*\fR but omitting word \fB$\fR.
+.RE
+
+.SS "Modifiers:"
+.sp
+.LP
+After the optional word designator, you can add a sequence of one or more of
+the following modifiers, each preceded by a \fB:\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 28n
+.rt
+Remove a trailing pathname component, leaving the head.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 28n
+.rt
+Remove a trailing suffix of the form `\fB\&.\fR\fIxxx\fR', leaving the
+basename.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.RS 28n
+.rt
+Remove all but the suffix, leaving the extension.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs/\fR\fIoldchars\fR\fB/\fR\fIreplacements\fR\fB/\fR\fR
+.ad
+.RS 28n
+.rt
+Substitute \fIreplacements\fR for \fIoldchars\fR. \fIoldchars\fR is a string
+that can contain embedded blank spaces, whereas \fIprevious_word\fR in the
+event designator can not.
+.sp
+.in +2
+.nf
+\fB^\fR\fIoldchars\fR\fB^\fR\fIreplacements\fR\fB^\fR
+.fi
+.in -2
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 28n
+.rt
+Remove all leading pathname components, leaving the tail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB&\fR\fR
+.ad
+.RS 28n
+.rt
+Repeat the previous substitution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 28n
+.rt
+Apply the change to the first occurrence of a match in each word, by prefixing
+the above (for example, \fBg&\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 28n
+.rt
+Print the new command but do not execute it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 28n
+.rt
+Quote the substituted words, escaping further substitutions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 28n
+.rt
+Like \fBq\fR, but break into words at each space character, tab or newline.
+.RE
+
+.sp
+.LP
+Unless preceded by a \fBg\fR, the modification is applied only to the first
+string that matches \fIoldchars\fR. An error results if no string matches.
+.sp
+.LP
+The left-hand side of substitutions are not regular expressions, but character
+strings. Any character can be used as the delimiter in place of \fB/\fR. A
+backslash quotes the delimiter character. The character \fB&\fR, in the right
+hand side, is replaced by the text from the left-hand-side. The \fB&\fR can be
+quoted with a backslash. A null \fIoldchars\fR uses the previous string either
+from a \fIoldchars\fR or from a contextual scan string \fIs\fR from
+\fB!?\fR\fIs\fR. You can omit the rightmost delimiter if a newline immediately
+follows \fIreplacements\fR; the rightmost \fB?\fR in a context scan can
+similarly be omitted.
+.sp
+.LP
+Without an event specification, a history reference refers either to the
+previous command, or to a previous history reference on the command line (if
+any).
+.SS "ksh"
+.sp
+.LP
+Using \fBfc\fR, in the form of
+.sp
+.in +2
+.nf
+\fBfc -e \(mi [\fIold\fR=\fInew\fR] [\fIcommand\fR],\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+.sp
+.in +2
+.nf
+\fBfc -s [\fIold\fR=\fInew\fR] [\fIcommand\fR],\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the \fIcommand\fR is re-executed after the substitution
+\fIold\fR\fB=\fR\fInew\fR is performed. If there is not a \fIcommand\fR
+argument, the most recent command typed at this terminal is executed.
+.sp
+.LP
+Using \fBfc\fR in the form of
+.sp
+.in +2
+.nf
+\fBfc [-e \fIename\fR] [-nlr ] [\fIfirst\fR [\fIlast\fR]],\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+a range of commands from \fIfirst\fR to \fIlast\fR is selected from the last
+\fBHISTSIZE\fR commands that were typed at the terminal. The arguments
+\fIfirst\fR and \fIlast\fR can be specified as a number or as a string. A
+string is used to locate the most recent command starting with the given
+string. A negative number is used as an offset to the current command number.
+If the \fB-l\fR flag is selected, the commands are listed on standard output.
+Otherwise, the editor program \fB-e\fR \fIname\fR is invoked on a file
+containing these keyboard commands. If \fIename\fR is not supplied, then the
+value of the variable \fBFCEDIT\fR (default \fB/bin/ed\fR) is used as the
+editor. When editing is complete, the edited command(s) is executed. If
+\fBlast\fR is not specified, it is set to \fIfirst\fR. If \fIfirst\fR is not
+specified, the default is the previous command for editing and \(mi16 for
+listing. The flag \fB-r\fR reverses the order of the commands and the flag
+\fB-n\fR suppresses command numbers when listing. (See \fBksh\fR(1) for more
+about command line editing.)
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTFILE\fR\fR
+.ad
+.RS 12n
+.rt
+If this variable is set when the shell is invoked, then the value is the
+pathname of the file that is used to store the command history.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTSIZE\fR\fR
+.ad
+.RS 12n
+.rt
+If this variable is set when the shell is invoked, then the number of
+previously entered commands that are accessible by this shell is greater than
+or equal to this number. The default is \fB128\fR.
+.RE
+
+.SS "Command Re-entry:"
+.sp
+.LP
+The text of the last \fBHISTSIZE\fR (default 128) commands entered from a
+terminal device is saved in a \fBhistory\fR file. The file
+\fB$HOME/.sh_history\fR is used if the \fBHISTFILE\fR variable is not set or if
+the file it names is not writable. A shell can access the commands of all
+\fIinteractive\fR shells which use the same named \fBHISTFILE\fR. The special
+command \fBfc\fR is used to list or edit a portion of this file. The portion of
+the file to be edited or listed can be selected by number or by giving the
+first character or characters of the command. A single command or range of
+commands can be specified. If you do not specify an editor program as an
+argument to \fBfc\fR then the value of the variable \fBFCEDIT\fR is used. If
+\fBFCEDIT\fR is not defined then \fB/bin/ed\fR is used. The edited command(s)
+is printed and re-executed upon leaving the editor. The editor name \fB\(mi\fR
+is used to skip the editing phase and to re-execute the command. In this case a
+substitution parameter of the form \fIold\fR\fB=\fR\fInew\fR can be used to
+modify the command before execution. For example, if \fBr\fR is aliased to
+\fBa\'fc\fR \fB-e\fR \fB\(mi a\'\fR then typing \fB`r\fR \fBbad=good\fR
+\fBc'\fR re-executes the most recent command which starts with the letter
+\fBc\fR, replacing the first occurrence of the string \fBbad\fR with the string
+\fBgood\fR.
+.sp
+.LP
+Using the \fBfc\fR built-in command within a compound command causes the whole
+command to disappear from the history file.
+.SS "ksh93"
+.sp
+.LP
+\fBhist\fR lists, edits, or re-executes commands previously entered into the
+current shell environment.
+.sp
+.LP
+The command history list references commands by number. The first number in the
+list is selected arbitrarily. The relationship of a number to its command does
+not change during a login session. When the number reaches \fB32767\fR the
+number wraps around to \fB1\fR but maintains the ordering.
+.sp
+.LP
+When the \fBl\fR option is not specified, and commands are edited, the
+resulting lines are entered at the end of the history list and then re-executed
+by the current shell. The \fBhist\fR command that caused the editing is not
+entered into the history list. If the editor returns a \fBnon-zero\fR exit
+status, this suppresses the entry into the history list and the command
+re-execution. Command line variable assignments and redirections affect both
+the \fBhist\fR command and the commands that are re-executed.
+.sp
+.LP
+\fIfirst\fR and \fIlast\fR define the range of commands. Specify \fIfirst\fR
+and \fIlast\fR as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fInumber\fR\fR
+.ad
+.RS 11n
+.rt
+A positive number representing a command number. A \fB+\fR sign can precede
+\fInumber\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 11n
+.rt
+A negative number representing a command that was executed \fInumber\fR
+commands previously. For example, \fB-1\fR is the previous command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR\fR
+.ad
+.RS 11n
+.rt
+\fIstring\fR indicates the most recently entered command that begins with
+\fIstring\fR. \fIstring\fR should not contain an \fB=\fR.
+.RE
+
+.sp
+.LP
+If \fIfirst\fR is omitted, the previous command is used, unless \fB-l\fR is
+specified, in which case it defaults to \fB-16\fR and last defaults to
+\fB-1\fR.
+.sp
+.LP
+If \fIfirst\fR is specified and \fIlast\fR is omitted, then \fIlast\fR defaults
+to \fIfirst\fR unless \fB-l\fR is specified in which case it defaults to
+\fB-1\fR.
+.sp
+.LP
+If no editor is specified, then the editor specified by the \fBHISTEDIT\fR
+variable is used if set, or the \fBFCEDIT\fR variable is used if set,
+otherwise, \fBed\fR is used.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-e\fR \fIeditor\fR\fR
+.ad
+.RS 13n
+.rt
+Uses the editor named by \fIeditor\fR to edit the commands. The \fIeditor\fR
+string is a utility name, subject to search via the \fBPATH\fR variable. The
+value in the \fBFCEDIT\fR variable is used as a default when \fB-e\fR is not
+specified. If \fBFCEDIT\fR is null or unset, \fBed\fR is used as the editor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 13n
+.rt
+(The letter ell.) Lists the commands rather than invoking an editor on them.
+The commands is written in the sequence indicated by the \fIfirst\fR and
+\fIlast\fR operands, as affected by \fB-r\fR, with each command preceded by the
+command number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 13n
+.rt
+Suppresses command numbers when listing with \fB-l\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 13n
+.rt
+Reverses the order of the commands listed (with \fB-l\fR \fB)\fR or edited
+(with neither \fB-l\fR nor \fB-s\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Re-executes the command without invoking an editor.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+\fBksh93\fR supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIeditor\fR\fR
+.ad
+.RS 13n
+.rt
+Specify the editor to use to edit the history command. A value of \fB-\fR for
+\fIeditor\fR is equivalent to specifying the \fB-s\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 13n
+.rt
+List the commands rather than editing and re-executing them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fInum\fR\fR
+.ad
+.RS 13n
+.rt
+Start at \fInum\fR commands back.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 13n
+.rt
+Suppress the command numbers when the commands are listed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 13n
+.rt
+Write the result of history expansion for each operand to standard output. All
+other options are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 13n
+.rt
+Reverse the order of the commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Re-execute the command without invoking an editor. In this case an operand of
+the form \fIold=new\fR can be specified to change the first occurrence of the
+string \fIold\fR in the command to \fInew\fR before re-executing the command.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfirst\fR\fR
+.ad
+.br
+.na
+\fB\fIlast\fR\fR
+.ad
+.RS 9n
+.rt
+Selects the commands to list or edit. The number of previous commands that can
+be accessed is determined by the value of the \fBHISTSIZE\fR variable. The
+value of \fIfirst\fR or \fIlast\fR or both is one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB[\fB+\fR]\fInumber\fR\fR
+.ad
+.RS 14n
+.rt
+A positive number representing a command number. Command numbers can be
+displayed with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fInumber\fR\fR
+.ad
+.RS 14n
+.rt
+A negative decimal number representing the command that was executed
+\fInumber\fR of commands previously. For example, \fB\(mi1\fR is the
+immediately previous command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR\fR
+.ad
+.RS 14n
+.rt
+A string indicating the most recently entered command that begins with that
+string. If the \fIold=new\fR operand is not also specified with \fB-s\fR, the
+string form of the \fIfirst\fR operand cannot contain an embedded equal sign.
+.sp
+When the synopsis form with \fB-s\fR is used, if \fIfirst\fR is omitted, the
+previous command is used.
+.sp
+For the synopsis forms without \fB-s\fR \fB:\fR
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIlast\fR is omitted, \fIlast\fR defaults to the previous command when
+\fB-l\fR is specified; otherwise, it defaults to \fIfirst\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIfirst\fR and \fIlast\fR are both omitted, the previous 16 commands is
+listed or the previous single command is edited (based on the \fB-l\fR option).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIfirst\fR and \fIlast\fR are both present, all of the commands from
+\fIfirst\fR to \fIlast\fR is edited (without \fB-l\fR \fB)\fR or listed (with
+\fB-l\fR). Editing multiple commands is accomplished by presenting to the
+editor all of the commands at one time, each command starting on a new line. If
+\fIfirst\fR represents a newer command than \fIlast\fR, the commands is listed
+or edited in reverse sequence, equivalent to using \fB-r\fR. For example, the
+following commands on the first line are equivalent to the corresponding
+commands on the second:
+.sp
+.in +2
+.nf
+fc -r 10 20 fc 30 40
+fc 20 10 fc -r 40 30
+.fi
+.in -2
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When a range of commands is used, it is not be an error to specify \fIfirst\fR
+or \fIlast\fR values that are not in the history list. \fBfc\fR substitutes the
+value representing the oldest or newest command in the list, as appropriate.
+For example, if there are only ten commands in the history list, numbered 1 to
+10:
+.sp
+.in +2
+.nf
+fc -l
+fc 1 99
+.fi
+.in -2
+
+lists and edits, respectively, all ten commands.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIold=new\fR\fR
+.ad
+.RS 14n
+.rt
+Replace the first occurrence of string \fIold\fR in the commands to be
+reexecuted by the string \fInew\fR.
+.RE
+
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+When the \fB-l\fR option is used to list commands, the format of each command
+in the list is as follows:
+.sp
+.in +2
+.nf
+\fB"%d\et%s\en", <\fR\fIline number\fR\fB>, <\fR\fIcommand\fR\fB>\fR
+.fi
+.in -2
+
+.sp
+.LP
+If both the \fB-l\fR and \fB-n\fR options are specified, the format of each
+command is:
+.sp
+.in +2
+.nf
+\fB"\et%s\en", <\fR\fIcommand\fR\fB>\fR
+.fi
+.in -2
+
+.sp
+.LP
+If the \fIcommand\fR\fIcommand\fR consists of more than one line, the lines
+after the first are displayed as:
+.sp
+.in +2
+.nf
+\fB"\et%s\en", <\fR\fIcontinued-command\fR\fB>\fR
+.fi
+.in -2
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing history and fc
+.sp
+.in +2
+.nf
+ csh ksh
+
+% history $ fc -l
+ 1 cd /etc 1 cd /etc
+ 2 vi passwd 2 vi passwd
+ 3 date 3 date
+ 4 cd 4 cd
+ 5 du . 5 du .
+ 6 ls -t 6 ls -t
+ 7 history 7 fc -l
+
+% !d $ fc -e - d
+ du . du .
+ 262 ./SCCS 262 ./SCCS
+ 336 . 336 .
+
+% !da $ fc -e - da
+ Thu Jul 21 17:29:56 PDT 1994 Thu Jul 21 17:29:56 PDT 1994
+
+% $ alias \e!='fc -e -'
+
+% !! $ !
+ date alias ='fc -e -'
+ Thu Jul 21 17:29:56 PDT 1994
+.fi
+.in -2
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBfc\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFCEDIT\fR\fR
+.ad
+.RS 12n
+.rt
+This variable, when expanded by the shell, determines the default value for the
+\fB-e\fR \fIeditor\fR option's \fIeditor\fR option-argument. If \fBFCEDIT\fR is
+null or unset, \fBed\fR(1) is used as the editor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTFILE\fR\fR
+.ad
+.RS 12n
+.rt
+Determine a pathname naming a command history file. If the \fBHISTFILE\fR
+variable is not set, the shell can attempt to access or create a file
+\fB\&.sh_history\fR in the user's home directory. If the shell cannot obtain
+both read and write access to, or create, the history file, it uses an
+unspecified mechanism that allows the history to operate properly. (References
+to history ``file'' in this section are understood to mean this unspecified
+mechanism in such cases.) \fBfc\fR can choose to access this variable only when
+initializing the history file; this initialization occurs when \fBfc\fR or
+\fBsh\fR first attempt to retrieve entries from, or add entries to, the file,
+as the result of commands issued by the user, the file named by the \fBENV\fR
+variable, or a system startup file such as \fB/etc/profile\fR. (The
+initialization process for the history file can be dependent on the system
+startup files, in that they can contain commands that effectively preempts the
+user's settings of \fBHISTFILE\fR and \fBHISTSIZE\fR. For example, function
+definition commands are recorded in the history file, unless the \fBset\fR
+\fB-o\fR \fBnolog\fR option is set. If the system administrator includes
+function definitions in some system startup file called before the \fBENV\fR
+file, the history file is initialized before the user gets a chance to
+influence its characteristics.) The variable \fBHISTFILE\fR is accessed
+initially when the shell is invoked. Any changes to \fBHISTFILE\fR does not
+take effect until another shell is invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTSIZE\fR\fR
+.ad
+.RS 12n
+.rt
+Determine a decimal number representing the limit to the number of previous
+commands that are accessible. If this variable is unset, an unspecified default
+greater than or equal to 128 are used. The variable \fBHISTSIZE\fR is accessed
+initially when the shell is invoked. Any changes to \fBHISTSIZE\fR does not
+take effect until another shell is invoked.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion of the listing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+Otherwise, the exit status is that of the commands executed by \fBfc\fR or
+\fBhist\fR.
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBed\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBset\fR(1),
+\fBset\fR(1F), \fBsh\fR(1), \fBsource\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5)
diff --git a/usr/src/man/man1/hostid.1 b/usr/src/man/man1/hostid.1
new file mode 100644
index 0000000000..6b1e3a6a02
--- /dev/null
+++ b/usr/src/man/man1/hostid.1
@@ -0,0 +1,25 @@
+'\" te
+.\" Copyright (c) 2009 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH hostid 1 "4 Feb 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+hostid \- print the numeric identifier of the current host
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/hostid\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBhostid\fR command prints the identifier of the current host in
+hexadecimal. If it is executed within a non-global zone that emulates a host
+identifier, the emulated host identifier is printed. This numeric value is
+likely to differ when \fBhostid\fR is run on a different machine.
+.SH SEE ALSO
+.sp
+.LP
+\fBsysinfo\fR(2), \fBgethostid\fR(3C), \fBattributes\fR(5), \fBzones\fR(5)
diff --git a/usr/src/man/man1/hostname.1 b/usr/src/man/man1/hostname.1
new file mode 100644
index 0000000000..2458257b13
--- /dev/null
+++ b/usr/src/man/man1/hostname.1
@@ -0,0 +1,24 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH hostname 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+hostname \- set or print name of current host system
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/hostname\fR [\fIname-of-host\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBhostname\fR command prints the name of the current host, as given before
+the \fBlogin\fR prompt. The super-user can set the hostname by giving an
+argument.
+.SH SEE ALSO
+.sp
+.LP
+\fBuname\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/iconv.1 b/usr/src/man/man1/iconv.1
new file mode 100644
index 0000000000..34d23cc35d
--- /dev/null
+++ b/usr/src/man/man1/iconv.1
@@ -0,0 +1,298 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH iconv 1 "14 Nov 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+iconv \- code set conversion utility
+.SH SYNOPSIS
+.LP
+.nf
+\fBiconv\fR [\fB-cs\fR] \fB-f\fR \fIfrommap\fR \fB-t\fR \fItomap\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBiconv\fR \fB-f\fR \fIfromcode\fR [\fB-cs\fR] [\fB-t\fR \fItocode\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBiconv\fR \fB-t\fR \fItocode\fR [\fB-cs\fR] [\fB-f\fR \fIfromcode\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBiconv\fR \fB-l\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBiconv\fR utility converts the characters or sequences of characters in
+\fIfile\fR from one code set to another and writes the results to standard
+output. If no conversion exists for a particular character, an
+implementation-defined conversion is performed on this character.
+.sp
+.LP
+The list of supported conversions and the locations of the associated
+conversion tables are provided in the \fBiconv\fR(5) manual page.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 18n
+.rt
+Omits any characters that are invalid in the codeset of the input file from the
+output. When \fB-c\fR is not used, the results of encountering invalid
+characters in the input stream depend on the specified codesets for the
+conversion. Invalid characters can be either those that are not valid
+characters in the codeset of the input file or those that have no corresponding
+character in the codeset of the output file. The presence or absence of
+\fB-c\fR does not affect the exit status of \fBiconv\fR. When \fIfromcode\fR is
+specified for the \fIfromcodeset\fR of the \fB-f\fR option or \fItocode\fR is
+specified for the \fItocodeset\fR of the \fB-t\fR option, the specification of
+\fB-c\fR may be ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfromcodeset\fR\fR
+.ad
+.RS 18n
+.rt
+Identifies the code set of the input file. The following two forms of the
+\fIfromcodeset\fR option-argument are recognized:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfromcode\fR\fR
+.ad
+.RS 12n
+.rt
+The \fIfromcode\fR option-argument must not contain a slash (\fB/\fR)
+character. It is interpreted as the name of one of the codeset descriptions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfrommap\fR\fR
+.ad
+.RS 12n
+.rt
+The \fIfrommap\fR option-argument must contain a slash character. It is
+interpreted as the pathname of a charmap file as defined in \fBcharmap\fR(5).
+If the pathname does not represent a valid, readable charmap file, the results
+are undefined.
+.RE
+
+If this option is omitted, the codeset of the current locale is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+Writes all supported \fIfromcode\fR and \fItocode\fR values to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 18n
+.rt
+Suppresses any messages written to standard error concerning invalid
+characters. When \fB-s\fR is not used, the results of encountering invalid
+characters in the input stream depend on the specified codesets for the
+conversion. Invalid characters can be either those that are not valid
+characters in the codeset of the input file or those that have no corresponding
+character in the codeset of the output file. The presence or absence of
+\fB-s\fR does not affect the exit status of \fBiconv\fR. When \fIfromcode\fR is
+specified for the \fIfromcodeset\fR of the \fB-f\fR option or \fItocode\fR is
+specified for the \fItocodeset\fR of the \fB-t\fR option, the specification of
+\fB-s\fR may be ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItocodeset\fR\fR
+.ad
+.RS 18n
+.rt
+Identifies the code set used for the output file. The following two forms of
+the \fItocodeset\fR option-argument are recognized:
+.sp
+.ne 2
+.mk
+.na
+\fB\fItocode\fR\fR
+.ad
+.RS 10n
+.rt
+The \fItocode\fR option-argument must not contain a slash (\fB/\fR) character.
+It is interpreted as the name of one of the codeset descriptions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItomap\fR\fR
+.ad
+.RS 10n
+.rt
+The \fItomap\fR option-argument must contain a slash character. It is
+interpreted as the pathname of a charmap file as defined in \fBcharmap\fR(5).
+If the pathname does not represent a valid, readable charmap file, the results
+are undefined.
+.RE
+
+If this option is omitted, the codeset of the current locale is used.
+.RE
+
+.sp
+.LP
+If either \fB-f\fR or \fB-t\fR represents a charmap file but the other does
+not, or is omitted, or if both \fB-f\fR and \fB-t\fR are omitted, \fBiconv\fR
+fails as an error.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of an input file. If no file operands are specified, or if a file
+operand is '\fB-\fR', the standard input is used.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRConverting and storing files
+.sp
+.LP
+The following example converts the contents of file \fBmail1\fR from code set
+\fB8859\fR to \fB646fr\fR and stores the results in file \fBmail.local\fR:
+
+.sp
+.in +2
+.nf
+example% \fBiconv -f 8859 -t 646fr mail1 > mail.local\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBiconv\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error has occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/iconv/iconv_data\fR\fR
+.ad
+.RS 29n
+.rt
+list of conversions supported by conversion tables
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBiconv\fR(3C), \fBiconv_open\fR(3C), \fBattributes\fR(5), \fBcharmap\fR(5),
+\fBenviron\fR(5), \fBiconv\fR(5), \fBiconv_unicode\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Make sure that both charmap files use the same symbolic names for characters
+the two codesets have in common.
+.sp
+.LP
+The output format of the \fB-l\fR option is unspecified. The \fB-l\fR option is
+not intended for shell script usage.
+.sp
+.LP
+When \fIfromcode\fR or \fItocode\fR is specified for the codeset conversion,
+\fBiconv\fR uses the \fBiconv_open\fR(3C) function. If \fBiconv_open\fR(3C)
+fails to open the specified codeset conversion, \fBiconv\fR searches for an
+appropriate conversion table. As for the supported codeset conversion by
+\fBiconv_open\fR(3C), please refer to \fBiconv\fR(5) and \fBiconv_locale\fR(5).
diff --git a/usr/src/man/man1/indxbib.1 b/usr/src/man/man1/indxbib.1
new file mode 100644
index 0000000000..217e8ac09b
--- /dev/null
+++ b/usr/src/man/man1/indxbib.1
@@ -0,0 +1,118 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH indxbib 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+indxbib \- create an inverted index to a bibliographic database
+.SH SYNOPSIS
+.LP
+.nf
+\fBindxbib\fR \fIdatabase-file\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBindxbib\fR makes an inverted index to the named \fIdatabase-file\fR (which
+must reside within the current directory), typically for use by
+\fBlookbib\fR(1) and \fBrefer\fR(1). A \fIdatabase\fR contains bibliographic
+references (or other kinds of information) separated by blank lines.
+.sp
+.LP
+A bibliographic reference is a set of lines, constituting fields of
+bibliographic information. Each field starts on a line beginning with a
+`\fB%\fR', followed by a key-letter, then a blank, and finally the contents of
+the field, which may continue until the next line starting with `\fB%\fR'.
+.sp
+.LP
+\fBindxbib\fR is a shell script that calls two programs:
+\fB/usr/lib/refer/mkey\fR and \fB/usr/lib/refer/inv\fR. \fBmkey\fR truncates
+words to 6 characters, and maps upper case to lower case. It also discards
+words shorter than 3 characters, words among the 100 most common English words,
+and numbers (dates) < 1000 or > 2099. These parameters can be changed.
+.sp
+.LP
+\fBindxbib\fR creates an entry file (with a \fB\&.ia\fR suffix), a posting file
+(\fB\&.ib\fR), and a tag file (\fB\&.ic\fR), in the working directory.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/refer/mkey\fR\fR
+.ad
+.RS 23n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/refer/inv\fR\fR
+.ad
+.RS 23n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\&.ia\fR\fR
+.ad
+.RS 23n
+.rt
+entry file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\&.ib\fR\fR
+.ad
+.RS 23n
+.rt
+posting file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\&.ic\fR\fR
+.ad
+.RS 23n
+.rt
+tag file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIx\fR\fB\&.ig\fR\fR
+.ad
+.RS 23n
+.rt
+reference file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaddbib\fR(1), \fBlookbib\fR(1), \fBrefer\fR(1), \fBroffbib\fR(1),
+\fBsortbib\fR(1), \fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+All dates should probably be indexed, since many disciplines refer to
+literature written in the 1800s or earlier.
+.sp
+.LP
+\fBindxbib\fR does not recognize pathnames.
diff --git a/usr/src/man/man1/ipcrm.1 b/usr/src/man/man1/ipcrm.1
new file mode 100644
index 0000000000..050adf1bb4
--- /dev/null
+++ b/usr/src/man/man1/ipcrm.1
@@ -0,0 +1,151 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ipcrm 1 "9 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ipcrm \- remove a message queue, semaphore set, or shared memory ID
+.SH SYNOPSIS
+.LP
+.nf
+\fBipcrm\fR [\fB-z\fR \fIzone\fR] [\fB-m\fR \fIshmid\fR] [\fB-q\fR \fImsqid\fR] [\fB-s\fR \fIsemid\fR]
+ [\fB-M\fR \fIshmkey\fR] [\fB-Q\fR \fImsgkey\fR] [\fB-S\fR \fIsemkey\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBipcrm\fR removes one or more messages, semaphores, or shared memory
+identifiers.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzone\fR\fR
+.ad
+.RS 11n
+.rt
+Keys specified by other options refer to facilities in the specified zone (see
+\fBzones\fR(5)). The default is the zone in which the command is executing.
+This option is only useful when the command is executed in the global zone.
+.RE
+
+.sp
+.LP
+The identifiers are specified by the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIshmid\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the shared memory identifier \fIshmid\fR from the system. The shared
+memory segment and data structure associated with it are destroyed after the
+last detach.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR \fImsqid\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the message queue identifier \fImsqid\fR from the system and destroys
+the message queue and data structure associated with it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsemid\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the semaphore identifier \fIsemid\fR from the system and destroys the
+set of semaphores and data structure associated with it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fIshmkey\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the shared memory identifier, created with key \fIshmkey\fR, from the
+system. The shared memory segment and data structure associated with it are
+destroyed after the last detach.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR \fImsgkey\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the message queue identifier, created with key \fImsgkey\fR, from the
+system and destroys the message queue and data structure associated with it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIsemkey\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the semaphore identifier, created with key \fIsemkey\fR, from the
+system and destroys the set of semaphores and data structure associated with
+it.
+.RE
+
+.sp
+.LP
+The details of the removes are described in \fBmsgctl\fR(2), \fBshmctl\fR(2),
+and \fBsemctl\fR(2). Use the \fBipcs\fR command to find the identifiers and
+keys.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBipcrm\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBipcs\fR(1), \fBmsgctl\fR(2), \fBmsgget\fR(2), \fBmsgrcv\fR(2),
+\fBmsgsnd\fR(2), \fBsemctl\fR(2), \fBsemget\fR(2), \fBsemop\fR(2),
+\fBshmctl\fR(2), \fBshmget\fR(2), \fBshmop\fR(2), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5), \fBzones\fR(5)
diff --git a/usr/src/man/man1/ipcs.1 b/usr/src/man/man1/ipcs.1
new file mode 100644
index 0000000000..df29671afc
--- /dev/null
+++ b/usr/src/man/man1/ipcs.1
@@ -0,0 +1,726 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ipcs 1 "17 Jan 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+ipcs \- report inter-process communication facilities status
+.SH SYNOPSIS
+.LP
+.nf
+\fBipcs\fR [\fB-aAbciJmopqstZ\fR] [\fB-D\fR \fImtype\fR] [\fB-z\fR \fIzone\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBipcs\fR utility prints information about active inter-process
+communication facilities. The information that is displayed is controlled by
+the options supplied. Without options, information is printed in short format
+for message queues, shared memory, and semaphores that are currently active in
+the system.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Prints information about active shared memory segments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 6n
+.rt
+Prints information about active message queues.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Prints information about active semaphores.
+.RE
+
+.sp
+.LP
+If \fB-m\fR, \fB-q\fR, or \fB-s\fR are specified, information about only those
+indicated is printed. If none of these three is specified, information about
+all three is printed subject to these options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 12n
+.rt
+Uses all XCU5 print options. (This is a shorthand notation for \fB-b\fR,
+\fB-c\fR, \fB-o\fR, \fB-p\fR, and \fB-t\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 12n
+.rt
+Uses all print options. (This is a shorthand notation for \fB-b\fR, \fB-c\fR,
+\fB-i\fR, \fB-J\fR, \fB-o\fR, \fB-p\fR, and \fB-t\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 12n
+.rt
+Prints information on biggest allowable size: maximum number of bytes in
+messages on queue for message queues, size of segments for shared memory, and
+number of semaphores in each set for semaphores. See below for meaning of
+columns in a listing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 12n
+.rt
+Prints creator's login name and group name. See below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fImtype\fR\fR
+.ad
+.RS 12n
+.rt
+Displays, in hexadecimal and \fBASCII\fR, the contents of all messages of type
+\fImtype\fR found on any message queue that the user invoking \fBipcs\fR has
+permission to read. If \fImtype\fR is \fB0\fR, all messages are displayed. If
+\fImtype\fR is negative, all messages with type less than or equal to the
+absolute value of \fImtype\fR are displayed. (See \fBmsgrcv\fR(2) and
+\fBmsgsnap\fR(2)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 12n
+.rt
+Prints number of \fBISM\fR attaches to shared memory segments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-J\fR\fR
+.ad
+.RS 12n
+.rt
+Prints the creator's project.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 12n
+.rt
+Prints information on outstanding usage: number of messages on queue and total
+number of bytes in messages on queue for message queues and number of processes
+attached to shared memory segments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 12n
+.rt
+Prints process number information: process \fBID\fR of last process to send a
+message, process \fBID\fR of last process to receive a message on message
+queues, process \fBID\fR of creating process, and process \fBID\fR of last
+process to attach or detach on shared memory segments. See below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 12n
+.rt
+Prints time information: time of the last control operation that changed the
+access permissions for all facilities, time of last \fBmsgsnd\fR(2) and last
+\fBmsgrcv\fR(2) on message queues, time of last \fBshmat\fR(2) and last
+\fBshmdt\fR(2) on shared memory (see \fBshmop\fR(2)), time of last
+\fBsemop\fR(2) on semaphores. See below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzone\fR\fR
+.ad
+.RS 12n
+.rt
+Prints information about facilities associated with the specified zone (see
+\fBzones\fR(5)). The zone can be specified as either a name or a numeric id.
+The default is to display information about the zone in which the command is
+executing. Notice that this option is only useful when executing in the global
+zone.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.RS 12n
+.rt
+When executing in the global zone, prints information about all zones.
+Otherwise, prints information about the zone in which the command is executing.
+The output includes the zone associated with each facility.
+.RE
+
+.sp
+.LP
+The column headings and the meaning of the columns in an \fBipcs\fR listing are
+given below. The letters in parentheses indicate the options that cause the
+corresponding heading to appear and "all" means that the heading always
+appears. \fBNote:\fR These options only determine what information is provided
+for each facility; they do not determine which facilities are listed.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT\fR (all)\fR
+.ad
+.RS 19n
+.rt
+Type of the facility:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 5n
+.rt
+message queue
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR\fR
+.ad
+.RS 5n
+.rt
+shared memory segment
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 5n
+.rt
+semaphore
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBID\fR (all)\fR
+.ad
+.RS 19n
+.rt
+The identifier for the facility entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBKEY\fR (all)\fR
+.ad
+.RS 19n
+.rt
+The key used as an argument to \fBmsgget\fR(2), \fBsemget\fR(2), or
+\fBshmget\fR(2) to create the facility entry. (\fBNote:\fR The key of a shared
+memory segment is changed to \fBIPC_PRIVATE\fR when the segment has been
+removed until all processes attached to the segment detach it.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMODE\fR (all)\fR
+.ad
+.RS 19n
+.rt
+The facility access modes and flags: The mode consists of 11 characters that
+are interpreted as follows. The first two characters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBR\fR\fR
+.ad
+.RS 5n
+.rt
+A process is waiting on a \fBmsgrcv\fR(2).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.RS 5n
+.rt
+A process is waiting on a \fBmsgsnd\fR(2).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 5n
+.rt
+The corresponding special flag is not set.
+.RE
+
+The next nine characters are interpreted as three sets of three bits each. The
+first set refers to the owner's permissions; the next to permissions of others
+in the user-group of the facility entry; and the last to all others. Within
+each set, the first character indicates permission to read, the second
+character indicates permission to write or alter the facility entry, and the
+last character is currently unused.
+.sp
+The permissions are indicated as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 8n
+.rt
+Read permission is granted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fR\fR
+.ad
+.RS 8n
+.rt
+Write permission is granted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.RS 8n
+.rt
+Alter permission is granted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 8n
+.rt
+The indicated permission is not granted.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOWNER\fR (all)\fR
+.ad
+.RS 19n
+.rt
+The login name of the owner of the facility entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBGROUP\fR (all)\fR
+.ad
+.RS 19n
+.rt
+The group name of the group of the owner of the facility entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCREATOR\fR (a,A,c)\fR
+.ad
+.RS 19n
+.rt
+The login name of the creator of the facility entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCGROUP\fR (a,A,c)\fR
+.ad
+.RS 19n
+.rt
+The group name of the group of the creator of the facility entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCBYTES\fR (a,A,o)\fR
+.ad
+.RS 19n
+.rt
+The number of bytes in messages currently outstanding on the associated message
+queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBQNUM\fR (a,A,o)\fR
+.ad
+.RS 19n
+.rt
+The number of messages currently outstanding on the associated message queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBQBYTES\fR (a,A,b)\fR
+.ad
+.RS 19n
+.rt
+The maximum number of bytes allowed in messages outstanding on the associated
+message queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLSPID\fR (a,A,p)\fR
+.ad
+.RS 19n
+.rt
+The process \fBID\fR of the last process to send a message to the associated
+queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLRPID\fR (a,A,p)\fR
+.ad
+.RS 19n
+.rt
+The process \fBID\fR of the last process to receive a message from the
+associated queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSTIME\fR (a,A,t)\fR
+.ad
+.RS 19n
+.rt
+The time the last message was sent to the associated queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRTIME\fR (a,A,t)\fR
+.ad
+.RS 19n
+.rt
+The time the last message was received from the associated queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCTIME\fR (a,A,t)\fR
+.ad
+.RS 19n
+.rt
+The time when the associated entry was created or changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBISMATTCH\fR (a,i)\fR
+.ad
+.RS 19n
+.rt
+The number of \fBISM\fR attaches to the associated shared memory segments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNATTCH\fR (a,A,o)\fR
+.ad
+.RS 19n
+.rt
+The number of processes attached to the associated shared memory segment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSEGSZ\fR (a,A,b)\fR
+.ad
+.RS 19n
+.rt
+The size of the associated shared memory segment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCPID\fR (a,A,p)\fR
+.ad
+.RS 19n
+.rt
+The process \fBID\fR of the creator of the shared memory entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLPID\fR (a,A,p)\fR
+.ad
+.RS 19n
+.rt
+The process \fBID\fR of the last process to attach or detach the shared memory
+segment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBATIME\fR (a,A,t)\fR
+.ad
+.RS 19n
+.rt
+The time the last attach was completed to the associated shared memory segment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDTIME\fR (a,A,t)\fR
+.ad
+.RS 19n
+.rt
+The time the last detach was completed on the associated shared memory segment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNSEMS\fR (a,A,b)\fR
+.ad
+.RS 19n
+.rt
+The number of semaphores in the set associated with the semaphore entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOTIME\fR (a,A,t)\fR
+.ad
+.RS 19n
+.rt
+The time the last semaphore operation was completed on the set associated with
+the semaphore entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPROJECT\fR (J,A)\fR
+.ad
+.RS 19n
+.rt
+The project name of the creator of the facility entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBZONE\fR (Z)\fR
+.ad
+.RS 19n
+.rt
+The zone with which the facility is associated.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBipcs\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.RS 6n
+.rt
+Determine the timezone for the time strings written by \fBipcs\fR.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 15n
+.rt
+group names
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+user names
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBipcrm\fR(1), \fBmsgget\fR(2), \fBmsgids\fR(2), \fBmsgrcv\fR(2),
+\fBmsgsnap\fR(2), \fBmsgsnd\fR(2), \fBsemget\fR(2), \fBsemids\fR(2),
+\fBsemop\fR(2), \fBshmctl\fR(2), \fBshmget\fR(2), \fBshmids\fR(2),
+\fBshmop\fR(2), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5),
+\fBzones\fR(5)
+.SH NOTES
+.sp
+.LP
+Things can change while \fBipcs\fR is running. The information it gives is
+guaranteed to be accurate only when it was retrieved.
diff --git a/usr/src/man/man1/isainfo.1 b/usr/src/man/man1/isainfo.1
new file mode 100644
index 0000000000..e705d9a355
--- /dev/null
+++ b/usr/src/man/man1/isainfo.1
@@ -0,0 +1,169 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH isainfo 1 "8 Feb 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+isainfo \- describe instruction set architectures
+.SH SYNOPSIS
+.LP
+.nf
+\fBisainfo\fR [ [\fB-v\fR] [\fB-b\fR | \fB-n\fR | \fB-k\fR] | [\fB-x\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBisainfo\fR utility is used to identify various attributes of the
+instruction set architectures supported on the currently running system. Among
+the questions it can answer are whether 64-bit applications are supported, or
+whether the running kernel uses 32-bit or 64-bit device drivers.
+.sp
+.LP
+When invoked with no options, \fBisainfo\fR prints the names of the native
+instruction sets for applications supported by the current version of the
+operating system. These are a subset of the list returned by \fBisalist\fR(1).
+The subset corresponds to the basic applications environments supported by the
+currently running system.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the number of bits in the address space of the native instruction set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the name of the instruction set(s) used by the operating system kernel
+components such as device drivers and \fBSTREAMS\fR modules.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the name of the native instruction set used by portable applications
+supported by the current version of the operating system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+When used with the \fB-b\fR, \fB-k\fR or \fB-n\fR options, prints more detailed
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Prints instruction extensions to the native ABI which are supported by the
+platform.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRInvoking \fBisainfo\fR on a 32-bit x86 Platform
+.sp
+.LP
+The following example invokes \fBisainfo\fR on a 32-bit x86 platform:
+
+.sp
+.in +2
+.nf
+example% isainfo -v
+32-bit i386 applications
+
+example% isainfo -k
+i386
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRInvoking \fBisainfo\fR on a System Running the 64-bit Operating
+System on a 64-bit SPARC Processor
+.sp
+.LP
+The following example invokes \fBisainfo\fR on a system running the 64-bit
+operating system on a 64-bit SPARC processor:
+
+.sp
+.in +2
+.nf
+example% isainfo
+sparcv9 sparc
+example% isainfo -n
+sparcv9
+example% isainfo -v
+64-bit sparcv9 applications
+32-bit sparc applications
+example% isainfo -vk
+64-bit sparcv9 kernel modules
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRInvoking \fBisainfo\fR \fB-x\fR on an AMD Opteron CPU
+.sp
+.LP
+The following example invokes \fBisainfo\fR with the \fB-x\fR option on an AMD
+Opteron CPU:
+
+.sp
+.in +2
+.nf
+example% isainfo -x
+i386: fpu tsc cx8 sep cmov mmx ammx a3dnow a3dnowx fxsr sse sse2 pause
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fBNon-zero\fR
+.ad
+.RS 12n
+.rt
+Options are not specified correctly, or the command is unable to recognize
+attributes of the system on which it is running. An error message is printed to
+\fBstderr\fR.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBisalist\fR(1), \fBuname\fR(1), \fBpsrinfo\fR(1M), \fBgetisax\fR(2),
+\fBsysinfo\fR(2), \fBattributes\fR(5), \fBisalist\fR(5)
diff --git a/usr/src/man/man1/isalist.1 b/usr/src/man/man1/isalist.1
new file mode 100644
index 0000000000..5f406ec73e
--- /dev/null
+++ b/usr/src/man/man1/isalist.1
@@ -0,0 +1,45 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH isalist 1 "20 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+isalist \- display the native instruction sets executable on this platform
+.SH SYNOPSIS
+.LP
+.nf
+\fBisalist\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBisalist\fR prints the names of the native instruction sets executable on
+this platform on the standard output, as returned by the \fBSI_ISALIST\fR
+command of \fBsysinfo\fR(2).
+.sp
+.LP
+The names are space-separated and are ordered in the sense of best performance.
+That is, earlier-named instruction sets might contain more instructions than
+later-named instruction sets; a program that is compiled for an earlier-named
+instruction sets will most likely run faster on this machine than the same
+program compiled for a later-named instruction set.
+.sp
+.LP
+Programs compiled for instruction sets that do not appear in the list will most
+likely experience performance degradation or not run at all on this machine.
+.sp
+.LP
+The instruction set names known to the system are listed in \fBisalist\fR(5).
+These names might or might not match predefined names or compiler options in
+the C language compilation system,
+.sp
+.LP
+This command is obsolete and may be removed in a future version of Solaris. See
+\fBisainfo\fR(1) for a better way to handle instruction set extensions.
+.SH SEE ALSO
+.sp
+.LP
+\fBisainfo\fR(1), \fBoptisa\fR(1), \fBuname\fR(1), \fBsysinfo\fR(2),
+\fBattributes\fR(5), \fBisalist\fR(5)
diff --git a/usr/src/man/man1/jobs.1 b/usr/src/man/man1/jobs.1
new file mode 100644
index 0000000000..9bb06b3cee
--- /dev/null
+++ b/usr/src/man/man1/jobs.1
@@ -0,0 +1,1045 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH jobs 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+jobs, fg, bg, stop, notify \- control process execution
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBjobs\fR [\fB-p\fR | \fB-l\fR] [% \fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBjobs\fR \fB-x\fR \fIcommand\fR [\fIarguments\fR]
+.fi
+
+.LP
+.nf
+\fBfg\fR [% \fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBbg\fR [% \fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBstop\fR % \fIjob_id\fR...
+.fi
+
+.LP
+.nf
+\fBstop\fR \fIpid\fR...
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBjobs\fR [\fB-l\fR]
+.fi
+
+.LP
+.nf
+\fBfg\fR [% \fIjob_id\fR]
+.fi
+
+.LP
+.nf
+\fBbg\fR [% \fIjob_id\fR]...
+.fi
+
+.LP
+.nf
+\fBnotify\fR [% \fIjob_id\fR]...
+.fi
+
+.LP
+.nf
+\fBstop\fR % \fIjob_id\fR...
+.fi
+
+.LP
+.nf
+\fBstop\fR \fIpid\fR...
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBjobs\fR [\fB-lnp\fR] [% \fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBfg\fR [% \fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBbg\fR [% \fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBstop\fR % \fIjob_id\fR...
+.fi
+
+.LP
+.nf
+\fBstop\fR \fIpid\fR...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBjobs\fR [\fB-lnp\fR] [\fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBfg\fR [\fIjob_id\fR...]
+.fi
+
+.LP
+.nf
+\fBbg\fR [\fIjob_id\fR...]
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+When Job Control is enabled, the Bourne shell built-in \fBjobs\fR reports all
+jobs that are stopped or executing in the background. If \fB%\fR\fIjob_id\fR is
+omitted, all jobs that are stopped or running in the background is reported.
+The following options modify or enhance the output of \fBjobs\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Reports the process group \fBID\fR and working directory of the jobs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Reports only the process group \fBID\fR of the jobs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Replaces any \fIjob_id\fR found in \fIcommand\fR or \fIarguments\fR with the
+corresponding process group \fBID\fR, and then executes \fIcommand\fR passing
+it \fIarguments\fR.
+.RE
+
+.sp
+.LP
+When the shell is invoked as \fBjsh\fR, Job Control is enabled in addition to
+all of the functionality described previously for \fBsh\fR. Typically Job
+Control is enabled for the interactive shell only. Non-interactive shells
+typically do not benefit from the added functionality of Job Control.
+.sp
+.LP
+With Job Control enabled every command or pipeline the user enters at the
+terminal is called a \fIjob_id\fR. All jobs exist in one of the following
+states: foreground, background or stopped. These terms are defined as follows:
+.RS +4
+.TP
+1.
+A job in the \fBforeground\fR has read and write access to the controlling
+terminal.
+.RE
+.RS +4
+.TP
+2.
+A job in the \fBbackground\fR is denied read access and has conditional
+write access to the controlling terminal (see \fBstty\fR(1))
+.RE
+.RS +4
+.TP
+3.
+A \fBstopped\fR job is a job that has been placed in a suspended state,
+usually as a result of a \fBSIGTSTP\fR signal (see \fBsignal.h\fR(3HEAD)).
+.RE
+.sp
+.LP
+Every job that the shell starts is assigned a positive integer, called a
+\fIjob_id number\fR which is tracked by the shell and are used as an identifier
+to indicate a specific job. Additionally, the shell keeps track of the
+\fBcurrent\fR and \fBprevious\fR jobs. The \fBcurrent job\fR is the most recent
+job to be started or restarted. The \fBprevious job\fR is the first non-current
+job.
+.sp
+.LP
+The acceptable syntax for a Job Identifier is of the form:
+.sp
+.LP
+\fB%\fR\fIjob_id\fR
+.sp
+.LP
+where \fIjob_id\fR can be specified in any of the following formats:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR or \fB+\fR\fR
+.ad
+.RS 13n
+.rt
+for the current job
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 13n
+.rt
+for the previous job
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fI<string>\fR\fR
+.ad
+.RS 13n
+.rt
+specify the job for which the command line uniquely contains \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 13n
+.rt
+for job number \fIn\fR, where \fIn\fR is a job number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpref\fR\fR
+.ad
+.RS 13n
+.rt
+where \fIpref\fR is a unique prefix of the command name (for example, if the
+command \fBls \(mil name\fR were running in the background, it could be
+referred to as \fB%ls\fR); \fIpref\fR cannot contain blanks unless it is
+quoted.
+.RE
+
+.sp
+.LP
+When Job Control is enabled, \fBfg\fR resumes the execution of a stopped job in
+the foreground, also moves an executing background job into the foreground. If
+\fB%\fR\fIjob_id\fR is omitted the current job is assumed.
+.sp
+.LP
+When Job Control is enabled, \fBbg\fR resumes the execution of a stopped job in
+the background. If \fB%\fR\fIjob_id\fR is omitted the current job is assumed.
+.sp
+.LP
+\fBstop\fR stops the execution of a background job(s) by using its
+\fIjob_id\fR, or of any process by using its \fIpid\fR; see \fBps\fR(1).
+.SS "csh"
+.sp
+.LP
+The C shell built-in, \fBjobs\fR, without an argument, lists the active jobs
+under job control.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+List process \fBID\fRs, in addition to the normal information.
+.RE
+
+.sp
+.LP
+The shell associates a numbered \fIjob_id\fR with each command sequence to keep
+track of those commands that are running in the background or have been stopped
+with \fBTSTP\fR signals (typically Control-Z). When a command or command
+sequence (semicolon-separated list) is started in the background using the
+\fB&\fR metacharacter, the shell displays a line with the job number in
+brackets and a list of associated process numbers:
+.sp
+.LP
+\fB[1] 1234\fR
+.sp
+.LP
+To see the current list of jobs, use the \fBjobs\fR built-in command. The job
+most recently stopped (or put into the background if none are stopped) is
+referred to as the \fBcurrent\fR job and is indicated with a `\fB+\fR'. The
+previous job is indicated with a `\fB\(mi\fR\&'; when the current job is
+terminated or moved to the foreground, this job takes its place (becomes the
+new current job).
+.sp
+.LP
+To manipulate jobs, refer to the \fBbg\fR, \fBfg\fR, \fBkill\fR, \fBstop\fR,
+and \fB%\fR built-in commands.
+.sp
+.LP
+A reference to a job begins with a `\fB%\fR'. By itself, the percent sign
+refers to the current job.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR \fB%+\fR \fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+The current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\(mi\fR\fR
+.ad
+.RS 12n
+.rt
+The previous job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIj\fR\fR
+.ad
+.RS 12n
+.rt
+Refer to job \fIj\fR as in: `\fBkill\fR \fB-9\fR \fB%\fR\fIj\fR'. \fIj\fR can
+be a job number, or a string that uniquely specifies the command line by which
+it was started; `\fBfg %vi\fR' might bring a stopped \fBvi\fR job to the
+foreground, for instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Specify the job for which the command line uniquely contains \fIstring\fR.
+.RE
+
+.sp
+.LP
+A job running in the background stops when it attempts to read from the
+terminal. Background jobs can normally produce output, but this can be
+suppressed using the `\fBstty tostop\fR' command.
+.sp
+.LP
+\fBfg\fR brings the current or specified \fIjob_id\fR into the foreground.
+.sp
+.LP
+\fBbg\fR runs the current or specified jobs in the background.
+.sp
+.LP
+\fBstop\fR stops the execution of a background job(s) by using its
+\fIjob_id\fR, or of any process by using its \fIpid\fR; see \fBps\fR(1).
+.sp
+.LP
+\fBnotify\fR notifies the user asynchronously when the status of the current
+job or specified jobs changes.
+.SS "ksh"
+.sp
+.LP
+\fBjobs\fR displays the status of the jobs that were started in the current
+shell environment. When \fBjobs\fR reports the termination status of a job, the
+shell removes its process \fBID\fR from the list of those known in the current
+shell execution environment.
+.sp
+.LP
+\fIjob_id\fR specifies the jobs for which the status is to be displayed. If no
+\fIjob_id\fR is specified, the status information for all jobs are displayed.
+.sp
+.LP
+The following options modify or enhance the output of \fBjobs\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+(The letter ell.) Provides more information about each job listed. This
+information includes the job number, current job, process group \fBID\fR, state
+and the command that formed the job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Displays only jobs that have stopped or exited since last notified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Displays only the process \fBID\fRs for the process group leaders of the
+selected jobs.
+.RE
+
+.sp
+.LP
+By default, \fBjobs\fR displays the status of all the stopped jobs, running
+background jobs, and all jobs whose status has changed and have not been
+reported by the shell.
+.sp
+.LP
+If the \fBmonitor\fR option of the \fBset\fR command is turned on, an
+interactive shell associates a \fBjob\fR with each pipeline. It keeps a table
+of current jobs, printed by the \fBjobs\fR command, and assigns them small
+integer numbers. When a job is started asynchronously with \fB&\fR, the shell
+prints a line which looks like:
+.sp
+.LP
+\fB[1]\fR \fB1234\fR
+.sp
+.LP
+indicating that the job, which was started asynchronously, was job number
+\fB1\fR and had one (top-level) process, whose process id was \fB1234\fR.
+.sp
+.LP
+If you are running a job and wish to do something else you can hit the key ^Z
+(Control-Z) which sends a \fBSTOP\fR signal to the current job. The shell then
+normally indicates that the job has been "\fBStopped\fR" (see \fBOUTPUT\fR
+below), and print another prompt. You can then manipulate the state of this
+job, putting it in the background with the \fBbg\fR command, or run some other
+commands and then eventually bring the job back into the foreground with the
+foreground command \fBfg\fR. A ^Z takes effect immediately and is like an
+interrupt, in that pending output and unread input are discarded when it is
+typed.
+.sp
+.LP
+There are several ways to refer to jobs in the shell. A job can be referred to
+by the process id of any process of the job or by one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The job with the specified number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Any job whose command line begins with \fIstring\fR; works only in the
+interactive mode when the history file is active.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Any job whose command line contains \fIstring\fR; works only in the interactive
+mode when the history file is active.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+Current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%+\fR\fR
+.ad
+.RS 12n
+.rt
+Equivalent to \fB%%\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\(mi\fR\fR
+.ad
+.RS 12n
+.rt
+Previous job.
+.RE
+
+.sp
+.LP
+The shell learns immediately whenever a process changes state. It normally
+informs you whenever a job becomes blocked so that no further progress is
+possible, but only just before it prints a prompt. This is done so that it does
+not otherwise disturb your work. When the monitor mode is on, each background
+job that completes triggers any trap set for \fBCHLD\fR. When you try to leave
+the shell while jobs are running or stopped, you are warned that `You have
+stopped (running) jobs.' You can use the \fBjobs\fR command to see what they
+are. If you do this or immediately try to exit again, the shell does not warn
+you a second time, and the stopped jobs are terminated.
+.sp
+.LP
+\fBfg\fR moves a background job from the current environment into the
+foreground. Using \fBfg\fR to place a job in the foreground removes its process
+\fBID\fR from the list of those known in the current shell execution
+environment. The \fBfg\fR command is available only on systems that support job
+control. If \fIjob_id\fR is not specified, the current job is brought into the
+foreground.
+.sp
+.LP
+\fBbg\fR resumes suspended jobs from the current environment by running them as
+background jobs. If the job specified by \fIjob_id\fR is already a running
+background job, \fBbg\fR has no effect and exits successfully. Using \fBbg\fR
+to place a job into the background causes its process \fBID\fR to become `known
+in the current shell execution environment, as if it had been started as an
+asynchronous list. The \fBbg\fR command is available only on systems that
+support job control. If \fIjob_id\fR is not specified, the current job is
+placed in the background.
+.sp
+.LP
+\fBstop\fR stops the execution of a background job(s) by using its
+\fIjob_id\fR, or of any process by using its \fIpid\fR. See \fBps\fR(1).
+.SS "ksh93"
+.sp
+.LP
+\fBjobs\fR displays information about specified jobs that were started by the
+current shell environment on standard output. The information contains the job
+number enclosed in \fB[...]\fR, the status, and the command line that started
+the job.
+.sp
+.LP
+If \fIjob_id\fR is omitted, \fBjobs\fR displays the status of all stopped jobs,
+background jobs, and all jobs whose status has changed since last reported by
+the shell.
+.sp
+.LP
+When \fBjobs\fR reports the termination status of a job, the shell removes the
+job from the list of known jobs in the current shell environment.
+.sp
+.LP
+The following options modify or enhances the output of \fBjobs\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Displays process IDs after the job number in addition to the usual information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Displays only the jobs whose status has changed since the last prompt was
+displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the process group leader IDs for the specified jobs.
+.RE
+
+.sp
+.LP
+\fIjob_id\fR can be specified to \fBjobs\fR, \fBfg\fR, and \fBbg\fR as one of
+the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The process id of \fBjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The process group id of \fBjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The job number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+The job whose name begins with \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+The job whose name contains \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%+\fR\fR
+.ad
+.br
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+The current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%-\fR\fR
+.ad
+.RS 12n
+.rt
+The previous job.
+.RE
+
+.sp
+.LP
+\fBfg\fR places the specified jobs into the foreground in sequence and sends a
+\fBCONT\fR signal to start each running. If \fIjob_id\fR is omitted, the most
+recently started or stopped background job is moved to the foreground.
+.sp
+.LP
+\fBbg\fR places the specified jobs into the background and sends a \fBCONT\fR
+signal to start them running. If \fIjob_id\fR is omitted, the most recently
+started or stopped background job is resumed or continued in the background.
+.SH OUTPUT
+.sp
+.LP
+If the \fB-p\fR option is specified, the output consists of one line for each
+process \fBID\fR:
+.sp
+.LP
+\fB"%d\en",\fR \fI"process ID"\fR
+.sp
+.LP
+Otherwise, if the \fB-l\fR option is not specified, the output is a series of
+lines of the form:
+.sp
+.LP
+\fB"[%d] %c %s %s\en"\fR, \fIjob-number\fR, \fIcurrent\fR, \fIstate\fR,
+\fIcommand\fR
+.sp
+.LP
+where the fields are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcurrent\fR\fR
+.ad
+.RS 14n
+.rt
+The character \fB+\fR identifies the job that would be used as a default for
+the \fBfg\fR or \fBbg\fR commands. This job can also be specified using the
+\fIjob_id\fR \fB%+\fR or \fB%%\fR \fB\&.\fR The character \fB\(mi\fR identifies
+the job that would become the default if the current default job were to exit;
+this job can also be specified using the \fIjob_id\fR \fB%\(mi\fR \fB\&.\fR For
+other jobs, this field is a space character. At most, one job can be identified
+with \fB+\fR and at most one job can be identified with \fB\(mi\fR\&. If there
+is any suspended job, then the current job is a suspended job. If there are at
+least two suspended jobs, then the previous job is also a suspended job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIjob-number\fR\fR
+.ad
+.RS 14n
+.rt
+A number that can be used to identify the process group to the \fBwait\fR,
+\fBfg\fR, \fBbg,\fR and \fBkill\fR utilities. Using these utilities, the job
+can be identified by prefixing the job number with \fB%\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstate\fR\fR
+.ad
+.RS 14n
+.rt
+One of the following strings in the POSIX Locale:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRunning\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job has not been suspended by a signal and has not exited.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDone\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job completed and returned exit status zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDone\fR(\fIcode\fR)\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job completed normally and that it exited with the specified
+\fBnon-zero\fR exit status, \fIcode\fR, expressed as a decimal number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBStopped\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job was stopped.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBStopped(SIGTSTP)\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job was suspended by the \fBSIGTSTP\fR signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBStopped(SIGSTOP)\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job was suspended by the \fBSIGSTOP\fR signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBStopped(SIGTTIN)\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job was suspended by the \fBSIGTTIN\fR signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBStopped(SIGTTOU)\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that the job was suspended by the \fBSIGTTOU\fR signal.
+.RE
+
+The implementation can substitute the string \fBSuspended\fR in place of
+\fBStopped\fR. If the job was terminated by a signal, the format of \fBstate\fR
+is unspecified, but it is visibly distinct from all of the other \fBstate\fR
+formats shown here and indicates the name or description of the signal causing
+the termination.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 14n
+.rt
+The associated command that was specified to the shell.
+.RE
+
+.sp
+.LP
+If the \fB-l\fR option is specified, a field containing the process group
+\fBID\fR is inserted before the \fBstate\fR field. Also, more processes in a
+process group can be output on separate lines, using only the process \fBID\fR
+and \fBcommand\fR fields.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBjobs\fR, \fBfg\fR, and \fBbg\fR: \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.SS "sh, csh, ksh"
+.sp
+.LP
+The following exit values are returned for \fBjobs\fR, \fBfg\fR, and \fBbg\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned for \fBjobs\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The information for each job is written to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One or more jobs does not exist.
+.RE
+
+.sp
+.LP
+The following exit values are returned for \fBfg\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexit status of last job\fR\fR
+.ad
+.RS 27n
+.rt
+One or more jobs has been brought into the foreground.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnon-zero\fR\fR
+.ad
+.RS 27n
+.rt
+One or more jobs does not exist or has completed.
+.RE
+
+.sp
+.LP
+The following exit values are returned for \fBbg\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All background jobs are started.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One more jobs does not exist or there are no background jobs.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "csh, sh, ksh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBkill\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBps\fR(1),
+\fBsh\fR(1), \fBstop\fR(1), \fBshell_builtins\fR(1), \fBstty\fR(1),
+\fBwait\fR(1), \fBsignal.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/join.1 b/usr/src/man/man1/join.1
new file mode 100644
index 0000000000..02ec2fbde8
--- /dev/null
+++ b/usr/src/man/man1/join.1
@@ -0,0 +1,366 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH join 1 "8 Feb 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+join \- relational database operator
+.SH SYNOPSIS
+.LP
+.nf
+\fBjoin\fR [\fB-a\fR \fIfilenumber\fR | \fB-v\fR \fIfilenumber\fR] [\fB-1\fR \fIfieldnumber\fR]
+ [\fB-2\fR \fIfieldnumber\fR] [\fB-o\fR \fIlist\fR] [\fB-e\fR \fIstring\fR] [\fB-t\fR \fIchar\fR] \fIfile1\fR \fIfile2\fR
+.fi
+
+.LP
+.nf
+\fBjoin\fR [\fB-a\fR \fIfilenumber\fR] [\fB-j\fR \fIfieldnumber\fR] [\fB-j1\fR \fIfieldnumber\fR]
+ [\fB-j2\fR \fIfieldnumber\fR] [\fB-o\fR \fIlist\fR] [\fB-e\fR \fIstring\fR] [\fB-t\fR \fIchar\fR] \fIfile1\fR \fIfile2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBjoin\fR command forms, on the standard output, a join of the two
+relations specified by the lines of \fIfile1\fR and \fIfile2\fR.
+.sp
+.LP
+There is one line in the output for each pair of lines in \fIfile1\fR and
+\fIfile2\fR that have identical join fields. The output line normally consists
+of the common field, then the rest of the line from \fIfile1\fR, then the rest
+of the line from \fIfile2\fR. This format can be changed by using the \fB-o\fR
+option (see below). The \fB-a\fR option can be used to add unmatched lines to
+the output. The \fB-v\fR option can be used to output only unmatched lines.
+.sp
+.LP
+The default input field separators are blank, tab, or new-line. In this case,
+multiple separators count as one field separator, and leading separators are
+ignored. The default output field separator is a blank.
+.sp
+.LP
+If the input files are not in the appropriate collating sequence, the results
+are unspecified.
+.SH OPTIONS
+.sp
+.LP
+Some of the options below use the argument \fIfilenumber\fR. This argument
+should be a \fB1\fR or a \fB2\fR referring to either \fIfile1\fR or
+\fIfile2\fR, respectively.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIfilenumber\fR \fR
+.ad
+.RS 20n
+.rt
+In addition to the normal output, produce a line for each unpairable line in
+file \fIfilenumber\fR, where \fIfilenumber\fR is \fB1\fR or \fB2\fR. If both
+\fB-a\fR \fB1\fR and \fB-a\fR \fB2\fR are specified, all unpairable lines will
+be output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIstring\fR \fR
+.ad
+.RS 20n
+.rt
+Replace empty output fields in the list selected by option \fB-o\fR with the
+string \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIfieldnumber\fR \fR
+.ad
+.RS 20n
+.rt
+Equivalent to \fB-1\fR\fIfieldnumber\fR \fB-\fR\fB2\fR\fIfieldnumber\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j1\fR \fIfieldnumber\fR \fR
+.ad
+.RS 20n
+.rt
+Equivalent to \fB-1\fR\fIfieldnumber\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j2\fR \fIfieldnumber\fR \fR
+.ad
+.RS 20n
+.rt
+Equivalent to \fB-2\fR\fIfieldnumber\fR. Fields are numbered starting with
+\fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIlist\fR \fR
+.ad
+.RS 20n
+.rt
+Each output line includes the fields specified in \fIlist\fR. Fields selected
+by \fIlist\fR that do not appear in the input will be treated as empty output
+fields. (See the \fB-e\fR option.) Each element of which has the either the
+form \fIfilenumber\fR\fB\&.\fR\fIfieldnumber\fR\fB,\fR or \fB0\fR, which
+represents the \fBjoin\fR field. The common field is not printed unless
+specifically requested.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIchar\fR \fR
+.ad
+.RS 20n
+.rt
+Use character \fIchar\fR as a separator. Every appearance of \fIchar\fR in a
+line is significant. The character \fIchar\fR is used as the field separator
+for both input and output. With this option specified, the collating term
+should be the same as \fBsort\fR without the \fB-b\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIfilenumber\fR \fR
+.ad
+.RS 20n
+.rt
+Instead of the default output, produce a line only for each unpairable line in
+\fIfilenumber\fR, where \fIfilenumber\fR is \fB1\fR or \fB2\fR. If both
+\fB-v\fR \fB1\fR and \fB-v\fR \fB2\fR are specified, all unpairable lines will
+be output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR \fIfieldnumber\fR \fR
+.ad
+.RS 20n
+.rt
+Join on the \fIfieldnumber\fRth field of file 1. Fields are decimal integers
+starting with \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-2\fR\fIfieldnumber\fR \fR
+.ad
+.RS 20n
+.rt
+Join on the \fIfieldnumber\fRth field of file 2. Fields are decimal integers
+starting with \fB1\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fR
+.ad
+.RS 10n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile2\fR \fR
+.ad
+.RS 10n
+.rt
+A path name of a file to be joined. If either of the \fIfile1\fR or \fIfile2\fR
+operands is \fB\(mi\fR, the standard input is used in its place.
+.RE
+
+.sp
+.LP
+\fIfile1\fR and \fIfile2\fR must be sorted in increasing collating sequence as
+determined by \fBLC_COLLATE\fR on the fields on which they are to be joined,
+normally the first in each line (see \fBsort\fR(1)).
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBjoin\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRJoining the password file and group file
+.sp
+.LP
+The following command line will join the password file and the group file,
+matching on the numeric group ID, and outputting the login name, the group name
+and the login directory. It is assumed that the files have been sorted in
+\fBASCII\fR collating sequence on the group ID fields.
+
+.sp
+.in +2
+.nf
+example% \fBjoin -j1 4-j2 3 -o 1.1 2.1 1.6 -t:/etc/passwd /etc/group\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing the -o option
+.sp
+.LP
+The \fB-o\fR \fB0\fR field essentially selects the union of the join fields.
+For example, given file \fBphone\fR:
+
+.sp
+.in +2
+.nf
+!Name Phone Number
+Don +1 123-456-7890
+Hal +1 234-567-8901
+Yasushi +2 345-678-9012
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and file \fBfax\fR:
+
+.sp
+.in +2
+.nf
+!Name Fax Number
+
+Don +1 123-456-7899
+
+Keith +1 456-789-0122
+
+Yasushi +2 345-678-9011
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where the large expanses of white space are meant to each represent a single
+tab character), the command:
+
+.sp
+.in +2
+.nf
+example% \fBjoin -t"\fItab\fR" -a 1 -a 2 -e '(unknown)' -o 0,1.2,2.2 phone fax\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would produce
+
+.sp
+.in +2
+.nf
+!Name Phone Number Fax Number
+Don +1 123-456-7890 +1 123-456-7899
+Hal +1 234-567-8901 (unknown
+Keith (unknown) +1 456-789-012
+Yasushi +2 345-678-9012 +2 345-678-9011
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBjoin\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_COLLATE\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+All input files were output successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBawk\fR(1), \fBcomm\fR(1), \fBsort\fR(1), \fBuniq\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+With default field separation, the collating sequence is that of \fBsort\fR
+\fB-\fR\fBb\fR; with \fB-t\fR, the sequence is that of a plain sort.
+.sp
+.LP
+The conventions of the \fBjoin\fR, \fBsort\fR, \fBcomm\fR, \fBuniq\fR, and
+\fBawk\fR commands are wildly incongruous.
diff --git a/usr/src/man/man1/kbd.1 b/usr/src/man/man1/kbd.1
new file mode 100644
index 0000000000..226c8ea660
--- /dev/null
+++ b/usr/src/man/man1/kbd.1
@@ -0,0 +1,705 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kbd 1 "29 Jan 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+kbd \- manipulate the state of keyboard, or display the type of keyboard, or
+change the default keyboard abort sequence effect
+.SH SYNOPSIS
+.LP
+.nf
+\fBkbd\fR [\fB-r\fR] [\fB-t\fR ] [\fB-l\fR] [\fB-a\fR enable | disable | alternate]
+ [\fB-c\fR on | off] [\fB-d\fR \fIkeyboard device\fR]
+ [\fB-D\fR \fIautorepeat delay\fR] [\fB-R\fR \fIautorepeat rate\fR]
+.fi
+
+.LP
+.nf
+\fBkbd\fR [\fB-i\fR] [\fB-d\fR \fIkeyboard device\fR]
+.fi
+
+.LP
+.nf
+\fBkbd\fR \fB-s\fR [\fIlanguage\fR]
+.fi
+
+.LP
+.nf
+\fBkbd\fR \fB-b\fR [\fBkeyboard\fR | \fBconsole\fR] \fIfrequency\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkbd\fR utility manipulates the state of the keyboard, or displays the
+keyboard type, or allows the default keyboard abort sequence effect to be
+changed. The abort sequence also applies to serial console devices. The
+\fBkbd\fR utility sets the \fB/dev/kbd\fR default keyboard device.
+.SH EXTENDED DESCRIPTION
+.sp
+.LP
+The \fB-i\fR option reads and processes default values for the keyclick and
+keyboard abort settings from the \fB/etc/default/kbd\fR keyboard default file.
+Only keyboards that support a clicker respond to the \fB-c\fR option. To turn
+clicking on by default, add or change the value of the \fBKEYCLICK\fR variable
+in the \fB/etc/default/kbd\fR file to:
+.sp
+.in +2
+.nf
+KEYCLICK=on
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Next, run the command \fBkbd\fR \fB-i\fR to change the setting. Valid settings
+for the \fBKEYCLICK\fR variable are \fBon\fR and \fBoff\fR; all other values
+are ignored. If the \fBKEYCLICK\fR variable is not specified in the default
+file, the setting is unchanged.
+.sp
+.LP
+The keyboard abort sequence effect can only be changed by a super-user using
+the \fB-a\fR option. This sequence is typically Stop-A or L1-A and Shift-Pause
+on the keyboard on \fBSPARC\fR systems, F1-A and Shift-Pause on x86 systems,
+and BREAK on the serial console input device on most systems.
+.sp
+.LP
+A \fBBREAK\fR condition that originates from an erroneous electrical signal
+cannot be distinguished from one deliberately sent by remote \fBDCE\fR. As a
+remedy, use the \fB-a\fR option with Alternate Break to switch break
+interpretation. Due to the risk of incorrect sequence interpretation, binary
+protocols such as \fBSLIP\fR and others should not be run over the serial
+console port when Alternate Break sequence is in effect.
+.sp
+.LP
+Although PPP is a binary protocol, it has the ability to avoid using characters
+that interfere with serial operation. The default alternate break sequence is
+CTRL-m \fB~\fR CTRL-b, or \fB0D 7E 02\fR in hexidecimal. In PPP, this can be
+avoided by setting either \fB0x00000004\fR or \fB0x00002000\fR in the ACCM.
+This forces an escape for the CTRL-b or CTRL-m characters, respectively.
+.sp
+.LP
+To do this in Solaris PPP 4.0, add:
+.sp
+.in +2
+.nf
+asyncmap 0x00002000
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+to the \fB/etc/ppp/options\fR file or any of the other configuration files used
+for the connection. See \fBpppd\fR(1M).
+.sp
+.LP
+SLIP has no comparable capability, and must not be used if the Alternate Break
+sequence is in use.
+.sp
+.LP
+The Alternate Break sequence has no effect on the keyboard abort. For more
+information on the Alternate Break sequence, see \fBzs\fR(7D),\fBse\fR(7D), and
+\fBasy\fR(7D).
+.sp
+.LP
+On many systems, the default effect of the keyboard abort sequence is to
+suspend the operating system and enter the debugger or the monitor. Some
+systems feature key switches with a \fBsecure\fR position. On these systems,
+setting the key switch to the \fBsecure\fR position overrides any software
+default set with this command.
+.sp
+.LP
+To permanently change the software default effect of the keyboard abort
+sequence, first add or change the value of the \fBKEYBOARD_ABORT\fR variable in
+the \fB/etc/default/kbd\fR file to:
+.sp
+.in +2
+.nf
+KEYBOARD_ABORT=disable
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Next, run the command \fBkbd\fR \fB-i\fR to change the setting. Valid settings
+are \fBenable\fR, \fBdisable\fR, and \fBalternate\fR; all other values are
+ignored. If the variable is not specified in the default file, the setting is
+unchanged.
+.sp
+.LP
+To set the abort sequence to the hardware BREAK, set the value of the
+\fBKEYBOARD_ABORT\fR variable in the \fB/etc/default/kbd\fR file to:
+.sp
+.in +2
+.nf
+KEYBOARD_ABORT=enable
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To change the current setting, run the command \fBkbd\fR \fB-i\fR. To set the
+abort sequence to the Alternate Break character sequence, first set the current
+value of the \fBKEYBOARD_ABORT\fR variable in the \fB/etc/default/kbd\fR file
+to:
+.sp
+.in +2
+.nf
+KEYBOARD_ABORT=alternate
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Next, run the command \fBkbd\fR \fB-i\fR to change the setting. When the
+Alternate Break sequence is in effect, only serial console devices are
+affected.
+.sp
+.LP
+To set the autorepeat delay by default, set the \fBREPEAT_DELAY\fR variable in
+the file \fB/etc/default/kbd\fR to the expected value with units in
+milliseconds (ms). To avoid making the keyboard unusable due to a typographical
+error, delay values below \fBKIOCRPTDELAY_MIN\fR (defined in
+\fB/usr/include/sys/kbio.h\fR) are rejected with \fBEINVAL\fR:
+.sp
+.in +2
+.nf
+REPEAT_DELAY=500
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To set the autorepeat rate by default, set the \fBREPEAT_RATE\fR variable in
+the file \fB/etc/default/kbd\fR to the expected value with units in
+milliseconds. Negative and zero repeat rates are ejected with \fBEINVAL\fR:
+.sp
+.in +2
+.nf
+REPEAT_RATE=33
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To change the current settings of \fIdelay\fR and \fIrate\fR, run the command,
+\fBkbd\fR \fB-i\fR. When the Auto Repeat Delay and/or Auto Repeat Rate are in
+effect, only command line mode is affected.
+.sp
+.LP
+To set the language by default, set the \fBLAYOUT\fR variable in the file
+\fB/etc/default/kbd\fR to the expected language. These languages supported in
+kernel can be found by running \fBkbd\fR \fB-s\fR. Other values are ignored.
+For example, the following sets Spanish layout to the keyboard:
+.sp
+.in +2
+.nf
+LAYOUT=Spanish
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Next, run the \fBkbd\fR \fB-i\fR to change the setting. When Solaris reboots,
+the Spanish key table is loaded into kernel. These layouts are valid for
+\fBusb\fR and \fBps/2\fR keyboards.
+.sp
+.LP
+To set the keyboard beeper frequency by default, set the \fBKBD_BEEPER_FREQ\fR
+variable in the file \fB/etc/default/kbd\fR to the expected value with units in
+HZ. This value should be between 0 and 32767, inclusive. Otherwise will be
+rejected with \fBEINVAL\fR:
+.sp
+.in +2
+.nf
+KBD_BEEPER_FREQ=2000
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To set the console beeper frequency by default, set the
+\fBCONSOLE_BEEPER_FREQ\fR variable in the file \fB/etc/default/kbd\fR to the
+expected value with units in HZ. This value should be between 0 and 32767,
+inclusive. Otherwise will be rejected with \fBEINVAL\fR:
+.sp
+.in +2
+.nf
+CONSOLE_BEEPER_FREQ=900
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To change the current settings of keyboard beeper frequency and console beeper
+frequency, run \fBkbd\fR \fB-i\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fBenable\fR | \fBdisable\fR | \fBalternate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables, disables, or alternates the keyboard abort sequence effect. By
+default, a keyboard abort sequence suspends the operating system on most
+systems. This sequence is typically Stop-A or L1-A and Shift-Pause on the
+keyboard on \fBSPARC\fR systems, F1-A and Shift-Pause on x86 systems, and BREAK
+on the serial console device.
+.sp
+The default keyboard behavior can be changed using this option. The \fB-a\fR
+option can only be used by a super-user.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBenable\fR\fR
+.ad
+.RS 13n
+.rt
+Enables the default effect of the keyboard abort sequence (suspend the
+operating system and enter the debugger or the monitor).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisable\fR\fR
+.ad
+.RS 13n
+.rt
+Disables the default/alternate effect and ignores keyboard abort sequences.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBalternate\fR\fR
+.ad
+.RS 13n
+.rt
+Enables the alternate effect of the keyboard abort sequences (suspend the
+operating system and enter the debugger or the monitor) upon receiving the
+Alternate Break character sequence on the console. The Alternate Break sequence
+is defined by the drivers \fBzs\fR(7D), \fBse\fR(7D), \fBasy\fR(7D). Due to a
+risk of incorrect sequence interpretation, binary protocols cannot be run over
+the serial console port when this value is used.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fBkeyboard\fR | \fBconsole\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the beeper frequency for keyboard or console.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyboard\fR\fR
+.ad
+.RS 12n
+.rt
+Set the keyboard beeper frequency to the operand in HZ. See \fBOPERANDS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBconsole\fR\fR
+.ad
+.RS 12n
+.rt
+Sets the console beeper frequency to the operand in HZ. See \fBOPERANDS\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fBon\fR | \fBoff\fR\fR
+.ad
+.sp .6
+.RS 4n
+Turns the clicking of the keyboard on or off.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBon\fR\fR
+.ad
+.RS 7n
+.rt
+Enables clicking
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoff\fR\fR
+.ad
+.RS 7n
+.rt
+Disables clicking
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIkeyboard device\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the keyboard device being set. The default setting is \fB/dev/kbd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIautorepeat delay\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the autorepeat delay in milliseconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets keyboard properties from the keyboard default file. With the exception of
+\fB-d\fR \fIkeyboard device\fR, this option cannot be used with any other
+option. The \fB-i\fR option instructs the keyboard command to read and process
+keyclick and keyboard abort default values from the \fB/etc/default/kbd\fR
+file. The \fB-i\fR option can only be used by a user or role with the Device
+Security Rights Profile.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns the layout code of the keyboard being used, and the autorepeat delay
+and autorepeat rate being used.
+.sp
+If used with -R or -D option, this option returns the value before the changes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Resets the keyboard as if power-up.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIautorepeat rate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the autorepeat rate in milliseconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-s\fR \fB[\fR\fIlanguage\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the keyboard layout into kernel.
+.sp
+If \fIlanguage\fR is specified, the layout is set to \fIlanguage\fR. If
+\fIlanguage\fR is not specified, a list of available layouts are presented,
+prompting for the user to specify the \fIlanguage\fR. See \fBOPERANDS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns the type of the keyboard being used.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fBfrequency\fR
+.ad
+.RS 13n
+.rt
+The frequency value specified to be set in kernel. The receiver of this value
+is specified by the \fB-b\fR option. This value should be between 0 and 32767
+otherwise will be ejected with \fBEINVAL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBlanguage\fR
+.ad
+.RS 13n
+.rt
+The language specified to be set in kernel. If the language is not found, the
+languages supported are listed for selection. It only applies to \fB-s\fR
+option.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying the Keyboard Type
+.sp
+.LP
+The following example displays the keyboard type:
+
+.sp
+.in +2
+.nf
+example% kbd -t
+Type 4 Sun keyboard
+example%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSetting Keyboard Defaults
+.sp
+.LP
+The following example sets the keyboard defaults as specified in the keyboard
+default file:
+
+.sp
+.in +2
+.nf
+example# kbd -i
+example#
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDisplaying Information
+.sp
+.LP
+The following example displays keyboard type and layout code. It also displays
+auto repeat delay and rate settings.
+
+.sp
+.in +2
+.nf
+example% kbd -l
+type=4
+layout=43 (0x2b)
+delay(ms)=500
+rate(ms)=33
+example%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRSetting Keyboard Autorepeat Delay
+.sp
+.LP
+The following example sets the keyboard autorepeat delay:
+
+.sp
+.in +2
+.nf
+example% kbd -D 300
+example%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRSetting Keyboard Autorepeat Rate
+.sp
+.LP
+The following example sets the keyboard autorepeat rate:
+
+.sp
+.in +2
+.nf
+example% kbd -R 50
+example%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRSelecting and Setting the Keyboard Language
+.sp
+.LP
+The following example selects and sets the keyboard language from a list of
+languages specified:
+
+.sp
+.in +2
+.nf
+example% kbd -s
+1. Albanian 16. Malta_UK
+2. Belarusian 17. Malta_US
+3. Belgian 18. Norwegian
+4. Bulgarian 19. Portuguese
+5. Croatian 20. Russian
+6. Danish 21. Serbia-And-Montenegro
+7. Dutch 22. Slove
+\&......
+
+To select the keyboard layout, enter a number [default n]:
+
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example sets the keyboard language specified:
+
+.sp
+.in +2
+.nf
+example% kbd -s Dutch
+example%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRSetting the Keyboard Beeper Frequency
+.sp
+.LP
+The following example sets the keyboard beeper frequency:
+
+.sp
+.in +2
+.nf
+example% kbd -b keyboard 1000
+example%
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/kbd\fR\fR
+.ad
+.RS 20n
+.rt
+Keyboard device file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/default/kbd\fR\fR
+.ad
+.RS 20n
+.rt
+Keyboard default file containing software defaults for keyboard configurations.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBloadkeys\fR(1), \fBsvcs\fR(1), \fBinetd\fR(1M), \fBinetadm\fR(1M),
+\fBkadb\fR(1M), \fBsvcadm\fR(1M), \fBpppd\fR(1M), \fBkeytables\fR(4),
+\fBattributes\fR(5), \fBsmf\fR(5), \fBkb\fR(7M), \fBzs\fR(7D), \fBse\fR(7D),
+\fBasy\fR(7D), \fBvirtualkm\fR(7D)
+.SH NOTES
+.sp
+.LP
+Some server systems have key switches with a \fBsecure\fR key position that can
+be read by system software. This key position overrides the normal default of
+the keyboard abort sequence effect and changes the default so the effect is
+disabled. When the key switch is in the \fBsecure\fR position on these systems,
+the keyboard abort sequence effect cannot be overridden by the software
+default, which is settable with the \fBkbd\fR utility.
+.sp
+.LP
+Currently, there is no way to determine the state of the keyboard click
+setting.
+.sp
+.LP
+The \fBkdb\fR service is managed by the service management facility,
+\fBsmf\fR(5), under the service identifier:
+.sp
+.in +2
+.nf
+svc:/system/keymap:default
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Administrative actions on this service, such as enabling, disabling, or
+requesting restart, can be performed using \fBsvcadm\fR(1M). Responsibility for
+initiating and restarting this service is delegated to \fBinetd\fR(1M). Use
+\fBinetadm\fR(1M) to make configuration changes and to view configuration
+information for this service. The service's status can be queried using the
+\fBsvcs\fR(1) command.
diff --git a/usr/src/man/man1/kdestroy.1 b/usr/src/man/man1/kdestroy.1
new file mode 100644
index 0000000000..6abecc7897
--- /dev/null
+++ b/usr/src/man/man1/kdestroy.1
@@ -0,0 +1,122 @@
+'\" te
+.\" Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
+.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kdestroy 1 "30 Apr 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+kdestroy \- destroy Kerberos tickets
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/kdestroy\fR [\fB-q\fR] [\fB-c\fR \fIcache_name\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkdestroy\fR utility destroys the user's active Kerberos authorization
+tickets by writing zeros to the specified credentials cache that contains them.
+If the credentials cache is not specified, the default credentials cache is
+destroyed. If the credentials cache does not exist, \fBkdestroy\fR displays a
+message to that effect.
+.sp
+.LP
+After overwriting the cache, \fBkdestroy\fR removes the cache from the system.
+The utility displays a message indicating the success or failure of the
+operation. If \fBkdestroy\fR is unable to destroy the cache, it will warn you
+by making your terminal beep.
+.sp
+.LP
+If desired, you can place the \fBkdestroy\fR command in your \fB\&.logout\fR
+file so that your tickets are destroyed automatically when you logout.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcache_name\fR\fR
+.ad
+.RS 17n
+.rt
+Uses \fIcache_name\fR as the credentials (ticket) cache name and location. If
+this option is not used, the default cache name and location are used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 17n
+.rt
+Runs quietly. Your terminal will not beep when \fBkdestroy\fR fails to destroy
+the tickets.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+\fBkdestroy\fR uses the following environment variable:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBKRB5CCNAME\fR\fR
+.ad
+.RS 14n
+.rt
+Location of the credentials (ticket) cache. See \fBkrb5envvar\fR(5) for syntax
+and details.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/krb5cc_\fIuid\fR\fR\fR
+.ad
+.RS 19n
+.rt
+Default credentials cache (\fIuid\fR is the decimal \fBUID\fR of the user).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+_
+Command argumentsEvolving
+_
+Command outputUnstable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkinit\fR(1), \fBklist\fR(1), \fBattributes\fR(5), \fBkerberos\fR(5),
+\fBkrb5envvar\fR(5)
+.SH BUGS
+.sp
+.LP
+Only the tickets in the specified credentials cache are destroyed. Separate
+ticket caches are used to hold root instance and password changing tickets.
+These files should probably be destroyed too, or all of a user's tickets should
+be kept in a single credential cache.
diff --git a/usr/src/man/man1/keylogin.1 b/usr/src/man/man1/keylogin.1
new file mode 100644
index 0000000000..e673230c4e
--- /dev/null
+++ b/usr/src/man/man1/keylogin.1
@@ -0,0 +1,93 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH keylogin 1 "2 Dec 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+keylogin \- decrypt and store secret key with keyserv
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/keylogin\fR [\fB-r\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkeylogin\fR command prompts for a password, and uses it to decrypt the
+user's secret key. The key can be found in the \fB/etc/publickey\fR file (see
+\fBpublickey\fR(4)) or the NIS map ``publickey.byname'' or the NIS+ table
+``cred.org_dir'' in the user's home domain. The sources and their lookup order
+are specified in the \fB/etc/nsswitch.conf\fR file. See \fBnsswitch.conf\fR(4).
+Once decrypted, the user's secret key is stored by the local key server
+process, \fBkeyserv\fR(1M). This stored key is used when issuing requests to
+any secure RPC services, such as \fBNFS\fR or NIS+. The program
+\fBkeylogout\fR(1) can be used to delete the key stored by \fBkeyserv\fR
+\fB\&.\fR
+.sp
+.LP
+\fBkeylogin\fR fails if it cannot get the caller's key, or the password given
+is incorrect. For a new user or host, a new key can be added using
+\fBnewkey\fR(1M), \fBnisaddcred\fR(1M), or \fBnisclient\fR(1M).
+.sp
+.LP
+If multiple authentication mechanisms are configured for the system, each of
+the configured mechanism's secret key is decrypted and stored by
+\fBkeyserv\fR(1M). See \fBnisauthconf\fR(1M) for information on configuring
+multiple authentication mechanisms.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Update the \fB/etc/.rootkey\fR file. This file holds the unencrypted secret key
+of the superuser. Only the superuser can use this option. It is used so that
+processes running as superuser can issue authenticated requests without
+requiring that the administrator explicitly run \fBkeylogin\fR as superuser at
+system startup time. See \fBkeyserv\fR(1M). The \fB-r\fR option should be used
+by the administrator when the host's entry in the publickey database has
+changed, and the \fB/etc/.rootkey\fR file has become out-of-date with respect
+to the actual key pair stored in the publickey database. The permissions on the
+\fB/etc/.rootkey\fR file are such that it can be read and written by the
+superuser but by no other user on the system.
+.sp
+If multiple authentication mechanisms are configured for the system, each of
+the configured mechanism's secret keys is stored in the \fB/etc/.rootkey\fR
+file.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/.rootkey\fR\fR
+.ad
+.RS 17n
+.rt
+superuser's secret key
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchkey\fR(1), \fBkeylogout\fR(1), \fBlogin\fR(1), \fBkeyserv\fR(1M),
+\fBnewkey\fR(1M), \fBnisaddcred\fR(1M), \fBnisauthconf\fR(1M),
+\fBnisclient\fR(1M), \fBnsswitch.conf\fR(4), \fBpublickey\fR(4),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+NIS+ might not be supported in future releases of the Solaris operating system.
+Tools to aid the migration from NIS+ to LDAP are available in the current
+Solaris release. For more information, visit
+http://www.sun.com/directory/nisplus/transition.html.
diff --git a/usr/src/man/man1/keylogout.1 b/usr/src/man/man1/keylogout.1
new file mode 100644
index 0000000000..ad1354bf57
--- /dev/null
+++ b/usr/src/man/man1/keylogout.1
@@ -0,0 +1,62 @@
+'\" te
+.\" Copyright (C) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH keylogout 1 "2 Dec 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+keylogout \- delete stored secret key with keyserv
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/keylogout\fR [\fB-f\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBkeylogout\fR deletes the key stored by the key server process
+\fBkeyserv\fR(1M). Further access to the key is revoked; however, current
+session keys might remain valid until they expire or are refreshed.
+.sp
+.LP
+Deleting the keys stored by \fBkeyserv\fR causes any background jobs or
+scheduled \fBat\fR(1) jobs that need secure RPC services to fail. Since only
+one copy of the key is kept on a machine, it is a bad idea to place a call to
+this command in your \fB\&.logout\fR file since it affects other sessions on
+the same machine.
+.sp
+.LP
+If multiple NIS+ authentication mechanisms are configured for the system, then
+all keys stored by the key server process is deleted, including keys that are
+no longer configured.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Force \fBkeylogout\fR to delete the secret key for the superuser. By default,
+\fBkeylogout\fR by the superuser is disallowed because it would break all RPC
+services, such as \fBNFS,\fR that are started by the superuser.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBat\fR(1), \fBchkey\fR(1), \fBlogin\fR(1), \fBkeylogin\fR(1),
+\fBkeyserv\fR(1M), \fBnewkey\fR(1M), \fBnisauthconf\fR(1M), \fBpublickey\fR(4),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+NIS+ might not be supported in future releases of the Solaris operating system.
+Tools to aid the migration from NIS+ to LDAP are available in the current
+Solaris release. For more information, visit
+http://www.sun.com/directory/nisplus/transition.html.
diff --git a/usr/src/man/man1/kill.1 b/usr/src/man/man1/kill.1
new file mode 100644
index 0000000000..eed72c9a34
--- /dev/null
+++ b/usr/src/man/man1/kill.1
@@ -0,0 +1,690 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kill 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+kill \- terminate or signal processes
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/kill\fR \fB-s\fR \fIsignal_name\fR \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/kill\fR \fB-l\fR [\fIexit_status\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/kill\fR [\fB-\fIsignal_name\fR\fR] \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/kill\fR [\fB-\fIsignal_number\fR\fR] \fIpid\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkill\fR utility sends a signal to the process or processes specified by
+each \fIpid\fR operand.
+.sp
+.LP
+For each \fIpid\fR operand, the \fBkill\fR utility performs actions equivalent
+to the \fBkill\fR(2) function called with the following arguments:
+.RS +4
+.TP
+1.
+The value of the \fIpid\fR operand is used as the \fIpid\fR argument.
+.RE
+.RS +4
+.TP
+2.
+The \fIsig\fR argument is the value specified by the \fB-s\fR option, the
+\fB-\fR\fIsignal_name\fR option, or the \fB-\fR\fIsignal_number\fR option, or,
+if none of these options is specified, by \fBSIGTERM\fR.
+.RE
+.sp
+.LP
+The signaled process must belong to the current user unless the user is the
+super-user.
+.sp
+.LP
+See NOTES for descriptions of the shell built-in versions of \fBkill\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+(The letter ell.) Writes all values of \fIsignal_name\fR supported by the
+implementation, if no operand is specified. If an \fIexit_status\fR operand is
+specified and it is a value of the \fB?\fR shell special parameter and
+\fBwait\fR corresponding to a process that was terminated by a signal, the
+\fIsignal_name\fR corresponding to the signal that terminated the process is
+written. If an \fIexit_status\fR operand is specified and it is the unsigned
+decimal integer value of a signal number, the \fIsignal_name\fR corresponding
+to that signal is written. Otherwise, the results are unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsignal_name\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the signal to send, using one of the symbolic names defined in the
+\fB<signal.h>\fR description. Values of \fIsignal_name\fR is recognized in a
+case-independent fashion, without the \fBSIG\fR prefix. In addition, the
+symbolic name \fB0\fR is recognized, representing the signal value zero. The
+corresponding signal is sent instead of \fBSIGTERM\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIsignal_name\fR\fR
+.ad
+.RS 18n
+.rt
+Equivalent to \fB-s\fR \fIsignal_name\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIsignal_number\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies a non-negative decimal integer, \fIsignal_number\fR, representing the
+signal to be used instead of \fBSIGTERM\fR, as the \fIsig\fR argument in the
+effective call to \fBkill\fR(2).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 15n
+.rt
+One of the following:
+.RS +4
+.TP
+1.
+A decimal integer specifying a process or process group to be signaled. The
+process or processes selected by positive, negative and zero values of the
+\fIpid\fR operand is as described for the kill function. If process number 0 is
+specified, all processes in the process group are signaled. If the first
+\fIpid\fR operand is negative, it should be preceded by \fB\(mi\(mi\fR to keep
+it from being interpreted as an option.
+.RE
+.RS +4
+.TP
+2.
+A job control job \fBID\fR that identifies a background process group to be
+signaled. The job control job \fBID\fR notation is applicable only for
+invocations of \fBkill\fR in the current shell execution environment.
+.RE
+The job control job \fBID\fR type of \fIpid\fR is available only on systems
+supporting the job control option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexit_status\fR\fR
+.ad
+.RS 15n
+.rt
+A decimal integer specifying a signal number or the exit status of a process
+terminated by a signal.
+.RE
+
+.SH USAGE
+.sp
+.LP
+Process numbers can be found by using \fBps\fR(1).
+.sp
+.LP
+The job control job \fBID\fR notation is not required to work as expected when
+\fBkill\fR is operating in its own utility execution environment. In either of
+the following examples:
+.sp
+.in +2
+.nf
+example% \fBnohup kill %1 &\fR
+example% \fBsystem( "kill %1");\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBkill\fR operates in a different environment and does not share the shell's
+understanding of job numbers.
+.SH OUTPUT
+.sp
+.LP
+When the \fB-l\fR option is not specified, the standard output is not be used.
+.sp
+.LP
+When the \fB-l\fR option is specified, the symbolic name of each signal is
+written in the following format:
+.sp
+.in +2
+.nf
+"%s%c", <\fIsignal_name\fR>, <\fIseparator\fR>
+.fi
+.in -2
+
+.sp
+.LP
+where the \fB<\fR\fIsignal_name\fR\fB>\fR is in upper-case, without the
+\fBSIG\fR prefix, and the \fB<\fR\fIseparator\fR\fB>\fR is either a newline
+character or a space character. For the last signal written,
+\fB<\fR\fIseparator\fR\fB>\fR is a newline character.
+.sp
+.LP
+When both the \fB-l\fR option and \fIexit_status\fR operand are specified, the
+symbolic name of the corresponding signal is written in the following format:
+.sp
+.in +2
+.nf
+"%s\en", <\fIsignal_name\fR>
+.fi
+.in -2
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSending the kill signal
+.sp
+.LP
+Any of the commands:
+
+.sp
+.in +2
+.nf
+example% \fBkill -9 100 -165\fR
+example% \fBkill -s kill 100 -165\fR
+example% \fBkill -s KILL 100 -165\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+sends the \fBSIGKILL\fR signal to the process whose process \fBID\fR is
+\fB100\fR and to all processes whose process group \fBID\fR is \fB165\fR,
+assuming the sending process has permission to send that signal to the
+specified processes, and that they exist.
+
+.LP
+\fBExample 2 \fRAvoiding ambiguity with an initial negative number
+.sp
+.LP
+To avoid an ambiguity of an initial negative number argument specifying either
+a signal number or a process group, the former is always be the case.
+Therefore, to send the default signal to a process group (for example,
+\fB123\fR), an application should use a command similar to one of the
+following:
+
+.sp
+.in +2
+.nf
+example% \fBkill -TERM -123\fR
+example% \fBkill -- -123\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBkill\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+At least one matching process was found for each \fIpid\fR operand, and the
+specified signal was successfully processed for at least one matching process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/kill, csh, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBgetconf\fR(1), \fBjobs\fR(1), \fBksh\fR(1), \fBksh93\fR(1),
+\fBps\fR(1), \fBsh\fR(1), \fBshell_builtins\fR(1), \fBwait\fR(1),
+\fBkill\fR(2), \fBsignal\fR(3C), \fBsignal.h\fR(3HEAD), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.SS "/usr/bin/kill"
+.sp
+.LP
+The number of realtime signals supported is defined by the \fBgetconf\fR(1)
+value \fB_POSIX_RTSIG_MAX\fR.
+.SS "sh"
+.sp
+.LP
+The Bourne shell, \fBsh\fR, has a built-in version of \fBkill\fR to provide the
+functionality of the \fBkill\fR command for processes identified with a
+\fIjobid\fR. The \fBsh\fR syntax is:
+.sp
+.in +2
+.nf
+kill [ -sig ] [ pid ] [ %job ]...
+kill -l
+.fi
+.in -2
+.sp
+
+.SS "csh"
+.sp
+.LP
+The C-shell, \fBcsh\fR, also has a built-in \fBkill\fR command, whose syntax
+is:
+.sp
+.in +2
+.nf
+kill [-sig][pid][%job]...
+kill -l
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBcsh\fR \fBkill\fR built-in sends the \fBTERM\fR (terminate) signal, by
+default, or the signal specified, to the specified process \fBID\fR, the
+\fIjob\fR indicated, or the current \fIjob\fR. Signals are either specified by
+number or by name. There is no default. Typing \fBkill\fR does not send a
+signal to the current job. If the signal being sent is \fBTERM\fR (terminate)
+or \fBHUP\fR (hangup), then the job or process is sent a \fBCONT\fR (continue)
+signal as well.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Lists the signal names that can be sent.
+.RE
+
+.SS "ksh"
+.sp
+.LP
+The syntax of the \fBksh\fR \fBkill\fR is:
+.sp
+.in +2
+.nf
+kill [-sig][pid][%job]...
+kill -l
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBksh\fR \fBkill\fR sends either the \fBTERM\fR (terminate) signal or the
+specified signal to the specified jobs or processes. Signals are either
+specified by number or by names (as specified in \fBsignal.h\fR(3HEAD) stripped
+of the \fBSIG\fR prefix). If the signal being sent is \fBTERM\fR (terminate) or
+\fBHUP\fR (hangup), then the job or process is sent a \fBCONT\fR (continue)
+signal if it is stopped. The argument \fIjob\fR can be the process id of a
+process that is not a member of one of the active jobs. In the second form,
+\fBkill\fR \fB-l\fR, the signal numbers and names are listed.
+.SS "ksh93"
+.sp
+.LP
+The syntax of the \fBksh93\fR \fBkill\fR is:
+.sp
+.in +2
+.nf
+kill [-n signum] [-s signame] job ...
+kill [-n signum] [-s signame] -l [arg ...]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+With the first form in which \fB-l\fR is not specified, \fBkill\fR sends a
+signal to one or more processes specified by \fIjob\fR. This normally
+terminates the processes unless the signal is being caught or ignored.
+.sp
+.LP
+Specify \fIjob\fR as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The process id of \fIjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The process group id of \fIjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The job number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+The job whose name begins with \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+The job whose name contains \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%+\fR\fR
+.ad
+.br
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+The current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%-\fR\fR
+.ad
+.RS 12n
+.rt
+The previous job.
+.RE
+
+.sp
+.LP
+If the signal is not specified with either the \fB-n\fR or the \fB-s\fR option,
+the \fBSIGTERM\fR signal is used.
+.sp
+.LP
+If \fB-l\fR is specified, and no \fIarg\fR is specified, then \fBkill\fR writes
+the list of signals to standard output. Otherwise, \fIarg\fR can be either a
+signal name, or a number representing either a signal number or exit status for
+a process that was terminated due to a signal. If a name is specified the
+corresponding signal number is written to standard output. If a number is
+specified the corresponding signal name is written to standard output.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 14n
+.rt
+List signal names or signal numbers rather than sending signals as described
+above. The \fB-n\fR and \fB-s\fR options cannot be specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIsignum\fR\fR
+.ad
+.RS 14n
+.rt
+Specify a signal number to send. Signal numbers are not portable across
+platforms, except for the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+No signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+\fBHUP\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 6n
+.rt
+\fBINT\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 6n
+.rt
+\fBQUIT\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB6\fR\fR
+.ad
+.RS 6n
+.rt
+\fBABRT\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB9\fR\fR
+.ad
+.RS 6n
+.rt
+\fBKILL\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB14\fR\fR
+.ad
+.RS 6n
+.rt
+\fBALRM\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB15\fR\fR
+.ad
+.RS 6n
+.rt
+\fBTERM\fR
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsigname\fR\fR
+.ad
+.RS 14n
+.rt
+Specify a signal name to send. The signal names are derived from their names in
+\fB<signal.h>\fR without the \fBSIG\fR prefix and are case insensitive.
+\fBkill\fR \fB-l\fR generates the list of signals on the current platform.
+.RE
+
+.sp
+.LP
+\fBkill\fR in \fBksh93\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+At least one matching process was found for each job operand, and the specified
+signal was successfully sent to at least one matching process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
diff --git a/usr/src/man/man1/kinit.1 b/usr/src/man/man1/kinit.1
new file mode 100644
index 0000000000..ce3dbcf9cf
--- /dev/null
+++ b/usr/src/man/man1/kinit.1
@@ -0,0 +1,670 @@
+'\" te
+.\" Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
+.\" Portions Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kinit 1 "12 Nov 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+kinit \- obtain and cache Kerberos ticket-granting ticket
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/kinit\fR [\fB-ARvV\fR] [\fB-p\fR | \fB-P\fR] [\fB-f\fR | \fB-F\fR] [\fB-a\fR] [\fB-c\fR \fIcache_name\fR]
+ [\fB-k\fR [\fB-t\fR \fIkeytab_file\fR]] [\fB-l\fR \fIlifetime\fR]
+ [\fB-r\fR \fIrenewable_life\fR] [\fB-s\fR \fIstart_time\fR] [\fB-S\fR \fIservice_name\fR]
+ [\fIprincipal\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkinit\fR command is used to obtain and cache an initial ticket-granting
+ticket (credential) for \fIprincipal\fR. This ticket is used for authentication
+by the Kerberos system. Only users with Kerberos principals can use the
+Kerberos system. For information about Kerberos principals, see
+\fBkerberos\fR(5).
+.sp
+.LP
+When you use \fBkinit\fR without options, the utility prompts for your
+\fIprincipal\fR and Kerberos password, and tries to authenticate your login
+with the local Kerberos server. The \fIprincipal\fR can be specified on the
+command line if desired.
+.sp
+.LP
+If Kerberos authenticates the login attempt, \fBkinit\fR retrieves your initial
+ticket-granting ticket and puts it in the ticket cache. By default your ticket
+is stored in the file \fB/tmp/krb5cc_\fIuid\fR\fR, where \fIuid\fR specifies
+your user identification number. Tickets expire after a specified lifetime,
+after which \fBkinit\fR must be run again. Any existing contents of the cache
+are destroyed by \fBkinit\fR.
+.sp
+.LP
+Values specified in the command line override the values specified in the
+Kerberos configuration file for \fIlifetime\fR and \fIrenewable_life\fR.
+.sp
+.LP
+The \fBkdestroy\fR(1) command can be used to destroy any active tickets before
+you end your login session.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 24n
+.rt
+Requests tickets with the local addresses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 24n
+.rt
+Requests address-less tickets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcache_name\fR\fR
+.ad
+.RS 24n
+.rt
+Uses \fIcache_name\fR as the credentials (ticket) cache name and location. If
+this option is not used, the default cache name and location are used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 24n
+.rt
+Requests forwardable tickets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 24n
+.rt
+Not forwardable. Does not request forwardable tickets.
+.sp
+Tickets that have been acquired on one host cannot normally be used on another
+host. A client can request that the ticket be marked forwardable. Once the
+\fBTKT_FLG_FORWARDABLE\fR flag is set on a ticket, the user can use this ticket
+to request a new ticket, but with a different \fBIP\fR address. Thus, users can
+use their current credentials to get credentials valid on another machine. This
+option allows a user to explicitly obtain a non-forwardable ticket.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR [\fB-t\fR \fIkeytab_file\fR]\fR
+.ad
+.RS 24n
+.rt
+Requests a host ticket, obtained from a key in the local host's \fIkeytab\fR
+file. The name and location of the keytab file can be specified with the
+\fB-t\fR \fIkeytab_file\fR option. Otherwise, the default name and location is
+used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlifetime\fR\fR
+.ad
+.RS 24n
+.rt
+Requests a ticket with the lifetime \fIlifetime\fR. If the \fB-l\fR option is
+not specified, the default ticket lifetime (configured by each site) is used.
+Specifying a ticket lifetime longer than the maximum ticket lifetime
+(configured by each site) results in a ticket with the maximum lifetime. See
+the \fBTime\fR \fBFormats\fR section for the valid time duration formats that
+you can specify for \fIlifetime\fR. See \fBkdc.conf\fR(4) and \fBkadmin\fR(1M)
+(for \fBgetprinc\fR command to verify the lifetime values for the server
+principal).
+.sp
+The lifetime of the tickets returned is the minimum of the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the command line.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the \fBKDC\fR configuration file.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the Kerberos data base for the server principal. In the case
+of \fBkinit\fR, it is \fBkrbtgt/\fIrealm name\fR\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the Kerberos database for the user principal.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 24n
+.rt
+Requests proxiable tickets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 24n
+.rt
+Not proxiable. Does not request proxiable tickets.
+.sp
+A proxiable ticket is a ticket that allows you to get a ticket for a service
+with \fBIP\fR addresses other than the ones in the Ticket Granting Ticket. This
+option allows a user to explicitly obtain a non-proxiable ticket.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIrenewable_life\fR\fR
+.ad
+.RS 24n
+.rt
+Requests renewable tickets, with a total lifetime of \fIrenewable_life\fR. See
+the \fBTime\fR \fBFormats\fR section for the valid time duration formats that
+you can specify for \fIrenewable_life\fR. See \fBkdc.conf\fR(4) and
+\fBkadmin\fR(1M) (for \fBgetprinc\fR command to verify the lifetime values for
+the server principal).
+.sp
+The renewable lifetime of the tickets returned is the minimum of the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the command line.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the \fBKDC\fR configuration file.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the Kerberos data base for the server principal. In the case
+of \fBkinit\fR, it is \fBkrbtgt/\fIrealm name\fR\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Value specified in the Kerberos database for the user principal.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 24n
+.rt
+Requests renewal of the ticket-granting ticket. Notice that an expired ticket
+cannot be renewed, even if the ticket is still within its renewable life.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIstart_time\fR\fR
+.ad
+.RS 24n
+.rt
+Requests a postdated ticket, valid starting at \fIstart_time\fR. Postdated
+tickets are issued with the \fIinvalid\fR flag set, and need to be fed back to
+the \fBKDC\fR before use. See the \fBTime\fR \fBFormats\fR section for either
+the valid absolute time or time duration formats that you can specify for
+\fIstart_time\fR. \fBkinit\fR attempts to match an absolute time first before
+trying to match a time duration.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIservice_name\fR\fR
+.ad
+.RS 24n
+.rt
+Specifies an alternate service name to use when getting initial tickets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 24n
+.rt
+Requests that the ticket granting ticket in the cache (with the \fIinvalid\fR
+flag set) be passed to the \fBKDC\fR for validation. If the ticket is within
+its requested time range, the cache is replaced with the validated ticket.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 24n
+.rt
+Verbose output. Displays further information to the user, such as confirmation
+of authentication and version.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR \fB\fIattribute\fR[=\fIvalue\fR]\fR\fR
+.ad
+.RS 24n
+.rt
+Specifies a pre-authentication attribute and value to be passed to
+pre-authentication plugins. The acceptable \fIattribute\fR and \fIvalue\fR
+values vary from pre-authentication plugin to plugin. This option can be
+specified multiple times to specify multiple attributes. If no value is
+specified, it is assumed to be \fByes\fR.
+.sp
+The following attributes are recognized by the OpenSSL \fBpkinit\fR
+pre-authentication mechanism:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX509_user_identity=URI\fR\fR
+.ad
+.RS 27n
+.rt
+Specifies where to find user's X509 identity information.
+.sp
+Valid URI types are \fBFILE\fR, \fBDIR\fR, \fBPKCS11\fR, \fBPKCS12\fR, and
+\fBENV\fR. See the \fBPKINIT URI Types\fR section for details.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX509_anchors=URI\fR\fR
+.ad
+.RS 27n
+.rt
+Specifies where to find trusted X509 anchor information.
+.sp
+Valid URI types are \fBFILE\fR and \fBDIR\fR. See the\fBPKINIT URI Types\fR
+section for details.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBflag_RSA_PROTOCOL[=yes]\fR\fR
+.ad
+.RS 27n
+.rt
+Specifies the use of RSA, rather than the default Diffie-Hellman protoco.
+.RE
+
+.RE
+
+.SS "PKINIT URI Types"
+.sp
+.ne 2
+.mk
+.na
+\fBFILE:\fIfile-name\fR[,\fIkey-file-name\fR]\fR
+.ad
+.sp .6
+.RS 4n
+This option has context-specific behavior.
+.sp
+.ne 2
+.mk
+.na
+\fBX509_user_identity\fR
+.ad
+.RS 22n
+.rt
+\fIfile-name\fR specifies the name of a PEM-format file containing the user's
+certificate. If \fIkey-file-name\fR is not specified, the user's private key is
+expected to be in \fIfile-name\fR as well. Otherwise, \fIkey-file-name\fR is
+the name of the file containing the private key.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBX509_anchors\fR
+.ad
+.RS 22n
+.rt
+\fIfile-name\fR is assumed to be the name of an OpenSSL-style ca-bundle file.
+The \fBca-bundle\fR file should be base-64 encoded.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBDIR:\fIdirectory-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option has context-specific behavior.
+.sp
+.ne 2
+.mk
+.na
+\fBX509_user_identity\fR
+.ad
+.RS 22n
+.rt
+\fIdirectory-name\fR specifies a directory with files named \fB*.crt\fR and
+\fB*.key\fR, where the first part of the file name is the same for matching
+pairs of certificate and private key files. When a file with a name ending with
+\fB\&.crt\fR is found, a matching file ending with \fB\&.key\fR is assumed to
+contain the private key. If no such file is found, then the certificate in the
+\fB\&.crt\fR is not used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBX509_anchors\fR
+.ad
+.RS 22n
+.rt
+\fIdirectory-name\fR is assumed to be an OpenSSL-style hashed CA directory
+where each CA cert is stored in a file named \fBhash-of-ca-cert.\fR\fI#\fR.
+This infrastructure is encouraged, but all files in the directory are examined
+and if they contain certificates (in PEM format), and are used.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBPKCS12:\fIpkcs12-file-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fIpkcs12-file-nam\fRe is the name of a \fBPKCS #12\fR format file, containing
+the user's certificate and private key.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBPKCS11:[slotid=\fIslot-id\fR][:token=\fItoken-label\fR][:certid=\fIcert-id\fR][:certlabel=\fIcert-label\fR]\fR
+.ad
+.sp .6
+.RS 4n
+All keyword and values are optional. PKCS11 modules (for example,
+\fBopensc-pkcs11.so\fR) must be installed as a crypto provider
+under\fBlibpkcs11\fR(3LIB). \fBslotid=\fR and/or \fBtoken=\fR can be specified
+to force the use of a particular smard card reader or token if there is more
+than one available. \fBcertid=\fR and/or \fBcertlabel=\fR can be specified to
+force the selection of a particular certificate on the device. See the
+\fBpkinit_cert_match\fR configuration option for more ways to select a
+particular certificate to use for \fBpkinit\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBENV:\fIenvironment-variable-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fIenvironment-variable-name\fR specifies the name of an environment variable
+which has been set to a value conforming to one of the previous values. For
+example, \fBENV:X509_PROXY\fR, where environment variable \fBX509_PROXY\fR has
+been set to \fBFILE:/tmp/my_proxy.pem\fR.
+.RE
+
+.SS "Time Formats"
+.sp
+.LP
+The following absolute time formats can be used for the \fB-s\fR
+\fIstart_time\fR option. The examples are based on the date and time of July 2,
+1999, 1:35:30 p.m.
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+Absolute Time FormatExample
+\fIyymmddhhmm\fR[\fIss\fR]990702133530
+\fIhhmm\fR[\fIss\fR]133530
+\fIyy\fR.\fImm\fR.\fBdd\fR.\fIhh\fR.\fImm\fR.\fIss\fR99:07:02:13:35:30
+\fIhh\fR:\fImm\fR[:\fIss\fR]13:35:30
+\fIldate\fR:\fIltime\fR07-07-99:13:35:30
+\fBdd\fR-\fImonth\fR-\fIyyyy\fR:\fIhh\fR:\fImm\fR[:\fIss\fR]02-july-1999:13:35:30
+.TE
+
+.sp
+
+.sp
+.TS
+tab();
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+VariableDescription
+\fBdd\fRday
+\fIhh\fRhour (24-hour clock)
+\fImm\fRminutes
+\fIss\fRseconds
+\fIyy\fRT{
+year within century (0-68 is 2000 to 2068; 69-99 is 1969 to 1999)
+T}
+\fIyyyy\fRyear including century
+\fImonth\fRlocale's full or abbreviated month name
+\fIldate\fRlocale's appropriate date representation
+\fIltime\fRlocale's appropriate time representation
+.TE
+
+.sp
+.LP
+The following time duration formats can be used for the \fB-l\fR
+\fIlifetime\fR, \fB-r\fR \fIrenewable_life\fR, and \fB-s\fR \fIstart_time\fR
+options. The examples are based on the time duration of 14 days, 7 hours, 5
+minutes, and 30 seconds.
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+Time Duration FormatExample
+\fI#\fRd14d
+\fI#\fRh7h
+\fI#\fRm5m
+\fI#\fRs30s
+\fI#\fRd\fI#\fRh\fI#\fRm\fI#\fRs14d7h5m30s
+\fI#\fRh\fI#\fRm[\fI#\fRs]7h5m30s
+\fIdays\fR-\fIhh\fR:\fImm\fR:\fIss\fR14-07:05:30
+\fIhours\fR:\fImm\fR[:\fIss\fR]7:05:30
+.TE
+
+.sp
+
+.sp
+.TS
+tab();
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+DelimiterDescription
+dnumber of days
+hnumber of hours
+mnumber of minutes
+snumber of seconds
+.TE
+
+.sp
+
+.sp
+.TS
+tab();
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+VariableDescription
+\fI#\fRnumber
+\fIdays\fRnumber of days
+\fIhours\fRnumber of hours
+\fIhh\fRhour (24-hour clock)
+\fImm\fRminutes
+\fIss\fRseconds
+.TE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+\fBkinit\fR uses the following environment variable:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBKRB5CCNAME\fR\fR
+.ad
+.RS 14n
+.rt
+Location of the credentials (ticket) cache. See \fBkrb5envvar\fR(5) for syntax
+and details.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/krb5cc_\fIuid\fR\fR\fR
+.ad
+.RS 25n
+.rt
+Default credentials cache (\fIuid\fR is the decimal \fBUID\fR of the user).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.keytab\fR\fR
+.ad
+.RS 25n
+.rt
+Default location for the local host's \fBkeytab\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.conf\fR\fR
+.ad
+.RS 25n
+.rt
+Default location for the local host's configuration file. See
+\fBkrb5.conf\fR(4).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command arguments are Evolving. The command output is Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBkdestroy\fR(1), \fBklist\fR(1), \fBkadmin\fR(1M), \fBktkt_warnd\fR(1M),
+\fBlibpkcs11\fR(3LIB), \fBkdc.conf\fR(4), \fBkrb5.conf\fR(4),
+\fBattributes\fR(5), \fBkerberos\fR(5), \fBkrb5envvar\fR(5), \fBpam_krb5\fR(5)
+.SH NOTES
+.sp
+.LP
+On success, \fBkinit\fR notifies \fBktkt_warnd\fR(1M) to alert the user when
+the initial credentials (ticket-granting ticket) are about to expire.
diff --git a/usr/src/man/man1/klist.1 b/usr/src/man/man1/klist.1
new file mode 100644
index 0000000000..a026d59cc8
--- /dev/null
+++ b/usr/src/man/man1/klist.1
@@ -0,0 +1,380 @@
+'\" te
+.\" Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
+.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH klist 1 "16 Nov 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+klist \- list currently held Kerberos tickets
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/klist\fR [\fB-e\fR]
+ [ [\fB-c\fR] [\fB-f\fR] [\fB-s\fR] [\fB-a\fR [\fB-n\fR]] [\fIcache_name\fR]]
+ [\fB-k\fR [\fB-t\fR] [\fB-K\fR] [\fIkeytab_file\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBklist\fR utility prints the name of the credentials cache, the identity
+of the principal that the tickets are for (as listed in the ticket file), and
+the principal names of all Kerberos tickets currently held by the user, along
+with the issue and expiration time for each authenticator. Principal names are
+listed in the form \fIname\fR\fB/\fR\fIinstance\fR\fB@\fR\fIrealm\fR, with
+the '\fB/\fR' omitted if the instance is not included, and the '\fB@\fR' omitted if
+the realm is not included.
+.sp
+.LP
+If \fIcache_file\fR or \fIkeytab_name\fR is not specified, \fBklist\fR displays
+the credentials in the default credentials cache or keytab files as
+appropriate. By default, your ticket is stored in the file
+\fB/tmp/krb5cc_\fIuid\fR\fR, where \fIuid\fR is the current user-ID of the
+user.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 20n
+.rt
+Displays list of addresses in credentials. Uses the configured nameservice to
+translate numeric network addresses to the associated hostname if possible.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR [\fIcache_name\fR]\fR
+.ad
+.RS 20n
+.rt
+Lists tickets held in a credentials cache. This is the default if neither
+\fB-c\fR nor \fB-k\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 20n
+.rt
+Displays the encryption types of the session key and the ticket for each
+credential in the credential cache, or each key in the keytab file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 20n
+.rt
+Shows the flags present in the credentials, using the following abbreviations:
+.sp
+.ne 2
+.mk
+.na
+\fBa\fR
+.ad
+.RS 5n
+.rt
+Anonymous
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBA\fR
+.ad
+.RS 5n
+.rt
+Pre-authenticated
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBd\fR
+.ad
+.RS 5n
+.rt
+Post-dated
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBD\fR
+.ad
+.RS 5n
+.rt
+Post-dateable
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBf\fR
+.ad
+.RS 5n
+.rt
+Forwarded
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBF\fR
+.ad
+.RS 5n
+.rt
+Forwardable
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBH\fR
+.ad
+.RS 5n
+.rt
+Hardware authenticated
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBi\fR
+.ad
+.RS 5n
+.rt
+Invalid
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBI\fR
+.ad
+.RS 5n
+.rt
+Initial
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBO\fR
+.ad
+.RS 5n
+.rt
+Okay as delegate
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBp\fR
+.ad
+.RS 5n
+.rt
+Proxy
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBP\fR
+.ad
+.RS 5n
+.rt
+Proxiable
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBR\fR
+.ad
+.RS 5n
+.rt
+Renewable
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBT\fR
+.ad
+.RS 5n
+.rt
+Transit policy checked
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR [\fIkeytab_file\fR]\fR
+.ad
+.RS 20n
+.rt
+List keys held in a \fBkeytab\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR\fR
+.ad
+.RS 20n
+.rt
+Displays the value of the encryption key in each keytab entry in the keytab
+file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 20n
+.rt
+Shows numeric \fBIP\fR addresses instead of reverse-resolving addresses. Only
+valid with \fB-a\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 20n
+.rt
+Causes \fBklist\fR to run silently (produce no output), but to still set the
+exit status according to whether it finds the credentials cache. The exit
+status is \fB0\fR if \fBklist\fR finds a credentials cache, and `\fB1\fRif it
+does not, or if the local-realm TGT has expired.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 20n
+.rt
+Displays the time entry timestamps for each keytab entry in the keytab file.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+\fBklist\fR uses the following environment variable:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBKRB5CCNAME\fR\fR
+.ad
+.RS 14n
+.rt
+Location of the credentials (ticket) cache. See \fBkrb5envvar\fR(5) for syntax
+and details.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/krb5cc_\fIuid\fR\fR\fR
+.ad
+.RS 25n
+.rt
+Default credentials cache (\fIuid\fR is the decimal \fBUID\fR of the user).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.keytab\fR\fR
+.ad
+.RS 25n
+.rt
+Default location for the local host's \fBkeytab\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.conf\fR\fR
+.ad
+.RS 25n
+.rt
+Default location for the local host's configuration file. See
+\fBkrb5.conf\fR(4).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command arguments are Evolving. The command output is Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBkdestroy\fR(1), \fBkinit\fR(1), \fBkrb5.conf\fR(4), \fBattributes\fR(5),
+\fBkrb5envvar\fR(5), \fBkerberos\fR(5)
+.SH BUGS
+.sp
+.LP
+When reading a file as a service key file, very little error checking is
+performed.
diff --git a/usr/src/man/man1/kmdb.1 b/usr/src/man/man1/kmdb.1
new file mode 100644
index 0000000000..db004bb384
--- /dev/null
+++ b/usr/src/man/man1/kmdb.1
@@ -0,0 +1,501 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kmdb 1 "3 May 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+kmdb \- in situ kernel debugger
+.SH SYNOPSIS
+.SS "Boot-time Loading"
+.sp
+.LP
+SPARC
+.LP
+.nf
+\fBok boot\fR [\fIdevice-specifier\fR] \fB-k\fR [\fB-d\fR] [\fIboot-flags\fR]
+.fi
+
+.LP
+.nf
+\fBok boot\fR [\fIdevice-specifier\fR] kmdb [\fB-d\fR] [\fIboot-flags\fR]
+.fi
+
+.sp
+.LP
+x86
+.LP
+.nf
+\fBkernel$\fR \fB/platform/i86pc/kernel/$ISADIR/unix\fR \fB-k\fR [\fB-d\fR] [\fIboot-flags\fR]
+.fi
+
+.SS "Runtime Loading"
+.LP
+.nf
+\fBmdb\fR \fB-K\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBkmdb\fR is an interactive kernel debugger which implements the user
+interface and functionality of \fBmdb\fR(1) in a live kernel context.
+\fBkmdb\fR provides features that allow for the control of kernel execution and
+for the inspection and modification of live kernel state. \fBkmdb\fR can be
+loaded at the beginning of a boot session or after the system is booted.
+.sp
+.LP
+This man page describes the features and functionality that are unique to
+\fBkmdb\fR or different in \fBkmdb\fR as compared to \fBmdb\fR(1). For more
+information on \fBmdb\fR(1) or further details on the features and
+functionality implemented by \fBkmdb\fR, see the \fBmdb\fR(1) man page and the
+\fISolaris Modular Debugger Guide\fR.
+.SS "Loading and Unloading"
+.sp
+.ne 2
+.mk
+.na
+\fBBoot-time Loading\fR
+.ad
+.RS 21n
+.rt
+When requested, the kernel runtime linker (\fBkrtld\fR) loads \fBkmdb\fR prior
+to the transfer of control to the kernel. If the \fB-d\fR flag is used, the
+debugger gains control of the system prior to the execution of the initial
+function in the 'unix' object. If \fB-d\fR is not used, \fBkmdb\fR is loaded
+but does not gain control until such time as it is explicitly entered. See the
+Debugger Entry section below. For a list of the boot commands which cause
+\fBkmdb\fR to be loaded at boot, see the SYNOPSIS section above.
+.sp
+Boot-loaded \fBkmdb\fR can be unloaded only by means of a system reboot.
+.sp
+Some features of \fBkmdb\fR rely on the presence of kernel services and are not
+immediately available to boot-loaded \fBkmdb\fR. In particular, the loading and
+unloading of dmods is not available until the module subsystem is initialized.
+Requests are queued until they can be processed. Similarly, translation of
+virtual addresses to physical addresses is not be available until the VM system
+has been initialized. Attempted translations fail until translation facilities
+are available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBRun-time Loading\fR
+.ad
+.RS 21n
+.rt
+\fBkmdb\fR can also be loaded after the system has booted, using the \fB-K\fR
+flag to \fBmdb\fR(1). When loaded in this fashion, it will immediately gain
+control of the system. Run-time-loaded \fBkmdb\fR can be unloaded using the
+\fB-U\fR flag to \fBmdb\fR(1) or from within the debugger with the \fB-u\fR
+flag to the \fB::quit dcmd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBTerminal types\fR
+.ad
+.RS 21n
+.rt
+When loaded, \fBkmdb\fR attempts to determine the proper terminal type in use
+on the system console. If the system being debugged has an attached keyboard
+and local display that are both used for the system console, \fBkmdb\fR uses
+the terminal type appropriate for the machine: 'sun' for SPARC; 'sun-color' for
+x86. When a serial console is in use, boot-loaded \fBkmdb\fR defaults to a
+terminal type 'vt100'. Run-time-loaded \fBkmdb\fR defaults to the terminal type
+requested by \fBmdb\fR(1). \fBmdb\fR(1) requests the terminal type specified by
+the value of the \fBTERM\fR environment variable unless overridden by the
+\fB-T\fR flag. \fB::term\fR can be used to view the current terminal type.
+.RE
+
+.SS "Debugger Entry"
+.sp
+.LP
+Debugger entry can be requested explicitly or implicitly. Implicit entry,
+encountered when breakpoints or other execution control features are used, is
+discussed in the \fBExecution Control\fR section.
+.sp
+.LP
+The primary means for explicit debugger entry is with the keyboard abort
+sequence for systems with local consoles and the BREAK character for those with
+serial consoles. The abort sequence is STOP-A or Shift-Pause for SPARC systems
+with local consoles, and F1-A or Shift-Pause for x86 systems with local
+consoles. See \fBkbd\fR(1) for a discussion of the abort sequence and for
+instructions on disabling it.
+.sp
+.LP
+A second way to request entry into the debugger is with the \fBmdb\fR(1)
+command. Invocations of \fBmdb\fR(1) with the \fB-K\fR flag after the debugger
+is loaded trigger debugger entry.
+.sp
+.LP
+If the kernel panics and \fBkmdb\fR is loaded, by default, the panic routine
+enters \fBkmdb\fR for live debugging. If a dump device is specified, and you
+enter \fB::cont\fR, the debugger exits and a crash dump is performed. To
+prevent the kernel from entering \fBkmdb\fR when panicking, you can set the
+\fBnopanicdebug\fR variable to \fB1\fR. Set the \fBnopanicdebug\fR variable to
+\fB1\fR using \fBkmdb\fR or including the following a line in
+\fB/etc/system\fR:
+.sp
+.in +2
+.nf
+set nopanicdebug = 1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This can be useful if you want to keep \fBkmdb\fR loaded, but always want a
+panic to trigger a crash dump without entering the debugger.
+.SS "Execution Control"
+.sp
+.LP
+For the most part, the execution control facilities provided by \fBkmdb\fR for
+the kernel mirror those provided by the \fBmdb\fR(1) process target.
+Breakpoints (\fB::bp\fR), watchpoints (\fB::wp\fR), \fB::continue\fR, and the
+various flavors of \fB::step\fR can be used.
+.sp
+.LP
+In contrast to the unlimited user process watchpoints supplied by the kernel,
+\fBkmdb\fR is restricted to a set of CPU watchpoints that limit the number,
+size, and type of watchpoints allowed. The \fB::wp\fR command does not allow a
+watchpoint to be created if it is incompatible with the watchpoints supported
+by the hardware.
+.SS "Debugger modules (dmods)"
+.sp
+.LP
+As with \fBmdb\fR(1), \fBkmdb\fR is installed with a number of
+subsystem-specific debugger modules, or dmods. The dmods are loaded and
+unloaded automatically with the loading and unloading of the subsystems that
+they support. The dmods can also be explicitly loaded and unloaded using
+\fB::load\fR and \fB::unload\fR.
+.sp
+.LP
+\fBkmdb\fR uses kernel facilities to load and unload dmods and must resume
+system execution to perform each requested action. When a dmod load or unload
+is complete, the system is stopped and the debugger is automatically
+re-entered. For a dmod load, processing is completed when the load of a
+requested dmod succeeds or fails. Status messages are provided in either case.
+.SS "Processor-specific functionality"
+.sp
+.LP
+Some functionality is specific to an individual processor type. An example of
+such functionality is the branch tracing provided by various x86 processors.
+Access to these processor-specific features is provided with processor-specific
+dcmds that are present only on systems that support them. The availability of
+processor-specific support is indicated in the output of the \fB::status
+dcmd\fR. The debugger relies on the kernel to determine the processor type.
+Even though the debugger might provide support for a given processor type, the
+support is not exposed until the kernel has progressed to the point at which
+processor identification has completed.
+.SS "Kernel Macros"
+.sp
+.LP
+The debugger provides access to a set of macros that are precompiled into the
+debugger. Only the precompiled macros are available . Unlike with \fBmdb\fR(1),
+the \fB$< dcmd\fR may not be used to load macros from arbitrary locations. Use
+the \fB$M\fR command to list the available macros.
+.SS "Built-in dcmds"
+.sp
+.LP
+This section lists dcmds that are unique to \fBkmdb\fR or those with behavior
+that differs in \fBkmdb\fR as compared to \fBmdb\fR(1).
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIaddress\fR]\fB::bp [+/-dDestT]\fR [\fB-c\fR \fIcmd\fR] [\fB-n\fR
+\fIcount\fR] \fIsym\fR ...\fR
+.ad
+.br
+.na
+\fB\fIaddress\fR \fB:b [\fR\fIcmd\fR \fB\&...]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set a breakpoint at the specified locations. The \fB::bp\fR dcmd sets a
+breakpoint at each address or symbol specified, including an optional address
+specified by an explicit expression preceding the dcmd, and each string or
+immediate value following the dcmd. The arguments can be symbol names or
+immediate values denoting a particular virtual address of interest.
+.sp
+If a symbol name is specified, the name may refer to a symbol that cannot yet
+be evaluated. It might consist of an object name and function name in a load
+object that has not yet been opened. In such a case, the breakpoint is deferred
+and is not active in the target until an object matching the given name is
+loaded. The breakpoint is automatically enabled when the load object is opened.
+.sp
+The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR, \fB-c\fR, and
+\fB-n\fR options have the same meaning as they do for the \fB::evset\fR dcmd.
+See \fBmdb\fR(1) for a description of \fB::evset\fR. If the \fB:b\fR form of
+the dcmd is used, a breakpoint is set only at the virtual address specified by
+the expression preceding the dcmd. The arguments following the \fB:b\fR dcmd
+are concatenated together to form the callback string. If this string contains
+meta-characters, it must be quoted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::branches\fR [\fB-v\fR]\fR
+.ad
+.br
+.na
+\fB(x86 only)\fR
+.ad
+.sp .6
+.RS 4n
+Display the last branches taken by the CPU. This dcmd is supported only on x86
+systems, and is available only when processor-specific support is detected and
+enabled. The number and type of branches displayed is dependent on the
+capabilities of the branch tracing facilities provided by the CPU. When the
+\fB-v\fR option is used, the instructions prior to a given branch are
+displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIfunction\fR] \fB::call\fR [\fIarg\fR [\fIarg\fR ...]]\fR
+.ad
+.sp .6
+.RS 4n
+Call the specified function using the specified arguments. The called function
+must be listed as a function in the symbol table for a loaded module. String
+arguments are passed by reference. When the call completes, the return value of
+the function is displayed.
+.sp
+This dcmd must be used with extreme caution. The kernel will not be resumed
+when the call is made. The function being called may not make any assumptions
+regarding the availability of any kernel services, and must not perform
+operations or calls that may block. The user must also beware of any
+side-effects introduced by the called function, as kernel stability might be
+affected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIaddr\fR] \fB::cpuregs\fR [\fB-c\fR \fIcpuid\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Display the current general purpose register set for the specified CPU, in the
+format used by \fB::regs\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIaddr\fR] \fB::cpustack\fR [\fB-c\fR \fIcpuid\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print a C stack backtrace for the specified CPU. The backtrace displayed is for
+the point at which the specified CPU entered or was stopped by the debugger.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddr\fR[,\fIlen\fR] \fB::in\fR [\fB-L\fR \fIlen\fR]\fR
+.ad
+.br
+.na
+\fB(x86 only)\fR
+.ad
+.sp .6
+.RS 4n
+Read \fIlen\fR bytes from the I/O port specified by \fIaddr\fR. The value of
+the \fB-L\fR option, if provided, takes precedence over the value of the repeat
+count. The read length must be 1, 2, or 4 bytes, and the port address must have
+the same alignment as the length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddr\fR[,\fIlen\fR] \fB::out\fR [\fB-L\fR \fIlen\fR] \fIvalue\fR\fR
+.ad
+.br
+.na
+\fB(x86 only)\fR
+.ad
+.sp .6
+.RS 4n
+Write value to the len-byte I/O port specified by \fIaddr\fR. The value of the
+\fB-L\fR option, if provided, takes precedence over the value of the repeat
+count. The write length must be 1, 2, or 4 bytes and the port address must have
+the same alignment as the length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::quit\fR [\fB-u\fR]\fR
+.ad
+.br
+.na
+\fB\fB$q\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes the debugger to exit. When the \fB-u\fR option is used, the system is
+resumed and the debugger is unloaded. The \fB-u\fR option may not be used if
+the debugger was loaded at boot. When the \fB-u\fR option is not used, SPARC
+systems will exit to the boot PROM \fBok\fR prompt. The \fBgo\fR command can be
+used to re-enter the debugger. On x86 systems, a prompt is displayed that
+requests permission to reboot the machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::step [over|out|branch]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Step the target one instruction. The optional \fBover\fR argument is used to
+step over subroutine calls. When the optional \fBout\fR argument is specified,
+the target program continues until control returns from the current function.
+.sp
+The optional \fBbranch\fR argument is available only on x86 systems when
+processor-specific support is detected and enabled. When \fB::step branch\fR is
+specified, the target program continues until the next branching instruction is
+encountered.
+.sp
+On SPARC systems, the \fB::step dcmd\fR may not be used to step 'ta'
+instructions. Similarly, it may not be used on x86 systems to step 'int'
+instructions. If the step results in a trap that cannot be resolved by the
+debugger, a message to that effect is printed and the step will fail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcpuid::switch\fR\fR
+.ad
+.br
+.na
+\fB\fBcpuid:x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use the specified CPU as the representative. Stack traces, general purpose
+register dumps, and similar functionality use the new representative CPU as the
+data source. Full execution control functionality is available on the new
+representative CPU.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::term\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the current terminal type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddr\fR\fB[,\fR\fIlen\fR]\fB::wp [+/-dDestT]\fR [\fB-rwx\fR] [\fB-pi\fR]
+[\fB-n\fR \fIcount\fR] [\fB-c\fR \fIcmd\fR]\fR
+.ad
+.br
+.na
+\fB\fB\fIaddr\fR[,\fIlen\fR]\fR\fB:a [\fIcmd\fR\fR \fB\&...]\fR\fR
+.ad
+.br
+.na
+\fB\fB\fIaddr\fR[,\fIlen\fR]\fR\fB:p [\fIcmd\fR\fR \fB\&...]\fR\fR
+.ad
+.br
+.na
+\fB\fB\fIaddr\fR[,\fIlen\fR]\fR\fB:w [\fIcmd\fR\fR \fB\&...]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set a watchpoint at the specified address, interpreted by default as a virtual
+address. If the \fB-p\fR option is used, the address is interpreted as a
+physical address. On x86 platforms, watchpoints can be set on I/O ports using
+the \fB-i\fR option. When the \fB-i\fR option is used, the address is
+interpreted as that of an I/O port.
+.sp
+The length in bytes of the watched region can be set by specifying an optional
+repeat count preceding the dcmd. If no length is explicitly set, the default is
+one byte. The \fB::wp\fR dcmd allows the watchpoint to be configured to trigger
+on any combination of read (\fB-r\fR option), write (\fB-w\fR option), or
+execute (\fB-x\fR option) access.
+.sp
+The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR, \fB-c\fR, and
+\fB-n\fR options have the same meaning as they do for the \fB::evset\fR dcmd.
+See \fBmdb\fR(1) for a description of \fB::evset\fR. The \fB:a\fR dcmd sets a
+read access watchpoint at the specified address. The \fB:p\fR dcmd sets an
+execute access watchpoint at the specified address. The \fB:w\fR dcmd sets a
+write access watchpoint at the specified address. The arguments following the
+\fB:a\fR, \fB:p\fR, and \fB:w\fR dcmds are concatenated together to form the
+callback string. If the string contains meta-characters, it must be quoted.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmdb\fR(1), \fBboot\fR(1M), \fBdumpadm\fR(1M), \fBkernel\fR(1M),
+\fBsystem\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fISolaris Modular Debugger Guide\fR
+.SS "SPARC Only"
+.sp
+.LP
+\fBkbd\fR(1)
+.SH NOTES
+.SS "Limitations on Memory Available to the Debugger"
+.sp
+.LP
+The memory region available to the debugger is allocated when the debugger is
+loaded, and is fixed at that point. If dcmds attempt to allocate more memory
+than is available, they will, if possible, be terminated. The debugger will
+attempt to recover gracefully from an out-of-memory situation, but may be
+unable to, and may be forced to terminate the system. This constraint is
+especially acute on 32-bit x86 systems.
+.SS "Performance Impact"
+.sp
+.LP
+System performance will be negatively impacted by the loading of \fBkmdb\fR, as
+the debugger will consume kernel memory and other limited system resources.
diff --git a/usr/src/man/man1/kmfcfg.1 b/usr/src/man/man1/kmfcfg.1
new file mode 100644
index 0000000000..5ff293370f
--- /dev/null
+++ b/usr/src/man/man1/kmfcfg.1
@@ -0,0 +1,897 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kmfcfg 1 "3 Feb 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+kmfcfg \- Key Management Policy and Plugin Configuration Utility
+.SH SYNOPSIS
+.LP
+.nf
+\fBkmfcfg\fR \fIsubcommand\fR [\fIoption\fR ...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkmfcfg\fR command allows users to configure Key Management Framework
+(KMF) policy databases. The KMF policy database (DB) restricts the use of keys
+and certificates that are managed through the KMF framework.
+.sp
+.LP
+\fBkmfcfg\fR provides the ability to list, create, modify, delete, import and
+export policy definitions either in the system default database file
+\fB/etc/security/kmfpolicy.xml\fR or a user-defined database file.
+.sp
+.LP
+For plugin configuration, \fBkmfcfg\fR allows users to display plugin
+information, install or uninstall a KMF plugin, and modify the plugin option.
+.SH SUBCOMMANDS
+.sp
+.LP
+The following subcommands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcreate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Adds a new policy into the policy database file.
+.sp
+The format for the \fBcreate\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+create [dbfile=\fIdbfile\fR] policy=\fIpolicyname\fR
+ [ignore-date=true|false]
+ [ignore-unknown-eku=true|false]
+ [ignore-trust-anchor=true|false]
+ [validity-adjusttime=\fIadjusttime\fR]
+ [ta-name=trust anchor subject DN]
+ [ta-serial=trust anchor serial number]
+ [ocsp-responder=\fIURL\fR]
+ [ocsp-proxy=\fIURL\fR]
+ [ocsp-use-cert-responder=true|false]
+ [ocsp-response-lifetime=timelimit]
+ [ocsp-ignore-response-sign=true|false]
+ [ocsp-responder-cert-name=Issuer DN]
+ [ocsp-responder-cert-serial=\fIserial number\fR]
+ [crl-basefilename=\fIbasefilename\fR]
+ [crl-directory=\fIdirectory\fR]
+ [crl-get-crl-uri=true|false]
+ [crl-proxy=\fIURL\fR]
+ [crl-ignore-crl-sign=true|false]
+ [crl-ignore-crl-date=true|false]
+ [keyusage=digitalSignature|nonRepudiation
+ |keyEncipherment | dataEncipherment |
+ keyAgreement |keyCertSign |
+ cRLSign | encipherOnly | decipherOnly],[...]
+ [ekunames=serverAuth | clientAuth |
+ codeSigning | emailProtection |
+ ipsecEndSystem | ipsecTunnel |
+ ipsecUser | timeStamping |
+ OCSPSigning],[...]
+ [ekuoids=\fIOID,OID,OID...\fR]
+.fi
+.in -2
+.sp
+
+The \fBcreate\fR subcommand supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrl-basefilename=\fR\fIfilename\fR\fR
+.ad
+.br
+.na
+\fB\fBcrl-directory=\fR\fIdirectory\fR\fR
+.ad
+.sp .6
+.RS 4n
+These two attributes are used to specify the location for CRL files. The
+\fBcrl-basefilename\fR attribute represents the base filename for a CRL file.
+The \fBcrl-directory\fR attribute represents the directory for CRL files, which
+defaults to the current directory.
+.sp
+If the \fBcrl-get-crl-uri\fR attribute is set to \fBtrue\fR and the
+\fBcrl-basefilename\fR is not specified, the \fBbasefilename\fR for the cached
+CRL file is the basename of the URI used to fetch the CRL file.
+.sp
+If the \fBcrl-get-crl-uri\fR attribute is set to \fBfalse\fR the
+\fBcrl-basefilename\fR needs to be specified to indicate an input CRL file. The
+setting for \fBcrl-get-crl-uri\fR is \fBfalse\fR by default.
+.sp
+These two attributes only apply to the file-based CRL plugins. The current
+file-based CRL plugins are \fBfile\fR and \fBpkcs11\fR keystores. For the
+\fBnss\fR keystore, the CRL location is always the NSS internal database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrl-get-crl-uri=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+Configure if a CRL file is fetched and cached dynamically as part of the
+certificate validation, using the URI information from the certificate's
+distribution points extension.
+.sp
+The default for this attribute is \fBfalse\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrl-ignore-crl-date=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBcrl-ignore-crl-date\fR is set to true, the validity time period of the
+CRL is not checked.
+.sp
+The default for this attribute is \fBfalse\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrl-ignore-crl-sign=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBcrl-ignore-crl-sign\fR is set to \fBtrue\fR, the signature of the CRL is
+not checked.
+.sp
+The default for this attribute is \fBfalse\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrl-proxy=\fR \fIURL\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the proxy server name and port for dynamically retrieving a CRL file when
+\fBcrl-get-crl-uri\fR is set to \fBtrue\fR.
+.sp
+The port number is optional. If the port number is not specified, the default
+value is \fB8080\fR. An example \fBcrl-proxy\fR setting might be:
+\fBcrl-proxy=webcache.sfbay:8080\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdbfile=\fR\fIdbfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+The DB file to add the new policy. If not specified, the default is the system
+KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBekuoids=\fR\fIEKUOIDS\fR\fR
+.ad
+.sp .6
+.RS 4n
+A comma separated list of Extended Key Usage OIDs that are required by the
+policy being defined. The OIDs are expressed in \fBdot notation\fR, for
+example, \fB1.2.3.4\fR. An example \fBekuoids\fR setting might be:
+\fBekuoids=1.2.3.4,9.8.7.6.5\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBekunames=\fR\fIEKUNAMES\fR\fR
+.ad
+.sp .6
+.RS 4n
+A comma separated list of Extended Key Usage names that are required by the
+policy being defined. The list of values allowed for \fIEKUNAMES\fR are:
+\fBserverAuth\fR, \fBclientAuth\fR, \fBcodeSigning\fR, \fBemailProtection\fR,
+\fBipsecEndSystem\fR, \fBipsecTunnel\fR, \fBipsecUser\fR, \fBtimeStamping\fR,
+and \fBOCSPSigning\fR
+.sp
+The OCSP, CRL, key usage and extended key usage checkings are off by default.
+To turn on any one of them, specify one or more attributes for the particular
+checking. For example, if the \fBocsp-responder\fR attribute is set, then the
+OCSP checking is turned on. If the \fBekuname\fR attribute or the \fBekuoids\fR
+attribute is set, then the extended key usage checking is turned on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignore-date=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the \fBIgnore Date\fR option for this policy. By default this value is
+\fBfalse\fR. If \fBtrue\fR is specified, the policy ignores the validity
+periods defined in the certificates when evaluating their validity.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignore-unknown-eku=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the \fBIgnore Unknown EKU\fR option for this policy. By default this value
+is \fBfalse\fR. If \fBtrue\fR, the policy ignores any unrecognized EKU values
+in the Extended Key Usage extension.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignore-trust-anchor=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the \fBIgnore Trust Anchor\fR option for this policy. By default this value
+is \fBfalse\fR. If \fBtrue\fR is specified, the policy does not verify the
+signature of the subject certificate using trust anchor certificate at
+validation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyusage=\fR\fIKUVALUES\fR\fR
+.ad
+.sp .6
+.RS 4n
+A comma separated list of key usage values that are required by the policy
+being defined. The list of values allowed are: \fBdigitalSignature\fR,
+\fBnonRepudiation\fR, \fBkeyEncipherment\fR, \fBdataEncipherment\fR,
+\fBkeyAgreement\fR, \fBkeyCertSign\fR, \fBcRLSign\fR, \fBencipherOnly\fR,
+\fBdecipherOnly\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBocsp-ignore-response-sign=true | false\fR\fR
+.ad
+.sp .6
+.RS 4n
+If this attribute is set to \fBtrue\fR, the signature of the OCSP response is
+not verified. This attribute value is default to \fBfalse\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBocsp-proxy=\fR\fIURL\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the proxy server name and port for OCSP. The port number is optional. If
+the port number is not specified, the default value is 8080. An example
+\fBocsp-proxy\fR setting might be: \fBocsp-proxy="webcache.sfbay:8080"\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBocsp-response-lifetime=\fR\fItimelimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the \fBfreshness\fR period that a response must be. The \fItimelimit\fR can
+be specified by \fInumber-day\fR, \fInumber-hour\fR, \fInumber-minute\fR, or
+\fInumber-second\fR. An example \fBocsp-response-lifetime\fR setting might
+be:\fBocsp-response-lifetime=6-hour\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBocsp-responder-cert-name=\fR\fIIssuerDN\fR\fR
+.ad
+.br
+.na
+\fB\fBocsp-responder-cert-serial=\fR\fIserialNumber\fR\fR
+.ad
+.sp .6
+.RS 4n
+These two attributes represent the OCSP responder certificate. The
+\fBocsp-responder-cert-name\fR is to specify the issuer name of the
+certificate. See the \fBta-name\fR option for example. The
+\fIocsp-responder-cert-serial\fR is for the serial number and must be specified
+as a hex value, for example, \fB0x0102030405060708090a0b0c0d0e0f\fR. If an OCSP
+responder is different from the issuer of the certificate and if the OCSP
+response needs to be verified, an OCSP responder certificate information should
+be provided.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBocsp-responder=\fR\fIURL\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the OCSP responder URL for use with the OCSP validation method. For
+example, \fBocsp-responder=http://ocsp.verisign.com/ocsp/status\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBo\fBcsp-use-cert-responder=true | fals\fRe\fR
+.ad
+.sp .6
+.RS 4n
+Configure this policy to always use the responder defined in the certificate
+itself if possible.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpolicy=\fR\fIpolicyname\fR\fR
+.ad
+.sp .6
+.RS 4n
+The policy record to be created. \fIpolicyname\fR is required.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvalidity-adjusttime=\fR\fIadjusttime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the adjust time for both ends of validity period for a certificate. The
+time can be specified by \fInumber-day, number-hour, number-minute, or
+number-second\fR. An example \fBvalidity-adjusttime\fR setting might be:
+\fBvalidity-adjusttime=6-hour. ta-name="Subject DN" ta-serial=serialNumber\fR
+.sp
+These two attributes represent the trust anchor certificate and are used to
+find the trust anchor certificate in the keystore. The \fIta-name\fR is to
+specify the distinguished name of the trust anchor certificate subject name.
+For example, \fBta-name="O=Sun Microsystems Inc., \ OU=Solaris Security
+Technologies Group, \ L=Ashburn, ST=VA, C=US, CN=John Smith"\fR The serial
+number of the TA certificate. This, along with the Issuer DN, is used to find
+the TA certificate in the keystore. The serial number must be specified as a
+hex value, for example, \fB0x0102030405060708090a0b0c0d0e\fR The trust anchor
+attributes need to be set, if the value of \fBignore-trust-anchor\fR attribute
+is false.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdelete\fR\fR
+.ad
+.sp .6
+.RS 4n
+Deletes any policy matching the indicated policy name. The system default
+policy (\fBdefault\fR) cannot be deleted.
+.sp
+The format for the \fBdelete\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+delete [dbfile=\fIdbfile\fR] policy=\fIpolicyname\fR
+.fi
+.in -2
+.sp
+
+The \fBdelete\fR subcommand supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fBdbfile=\fIdbfile\fR\fR
+.ad
+.RS 21n
+.rt
+Read policy definitions from the indicated file. If \fIdbfile\fR is not
+specified, , the default is the system KMF policy database file:
+\fB/etc/security/kmfpolicy.xml\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpolicy=\fIpolicyname\fR\fR
+.ad
+.RS 21n
+.rt
+The name of the policy to delete. \fIpolicyname\fR is required, if using the
+system database.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Exports a policy from one policy database file to another policy database file.
+.sp
+The format for the \fBexport\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+kmfcfg export policy=\fIpolicyname\fR outfile=\fInewdbfile\fR [dbfile=\fIdbfile\fR]
+.fi
+.in -2
+.sp
+
+The \fBexport\fR subcommand supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fBdbfile=\fIdbfile\fR\fR
+.ad
+.RS 24n
+.rt
+The DB file where the exported policy is read. If \fIdbfile\fR is not
+specified, the default is the system KMF policy database file:
+\fB/etc/security/kmfpolicy.xml\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBoutfile=\fIoutputdbfile\fR\fR
+.ad
+.RS 24n
+.rt
+The DB file where the exported policy is stored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpolicy=\fIpolicyname\fR\fR
+.ad
+.RS 24n
+.rt
+The policy record to be exported.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhelp\fR\fR
+.ad
+.sp .6
+.RS 4n
+Displays help for the \fBkmfcfg\fR command.
+.sp
+The format for the \fBhelp\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+help
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Imports a policy from one policy database file to another policy database file.
+.sp
+The format for the \fBimport\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+kmfcfg import policy=\fIpolicyname\fR infile=\fIinputdbfile\fR [dbfile=\fIdbfile\fR]
+.fi
+.in -2
+.sp
+
+The \fBimport\fR subcommand supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fBpolicy=\fIpolicyname\fR\fR
+.ad
+.RS 22n
+.rt
+The policy record to be imported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBinfile=\fIinputdbfile\fR\fR
+.ad
+.RS 22n
+.rt
+The DB file to read the policy from.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdbfile=\fIoutdbfile\fR\fR
+.ad
+.RS 22n
+.rt
+The DB file to add the new policy. If not specified, the default is the system
+KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist\fR\fR
+.ad
+.sp .6
+.RS 4n
+Without arguments, lists all policy definitions from the default system
+database.
+.sp
+The format for the \fBlist\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+list [dbfile=\fIdbfile\fR] [policy=\fIpolicyname\fR]
+.fi
+.in -2
+.sp
+
+The \fBlist\fR subcommand supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fBdbfile=\fIdbfile\fR\fR
+.ad
+.RS 21n
+.rt
+Reads policy definitions from the indicated file. If not specified, the default
+is the system KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpolicy=\fIpolicyname\fR\fR
+.ad
+.RS 21n
+.rt
+Only display policy definition for the named policy.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmodify\fR\fR
+.ad
+.sp .6
+.RS 4n
+Modifies any policy matching the indicated name. The system default policy
+(\fBdefault\fR) cannot be modified.
+.sp
+The format for the \fBmodify\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+modify [dbfile=\fIdbfile\fR] policy=\fIpolicyname\fR
+ [ignore-date=true|false]
+ [ignore-unknown-eku=true|false]
+ [ignore-trust-anchor=true|false]
+ [validity-adjusttime=\fIadjusttime\fR]
+ [ta-name=trust anchor subject DN]
+ [ta-serial=trust anchor serial number]
+ [ocsp-responder=\fIURL\fR]
+ [ocsp-proxy=\fIURL\fR]
+ [ocsp-use-cert-responder=true|false]
+ [ocsp-response-lifetime=timelimit]
+ [ocsp-ignore-response-sign=true|false]
+ [ocsp-responder-cert-name=Issuer DN]
+ [ocsp-responder-cert-serial=serial number]
+ [ocsp-none=true|false]
+ [crl-basefilename=\fIbasefilename\fR]
+ [crl-directory=\fIdirectory\fR]
+ [crl-get-crl-uri=true|false]
+ [crl-proxy=URL]
+ [crl-ignore-crl-sign=true|false]
+ [crl-ignore-crl-date=true|false]
+ [crl-none=true|false]
+ [keyusage=digitalSignature| nonRepudiation
+ |keyEncipherment | dataEncipherment |
+ keyAgreement |keyCertSign |
+ cRLSign | encipherOnly | decipherOnly],[...]
+ [keyusage-none=true|false]
+ [ekunames=serverAuth | clientAuth |
+ codeSigning | emailProtection |
+ ipsecEndSystem | ipsecTunnel |
+ ipsecUser | timeStamping |
+ OCSPSigning],[...]
+ [ekuoids=OID,OID,OID]
+ [eku-none=true|false]
+.fi
+.in -2
+.sp
+
+The \fBmodify\fR subcommand supports many of the same options as the
+\fBcreate\fR subcommand. For descriptions of shared options, see the create
+subcommand.
+.sp
+The \fBmodify\fR subcommand supports the following unique options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrl-none=true | false\fR\fR
+.ad
+.RS 30n
+.rt
+If \fBcrl-none\fR is set to \fBtrue\fR, CRL checking is turned off. If this
+attribute is set to \fBtrue\fR, other CRL attributes cannot be set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdfile=[\fIdbfile\fR]\fR
+.ad
+.RS 30n
+.rt
+The database file to modify a policy. If not specified, the default is the
+system KMF policy database file \fB/etc/security/kmfpolicy.xml\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBeku-none=true | false\fR
+.ad
+.RS 30n
+.rt
+If \fBeku-none\fR is set to \fBtrue\fR, extended key usage checking is turned
+off. The extended key usage attributes, \fBekuname\fR and \fBekuoids\fR cannot
+be set at the same time if \fBeku-none\fR is set to \fBtrue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBkeyusage-none=true | false\fR
+.ad
+.RS 30n
+.rt
+If \fBkeyusage-none\fR is set to true, key usage checking is turned off.
+.sp
+The \fBkeyusage\fR attribute cannot be set at the same time if this attribute
+is set to \fBtrue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBocsp-none=true | false\fR
+.ad
+.RS 30n
+.rt
+If \fBocsp-none\fR is set to true, OCSP checking is turned off. Any other OCSP
+attribute is not set at the same time if this attribute is set to \fBtrue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpolicy=\fIpolicyname\fR\fR
+.ad
+.RS 30n
+.rt
+The name of the policy to modify. \fIpolicyname\fR is required.
+The \fBdefault\fR policy in the system KMF policy database cannot be modified.
+.RE
+
+.RE
+
+.SS "Plugin Subcommands"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinstall keystore=\fR\fIkeystore_name\fR \fBmodulepath=\fR\fIpathname\fR\e
+\fB[option=\fR\fIoption_str\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Install a plugin into the system. The \fBmodulepath\fR field specifies the
+pathname to a KMF plugin shared library object. If \fIpathname\fR is not
+specified as an absolute pathname, shared library objects are assumed to be
+relative to \fB/lib/security/$ISA/\fR. The \fBISA\fR token is replaced by an
+implementation defined directory name which defines the pathname relative to
+the calling program's instruction set architecture.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist plugin\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display KMF plugin information.
+.sp
+Without the \fBplugin\fRkeyword, \fBkmfcfg list\fR shows the policy information
+as described in the \fBSUBCOMMANDS\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmodify plugin keystore=\fR\fIkeystore_name\fR
+\fBoption=\fR\fIoption_str\fR\fR
+.ad
+.sp .6
+.RS 4n
+Modify the \fBplugin\fR option. The \fBplugin\fR option is defined by the
+plugin and is interpreted by the plugin specifically, therefore this command
+accepts any option string.
+.sp
+Without the \fBplugin\fR keyword, \fBkmfcfg modify\fR updates the policy
+configuration as described in the \fBSUBCOMMANDS\fR section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuninstall keystore=\fR\fIkeystore_name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uninstall the plugin with the \fIkeystore_name\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating a New Policy
+.sp
+.LP
+The following example creates a new policy called IPSEC in the system database:
+
+.sp
+.in +2
+.nf
+$ kmfcfg create IPSEC \e
+ignore-trust-anchor=true \e
+ocsp-use-cert-responder=true \e
+keyusage=keyAgreement,keyEncipherment,dataEncipherment \e
+ekuname=ipsecTunnel,ipsecUser
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/security/kmfpolicy.xml\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default system policy database
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/kpasswd.1 b/usr/src/man/man1/kpasswd.1
new file mode 100644
index 0000000000..0ca557784a
--- /dev/null
+++ b/usr/src/man/man1/kpasswd.1
@@ -0,0 +1,84 @@
+'\" te
+.\" Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
+.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH kpasswd 1 "30 Jul 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+kpasswd \- change a user's Kerberos password
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/kpasswd\fR [\fIprincipal\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBkpasswd\fR command is used to change a Kerberos principal's password.
+\fBkpasswd\fR prompts for the current Kerberos password, which is used to
+obtain a \fBchangepw\fR ticket from the \fBKDC\fR for the user's Kerberos
+realm. If \fBkpasswd\fR successfully obtains the \fBchangepw\fR ticket, the
+user is prompted twice for the new password, and the password is changed.
+.sp
+.LP
+If the principal is governed by a policy that specifies the length and/or
+number of character classes required in the new password, the new password must
+conform to the policy. (The five character classes are lower case, upper case,
+numbers, punctuation, and all other characters.)
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprincipal\fR\fR
+.ad
+.RS 13n
+.rt
+Change the password for the Kerberos principal \fIprincipal\fR. Otherwise, the
+principal is derived from the identity of the user invoking the \fBkpasswd\fR
+command.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/ovsec_adm.\fIxxxxxx\fR\fR\fR
+.ad
+.RS 25n
+.rt
+Temporary credentials cache for the lifetime of the password changing
+operation. (\fIxxxxxx\fR is a random string.)
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkerberos\fR(5)
+.SH BUGS
+.sp
+.LP
+If \fBkpasswd\fR is suspended, the \fBchangepw\fR tickets may not be destroyed.
diff --git a/usr/src/man/man1/krb5-config.1 b/usr/src/man/man1/krb5-config.1
new file mode 100644
index 0000000000..4fdd886015
--- /dev/null
+++ b/usr/src/man/man1/krb5-config.1
@@ -0,0 +1,208 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH krb5-config 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+krb5-config \- link against the installed Kerberos libraries
+.SH SYNOPSIS
+.LP
+.nf
+\fBkrb5-config\fR
+ [\fB--all\fR | \fB--cflags\fR | \fB--exec-prefix\fR | \fB--help\fR | \fB--libs\fR \fIlibrary\fR |
+ \fB--prefix\fR | \fB--vendor\fR | \fB--version\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBkrb5-config\fR identifies and displays the special flags that are needed to
+compile and link programs against the installed Kerberos libraries.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--all\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the version, vendor, prefix and \fBexec-prefix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--cflags\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the compiler flags with which Kerberos was built.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--exec-prefix\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the \fBexec-prefix\fR with which Kerberos was built.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--help\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the usage message.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--libs\fR \fIlibrary\fR\fR
+.ad
+.RS 18n
+.rt
+Displays compiler options required to link with \fIlibrary\fR.
+.sp
+The following \fIlibrary\fR values are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkrb5\fR\fR
+.ad
+.RS 8n
+.rt
+Kerberos 5 application
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--prefix\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the prefix with which Kerberos was built.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--vendor\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the vendor of the installed Kerberos implementation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--version\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the version of the installed Kerberos implementation.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fB--cflags\fR Option
+.sp
+.LP
+The following example displays the C compiler flags needed to use
+\fBlibkrb5\fR(3LIB):
+
+.sp
+.in +2
+.nf
+% krb5-config --cflags
+-I/usr/include/kerberosv5
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing the\fB--libs\fR Option
+.sp
+.LP
+The following example shows the C compiler options needed to link against
+\fBlibkrb5\fR(3LIB):
+
+.sp
+.in +2
+.nf
+% krb5-config --libs
+-L/usr/lib -R/usr/lib -lkrb5
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityVolatile
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlibgss\fR(3LIB), \fBlibkrb5\fR(3LIB), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ksh93.1 b/usr/src/man/man1/ksh93.1
new file mode 100644
index 0000000000..af325bc61c
--- /dev/null
+++ b/usr/src/man/man1/ksh93.1
@@ -0,0 +1,7812 @@
+'\" te
+.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc.
+.TH ksh93 1 "11 Aug sam2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ksh93, rksh93 \- Korn Shell, a standard and restricted command and programming
+language
+.SH SYNOPSIS
+.LP
+.nf
+\fBksh93\fR [\fB\(+-abcefhikmnoprstuvxBCD\fR] [\fB-R\fR \fIfile\fR] [ \fB\(+-o\fR \fIoption\fR] ...
+ [-] [\fIarg\fR ...]
+.fi
+
+.LP
+.nf
+\fBrksh93\fR [\fB\(+-abcefhikmnoprstuvxBCD\fR] [\fB-R\fR \fIfile\fR] [\fB\(+-o\fR \fIoption\fR] ...
+ [-] [\fIarg\fR ...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBksh93\fR is a command and programming language that executes commands read
+from a terminal or a file. \fBrksh93\fR is a restricted version of the command
+interpreter \fBksh93\fR. \fBrksh93\fR is used to set up login names and
+execution environments whose capabilities are more controlled than those of the
+standard shell.
+.sp
+.LP
+See \fBInvocation\fR for the meaning of arguments to the shell.
+.SS "Definitions"
+.sp
+.LP
+A \fImetacharacter\fR is defined as one of the following characters:
+.sp
+.in +2
+.nf
+; & ( ) | < > NEWLINE SPACE TAB
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+A \fIblank\fR is a \fBTAB\fR or a \fBSPACE\fR.
+.sp
+.LP
+An \fIidentifier\fR is a sequence of letters, digits, or underscores starting
+with a letter or underscore. Identifiers are used as components of \fIvariable
+names\fR.
+.sp
+.LP
+A \fIvname\fR is a sequence of one or more identifiers separated by a period
+(\fB\&.\fR) and optionally preceded by a period (\fB\&.\fR). \fIvnames\fR are
+used as function and variable names.
+.sp
+.LP
+A \fIword\fR is a sequence of \fIcharacters\fR from the character set defined
+by the current locale, excluding non-quoted \fImetacharacters\fR.
+.sp
+.LP
+A \fIcommand\fR is a sequence of characters in the syntax of the shell
+language. The shell reads each command and carries out the desired action
+either directly or by invoking separate utilities. A built-in command is a
+command that is carried out by the shell itself without creating a separate
+process. Some commands are built-in purely for convenience and are not
+documented in this manual page. Built-ins that cause side effects in the shell
+environment and built-ins that are found before performing a path search (see
+\fBExecution\fR) are documented in this manual page. For historical reasons,
+some of these built-ins behave differently than other built-ins and are called
+special built-ins.
+.SS "Commands"
+.sp
+.LP
+A \fIsimple-command\fR is a list of variable assignments (see \fBVariable
+Assignments\fR) or a sequence of \fIblank\fR-separated words which can be
+preceded by a list of variable assignments. See the \fBEnvironment\fR section
+of this manual page.
+.sp
+.LP
+The first word specifies the name of the command to be executed. Except as
+specified in this section, the remaining words are passed as arguments to the
+invoked command. The command name is passed as argument 0. See \fBexec\fR(2).
+The \fIvalue\fR of a simple-command is its exit status. If it terminates
+normally, its value is \fB0\fR-\fB255\fR. If it terminates abnormally, its
+value is \fB256+\fR\fIsignum\fR. The name of the signal corresponding to the
+exit status can be obtained by way of the \fB-l\fR option of the kill built-in
+utility.
+.sp
+.LP
+A \fIpipeline\fR is a sequence of one or more commands separated by \fB|\fR.
+The standard output of each command but the last is connected by a
+\fBpipe\fR(2) to the standard input of the next command. Each command, except
+possibly the last, is run as a separate process. The shell waits for the last
+command to terminate. The exit status of a pipeline is the exit status of the
+last command unless the \fBpipefail\fR option is enabled. Each pipeline can be
+preceded by the reserved word\fB!\fR. This causes the exit status of the
+pipeline to become \fB0\fR if the exit status of the last command is
+\fBnon-zero\fR, and \fB1\fR if the exit status of the last command is \fB0\fR.
+.sp
+.LP
+A \fIlist\fR is a sequence of one or more pipelines separated by \fB;, &, |&,
+&&, or |\fR, and optionally terminated by \fB;, &,\fR or \fB|&\fR. Of these
+five symbols, \fB;, &\fR, and \fB|&\fR have equal precedence, which is lower
+than that of \fB&&\fR and \fB||\fR. The symbols \fB&&\fR and \fB||\fR also have
+equal precedence.
+.sp
+.LP
+A semicolon (\fB;\fR) causes sequential execution of the preceding pipeline. An
+ampersand (\fB&\fR) causes asynchronous execution of the preceding pipeline,
+that is, the shell does \fInot\fR wait for that pipeline to finish. The symbol
+\fB|&\fR causes asynchronous execution of the preceding pipeline with a two-way
+pipe established to the parent shell. The standard input and output of the
+spawned pipeline can be written to and read from by the parent shell by
+applying the redirection operators \fB<&\fR and \fB>&\fR with \fBarg p\fR to
+commands and by using \fB-p\fR option of the built-in commands \fBread\fR and
+\fBprint\fR. The symbol \fB&&\fR (\fB||\fR) causes the \fIlist\fR following it
+to be executed only if the preceding pipeline returns a zero (\fBnon-zero\fR)
+value. One or more NEWLINEs can appear in a \fIlist\fR instead of a semicolon,
+to delimit a command. The first \fIitem\fR of the first \fIpipeline\fR of a
+\fIlist\fR that is a simple command not beginning with a redirection, and not
+occurring within a \fBwhile\fR, \fBuntil\fR, or \fBif\fR \fIlist\fR , can be
+preceded by a semicolon. This semicolon is ignored unless the \fBshowme\fR
+option is enabled as described with the \fBset\fR built-in.
+.sp
+.LP
+A \fIcommand\fR is either a simple-command or one of commands in the following
+list. Unless otherwise stated, the value returned by a command is that of the
+last simple-command executed in the command.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfor\fR \fIvname\fR \fB[ in\fR \fIword\fR \fB\&... ] ;do\fR \fIlist\fR
+\fB;done\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each time a \fBfor\fR command is executed, \fIvname\fR is set to the next
+\fIword\fR taken from the \fBin\fR \fIword\fR list. If \fBin\fR \fIword ...\fR
+is omitted, the \fBfor\fR command executes the \fBdo\fR \fIlist\fR once for
+each positional parameter that is set starting from 1. Execution ends when
+there are no more words in the list. See \fBParameter Expansion\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(( [\fR\fIexpr1\fR\fB] ; [\fR\fIexpr2\fR] ; [\fIexpr3\fR\fB] )) ;do\fR
+\fIlist\fR \fB;done\fR\fR
+.ad
+.sp .6
+.RS 4n
+The arithmetic expression \fIexpr1\fR is evaluated first. The arithmetic
+expression \fIexpr2\fR is repeatedly evaluated until it evaluates to \fBzero\fR
+and when \fBnon-zero\fR, \fIlist\fR is executed and the arithmetic expression
+\fIexpr3\fR evaluated. If any expression is omitted, then it behaves as if it
+evaluated to \fB1\fR. See \fBArithmetic Evaluation\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBselect\fR \fIvname\fR [ in \fIword\fR \fB\&... ] ;do\fR \fIlist\fR
+\fB;done\fR\fR
+.ad
+.sp .6
+.RS 4n
+A \fBselect\fR command prints on standard error (file descriptor 2) the set of
+\fIwords\fR, each preceded by a number. If \fBin\fR \fIword...\fR is omitted,
+the positional parameters starting from \fB1\fR are used instead. See
+\fBParameter Expansion\fR. The \fBPS3\fR prompt is printed and a line is read
+from the standard input. If this line consists of the number of one of the
+listed \fIword\fRs, then the value of the variable \fIvname\fR is set to the
+\fIword\fR corresponding to this number. If this line is empty, the selection
+list is printed again. Otherwise the value of the variable \fIvname\fR is set
+to \fBnull\fR. The contents of the line read from standard input is saved in
+the variable \fBREPLY\fR. The \fIlist\fR is executed for each selection until a
+break or \fBEOF\fR is encountered. If the \fBREPLY\fR variable is set to
+\fBnull\fR by the execution of \fIlist\fR, the selection list is printed before
+displaying the \fBPS3\fR prompt for the next selection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcase\fR \fIword\fR \fBin [ [(]\fR \fIpattern\fR \fB[ |\fR \fIpattern\fR
+\fB] ... )\fR \fIlist\fR \fB;; ] ... esac\fR\fR
+.ad
+.sp .6
+.RS 4n
+A \fBcase\fR command executes the \fIlist\fR associated with the first
+\fIpattern\fR that matches \fIword\fR. The form of the patterns is the same as
+that used for file name generation. See \fBFile Name Generation\fR.
+.sp
+The \fB;;\fR operator causes execution of \fBcase\fR to terminate. If \fB;&\fR
+is used in place of \fB;;\fR the next subsequent list, if any, is executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBif\fR \fIlist\fR \fB;then\fR \fIlist\fR \fB[ ;elif\fR \fIlist\fR
+\fB;then\fR \fIlist\fR ] \fB\&... [ ;else\fR \fIlist\fR \fB]\fR \fB;fi\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fIlist\fR following \fBif\fR is executed and, if it returns a \fBzero\fR
+exit status, the \fIlist\fR following the first \fBthen\fR is executed.
+Otherwise, the \fIlist\fR following \fBelif\fR is executed, and, if its value
+is \fBzero\fR, the \fIlist\fR following the next \fBthen\fR is executed.
+Failing each successive \fBelif\fR \fIlist\fR, the \fBelse\fR \fIlist\fR is
+executed. If the \fBif\fR \fIlist\fR has \fBnon-zero\fR exit status and there
+is no \fBelse\fR \fIlist\fR, then the \fBif\fR command returns a \fBzero\fR
+exit status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwhile\fR \fIlist\fR \fB;do\fR \fIlist\fR \fB;done\fR\fR
+.ad
+.br
+.na
+\fBuntil \fIlist\fR \fB;do\fR \fIlist\fR \fB;done\fR\fR
+.ad
+.sp .6
+.RS 4n
+A \fBwhile\fR command repeatedly executes the while \fIlist\fR and, if the exit
+status of the last command in the list is zero, executes the \fBdo\fR
+\fIlist\fR, otherwise the loop terminates. If no commands in the \fBdo\fR
+\fIlist\fR are executed, then the \fBwhile\fR command returns a \fBzero\fR exit
+status, \fBuntil\fR can be used in place of \fBwhile\fR to negate the loop
+termination test.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB((\fR\fIexpression\fR\fB))\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fIexpression\fR is evaluated using the rules for arithmetic evaluation
+described in this manual page. If the value of the arithmetic expression is
+\fBnon-zero\fR, the exit status is \fB0\fR. Otherwise the exit status is
+\fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(\fR\fIlist\fR\fB;)\fR\fR
+.ad
+.sp .6
+.RS 4n
+Execute list in a separate environment. If two adjacent open parentheses are
+needed for nesting, a SPACE must be inserted to avoid evaluation as an
+arithmetic command as described in this section.
+.sp
+\fIlist\fR is simply executed. Unlike the metacharacters, \fB(\fR and \fB)\fR,
+\fB{\fR and \fB}\fR are \fIreserved words\fR and must occur at the beginning of
+a line or after a \fB;\fR to be recognized.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[[\fR \fIexpression\fR \fB]]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Evaluates \fIexpression\fR and returns a \fBzero\fR exit status when
+\fIexpression\fR is true. See \fBConditional Expressions\fR for a description
+of \fIexpression\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfunction\fR \fIvarname\fR \fB{\fR \fIlist\fR \fB;}\fR\fR
+.ad
+.br
+.na
+\fB\fIvarname\fR \fB() {\fR \fIlist\fR \fB;}\fR\fR
+.ad
+.sp .6
+.RS 4n
+Define a function which is referenced by \fIvarname\fR. A function whose
+\fIvarname\fR contains a \fB\&.\fR is called a discipline function and the
+portion of the \fIvarname\fR preceding the last \fB\&.\fR must refer to an
+existing variable.
+.sp
+The body of the function is the \fIlist\fR of commands between \fB{\fR and
+\fB}\fR. A function defined with the function \fIvarname\fR syntax can also be
+used as an argument to the \fB\&.\fR special built-in command to get the
+equivalent behavior as if the \fIvarname\fR\fB()\fR syntax were used to define
+it. See \fBFunctions\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtime [\fR \fIpipeline\fR \fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIpipeline\fR is omitted, the user and system time for the current shell
+and completed child processes is printed on standard error. Otherwise,
+\fIpipeline\fR is executed and the elapsed time as well as the user and system
+time are printed on standard error. The \fBTIMEFORMAT\fR variable can be set to
+a format string that specifies how the timing information should be displayed.
+See \fBShell Variables\fR for a description of the \fBTIMEFORMAT\fR variable.
+.RE
+
+.sp
+.LP
+The following reserved words are recognized as reserved only when they are the
+first word of a command and are not quoted:
+.br
+.in +2
+\fBcase\fR
+.in -2
+.br
+.in +2
+\fBdo\fR
+.in -2
+.br
+.in +2
+\fBdone\fR
+.in -2
+.br
+.in +2
+\fBelse\fR
+.in -2
+.br
+.in +2
+\fBelif\fR
+.in -2
+.br
+.in +2
+\fBesac\fR
+.in -2
+.br
+.in +2
+\fBfor\fR
+.in -2
+.br
+.in +2
+\fBfi\fR
+.in -2
+.br
+.in +2
+\fBfunction\fR
+.in -2
+.br
+.in +2
+\fBif\fR
+.in -2
+.br
+.in +2
+\fBselect\fR
+.in -2
+.br
+.in +2
+\fBthen\fR
+.in -2
+.br
+.in +2
+\fBtime\fR
+.in -2
+.br
+.in +2
+\fBuntil\fR
+.in -2
+.br
+.in +2
+\fBwhile\fR
+.in -2
+.br
+.in +2
+\fB{ }\fR
+.in -2
+.br
+.in +2
+\fB[[ ]]\fR
+.in -2
+.br
+.in +2
+\fB!\fR
+.in -2
+.SS "Variable Assignments"
+.sp
+.LP
+One or more variable assignments can start a simple command or can be arguments
+to the \fBtypeset\fR, \fBexport\fR, or \fBreadonly\fR special built-in
+commands. The syntax for an \fIassignment\fR is of the form:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIvarname\fR\fB=\fR\fIword\fR\fR
+.ad
+.br
+.na
+\fB\fIvarname\fR\fB[\fR\fIword\fR\fB]=\fR\fIword\fR\fR
+.ad
+.sp .6
+.RS 4n
+No space is permitted between \fIvarname\fR and the \fB=\fR or between \fB=\fR
+and \fIword\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIvarname\fR\fB=(\fR\fIassignlist\fR\fB)\fR\fR
+.ad
+.sp .6
+.RS 4n
+No space is permitted between \fIvarname\fR and the \fB=\fR. An
+\fIassignlist\fR can be one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIword ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+Indexed array assignment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIword\fR\fB]=\fR\fIword ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+Associative array assignment. If prefixed by \fBtypeset\fR \fB-a\fR, creates an
+indexed array instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIassignment ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+Compound variable assignment. This creates a compound variable \fIvarname\fR
+with sub-variables of the form \fIvarname.name\fR, where \fIname\fR is the name
+portion of assignment. The value of \fIvarname\fR contains all the assignment
+elements. Additional assignments made to sub-variables of \fIvarname\fR are
+also displayed as part of the value of \fIvarname\fR. If no \fIassignment\fRs
+are specified, \fIvarname\fR is a compound variable allowing subsequence child
+elements to be defined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtypeset [\fR\fIoptions\fR] \fIassignment\fR \fB\&...\fR\fR
+.ad
+.sp .6
+.RS 4n
+Nested variable assignment. Multiple assignments can be specified by separating
+each of them with a \fB;\fR. The previous value is unset before the assignment.
+.RE
+
+In addition, a \fB+=\fR can be used in place of the \fB=\fR to signify adding
+to or appending to the previous value. When \fB+=\fR is applied to an
+arithmetic type, \fIword\fR is evaluated as an arithmetic expression and added
+to the current value. When applied to a string variable, the value defined by
+\fIword\fR is appended to the value. For compound assignments, the previous
+value is not unset and the new values are appended to the current ones provided
+that the types are compatible.
+.RE
+
+.SS "Comments"
+.sp
+.LP
+A word beginning with \fB#\fR causes that word and all the following characters
+up to a NEWLINE to be commented, or ignored.
+.SS "Aliasing"
+.sp
+.LP
+The first word of each command is replaced by the text of an alias if an alias
+for this word has been defined. An alias name consists of any number of
+characters excluding metacharacters, quoting characters, file expansion
+characters, parameter expansion characters, command substitution characters,
+and \fB=\fR. The replacement string can contain any valid shell script
+including the metacharacters listed in the \fBCommands\fR section. The first
+word of each command in the replaced text, other than any that are in the
+process of being replaced, are tested for aliases. If the last character of the
+alias value is a BLANK then the word following the alias is also checked for
+alias substitution.
+.sp
+.LP
+Aliases can be used to redefine built-in commands but cannot be used to
+redefine the reserved words listed in the \fBCommands\fR section. Aliases can
+be created and listed with the alias command and can be removed with the
+\fBunalias\fR command.
+.sp
+.LP
+Aliasing is performed when scripts are read, not while they are executed. For
+an alias to take effect, the \fBalias\fR definition command has to be executed
+before the command which references the alias is read. The following aliases
+are compiled into the shell but can be unset or redefined:
+.sp
+.in +2
+.nf
+autoload='typeset -fu'
+command='command '
+fc=hist
+float='typeset -lE'
+functions='typeset -f'
+hash='alias -t --'
+history='hist -l'
+integer='typeset -li'
+nameref='typeset -n'
+nohup='nohup '
+r='hist -s'
+redirect='command exec'
+source='command .'
+stop='kill -s STOP'
+suspend='kill -s STOP $$'
+times='{ { time;} 2>&1;}'
+type='whence -v'
+.fi
+.in -2
+.sp
+
+.SS "Tilde Substitution"
+.sp
+.LP
+After alias substitution is performed, each word is checked to see if it begins
+with an unquoted tilde (\fB~\fR). For tilde substitution, \fIword\fR also
+refers to the \fIword\fR portion of parameter expansion. See \fBParameter
+Expansion\fR.
+.sp
+.LP
+If it does, the word up to a \fB/\fR is checked to see if it matches a user
+name in the password database. If a match is found, the \fB~\fR and the matched
+login name are replaced by the login directory of the matched user. If no match
+is found, the original text is left unchanged. A \fB~\fR by itself, or in front
+of a \fB/\fR, is replaced by \fB$HOME\fR. A \fB~\fR followed by a \fB+\fR or
+\fB-\fR is replaced by the value of \fB$PWD\fR and \fB$OLDPWD\fR respectively.
+.sp
+.LP
+In addition, when expanding a \fIvariable assignment\fR, tilde substitution is
+attempted when the value of the assignment begins with a \fB~\fR, and when a
+\fB~\fR appears after a colon (\fB:\fR). The \fB:\fR also terminates a \fB~\fR
+login name.
+.SS "Command Substitution"
+.sp
+.LP
+The standard output from a command enclosed in parentheses preceded by a dollar
+sign (\fB$\fR) or a pair of grave accents (\fB``\fR) can be used as part or all
+of a word. Trailing NEWLINEs are removed. In the second (obsolete) form, the
+string between the quotes is processed for special quoting characters before
+the command is executed. See \fBQuoting\fR.
+.sp
+.LP
+The command substitution \fB$(cat file)\fR can be replaced by the equivalent
+but faster \fB$(<file)\fR. The command substitution \fB$(\fR\fIn\fR\fB<#)\fR
+expands to the current byte offset for file descriptor \fIn\fR.
+.SS "Arithmetic Substitution"
+.sp
+.LP
+An arithmetic expression enclosed in double parentheses preceded by a dollar
+sign ( \fB$((\fR\fIarithmetic_expression\fR\fB))\fR) is replaced by the value
+of the arithmetic expression within the double parentheses.
+.SS "Process Substitution"
+.sp
+.LP
+Process substitution is only available on versions of the UNIX operating system
+that support the \fB/dev/fd\fR directory for naming open files.
+.sp
+.LP
+Each command argument of the form \fB<(\fR\fIlist\fR\fB)\fR or
+\fB>(\fR\fIlist\fR\fB)\fR runs process \fIlist\fR asynchronously connected to
+some file in \fB/dev/fd\fR. The name of this file becomes the argument to the
+command. If the form with \fB>\fR is selected then writing on this file
+provides input for \fIlist\fR. If \fB<\fR is used, then the file passed as an
+argument contains the output of the \fIlist\fR process.
+.sp
+.LP
+For example,
+.sp
+.in +2
+.nf
+paste <(cut -f1 \fIfile1\fR) <(cut -f3 \fIfile2\fR) | tee \e
+ >(\fIprocess1\fR) >(\fIprocess2\fR)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBcut\fRs fields 1 and 3 from the files \fIfile1\fR and \fIfile2\fR
+respectively, \fBpaste\fRs the results together, and sends it to the processes
+\fIprocess1\fR and \fIprocess2\fR. It also displays the results to the standard
+output. The file, which is passed as an argument to the command, is a UNIX
+\fBpipe\fR(2). Programs that expect to \fBlseek\fR(2) on the file do not work.
+.SS "Parameter Expansion"
+.sp
+.LP
+A parameter is a variable, one or more digits, or any of the characters
+\fB*\fR, \fB@\fR, \fB#\fR, \fB?\fR, \fB-\fR, \fB$\fR, and \fB!\fR. A variable
+is denoted by a \fIvname\fR. To create a variable whose \fIvname\fR contains a
+\fB\&.\fR, a variable whose \fBvname\fR consists of everything before the
+last . must already exist. A variable has a value and zero or more attributes.
+Variables can be assigned values and attributes by using the \fBtypeset\fR
+special built-in command. The attributes supported by the shell are described
+later with the \fBtypeset\fR special built-in command. Exported variables pass
+values and attributes to the environment.
+.sp
+.LP
+The shell supports both indexed and associative arrays. An element of an array
+variable is referenced by a subscript. A subscript for an indexed array is
+denoted by an arithmetic expression, (see \fBArithmetic Evaluation\fR), between
+a \fB[\fR and a \fB]\fR. Use \fBset -A\fR \fIvname value ...\fR to assign
+values to an indexed array. The value of all subscripts must be in the range of
+\fB0\fR through \fB1,048,575\fR. Indexed arrays do not need to be declared. Any
+reference to a variable with a valid subscript is legal and an array is created
+if necessary.
+.sp
+.LP
+An associative array is created with the \fB-A\fR option to \fBtypeset\fR. A
+subscript for an associative array is denoted by a string enclosed between
+\fB[\fR and \fB]\fR.
+.sp
+.LP
+Referencing any array without a subscript is equivalent to referencing the
+array with subscript \fB0\fR.
+.sp
+.LP
+The value of a variable can be assigned by:
+.sp
+.in +2
+.nf
+\fIvname\fR=\fIvalue\fR [\fIvname\fR=\fIvalue\fR] ...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+.sp
+.in +2
+.nf
+\fIvname\fR[\fIsubscript\fR]=\fIvalue\fR [\fIvname\fR[\fIsubscript\fR]=\fIvalue\fR] ...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+No space is allowed before or after the \fB=\fR. A \fInameref\fR is a variable
+that is a reference to another variable. A \fInameref\fR is created with the
+\fB-n\fR attribute of \fBtypeset\fR. The value of the variable at the time of
+the \fBtypeset\fR command becomes the variable that is referenced whenever the
+\fInameref\fR variable is used. The name of a \fInameref\fR cannot contain a
+dot (\fI\&.\fR). When a variable or function name contains a \fB\&.,\fR and the
+portion of the name up to the first \fB\&.\fR matches the name of a
+\fInameref\fR, the variable referred to is obtained by replacing the
+\fInameref\fR portion with the name of the variable referenced by the
+\fInameref\fR. If a \fInameref\fR is used as the index of a \fBfor\fR loop, a
+name reference is established for each item in the list. A \fInameref\fR
+provides a convenient way to refer to the variable inside a function whose name
+is passed as an argument to a function. For example, if the name of a variable
+is passed as the first argument to a function, the command
+.sp
+.in +2
+.nf
+ typeset -n var=$1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+inside the function causes references and assignments to \fIvar\fR to be
+references and assignments to the variable whose name has been passed to the
+function. If either of the floating point attributes, \fB-E\fR, or \fB-F\fR, or
+the integer attribute, \fB-i\fR, is set for \fIvname\fR, then the \fIvalue\fR
+is subject to arithmetic evaluation as described in this manual page.
+Positional parameters, parameters denoted by a number, can be assigned values
+with the \fBset\fR special built-in command. Parameter \fB$0\fR is set from
+argument zero when the shell is invoked. The character \fB$\fR is used to
+introduce substitutable parameters.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shell reads all the characters from \fB${\fR to the matching \fB}\fR as
+part of the same word even if it contains braces or metacharacters. The value,
+if any, of the parameter is substituted. The braces are required when
+\fIparameter\fR is followed by a letter, digit, or underscore that is not to be
+interpreted as part of its name, when the variable name contains a \fB\&.\fR,
+or when a variable is subscripted. If \fIparameter\fR is one or more digits
+then it is a positional parameter. A positional parameter of more than one
+digit must be enclosed in braces. If \fIparameter\fR is \fB*\fR or \fB@\fR,
+then all the positional parameters, starting with \fB$1\fR, are substituted and
+separated by a field separator character. If an array \fIvname\fR with
+subscript \fB*\fR or \fB@\fR is used, then the value for each of the elements
+is substituted, separated by the first character of the value of \fBIFS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${#\fR\fIparameter\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIparameter\fR is \fB*\fR or \fB@\fR, the number of positional parameters
+is substituted. Otherwise, the length of the value of the \fIparameter\fR is
+substituted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${#\fR\fIvname\fR\fB[*]}\fR\fR
+.ad
+.br
+.na
+\fB\fB${#\fR\fIvname\fR\fB[@]}\fR\fR
+.ad
+.sp .6
+.RS 4n
+The number of elements in the array \fIvname\fR is substituted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${!\fR\fIvname\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands to the name of the variable referred to by \fIvname\fR. This is
+\fIvname\fR except when \fIvname\fR is a name reference.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${!\fR\fIvname\fR\fB[\fR\fIsubscript\fR\fB]}\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands to name of the subscript unless \fIsubscript\fR is \fB*\fR or \fB@\fR.
+When \fIsubscript\fR is \fB*\fR, the list of array subscripts for \fIvname\fR
+is generated. For a variable that is not an array, the value is \fB0\fR if the
+variable is set. Otherwise it is \fBnull\fR. When \fIsubscript\fR is \fB@\fR,
+it is the same as \fB$ {\fR\fIvname\fR\fB[\fR\fI*\fR\fB]}\fR, except that when
+used in double quotes, each array subscript yields a separate argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${!\fR\fIprefix\fR\fB*}\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands to the names of the variables whose names begin with \fIprefix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB:-\fR\fIword\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIparameter\fR is set and is non-null then substitute its value. Otherwise
+substitute \fIword\fR.
+.sp
+\fIword\fR is not evaluated unless it is to be used as the substituted string.
+.sp
+In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
+is NULL:
+.sp
+.in +2
+.nf
+print ${d:-$(pwd)}
+.fi
+.in -2
+.sp
+
+If the colon (\fB:\fR ) is omitted from the expression, the shell only checks
+whether \fIparameter\fR is set or not.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB:=\fR\fIword\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIparameter\fR is not set or is \fBnull\fR, set it to \fIword\fR. The value
+of the parameter is then substituted. Positional parameters cannot be assigned
+to in this way.
+.sp
+\fIword\fR is not evaluated unless it is to be used as the substituted string.
+.sp
+In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
+is NULL:
+.sp
+.in +2
+.nf
+print ${d:-$(pwd)}
+.fi
+.in -2
+.sp
+
+If the colon (\fB:\fR) is omitted from the expression, the shell only checks
+whether \fIparameter\fR is set or not.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB:?\fR\fIword\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIparameter\fR is set and is non-null, substitute its value. Otherwise,
+print \fIword\fR and exit from the shell , if the shell is not interactive. If
+\fIword\fR is omitted then a standard message is printed.
+.sp
+\fIword\fR is not evaluated unless it is to be used as the substituted string.
+.sp
+In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
+is NULL:
+.sp
+.in +2
+.nf
+print ${d:-$(pwd)}
+.fi
+.in -2
+.sp
+
+If the colon (\fB:\fR ) is omitted from the expression, the shell only checks
+whether \fIparameter\fR is set or not.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB:+\fR\fIword\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIparameter\fR is set and is non-null, substitute \fIword\fR. Otherwise
+substitute nothing.
+.sp
+\fIword\fR is not evaluated unless it is to be used as the substituted string.
+.sp
+In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
+is NULL:
+.sp
+.in +2
+.nf
+print ${d:-$(pwd)}
+.fi
+.in -2
+.sp
+
+If the colon (\fB:\fR) is omitted from the expression, the shell only checks
+whether \fIparameter\fR is set or not.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB:\fR\fIoffset\fR:\fIlength\fR}\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIparameter\fR\fB:\fR\fIoffset\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands to the portion of the value of \fIparameter\fR starting at the
+character (counting from \fB0\fR) determined by expanding offset as an
+arithmetic expression and consisting of the number of characters determined by
+the arithmetic expression defined by \fIlength\fR.
+.sp
+In the second form, the remainder of the value is used. A negative offset
+counts backwards from the end of \fIparameter\fR.
+.sp
+One or more BLANKs is required in front of a minus sign to prevent the shell
+from interpreting the operator as \fB:-\fR. If parameter is \fB*\fR or \fB@\fR,
+or is an array name indexed by \fB*\fR or \fB@\fR, then \fIoffset\fR and
+\fIlength\fR refer to the array index and number of elements respectively. A
+negative \fIoffset\fR is taken relative to one greater than the highest
+subscript for indexed arrays. The order for associative arrays is unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB#\fR\fIpattern\fR\fB}\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIparameter\fR\fB##\fR\fIpattern\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the shell \fIpattern\fR matches the beginning of the value of
+\fIparameter\fR, then the value of this expansion is the value of the
+\fIparameter\fR with the matched portion deleted. Otherwise the value of this
+\fIparameter\fR is substituted. In the first form the smallest matching
+\fIpattern\fR is deleted and in the second form the largest matching
+\fIpattern\fR is deleted. When \fIparameter\fR is \fB@\fR, \fB*\fR, or an array
+variable with subscript \fB@\fR or \fB*\fR, the substring operation is applied
+to each element in turn.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB%\fR\fIpattern\fR\fB}\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIparameter\fR\fB%%\fR\fIpattern\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the shell \fIpattern\fR matches the end of the value of \fIparameter\fR,
+then the value of this expansion is the value of the parameter with the matched
+part deleted. Otherwise substitute the value of \fIparameter\fR. In the first
+form the smallest matching pattern is deleted, and in the second form the
+largest matching pattern is deleted. When parameter is \fB@\fR, \fB*\fR, or an
+array variable with subscript \fB@\fR or \fB*\fR, the substring operation is
+applied to each element in turn.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB${\fR\fIparameter\fR\fB/\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIparameter\fR\fB//\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIparameter\fR\fB/#\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+.ad
+.br
+.na
+\fB\fB${\fR\fIparameter\fR\fB/%\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+.ad
+.sp .6
+.RS 4n
+Expands \fIparameter\fR and replaces the longest match of \fIpattern\fR with
+the specified \fIstring\fR. Each occurrence of \fB\e\fR\fIn\fR in \fIstring\fR
+is replaced by the portion of \fIparameter\fR that matches the \fIn\fR\fBth\fR
+sub-pattern.
+.sp
+When \fIstring\fR is null, the \fIpattern\fR is deleted and the \fB/\fR in
+front of string can be omitted. When \fIparameter\fR is \fB@\fR, \fB*\fR, or an
+array variable with subscript \fB@\fR or \fB*\fR, the substitution operation is
+applied to each element in turn. In this case, the \fIstring\fR portion of
+\fIword\fR is re-evaluated for each element.
+.sp
+In the first form, only the first occurrence of \fIpattern\fR is replaced.
+.sp
+In the second form, each match for \fIpattern\fR is replaced by the specified
+\fIstring\fR.
+.sp
+The third form restricts the pattern match to the beginning of the
+\fIstring\fR.
+.sp
+The fourth form restricts the pattern match to the end of the \fIstring\fR.
+.RE
+
+.sp
+.LP
+The following parameters are automatically set by the shell:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 19n
+.rt
+The number of positional parameters in decimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 19n
+.rt
+Options supplied to the shell on invocation or by the \fBset\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 19n
+.rt
+The decimal value returned by the last executed command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fR
+.ad
+.RS 19n
+.rt
+The process number of this shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB_\fR\fR
+.ad
+.RS 19n
+.rt
+Initially, the value of \fB_\fR is the absolute pathname of the shell or script
+being executed as passed in the environment. It is subsequently assigned the
+last argument of the previous command.
+.sp
+This parameter is not set for commands which are asynchronous. This parameter
+is also used to hold the name of the matching \fBMAIL\fR file when checking for
+mail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.RS 19n
+.rt
+The process number of the last background command invoked or the most recent
+job put in the background with the \fBbg\fR built-in command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.command\fR\fR
+.ad
+.RS 19n
+.rt
+When processing a \fBDEBUG\fR trap, this variable contains the current command
+line that is about to run.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.edchar\fR\fR
+.ad
+.RS 19n
+.rt
+This variable contains the value of the keyboard character (or sequence of
+characters if the first character is an ESC, \fBASCII 033\fR) that has been
+entered when processing a \fBKEYBD\fR trap. If the value is changed as part of
+the trap action, then the new value replaces the key (or key sequence) that
+caused the trap. See the \fBKey Bindings\fR section of this manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.edcol\fR\fR
+.ad
+.RS 19n
+.rt
+The character position of the cursor at the time of the most recent \fBKEYBD\fR
+trap.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.edmode\fR\fR
+.ad
+.RS 19n
+.rt
+The value is set to ESC when processing a \fBKEYBD\fR trap while in \fBvi\fR
+insert mode. Otherwise, \fB\&.sh.edmode\fR is null when processing a
+\fBKEYBD\fR trap. See the \fBvi Editing Mode\fR section of this manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.edtext\fR\fR
+.ad
+.RS 19n
+.rt
+The characters in the input buffer at the time of the most recent \fBKEYBD\fR
+trap. The value is null when not processing a \fBKEYBD\fR trap.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.file\fR\fR
+.ad
+.RS 19n
+.rt
+The pathname of the file than contains the current command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.fun\fR\fR
+.ad
+.RS 19n
+.rt
+The name of the current function that is being executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.match\fR\fR
+.ad
+.RS 19n
+.rt
+An indexed array which stores the most recent match and sub-pattern matches
+after conditional pattern matches that match and after variables expansions
+using the operators \fB#\fR, \fB%\fR, or \fB/\fR. The \fB0\fRth element stores
+the complete match and the \fIi\fRth element stores the \fIi\fRth sub-match.
+The \fB\&.sh.match\fR variable is unset when the variable that has expanded is
+assigned a new value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.name\fR\fR
+.ad
+.RS 19n
+.rt
+Set to the name of the variable at the time that a discipline function is
+invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.subscript\fR\fR
+.ad
+.RS 19n
+.rt
+Set to the name subscript of the variable at the time that a discipline
+function is invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.subshell\fR\fR
+.ad
+.RS 19n
+.rt
+The current depth for sub-shells and command substitution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.value\fR\fR
+.ad
+.RS 19n
+.rt
+Set to the value of the variable at the time that the set or append discipline
+function is invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.sh.version\fR\fR
+.ad
+.RS 19n
+.rt
+Set to a value that identifies the version of this shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLINENO\fR\fR
+.ad
+.RS 19n
+.rt
+The current line number within the script or function being executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOLDPWD\fR\fR
+.ad
+.RS 19n
+.rt
+The previous working directory set by the \fBcd\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOPTARG\fR\fR
+.ad
+.RS 19n
+.rt
+The value of the last option argument processed by the \fBgetopts\fR built-in
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOPTIND\fR\fR
+.ad
+.RS 19n
+.rt
+The index of the last option argument processed by the \fBgetopts\fR built-in
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPPID\fR\fR
+.ad
+.RS 19n
+.rt
+The process number of the parent of the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPWD\fR\fR
+.ad
+.RS 19n
+.rt
+The present working directory set by the \fBcd\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRANDOM\fR\fR
+.ad
+.RS 19n
+.rt
+Each time this variable is referenced, a random integer, uniformly distributed
+between \fB0\fR and \fB32767\fR, is generated. The sequence of random numbers
+can be initialized by assigning a numeric value to \fBRANDOM\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBREPLY\fR\fR
+.ad
+.RS 19n
+.rt
+This variable is set by the \fBselect\fR statement and by the \fBread\fR
+built-in command when no arguments are supplied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSECONDS\fR\fR
+.ad
+.RS 19n
+.rt
+Each time this variable is referenced, the number of seconds since shell
+invocation is returned. If this variable is assigned a value, then the value
+returned upon reference is the value that was assigned plus the number of
+seconds since the assignment.
+.RE
+
+.sp
+.LP
+The following variables are used by the shell:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCDPATH\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the search path for the \fBcd\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOLUMNS\fR\fR
+.ad
+.RS 14n
+.rt
+Defines the width of the edit window for the shell edit modes and for printing
+select lists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEDITOR\fR\fR
+.ad
+.RS 14n
+.rt
+If the \fBVISUAL\fR variable is not set, the value of this variable is checked
+for the patterns as described with \fBVISUAL\fR and the corresponding editing
+option is turned on.
+.sp
+See the \fBset\fR command in the \fBSpecial Command\fR section of this manual
+page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBENV\fR\fR
+.ad
+.RS 14n
+.rt
+Performs parameter expansion, command substitution, and arithmetic substitution
+on the value to generate the pathname of the script that is executed when the
+shell is invoked. This file is typically used for alias and function
+definitions. The default value is \fB$HOME/.kshrc\fR.
+.sp
+See the \fBInvocation\fR section of this manual page.
+.sp
+\fBENV\fR is not set by the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFCEDIT\fR\fR
+.ad
+.RS 14n
+.rt
+Obsolete name for the default editor name for the \fBhist\fR command.
+\fBFCEDIT\fR is not used when \fBHISTEDIT\fR is set.
+.sp
+The shell specifies a default value to \fBFCEDIT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFIGNORE\fR\fR
+.ad
+.RS 14n
+.rt
+A pattern that defines the set of file names that is ignored when performing
+file name matching.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFPATH\fR\fR
+.ad
+.RS 14n
+.rt
+The search path for function definitions. The directories in this path are
+searched for a file with the same name as the function or command when a
+function with the \fB-u\fR attribute is referenced and when a command is not
+found. If an executable file with the name of that command is found, then it is
+read and executed in the current environment. Unlike \fBPATH\fR, the current
+directory must be represented explicitly by dot (\fB\&.\fR) rather than by
+adjacent colon (\fB:\fR) characters or a beginning or ending colon (\fB:\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTCMD\fR\fR
+.ad
+.RS 14n
+.rt
+The number of the current command in the history file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTEDIT\fR\fR
+.ad
+.RS 14n
+.rt
+The name for the default editor name for the \fBhist\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTFILE\fR\fR
+.ad
+.RS 14n
+.rt
+If this variable is set when the shell is invoked, the value is the pathname of
+the file that is used to store the command history. See the \fBCommand
+Re-entry\fR section of this manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTSIZE\fR\fR
+.ad
+.RS 14n
+.rt
+If this variable is set when the shell is invoked, then the number of
+previously entered commands that are accessible by this shell is greater than
+or equal to this number. The default is \fB512\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.RS 14n
+.rt
+The default argument (home directory) for the \fBcd\fR command.
+.sp
+\fBHOME\fR is not set by the shell. \fBHOME\fR is set by \fBlogin\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBIFS\fR\fR
+.ad
+.RS 14n
+.rt
+Internal field separators, normally SPACE, TAB, and NEWLINE that are used to
+separate the results of command substitution or parameter expansion and to
+separate fields with the built-in command read. The first character of the
+\fBIFS\fR variable is used to separate arguments for the \fB"$*"\fR
+substitution. See the \fBQuoting\fR section of this manual page.
+.sp
+Each single occurrence of an \fBIFS\fR character in the string to be split,
+that is not in the \fBissspace\fR character class, and any adjacent characters
+in \fBIFS\fR that are in the \fBissspace\fR character class, delimit a field.
+One or more characters in IFS that belong to the \fBissspace\fR character
+class, delimit a field. In addition, if the same \fBissspace\fR character
+appears consecutively inside \fBIFS\fR, this character is treated as if it were
+not in the \fBissspace\fR class, so that if \fBIFS\fR consists of two tab
+characters, then two adjacent tab characters delimit a null field.
+.sp
+The shell specifies a default value to \fBIFS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLANG\fR\fR
+.ad
+.RS 14n
+.rt
+This variable determines the locale category for any category not specifically
+selected with a variable starting with \fBLC_\fR or \fBLANG\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_ALL\fR\fR
+.ad
+.RS 14n
+.rt
+This variable overrides the value of the \fBLANG\fR variable and any other
+\fBLC_\fR variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_COLLATE\fR\fR
+.ad
+.RS 14n
+.rt
+This variable determines the locale category for character collation
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR\fR
+.ad
+.RS 14n
+.rt
+This variable determines the locale category for character handling functions.
+It determines the character classes for pattern matching. See the \fBFile Name
+Generation\fR section of this manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_NUMERIC\fR\fR
+.ad
+.RS 14n
+.rt
+This variable determines the locale category for the decimal point character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLINES\fR\fR
+.ad
+.RS 14n
+.rt
+If this variable is set, the value is used to determine the column length for
+printing select lists. Select lists prints vertically until about two-thirds of
+\fBLINES\fR lines are filled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAIL\fR\fR
+.ad
+.RS 14n
+.rt
+If this variable is set to the name of a mail file \fBand\fR the \fBMAILPATH\fR
+variable is not set, then the shell informs the user of arrival of mail in the
+specified file.
+.sp
+\fBMAIL\fR is not set by the shell. On some systems, \fBMAIL\fR is set by
+\fBlogin\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAILCHECK\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies how often in seconds the shell checks for changes in the modification
+time of any of the files specified by the \fBMAILPATH\fR or \fBMAIL\fR
+variables. The default value is \fB600\fR seconds. When the time has elapsed
+the shell checks before issuing the next prompt.
+.sp
+The shell specifies a default value to \fBMAILCHECK\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAILPATH\fR\fR
+.ad
+.RS 14n
+.rt
+A colon ( \fB:\fR ) separated list of file names. If this variable is set, then
+the shell informs the user of any modifications to the specified files that
+have occurred within the last \fBMAILCHECK\fR seconds. Each file name can be
+followed by a \fB?\fR and a message that is printed. The message undergoes
+parameter expansion, command substitution, and arithmetic substitution with the
+variable \fB$_\fR defined as the name of the file that has changed. The default
+message is \fByou have mail in $_\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 14n
+.rt
+The search path for commands. Except in \fB\&.profile\fR, users cannot change
+\fBPATH\fR if executing under \fBrksh93\fR. See the \fBExecution\fR section of
+this manual page.
+.sp
+The shell specifies a default value to \fBPATH\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPS1\fR\fR
+.ad
+.RS 14n
+.rt
+The value of this variable is expanded for parameter expansion, command
+substitution, and arithmetic substitution to define the primary prompt string
+which by default is \fB$\fR. The character \fB!\fR in the primary prompt string
+is replaced by the command number. Two successive occurrences of \fB!\fR
+produces a single \fB!\fR when the prompt string is printed. See the \fBCommand
+Re-entry\fR section of this manual page.
+.sp
+The shell specifies a default value to \fBPS1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPS2\fR\fR
+.ad
+.RS 14n
+.rt
+Secondary prompt string, by default, \fB>\fR.
+.sp
+The shell specifies a default value to \fBPS2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPS3\fR\fR
+.ad
+.RS 14n
+.rt
+Selection prompt string used within a select loop, by default \fB#?\fR.
+.sp
+The shell specifies a default value to \fBPS3\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPS4\fR\fR
+.ad
+.RS 14n
+.rt
+The value of this variable is expanded for parameter evaluation, command
+substitution, and arithmetic substitution and precedes each line of an
+execution trace. By default, \fBPS4\fR is \fB+\fR. When \fBPS4\fR is unset, the
+execution trace prompt is also \fB+\fR .
+.sp
+The shell specifies a default value to \fBPS4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 14n
+.rt
+The pathname of the shell is kept in the environment. At invocation, if the
+basename of this variable is \fBrsh\fR, \fBrksh\fR, \fBrksh93\fR, or
+\fBkrsh\fR, the shell becomes restricted.
+.sp
+\fBSHELL\fR is not set by the shell. On some systems, \fBSHELL\fR is set by
+\fBlogin\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTIMEFORMAT\fR\fR
+.ad
+.RS 14n
+.rt
+The value of this parameter is used as a format string specifying how the
+timing information for pipelines prefixed with the \fBtime\fR reserved word
+should be displayed. The \fB%\fR character introduces a format sequence that is
+expanded to a time value or other information.
+.sp
+The format sequences and their meanings are as follows.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%%\fR\fR
+.ad
+.sp .6
+.RS 4n
+A literal \fB%\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%[\fIp\fR][l]R\fR\fR
+.ad
+.sp .6
+.RS 4n
+The elapsed time in seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%[\fIp\fR][l]U\fR\fR
+.ad
+.sp .6
+.RS 4n
+The number of CPU seconds spent in user mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%[\fIp\fR][l]S\fR\fR
+.ad
+.sp .6
+.RS 4n
+The number of CPU seconds spent in system mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%P\fR\fR
+.ad
+.sp .6
+.RS 4n
+The CPU percentage, computed as \fB(U + S) / R\fR.
+.RE
+
+The braces denote optional portions. The optional \fIp\fR is a digit specifying
+the \fIprecision\fR, the number of fractional digits after a decimal point. A
+value of \fB0\fR causes no decimal point or fraction to be output. At most
+three places after the decimal point can be displayed. Values of \fIp\fR
+greater than \fB3\fR are treated as \fB3\fR. If \fIp\fR is not specified, the
+value \fB3\fR is used.
+.sp
+The optional \fBl\fR specifies a longer format, including hours if greater than
+zero, minutes, and seconds of the form \fIHHhMMmSS.FFs\fR. The value of \fIp\fR
+determines whether or not the fraction is included.
+.sp
+All other characters are output without change and a trailing NEWLINE is added.
+If unset, the default value, \fB$'\nreal\t%2lR\nuser\t%2lU\nsys%2lS'\fR, is
+used. If the value is null, no timing information is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMOUT\fR\fR
+.ad
+.RS 14n
+.rt
+If set to a value greater than zero, \fBTMOUT\fR is the default time-out value
+for the \fBread\fR built-in command. The \fBselect\fR compound command
+terminates after \fBTMOUT\fR seconds when input is from a terminal. Otherwise,
+the shell terminates if a line is not entered within the prescribed number of
+seconds while reading from a terminal. The shell can be compiled with a maximum
+bound for this value which cannot be exceeded.
+.sp
+The shell specifies a default value to \fBTMOUT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBVISUAL\fR\fR
+.ad
+.RS 14n
+.rt
+If the value of this variable matches the pattern \fB*[Vv][Ii]*\fR, then the
+\fBvi\fR option is turned on. See \fBSpecial Commands\fR. If the value matches
+the pattern \fB*gmacs*\fR , the \fBgmacs\fR option is turned on. If the value
+matches the pattern \fB*macs*\fR, then the \fBemacs\fR option is turned on. The
+value of \fBVISUAL\fR overrides the value of \fBEDITOR\fR.
+.RE
+
+.SS "Field Splitting"
+.sp
+.LP
+After parameter expansion and command substitution, the results of
+substitutions are scanned for the field separator characters (those found in
+\fBIFS\fR) and split into distinct fields where such characters are found.
+Explicit null fields (\fB""\fR or \fB\&''\fR) are retained. Implicit null
+fields, those resulting from parameters that have no values or command
+substitutions with no output, are removed.
+.sp
+.LP
+If the \fBbraceexpand\fR (\fB-B\fR) option is set, each of the fields resulting
+from \fBIFS\fR are checked to see if they contain one or more of the brace
+patterns. Valid brace patterns: \fB{*\fR,\fB*}\fR,
+\fB{\fR\fIl1\fR\fB\&..\fR\fIl2\fR\fB}\fR ,
+\fB{\fR\fIn1\fR\fB\&..\fR\fIn2\fR\fB}\fR,
+\fB{\fR\fIn1\fR\fB\&..\fR\fIn2\fR\fB%\fR\fIfmt\fR\fB}
+{\fR\fIn1\fR\fB\&..\fR\fIn2\fR \fB\&..\fR\fIn3\fR\fB}\fR, or
+\fB{\fR\fIn1\fR\fB\&..\fR\fIn2\fR \fB\&..\fR\fIn3\fR\fB%\fR\fIfmt\fR\fB}\fR ,
+where \fB*\fR represents any character, \fIl1\fR,\fIl2\fR are letters and
+\fIn1\fR,\fIn2\fR,\fIn3\fR are signed numbers and \fIfmt\fR is a format
+specified as used by \fBprintf\fR. In each case, fields are created by
+prepending the characters before the \fB{\fR and appending the characters after
+the } to each of the strings generated by the characters between the \fB{\fR
+and \fB}\fR. The resulting fields are checked to see if they have any brace
+patterns.
+.sp
+.LP
+In the first form, a field is created for each string between \fB{\fR and
+\fB,,\fR between \fB,\fR and \fB,,\fR and between , and \fB}\fR. The string
+represented by \fB*\fR can contain embedded matching { and } without quoting.
+Otherwise, each \fB{\fR and \fB}\fR with \fB*\fR must be quoted.
+.sp
+.LP
+In the second form, \fIl1\fR and \fIl2\fR must both be either upper case or
+both be lower case characters in the C locale. In this case a field is created
+for each character from \fIl1\fR through \fIl2\fR.
+.sp
+.LP
+In the remaining forms, a field is created for each number starting at
+\fIn1\fR. This continues until it reaches \fIn2\fR and increments \fIn1\fR by
+\fIn3\fR. The cases where \fIn3\fR is not specified behave as if \fIn3\fR were
+1 if \fIn1\fR\fB<=\fR\fIn2\fR, and \fB-1\fR otherwise. In forms which specify
+\fB%\fR\fIfmt\fR, any format flags, widths and precisions can be specified and
+\fIfmt\fR can end in any of the specifiers \fBcdiouxX\fR. For example,
+\fB{a,z}{1..5..3%02d}{b..c}x\fR expands to the 8 fields, \fBa01bx, a01cx,
+a04bx, a04cx, z01bx, z01cx, z04bx,\fR and \fBz4cx\fR.
+.SS "File Name Generation"
+.sp
+.LP
+Following splitting, each field is scanned for the characters \fB*\fR, \fB?\fR,
+\fB(\fR, and \fB[\fR, unless the \fB-f\fR option has been set. If one of these
+characters appears, then the word is regarded as a pattern.
+.sp
+.LP
+Each file name component that contains any pattern character is replaced with a
+lexicographically sorted set of names that matches the pattern from that
+directory. If no file name is found that matches the pattern, then that
+component of the file name is left unchanged unless the pattern is prefixed
+with \fB~(N)\fR in which case it is removed. If \fBFIGNORE\fR is set, then each
+file name component that matches the pattern defined by the value of
+\fBFIGNORE\fR is ignored when generating the matching file names. The names
+\fB\&.\fR and \fB\&..\fR are also ignored. If \fBFIGNORE\fR is not set, the
+character \fB\&.\fR at the start of each file name component is ignored unless
+the first character of the pattern corresponding to this component is the
+character \fB\&.\fR itself. For other uses of pattern matching the \fB/\fR and
+\fB\&.\fR are not specially treated.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 11n
+.rt
+Match any string, including the null string. When used for file name expansion,
+if the \fBglobstar\fR option is on, two adjacent \fB*\fRs by themselves match
+all files and zero or more directories and subdirectories. If the two adjacent
+\fB*\fRs are followed by a \fB/\fR, only directories and subdirectories match.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 11n
+.rt
+Matches any single character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fB\&...\fR]\fR
+.ad
+.RS 11n
+.rt
+Match any one of the enclosed characters. A pair of characters separated by
+\fB-\fR matches any character lexically between the pair, inclusive. If the
+first character following the opening \fB[\fR is a \fB!\fR, any character not
+enclosed is matched. A \fB-\fR can be included in the character set by putting
+it as the first or last character. Within \fB[\fR and \fB]\fR, character
+classes can be specified with the syntax \fB[:\fR\fIclass\fR\fB:]\fR where
+\fIclass\fR is one of the following classes defined in the \fBANSI-C\fR
+standard:
+.sp
+.in +2
+.nf
+\fIalnum alpha blank cntrl digit graph
+lower print punct space upper
+word xdigit\fR
+.fi
+.in -2
+.sp
+
+\fIword\fR is equivalent to \fIalnum\fR plus the character \fB_\fR. Within
+\fB[\fR and \fB]\fR, an equivalence class can be specified with the syntax
+\fB[=\fR\fIc\fR\fB=]\fR which matches all characters with the same primary
+collation weight (as defined by the current locale) as the character \fIc\fR.
+Within \fB[\fR and \fB]\fR, [\fI\&.symbol.\fR] matches the collating symbol
+\fIsymbol\fR.
+.RE
+
+.sp
+.LP
+A \fIpattern-list\fR is a list of one or more patterns separated from each
+other with an \fB&\fR or \fB|\fR. An \fB&\fR signifies that all patterns must
+be matched whereas \fB|\fR requires that only one pattern be matched. Composite
+patterns can be formed with one or more of the following sub-patterns:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Optionally matches any one of the specified patterns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Matches zero or more occurrences of the specified patterns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Matches one or more occurrences of the specified patterns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB{\fR\fIn\fR\fB(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Matches \fIn\fR occurrences of the specified patterns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB{\fR\fIm\fR\fB,\fR\fIn\fR\fB(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Matches from \fIm\fR to \fIn\fR occurrences of the specified patterns. If
+\fIm\fR is omitted, \fB0\fR is used. If \fIn\fR is omitted at least \fIm\fR
+occurrences are matched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB@(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Matches exactly one of the specified patterns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!(\fR\fIpattern-list\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Matches anything except one of the specified patterns.
+.RE
+
+.sp
+.LP
+By default, each pattern, or sub-pattern matches the longest string possible
+consistent with generating the longest overall match. If more than one match is
+possible, the one starting closest to the beginning of the string is chosen.
+However, for each of the compound patterns a \fB-\fR can be inserted in front
+of the \fB(\fR to cause the shortest match to the specified \fIpattern-list\fR
+to be used.
+.sp
+.LP
+When \fIpattern-list\fR is contained within parentheses, the backslash
+character \fB\e\fR is treated specially even when inside a character class. All
+\fBANSI-C\fR character escapes are recognized and match the specified
+character. In addition the following escape sequences are recognized:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ed\fR\fR
+.ad
+.RS 7n
+.rt
+Matches any character in the digit class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eD\fR\fR
+.ad
+.RS 7n
+.rt
+Matches any character not in the digit class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\es\fR\fR
+.ad
+.RS 7n
+.rt
+Matches any character in the space class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eS\fR\fR
+.ad
+.RS 7n
+.rt
+Matches any character not in the space class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ew\fR\fR
+.ad
+.RS 7n
+.rt
+Matches any character in the word class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eW\fR\fR
+.ad
+.RS 7n
+.rt
+Matches any character not in the word class.
+.RE
+
+.sp
+.LP
+A pattern of the form \fB%(\fR\fIpattern-pairs\fR\fB)\fR is a sub-pattern that
+can be used to match nested character expressions. Each \fIpattern-pair\fR is a
+two character sequence which cannot contain \fB&\fR or \fB|\fR. The first
+\fIpattern-pair\fR specifies the starting and ending characters for the match.
+Each subsequent \fIpattern-pair\fR represents the beginning and ending
+characters of a nested group that is skipped over when counting starting and
+ending character matches. The behavior is unspecified when the first character
+of a \fIpattern-pair\fR is alphanumeric except for the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.RS 5n
+.rt
+Causes the ending character to terminate the search for this pattern without
+finding a match.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBE\fR\fR
+.ad
+.RS 5n
+.rt
+Causes the ending character to be interpreted as an escape character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBL\fR\fR
+.ad
+.RS 5n
+.rt
+Causes the ending character to be interpreted as a quote character causing all
+characters to be ignored when looking for a match.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBQ\fR\fR
+.ad
+.RS 5n
+.rt
+Causes the ending character to be interpreted as a quote character causing all
+characters other than any escape character to be ignored when looking for a
+match.
+.RE
+
+.sp
+.LP
+\fB%({}Q"E\e)\fR, matches characters starting at \fB{\fR until the matching
+\fB}\fR is found not counting any \fB{\fR or \fB}\fR that is inside a double
+quoted string or preceded by the escape character \fB\e\fR\&. Without the
+\fB{}\fR this pattern matches any C language string.
+.sp
+.LP
+Each sub-pattern in a composite pattern is numbered, starting at \fB1\fR, by
+the location of the \fB(\fR within the pattern. The sequence \fB\e\fR\fIn\fR,
+where \fIn\fR is a single digit and \fB\e\fR\fIn\fR comes after the \fIn\fRth.
+sub-pattern, matches the same string as the sub-pattern itself.
+.sp
+.LP
+A pattern can contain sub-patterns of the form
+\fB~(\fR\fIoptions\fR\fB:\fR\fIpattern-list\fR\fB)\fR, where either
+\fIoptions\fR or \fB:\fR\fIpattern-list\fR can be omitted. Unlike the other
+compound patterns, these sub-patterns are not counted in the numbered
+sub-patterns. If \fIoptions\fR is present, it can consist of one or more of the
+following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 5n
+.rt
+Enable the following options. This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 5n
+.rt
+Disable the following options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBE\fR\fR
+.ad
+.RS 5n
+.rt
+The remainder of the pattern uses extended regular expression syntax like the
+\fBegrep\fR(1) command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR\fR
+.ad
+.RS 5n
+.rt
+The remainder of the pattern uses \fBfgrep\fR(1) expression syntax.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 5n
+.rt
+File the longest match (greedy).
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBG\fR\fR
+.ad
+.RS 5n
+.rt
+The remainder of the pattern uses basic regular expression syntax like the
+\fBgrep\fR(1) command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 5n
+.rt
+Treat the match as case insensitive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBK\fR\fR
+.ad
+.RS 5n
+.rt
+The remainder of the pattern uses shell pattern syntax.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 5n
+.rt
+Left anchor the pattern.
+.sp
+This is the default for \fBK\fR style patterns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBN\fR\fR
+.ad
+.RS 5n
+.rt
+This is ignored. However, when it is the first letter and is used with file
+name generation, and no matches occur, the file pattern expands to the empty
+string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 5n
+.rt
+Right anchor the pattern.
+.sp
+This is the default for \fBK\fR style patterns.
+.RE
+
+.sp
+.LP
+If both \fIoptions\fR and \fB:\fR\fIpattern-list\fR are specified, then the
+options apply only to \fIpattern-list\fR. Otherwise, these options remain in
+effect until they are disabled by a subsequent \fB~(...)\fR or at the end of
+the sub-pattern containing \fB~(...)\fR.
+.SS "Quoting"
+.sp
+.LP
+Each of the metacharacters listed in the \fBDefinitions\fR has a special
+meaning to the shell.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 5n
+.rt
+File the longest match (greedy). This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 5n
+.rt
+Treat the match as case insensitive.
+.RE
+
+.sp
+.LP
+If both \fIoptions\fR and \fB:\fR\fIpattern-list\fR are specified, then the
+options apply only to \fIpattern-list\fR. Otherwise, the options remain in
+effect until they are disabled by a subsequent \fB~(...)\fR or at the end of
+the sub-pattern containing \fB~(...)\fR.
+.sp
+.LP
+Each of the metacharacters listed in the \fBDefinitions\fR section of this
+manual page has a special meaning to the shell and causes termination of a word
+unless quoted. A character can be quoted, that is, made to stand for itself, by
+preceding it with a backslash (\fB\e\fR). The pair \fB\e\fRNEWLINE is removed.
+All characters enclosed between a pair of single quote marks (\fB\&''\fR) that
+is not preceded by a \fB$\fR are quoted. A single quote cannot appear within
+the single quotes. A single quoted string preceded by an unquoted \fB$\fR is
+processed as an \fBANSI-C\fR string except for the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e0\fR\fR
+.ad
+.RS 19n
+.rt
+Causes the remainder of the string to be ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ec\fR\fIx\fR\fR
+.ad
+.RS 19n
+.rt
+Expands to the character CTRL-x.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eC\fR[\fB\&.\fR\fIname\fR\fB\&.\fR]\fR
+.ad
+.RS 19n
+.rt
+Expands to the collating element \fIname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ee\fR\fR
+.ad
+.RS 19n
+.rt
+Equivalent to the escape character (\fBASCII\fR 033),
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eE\fR\fR
+.ad
+.RS 19n
+.rt
+Equivalent to the escape character (\fBASCII\fR 033),
+.RE
+
+.sp
+.LP
+Inside double quote marks (\fB""\fR), parameter and command substitution occur
+and \fB\e\fR quotes the characters \fB\e\fR, \fB`\fR, \fB"\fR, and \fB$\fR. A
+\fB$\fR in front of a double quoted string is ignored in the \fBC\fR or
+\fBPOSIX\fR locale, and might cause the string to be replaced by a locale
+specific string otherwise. The meaning of \fB$*\fR and \fB$@\fR is identical
+when not quoted or when used as a variable assignment value or as a file name.
+However, when used as a command argument, \fB"$*"\fR is equivalent to
+\fB"$1\fId\fR$2\fId\fR..."\fR, where \fId\fR is the first character of the IFS
+variable, whereas \fB"$@"\fR is equivalent to \fB"$1" "$2" ....\fR Inside grave
+quote marks (\fB``\fR), \fB\\fR quotes the characters \fB\e\fR, \fB`\fR, and
+\fB$\fR. If the grave quotes occur within double quotes, then \fB\e\fR also
+quotes the character \fB"\fR.
+.sp
+.LP
+The special meaning of reserved words or aliases can be removed by quoting any
+character of the reserved word. The recognition of function names or built-in
+command names cannot be altered by quoting them.
+.SS "Arithmetic Evaluation"
+.sp
+.LP
+The shell performs arithmetic evaluation for arithmetic substitution, to
+evaluate an arithmetic command, to evaluate an indexed array subscript, and to
+evaluate arguments to the built-in commands \fBshift\fR and \fBlet\fR.
+Arithmetic evaluation is also performed on argument operands of the built-in
+command printf that correspond to numeric format specifiers in the format
+operand. See \fBprintf\fR(1). Evaluations are performed using double precision
+floating point arithmetic or long double precision floating point for systems
+that provide this data type. Floating point constants follow the \fBANSI-C\fR
+programming language floating point conventions. Integer constants follow the
+\fBANSI-C\fR programming language integer constant conventions although only
+single byte character constants are recognized and character casts are not
+recognized. Constants can be of the form \fB[\fR\fIbase#\fR\fB]\fR\fIn\fR where
+\fIbase\fR is a decimal number between two and sixty-four representing the
+arithmetic base and \fIn\fR is a number in that base. The digits greater than
+\fB9\fR are represented by the lower case letters, the upper case letters,
+\fB@\fR, and \fB_\fR respectively. For bases less than or equal to \fB36\fR,
+upper and lower case characters can be used interchangeably.
+.sp
+.LP
+An arithmetic expression uses the same syntax, precedence, and associativity of
+expression as the C language. All the C language operators that apply to
+floating point quantities can be used. In addition, the operator \fB**\fR can
+be used for exponentiation. It has higher precedence than multiplication and is
+left associative. When the value of an arithmetic variable or subexpression can
+be represented as a long integer, all C language integer arithmetic operations
+can be performed. Variables can be referenced by name within an arithmetic
+expression without using the parameter expansion syntax. When a variable is
+referenced, its value is evaluated as an arithmetic expression.
+.sp
+.LP
+Any of the following math library functions that are in the C math library can
+be used within an arithmetic expression:
+.sp
+.in +2
+.nf
+abs acos acosh asin asinh atan atan2 atanh cbrt
+copysign cos cosh erf erfc exp exp2 expm1 fabs
+fdim finite floor fma fmax fmod hypot ilogb
+int isinf isnan lgamma log log2 logb
+nearbyint nextafter nexttoward pow remainder
+rint round sin sinh sqrt tan tanh tgamma trunc
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+An internal representation of a \fIvariable\fR as a double precision floating
+point can be specified with the \fB-E [\fR\fIn\fR\fB]\fR or \fB-F
+[\fR\fIn\fR\fB]\fR option of the \fBtypeset\fR special built-in command. The
+\fB-E\fR option causes the expansion of the value to be represented using
+scientific notation when it is expanded. The optional option argument \fIn\fR
+defines the number of significant figures. The \fB-F\fR option causes the
+expansion to be represented as a floating decimal number when it is expanded.
+The optional option argument \fIn\fR defines the number of places after the
+decimal point in this case.
+.sp
+.LP
+An internal integer representation of a \fIvariable\fR can be specified with
+the \fB-i\fR \fB[\fR\fIn\fR\fB]\fR option of the \fBtypeset\fR special built-in
+command. The optional option argument \fIn\fR specifies an arithmetic base to
+be used when expanding the variable. If you do not specify an arithmetic base,
+base 10 is used.
+.sp
+.LP
+Arithmetic evaluation is performed on the value of each assignment to a
+variable with the \fB-E\fR, \fB-F\fR, or \fB-i\fR option. Assigning a floating
+point number to a variable whose type is an integer causes the fractional part
+to be truncated.
+.SS "Prompting"
+.sp
+.LP
+When used interactively, the shell prompts with the value of \fBPS1\fR after
+expanding it for parameter expansion, command substitution, and arithmetic
+substitution, before reading a command. In addition, each single \fB!\fR in the
+prompt is replaced by the command number. A \fB!!\fR is required to place
+\fB!\fR in the prompt. If at any time a NEWLINE is typed and further input is
+needed to complete a command, then the secondary prompt, that is, the value of
+\fBPS2\fR, is issued.
+.SS "Conditional Expressions"
+.sp
+.LP
+A \fBconditional expression\fR is used with the \fB[[\fR compound command to
+test attributes of files and to compare strings. Field splitting and file name
+generation are not performed on the words between \fB[[\fR and \fB]]\fR.
+.sp
+.LP
+Each expression can be constructed from one or more of the following unary or
+binary expressions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists.
+.sp
+This option is the same as \fB-e\fR. This option is obsolete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a block special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a character special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is an ordinary file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and it has its \fBsetgid\fR bit set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and its group matches the effective group id of this
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a symbolic link.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and it has its sticky bit set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a symbolic link.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIstring\fR\fR
+.ad
+.RS 21n
+.rt
+True, if length of \fIstring\fR is \fBnon-zero\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and the modification time is greater than the last
+access time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR\fR
+.ad
+.RS 21n
+.rt
+True, if option named \fIoption\fR is on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fI?option\fR\fR
+.ad
+.RS 21n
+.rt
+True, if option named \fIoption\fR is a valid option name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is owned by the effective user id of this
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a \fBFIFO\fR special file or a pipe.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is readable by current process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and has size greater than zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is a socket.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIfildes\fR\fR
+.ad
+.RS 21n
+.rt
+True, if file descriptor number \fIfildes\fR is open and associated with a
+terminal device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and it has its \fBsetuid\fR bit set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is writable by current process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIfile\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile\fR exists and is executable by current process. If \fIfile\fR
+exists and is a directory, then true if the current process has permission to
+search in the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIstring\fR\fR
+.ad
+.RS 21n
+.rt
+True, if length of \fIstring\fR is zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fB-ef\fR \fIfile2\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile1\fR and \fIfile2\fR exist and refer to the same file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fB-nt\fR \fIfile2\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile1\fR exists and \fIfile2\fR does not, or \fIfile1\fR is newer
+than \fIfile2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fB-ot\fR \fIfile2\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIfile2\fR exists and \fIfile1\fR does not, or \fIfile1\fR is older
+than \fIfile2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIstring\fR is not null.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR \fB==\fR \fIpattern\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIstring\fR matches \fIpattern\fR. Any part of \fIpattern\fR can be
+quoted to cause it to be matched as a string. With a successful match to
+\fIpattern\fR, the \fB\&.sh.match\fR array variable contains the match and
+sub-pattern matches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR \fB=\fR \fIpattern\fR\fR
+.ad
+.RS 21n
+.rt
+Same as \fB==\fR, but is obsolete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR \fB!=\fR \fIpattern\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIstring\fR does not match \fIpattern\fR. When the \fIstring\fR
+matches the \fIpattern\fR the \fB\&.sh.match\fR array variable contains the
+match and sub-pattern matches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR \fB=~\fR \fIere\fR\fR
+.ad
+.RS 21n
+.rt
+True if \fIstring\fR matches the pattern \fB~(E)\fR\fIere\fR where \fIere\fR is
+an extended regular expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring1\fR \fB<\fR \fIstring2\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIstring1\fR comes before \fIstring2\fR based on \fBASCII\fR value of
+their characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring1\fR \fB>\fR \fIstring2\fR\fR
+.ad
+.RS 21n
+.rt
+True, if \fIstring1\fR comes after \fIstring2\fR based on \fBASCII\fR value of
+their characters.
+.RE
+
+.sp
+.LP
+In each of the following expressions, if \fIfile\fR is of the form
+\fB/dev/fd/\fR\fIn\fR, where \fIn\fR is an integer, the test is applied to the
+open file whose descriptor number is \fIn\fR. The following obsolete arithmetic
+comparisons are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexp1\fR \fB-eq\fR \fIexp2\fR\fR
+.ad
+.RS 17n
+.rt
+True, if \fIexp1\fR is equal to \fIexp2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexp1\fR \fB-ge\fR \fIexp2\fR\fR
+.ad
+.RS 17n
+.rt
+True, if \fIexp1\fR is greater than or equal to \fIexp2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexp1\fR \fB-gt\fR \fIexp2\fR\fR
+.ad
+.RS 17n
+.rt
+True, if \fIexp1\fR is greater than \fIexp2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexp1\fR \fB-le\fR \fIexp2\fR\fR
+.ad
+.RS 17n
+.rt
+True, if \fIexp1\fR is less than or equal to \fIexp2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexp1\fR \fB-lt\fR \fIexp2\fR\fR
+.ad
+.RS 17n
+.rt
+True, if \fIexp1\fR is less than \fIexp2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexp1\fR \fB-ne\fR \fIexp2\fR\fR
+.ad
+.RS 17n
+.rt
+True, if \fIexp1\fR is not equal to \fIexp2\fR.
+.RE
+
+.sp
+.LP
+A compound expression can be constructed from these primitives by using any of
+the following, listed in decreasing order of precedence:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(\fR\fIexpression\fR\fB)\fR\fR
+.ad
+.RS 30n
+.rt
+True, if \fIexpression\fR is true. Used to group expressions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR \fIexpression\fR\fR
+.ad
+.RS 30n
+.rt
+True, if \fIexpression\fR is false.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression1\fR \fB&&\fR \fIexpression2\fR\fR
+.ad
+.RS 30n
+.rt
+True, if \fIexpression1\fR and \fIexpression2\fR are both true.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression1\fR \fB||\fR \fIexpression2\fR\fR
+.ad
+.RS 30n
+.rt
+True, if either \fIexpression1\fR or \fIexpression2\fR is true.
+.RE
+
+.SS "Input and Output"
+.sp
+.LP
+Before a command is executed, its input and output can be redirected using a
+special notation interpreted by the shell. The following can appear anywhere in
+a simple command or can precede or follow a command and are \fBnot\fR passed on
+to the invoked command. Command substitution, parameter expansion, and
+arithmetic substitution occur before \fIword\fR or \fIdigit\fR is used except
+as noted in this section. File name generation occurs only if the shell is
+interactive and the pattern matches a single file. Field splitting is not
+performed.
+.sp
+.LP
+In each of the following redirections, if \fIfile\fR is of the form
+\fB/dev/sctp/\fR\fIhost\fR\fB/\fR\fIport\fR,
+\fB/dev/tcp/\fR\fIhost\fR\fB/\fR\fIport\fR, or
+\fB/dev/udp/\fR\fIhost\fR\fB/\fR\fIport\fR, where \fIhost\fR is a hostname or
+host address, and \fIport\fR is a service specified by name or an integer port
+number, then the redirection attempts to make a \fBtcp\fR, \fBsctp\fR or
+\fBudp\fR connection to the corresponding socket.
+.sp
+.LP
+No intervening space is allowed between the characters of redirection
+operators.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+Use file \fIword\fR as standard input (file descriptor 0).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+Use file \fIword\fR as standard output (file descriptor 1). If the file does
+not exist then it is created. If the file exists, and the \fBnoclobber\fR
+option is on, this causes an error. Otherwise, it is truncated to zero length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>|\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB>\fR, except that it overrides the \fBnoclobber\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>>\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+Use file \fIword\fR as standard output. If the file exists, then output is
+appended to it (by first seeking to the end-of-file). Otherwise, the file is
+created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<>\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+Open file \fIword\fR for reading and writing as standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<<\fR\fB[-]\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+The shell input is read up to a line that is the same as \fIword\fR after any
+quoting has been removed, or to an end-of-file. No parameter substitution,
+command substitution, arithmetic substitution or file name generation is
+performed on \fIword\fR. The resulting document, called a \fBhere-document\fR,
+becomes the standard input. If any character of \fIword\fR is quoted, then no
+interpretation is placed upon the characters of the document. Otherwise,
+parameter expansion, command substitution, and arithmetic substitution occur,
+\fB\e\fRNEWLINE is ignored, and \fB\e\fR must be used to quote the characters
+\fB\e\fR, \fB$\fR, \fB`\fR\&. If \fB-\fR is appended to \fB<<\fR, then all
+leading tabs are stripped from \fIword\fR and from the document. If \fB#\fR is
+appended to \fB<<\fR, then leading SPACEs and TABs are stripped off the first
+line of the document and up to an equivalent indentation is stripped from the
+remaining lines and from \fIword\fR. A tab stop is assumed to occur at every 8
+columns for the purposes of determining the indentation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<<<\fR\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+A short form of here document in which \fIword\fR becomes the contents of the
+here-document after any parameter expansion, command substitution, and
+arithmetic substitution occur.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<&\fR\fIdigit\fR\fR
+.ad
+.RS 14n
+.rt
+The standard input is duplicated from file descriptor \fIdigit\fR, and
+similarly for the standard output using \fB>&\fR\fIdigit\fR. See \fBdup\fR(2).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<&\fR\fIdigit\fR\fB-\fR\fR
+.ad
+.RS 14n
+.rt
+The file descriptor specified by \fIdigit\fR is moved to standard input.
+Similarly for the standard output using \fB>&\fR\fIdigit\fR\fB-\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<&-\fR\fR
+.ad
+.RS 14n
+.rt
+The standard input is closed. Similarly for the standard output using
+\fB>&-\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<&p\fR\fR
+.ad
+.RS 14n
+.rt
+The input from the co-process is moved to standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>&p\fR\fR
+.ad
+.RS 14n
+.rt
+The output to the co-process is moved to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<#((\fR\fIexpr\fR\fB))\fR\fR
+.ad
+.RS 14n
+.rt
+Evaluate arithmetic expression \fIexpr\fR and position file descriptor 0 to the
+resulting value bytes from the start of the file. The variables \fBCUR\fR and
+\fBEOF\fR evaluate to the current offset and end-of-file offset respectively
+when evaluating \fIexpr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>#((\fR\fIexpr\fR\fB))\fR\fR
+.ad
+.RS 14n
+.rt
+The same as \fB<#\fR except applies to file descriptor 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<#\fR\fIpattern\fR\fR
+.ad
+.RS 14n
+.rt
+Seek forward to the beginning of the next line containing pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<##\fR\fIpattern\fR\fR
+.ad
+.RS 14n
+.rt
+The same as \fB<#\fR, except that the portion of the file that is skipped is
+copied to standard output.
+.RE
+
+.sp
+.LP
+If one of the redirection operators is preceded by a digit, with no intervening
+space, then the file descriptor number referred to is that specified by the
+digit (instead of the default 0 or 1). If one of the redirection operators
+other than \fB>&-\fR and the \fB>#\fR and \fB<#\fR forms, is preceded by
+\fB{\fR\fIvarname\fR\fB}\fR with no intervening space, then a file descriptor
+number \fB> 10\fR is selected by the shell and stored in the variable
+\fIvarname\fR. If \fB>&-\fR or the any of the \fB>#\fR and \fB<#\fR forms is
+preceded by \fB{\fR\fIvarname\fR\fB}\fR the value of \fIvarname\fR defines the
+file descriptor to close or position. For example:
+.sp
+.in +2
+.nf
+\&... 2>&1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+means file descriptor 2 is to be opened for writing as a duplicate of file
+descriptor 1 and
+.sp
+.in +2
+.nf
+exec [\fIn\fR]<\fIfile\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+means open \fIfile\fR for reading and store the file descriptor number in
+variable \fIn\fR. The order in which redirections are specified is significant.
+The shell evaluates each redirection in terms of the (\fIfile_descriptor\fR,
+\fIfile\fR) association at the time of evaluation. For example:
+.sp
+.in +2
+.nf
+\&... 1>\fIfname\fR 2>&1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+first associates file descriptor 1 with file \fIfname\fR. It then associates
+file descriptor 2 with the file associated with file descriptor 1, that is,
+\fIfname\fR. If the order of redirections were reversed, file descriptor 2
+would be associated with the terminal (assuming file descriptor 1 had been) and
+then file descriptor 1 would be associated with file \fIfname\fR. If a command
+is followed by \fB&\fR and job control is not active, the default standard
+input for the command is the empty file \fB/dev/null\fR. Otherwise, the
+environment for the execution of a command contains the file descriptors of the
+invoking shell as modified by input and output specifications.
+.SS "Environment"
+.sp
+.LP
+The \fIenvironment\fR is a list of name-value pairs that is passed to an
+executed program in the same way as a normal argument list. See
+\fBenviron\fR(5).
+.sp
+.LP
+The names must be \fIidentifiers\fR and the values are character strings. The
+shell interacts with the environment in several ways. On invocation, the shell
+scans the environment and creates a variable for each name found, giving it the
+corresponding value and attributes and marking it \fBexport\fR. Executed
+commands inherit the environment. If the user modifies the values of these
+variables or creates new ones, using the \fBexport\fR or \fBtypeset\fR \fB-x\fR
+commands, they become part of the environment. The environment seen by any
+executed command is thus composed of any name-value pairs originally inherited
+by the shell, whose values can be modified by the current shell, plus any
+additions which must be noted in \fBexport\fR or \fBtypeset\fR \fB-x\fR
+commands. The environment for any simple-command or function can be augmented
+by prefixing it with one or more variable assignments. A variable assignment
+argument is a word of the form \fIidentifier\fR\fB=\fR\fIvalue\fR. Thus:
+.sp
+.in +2
+.nf
+TERM=450 cmd args
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and
+.sp
+.in +2
+.nf
+(export TERM; TERM=450; cmd args)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+are equivalent (as far as the execution of \fIcmd\fR is concerned except for
+special built-in commands listed in the \fBBuilt-Ins\fR section, those that are
+preceded with a dagger. If the obsolete \fB-k\fR option is set, all variable
+assignment arguments are placed in the environment, even if they occur after
+the command name.
+.sp
+.LP
+The following example first prints \fBa=b c\fR and then \fBc\fR:
+.sp
+.in +2
+.nf
+echo a=b c
+set -k
+echo a=b c
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This feature is intended for use with scripts written for early versions of the
+shell and its use in new scripts is strongly discouraged.
+.SS "Functions"
+.sp
+.LP
+For historical reasons, there are two ways to define functions, the
+\fBname()\fR syntax and the \fBfunction\fR \fBname\fR syntax. These are
+described in the \fBCommands\fR section of this manual page.
+.sp
+.LP
+Shell functions are read in and stored internally. Alias names are resolved
+when the function is read. Functions are executed like commands with the
+arguments passed as positional parameters. See the \fBExecution\fR section of
+this manual page for details.
+.sp
+.LP
+Functions defined by the \fBfunction\fR \fBname\fR syntax and called by name
+execute in the same process as the caller and share all files and present
+working directory with the caller. Traps caught by the caller are reset to
+their default action inside the function. A trap condition that is not caught
+or ignored by the function causes the function to terminate and the condition
+to be passed on to the caller. A trap on \fBEXIT\fR set inside a function is
+executed in the environment of the caller after the function completes.
+Ordinarily, variables are shared between the calling program and the function.
+However, the \fBtypeset\fR special built-in command used within a function
+defines local variables whose scope includes the current function. They can be
+passed to functions that they call in the variable assignment list that
+precedes the call or as arguments passed as name references. Errors within
+functions return control to the caller.
+.sp
+.LP
+Functions defined with the \fBname()\fR syntax and functions defined with the
+\fBfunction\fR \fBname\fR syntax that are invoked with the \fB\&.\fR special
+built-in are executed in the caller's environment and share all variables and
+traps with the caller. Errors within these function executions cause the script
+that contains them to abort.
+.sp
+.LP
+The special built-in command \fBreturn\fR is used to return from function
+calls.
+.sp
+.LP
+Function names can be listed with the \fB-f\fR or \fB+f\fR option of the
+\fBtypeset\fR special built-in command. The text of functions, when available,
+is also listed with \fB-f\fR. Functions can be undefined with the \fB-f\fR
+option of the \fBunset\fR special built-in command.
+.sp
+.LP
+Ordinarily, functions are unset when the shell executes a shell script.
+Functions that need to be defined across separate invocations of the shell
+should be placed in a directory and the \fBFPATH\fR variable should contain the
+name of this directory. They can also be specified in the \fBENV\fR file.
+.SS "Discipline Functions"
+.sp
+.LP
+Each variable can have zero or more discipline functions associated with it.
+The shell initially understands the discipline names \fBget\fR, \fBset\fR,
+\fBappend\fR, and \fBunset\fR but on most systems others can be added at run
+time via the C programming interface extension provided by the \fBbuiltin\fR
+built-in utility. If the \fBget\fR discipline is defined for a variable, it is
+invoked whenever the specified variable is referenced. If the variable
+\fB\&.sh.value\fR is assigned a value inside the discipline function, the
+referenced variable is evaluated to this value instead. If the \fBset\fR
+discipline is defined for a variable, it is invoked whenever the specified
+variable is assigned a value. If the \fBappend\fR discipline is defined for a
+variable, it is invoked whenever a value is appended to the specified variable.
+The variable \fB\&.sh.value\fR is specified the value of the variable before
+invoking the discipline, and the variable is assigned the value of
+\fB\&.sh.value\fR after the discipline completes. If .\fBsh.value\fR is
+\fBunset\fR inside the discipline, then that value is unchanged. If the
+\fBunset\fR discipline is defined for a variable, it is invoked whenever the
+specified variable is unset. The variable is not unset unless it is unset
+explicitly from within this discipline function.
+.sp
+.LP
+The variable \fB\&.sh.name\fR contains the name of the variable for which the
+discipline function is called, \fB\&.sh.subscript\fR is the subscript of the
+variable, and \fB\&.sh.value\fR contains the value being assigned inside the
+\fBset\fR discipline function. For the \fBset\fR discipline, changing
+\fB\&.sh.value\fR changes the value that gets assigned.
+.SS "Jobs"
+.sp
+.LP
+If the monitor option of the \fBset\fR command is turned on, an interactive
+shell associates a job with each pipeline. It keeps a table of current jobs,
+printed by the \fBjobs\fR command, and assigns them small integer numbers. When
+a job is started asynchronously with \fB&\fR, the shell prints a line which
+looks like:
+.sp
+.in +2
+.nf
+[1] 1234
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+indicating that the job which was started asynchronously was job number 1 and
+had one (top-level) process, whose process id was \fB1234\fR.
+.sp
+.LP
+If you are running a job and wish to stop it, CTRL-z sends a \fBSTOP\fR signal
+to the current job. The shell normally displays a message that the job has been
+stopped, and displays another prompt. You can then manipulate the state of this
+job, putting it in the background with the \fBbg\fR command, or run some other
+commands and then eventually bring the job back into the foreground with the
+foreground command \fBfg\fR. A CTRL-z takes effect immediately and is like an
+interrupt in that pending output and unread input are discarded when it is
+typed.
+.sp
+.LP
+A job being run in the background stops if it tries to read from the terminal.
+Background jobs are normally allowed to produce output, but this can be
+disabled by giving the command \fBsttytostop\fR. If you set this \fBtty\fR
+option, then background jobs stop when they try to produce output like they do
+when they try to read input.
+.sp
+.LP
+There are several ways to refer to jobs in the shell. A job can be referred to
+by the process id of any process of the job or by one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+The job with the specified number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Any job whose command line begins with \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Any job whose command line contains \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+Current job.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%+\fR\fR
+.ad
+.RS 12n
+.rt
+Equivalent to \fB%%\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%-\fR\fR
+.ad
+.RS 12n
+.rt
+Previous job.
+.RE
+
+.sp
+.LP
+The shell learns immediately whenever a process changes state. It normally
+informs you whenever a job becomes blocked so that no further progress is
+possible, but only just before it prints a prompt. This is done so that it does
+not otherwise disturb your work. The notify option of the \fBset\fR command
+causes the shell to print these job change messages as soon as they occur.
+.sp
+.LP
+When the \fBmonitor\fR option is on, each background job that completes
+triggers any trap set for \fBCHLD\fR.
+.sp
+.LP
+When you try to leave the shell while jobs are running or stopped, you are
+warned that \fBYou have stopped(running) jobs.\fR You can use the \fBjobs\fR
+command to see what they are. If you immediately try to exit again, the shell
+does not warn you a second time, and the stopped jobs are terminated. When a
+login shell receives a \fBHUP\fR signal, it sends a \fBHUP\fR signal to each
+job that has not been disowned with the \fBdisown\fR built-in command.
+.SS "Signals"
+.sp
+.LP
+The \fBINT\fR and \fBQUIT\fR signals for an invoked command are ignored if the
+command is followed by \fB&\fR and the \fBmonitor\fR option is not active.
+Otherwise, signals have the values inherited by the shell from its parent. See
+the \fBtrap\fR built-in command.
+.SS "Execution"
+.sp
+.LP
+Each time a command is read, the substitutions are carried out. If the command
+name matches one of the ones in the \fBSpecial Built-in Commands\fR section of
+this manual page, it is executed within the current shell process. Next, the
+command name is checked to see if it matches a user defined function. If it
+does, the positional parameters are saved and then reset to the arguments of
+the function call. A function is also executed in the current shell process.
+When the function completes or issues a return, the positional parameter list
+is restored. For functions defined with the \fBfunction\fR \fBname\fR syntax,
+any trap set on \fBEXIT\fR within the function is executed. The exit value of a
+function is the value of the last command executed. If a command name is not a
+special built-in command or a user defined function, but it is one of the
+built-in commands, it is executed in the current shell process.
+.sp
+.LP
+The shell variable \fBPATH\fR defines the search path for the directory
+containing the command. Alternative directory names are separated by a colon
+(\fB:\fR). The default path is \fB/bin:/usr/bin:\fR, specifying \fB/bin\fR,
+\fB/usr/bin\fR, and the current directory in that order. The current directory
+can be specified by two or more adjacent colons, or by a colon at the beginning
+or end of the path list. If the command name contains a slash (\fB/\fR), the
+search path is not used. Otherwise, each directory in the path is searched for
+an executable file of the specified name that is not a directory. If found, and
+if the shell determines that there is a built-in version of a command
+corresponding to a specified pathname, this built-in is invoked in the current
+process. If found, and this directory is also contained in the value of the
+\fBFPATH\fR variable, then this file is loaded into the current shell
+environment as if it were the argument to the . command except that only preset
+aliases are expanded, and a function of the specified name is executed as
+described in this manual page. If not found, and the file \fB\&.paths\fR is
+found, and this file contains a line of the form \fBFPATH=\fR\fIpath\fR where
+\fIpath\fR is an existing directory, and this directory contains a file of the
+specified name, then this file is loaded into the current shell environment as
+if it were the argument to the \fB\&. special\fR built-in command and a
+function of the specified name is executed. Otherwise, if found, a process is
+created and an attempt is made to execute the command using \fBexec\fR(2).
+.sp
+.LP
+When an executable is found, the directory where it is found in is searched for
+a file named \fB\&.paths\fR. If this file is found and it contains a line of
+the form \fBBUILTIN_LIB=\fR\fIvalue\fR, the library named by \fIvalue\fR is
+searched for as if it were an option argument to \fBbuiltin -f\fR, and if it
+contains a built-in of the specified name this is executed instead of a command
+by this name. Otherwise, if this file is found and it contains a line of the
+form \fIname\fR\fB=\fR\fIvalue\fR in the first or second line, then the
+environment variable \fIname\fR is modified by prepending the directory
+specified by \fIvalue\fR to the directory list. If \fIvalue\fR is not an
+absolute directory, then it specifies a directory relative to the directory
+that the executable was found. If the environment variable \fIname\fR does not
+already exist it is added to the environment list for the specified command.
+.sp
+.LP
+If the file has execute permission but is not an \fBa.out\fR file, it is
+assumed to be a file containing shell commands. A separate shell is spawned to
+read it. All non-exported variables are removed in this case. If the shell
+command file doesn't have read permission, and/or if the \fBsetuid\fR and
+\fBsetgid\fR bits are set on the file, then the shell executes an agent whose
+job it is to set up the permissions and execute the shell with the shell
+command file passed down as an open file. A parenthesized command is executed
+in a sub-shell without removing non-exported variables.
+.SS "Command Re-entry"
+.sp
+.LP
+The text of the last \fBHISTSIZE\fR (default 512) commands entered from a
+terminal device is saved in a history file. The file \fB$HOME/.sh_history\fR is
+used if the \fBHISTFILE\fR variable is not set or if the file it names is not
+writable. A shell can access the commands of all interactive shells which use
+the same named \fBHISTFILE\fR. The built-in command \fBhist\fR is used to list
+or edit a portion of this file. The portion of the file to be edited or listed
+can be selected by number or by giving the first character or characters of the
+command. A single command or range of commands can be specified. If you do not
+specify an editor program as an argument to \fBhist\fR then the value of the
+variable \fBHISTEDIT\fR is used. If \fBHISTEDIT\fR is unset, the obsolete
+variable \fBFCEDIT\fR is used. If \fBFCEDIT\fR is not defined, then
+\fB/bin/ed\fR is used. The edited commands are printed and executed again upon
+leaving the editor unless you quit without writing. The \fB-s\fR option (and in
+obsolete versions, the editor name \fB-\fR) is used to skip the editing phase
+and to re-execute the command. In this case a substitution parameter of the
+form \fIold\fR\fB=\fR\fInew\fRcan be used to modify the command before
+execution. For example, with the preset alias \fBr\fR, which is aliased to
+\fB\&'hist -s'\fR, typing \fB`r bad=good c'\fR re-executes the most recent
+command which starts with the letter \fBc\fR, replacing the first occurrence of
+the string bad with the string good.
+.SS "Inline Editing Options"
+.sp
+.LP
+Normally, each command line entered from a terminal device is simply typed
+followed by a NEWLINE (RETURN or LINE FEED). If either the \fBemacs\fR,
+\fBgmacs\fR, or \fBvi\fR option is active, the user can edit the command line.
+To be in either of these edit modes set the corresponding option. An editing
+option is automatically selected each time the \fBVISUAL\fR or \fBEDITOR\fR
+variable is assigned a value ending in either of these option names.
+.sp
+.LP
+The editing features require that the user's terminal accept RETURN as carriage
+return without line feed and that a SPACE must overwrite the current character
+on the screen.
+.sp
+.LP
+Unless the \fBmultiline\fR option is on, the editing modes implement a concept
+where the user is looking through a window at the current line. The window
+width is the value of \fBCOLUMNS\fR if it is defined, otherwise \fB80\fR. If
+the window width is too small to display the prompt and leave at least 8
+columns to enter input, the prompt is truncated from the left. If the line is
+longer than the window width minus two, a mark is displayed at the end of the
+window to notify the user. As the cursor moves and reaches the window
+boundaries the window is centered about the cursor. The mark is a \fB>\fR
+(\fB<, *\fR) if the line extends on the right , left, or both sides of the
+window.
+.sp
+.LP
+The search commands in each edit mode provide access to the history file. Only
+strings are matched, not patterns, although a leading \fB^\fR in the string
+restricts the match to begin at the first character in the line.
+.sp
+.LP
+Each of the edit modes has an operation to list the files or commands that
+match a partially entered word. When applied to the first word on the line, or
+the first word after a \fB;\fR, \fB|\fR, \fB&\fR, or \fB(\fR, and the word does
+not begin with \fB~\fR or contain a \fB/\fR, the list of aliases, functions,
+and executable commands defined by the \fBPATH\fR variable that could match the
+partial word is displayed. Otherwise, the list of files that match the
+specified word is displayed. If the partially entered word does not contain any
+file expansion characters, a \fB*\fR is appended before generating these lists.
+After displaying the generated list, the input line is redrawn. These
+operations are called command name listing and file name listing, respectively.
+There are additional operations, referred to as command name completion and
+file name completion, which compute the list of matching commands or files, but
+instead of printing the list, replace the current word with a complete or
+partial match. For file name completion, if the match is unique, a \fB/\fR is
+appended if the file is a directory and a space is appended if the file is not
+a directory. Otherwise, the longest common prefix for all the matching files
+replaces the word. For command name completion, only the portion of the file
+names after the last \fB/\fR are used to find the longest command prefix. If
+only a single name matches this prefix, then the word is replaced with the
+command name followed by a space. When using a \fBTAB\fR for completion that
+does not yield a unique match, a subsequent TAB provides a numbered list of
+matching alternatives. A specific selection can be made by entering the
+selection number followed by a TAB.
+.SS "Key Bindings"
+.sp
+.LP
+The \fBKEYBD\fR trap can be used to intercept keys as they are typed and change
+the characters that are actually seen by the shell. This trap is executed after
+each character (or sequence of characters when the first character is ESC) is
+entered while reading from a terminal.
+.sp
+.LP
+The variable \fB\&.sh.edchar\fR contains the character or character sequence
+which generated the trap. Changing the value of \fB\&.sh.edchar\fR in the trap
+action causes the shell to behave as if the new value were entered from the
+keyboard rather than the original value. The variable \fB\&.sh.edcol\fR is set
+to the input column number of the cursor at the time of the input. The variable
+\fB\&.sh.edmode\fR is set to \fBESC\fR when in \fBvi\fR insert mode and is null
+otherwise. By prepending \fB${.sh.editmode}\fR to a value assigned to
+\fB\&.sh.edchar\fR it causes the shell to change to control mode if it is not
+already in this mode.
+.sp
+.LP
+This trap is not invoked for characters entered as arguments to editing
+directives, or while reading input for a character search.
+.SS "\fBemacs\fR Editing Mode"
+.sp
+.LP
+This mode is entered by enabling either the \fBemacs\fR or \fBgmacs\fR option.
+The only difference between these two modes is the way they handle \fB^T\fR. To
+edit, the user moves the cursor to the point needing correction and then
+inserts or deletes characters or words as needed. All the editing commands are
+control characters or escape sequences. The notation for control characters is
+caret (\fB^\fR) followed by the character.
+.sp
+.LP
+For example, \fB^F\fR is the notation for CTRL/F. This is entered by depressing
+\fBf\fR while holding down the CTRL (control) key. The SHIFT key is not
+depressed. (The notation \fB^?\fR indicates the DEL (delete) key.)
+.sp
+.LP
+The notation for escape sequences is \fBM-\fR followed by a character. For
+example, \fBM-f\fR (pronounced \fBMeta f\fR) is entered by depressing ESC
+(\fBASCII 033\fR) followed by \fBf\fR. \fBM-F\fR is the notation for ESC
+followed by \fBF\fR.
+.sp
+.LP
+All edit commands operate from any place on the line, not just at the
+beginning. The RETURN or the LINE FEED key is not entered after edit commands
+except when noted.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^F\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward (right) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[C\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward (right) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-f\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward one word. The \fBemacs\fR editor's idea of a word is a
+string of characters consisting of only letters, digits and underscores.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^B\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backward (left) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[D\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backward (left) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-b\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backward one word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^A\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the beginning of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[H\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the beginning of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^E\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the end of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[Y\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the end of line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^]\fR\fIchar\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward to the character \fIchar\fR on the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-^]\fR\fIchar\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backwards to the character \fIchar\fR on the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^X^X\fR\fR
+.ad
+.RS 13n
+.rt
+Interchange the cursor and the mark.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIerase\fR\fR
+.ad
+.RS 13n
+.rt
+Delete the previous character. The user-defined erase character is defined by
+the \fBstty\fR(1) command, and is usually \fB^H\fR or \fB#\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlnext\fR\fR
+.ad
+.RS 13n
+.rt
+Removes the next character's editing features. The user-defined literal next
+character is defined by the \fBstty\fR(1) command, or is \fB^V\fR if not
+defined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^D\fR\fR
+.ad
+.RS 13n
+.rt
+Delete the current character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-d\fR\fR
+.ad
+.RS 13n
+.rt
+Delete the current word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-^H\fR\fR
+.ad
+.RS 13n
+.rt
+MetaBACKSPACE. Delete the previous word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-h\fR\fR
+.ad
+.RS 13n
+.rt
+Delete the previous word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-^?\fR\fR
+.ad
+.RS 13n
+.rt
+MetaDEL. Delete the previous word. If your interrupt character is \fB^?\fR
+(DEL, the default), this command does not work.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^T\fR\fR
+.ad
+.RS 13n
+.rt
+Transpose the current character with the previous character, and advance the
+cursor in \fBemacs\fR mode. Transpose two previous characters in \fBgmacs\fR
+mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^C\fR\fR
+.ad
+.RS 13n
+.rt
+Capitalize the current character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-c\fR\fR
+.ad
+.RS 13n
+.rt
+Capitalize the current word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-l\fR\fR
+.ad
+.RS 13n
+.rt
+Change the current word to lower case.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^K\fR\fR
+.ad
+.RS 13n
+.rt
+Delete from the cursor to the end of the line. If preceded by a numerical
+parameter whose value is less than the current cursor position, delete from
+specified position up to the cursor. If preceded by a numerical parameter whose
+value is greater than the current cursor position, then delete from cursor up
+to specified cursor position.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^W\fR\fR
+.ad
+.RS 13n
+.rt
+Kill from the cursor to the mark.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-p\fR\fR
+.ad
+.RS 13n
+.rt
+Push the region from the cursor to the mark on the stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIkill\fR\fR
+.ad
+.RS 13n
+.rt
+Kill the entire current line. The user-defined kill character is defined by the
+\fBstty\fR(1) command, usually a \fB^G\fR or \fB@\fR. If two kill characters
+are entered in succession, all kill characters from then on cause a line feed.
+This is useful when using paper terminals.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^Y\fR\fR
+.ad
+.RS 13n
+.rt
+Restore the last item removed from line. Yank the item back to the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^L\fR\fR
+.ad
+.RS 13n
+.rt
+Line feed and print the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-^L\fR\fR
+.ad
+.RS 13n
+.rt
+Clear the screen.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^@\fR\fR
+.ad
+.RS 13n
+.rt
+Null character. Set mark.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-\fR\fIspace\fR\fR
+.ad
+.RS 13n
+.rt
+MetaSPACE. Set the mark.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^J\fR\fR
+.ad
+.RS 13n
+.rt
+New line. Execute the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^M\fR\fR
+.ad
+.RS 13n
+.rt
+Return. Execute the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEOF\fR\fR
+.ad
+.RS 13n
+.rt
+End-of-file character, normally \fB^D\fR, is processed as an \fBend-of-file\fR
+only if the current line is null.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^P\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the previous command. Each time \fB^P\fR is entered the previous command
+back in time is accessed. Moves back one line when it is not on the first line
+of a multi-line command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[A\fR\fR
+.ad
+.RS 13n
+.rt
+Equivalent to \fB^P\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-<\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the least recent (oldest) history line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM->\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the most recent (youngest) history line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^N\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the next command line. Each time \fB^N\fR is entered the next command
+line forward in time is accessed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[B\fR\fR
+.ad
+.RS 13n
+.rt
+Equivalent to \fB^N\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^R\fR\fIstring\fR\fR
+.ad
+.RS 13n
+.rt
+Reverse search history for a previous command line containing \fIstring\fR. If
+a parameter of zero is specified, the search is forward. \fIstring\fR is
+terminated by a RETURN or NEWLINE. If string is preceded by a \fB^\fR, the
+matched line must begin with \fIstring\fR. If \fIstring\fR is omitted, then the
+next command line containing the most recent \fIstring\fR is accessed. In this
+case a parameter of zero reverses the direction of the search.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^O\fR\fR
+.ad
+.RS 13n
+.rt
+Operate. Execute the current line and fetch the next line relative to current
+line from the history file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-\fR\fIdigits\fR\fR
+.ad
+.RS 13n
+.rt
+Escape. Define numeric parameter. The digits are taken as a parameter to the
+next command. The commands that accept a parameter are: \fB^F\fR, \fB^B\fR,
+\fBERASE\fR, \fB^C\fR, \fB^D\fR, \fB^K\fR, \fB^R\fR, \fB^P\fR, \fB^N\fR,
+\fB^]\fR, \fBM-.\fR, \fBM-\fR, \fBM-^]\fR, \fBM-_\fR, \fBM-=\fR, \fBM-b\fR,
+\fBM-c\fR, \fBM-d\fR, \fBM-f\fR, \fBM-h\fR, \fBM-l\fR, and \fBM-^H\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-\fR\fIletter\fR\fR
+.ad
+.RS 13n
+.rt
+Soft-key. Search the alias list for an alias by the name \fIletter\fR. If an
+alias of \fIletter\fR is defined, insert its value on the input queue.
+\fIletter\fR must not be one of the metafunctions in this section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-[\fR\fIletter\fR\fR
+.ad
+.RS 13n
+.rt
+Soft key. Search the alias list for an alias by the name \fIletter\fR. If an
+alias of this name is defined, insert its value on the input queue. This can be
+used to program function keys on many terminals.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-.\fR\fR
+.ad
+.RS 13n
+.rt
+The last word of the previous command is inserted on the line. If preceded by a
+numeric parameter, the value of this parameter determines which word to insert
+rather than the last word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-_\fR\fR
+.ad
+.RS 13n
+.rt
+Same as \fBM-.\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-*\fR\fR
+.ad
+.RS 13n
+.rt
+Attempt filename generation on the current word. As asterisk is appended if the
+word does not match any file or contain any special pattern characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-\fRESC\fR
+.ad
+.RS 13n
+.rt
+Command or file name completion as described in this manual page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^I\fRTAB\fR
+.ad
+.RS 13n
+.rt
+Attempts command or file name completion as described in this manual page. If a
+partial completion occurs, repeating this behaves as if \fBM-=\fR were entered.
+If no match is found or entered after SPACE, a TAB is inserted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-=\fR\fR
+.ad
+.RS 13n
+.rt
+If not preceded by a numeric parameter, generates the list of matching commands
+or file names as described in this manual page. Otherwise, the word under the
+cursor is replaced by the item corresponding to the value of the numeric
+parameter from the most recently generated command or file list. If the cursor
+is not on a word, the word is inserted instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^U\fR\fR
+.ad
+.RS 13n
+.rt
+Multiply parameter of next command by \fB4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\fR\fR
+.ad
+.RS 13n
+.rt
+Escape the next character. Editing characters, the user's erase, kill and
+interrupt (normally \fB^?\fR) characters can be entered in a command line or in
+a search string if preceded by a \fB\e\fR\&. The \fB\e\fR removes the next
+character's editing features, if any.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-^V\fR\fR
+.ad
+.RS 13n
+.rt
+Display the version of the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM-#\fR\fR
+.ad
+.RS 13n
+.rt
+If the line does not begin with a \fB#\fR, a \fB#\fR is inserted at the
+beginning of the line and after each NEWLINE, and the line is entered. This
+causes a comment to be inserted in the history file. If the line begins with a
+\fB#\fR, the \fB#\fR is deleted and one \fB#\fR after each NEWLINE is also
+deleted.
+.RE
+
+.SS "\fBvi\fR Editing Mode"
+.sp
+.LP
+There are two typing modes. Initially, when you enter a command you are in the
+input mode. To edit, the user enters control mode by typing ESC (033) and moves
+the cursor to the point needing correction and then inserts or deletes
+characters or words as needed. Most control commands accept an optional repeat
+\fIcount\fR prior to the command.
+.sp
+.LP
+When in vi mode on most systems, canonical processing is initially enabled and
+the command is echoed again if the speed is 1200 baud or greater and it
+contains any control characters or less than one second has elapsed since the
+prompt was printed. The ESC character terminates canonical processing for the
+remainder of the command and the user can then modify the command line. This
+scheme has the advantages of canonical processing with the type-ahead echoing
+of raw mode.
+.sp
+.LP
+If the option \fBviraw\fR is also set, the terminal is always have canonical
+processing disabled. This mode is implicit for systems that do not support two
+alternate end of line delimiters, and might be helpful for certain terminals.
+.SS "Input Edit Commands"
+.sp
+.LP
+By default the editor is in input mode.
+.sp
+.LP
+The following input edit commands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fBERASE\fR
+.ad
+.RS 10n
+.rt
+User defined erase character as defined by the \fBstty\fR command, usually
+\fB^H\fR or \fB#\fR. Delete previous character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^W\fR\fR
+.ad
+.RS 10n
+.rt
+Delete the previous blank separated word. On some systems the \fBviraw\fR
+option might be required for this to work.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBEOF\fR
+.ad
+.RS 10n
+.rt
+As the first character of the line causes the shell to terminate unless the
+\fBignoreeof\fR option is set. Otherwise this character is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlnext\fR\fR
+.ad
+.RS 10n
+.rt
+User defined literal next character as defined by the \fBstty\fR(1) or \fB^V\fR
+if not defined. Removes the next character's editing features, if any. On some
+systems the \fBviraw\fR option might be required for this to work.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\fR\fR
+.ad
+.RS 10n
+.rt
+Escape the next ERASE or KILL character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^I\fR TAB\fR
+.ad
+.RS 10n
+.rt
+Attempts command or file name completion as described in this manual page and
+returns to input mode. If a partial completion occurs, repeating this behaves
+as if \fB=\fR were entered from control mode. If no match is found or entered
+after SPACE, a TAB is inserted.
+.RE
+
+.SS "Motion Edit Commands"
+.sp
+.LP
+The motion edit commands move the cursor.
+.sp
+.LP
+The following motion edit commands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]l\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward (right) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB][C\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward (right) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]w\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor forward one alphanumeric word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]W\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the beginning of the next word that follows a blank.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]e\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the end of the word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]E\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the end of the current blank delimited word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]h\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backward (left) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB][D\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backward (left) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]b\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor backward one word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]B\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the preceding blank separated word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]|\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to column \fIcount\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]f\fR\fIc\fR\fR
+.ad
+.RS 13n
+.rt
+Find the next character \fIc\fR in the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]F\fR\fIc\fR\fR
+.ad
+.RS 13n
+.rt
+Find the previous character \fIc\fR in the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]t\fR\fIC\fR\fR
+.ad
+.RS 13n
+.rt
+Equivalent to \fBf\fR followed by \fBh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]T\fR\fIc\fR\fR
+.ad
+.RS 13n
+.rt
+Equivalent to \fBF\fR followed by \fBl\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB];\fR\fR
+.ad
+.RS 13n
+.rt
+Repeat \fIcount\fR times the last single character find command: \fBf\fR,
+\fBF\fR, \fBt,\fR or \fBT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB],\fR\fR
+.ad
+.RS 13n
+.rt
+Reverse the last single character find command \fIcount\fR times.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the start of line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to start of line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[H\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the first non-blank character in the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the end of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[Y\fR\fR
+.ad
+.RS 13n
+.rt
+Move the cursor to the end of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fR
+.ad
+.RS 13n
+.rt
+Moves to balancing \fB(\fR, \fB)\fR, \fB{\fR, \fB}\fR, \fB[\fR, or \fB]\fR. If
+cursor is not on one of the characters described in this section, the remainder
+of the line is searched for the first occurrence of one of the characters
+first.
+.RE
+
+.SS "Search Edit Commands"
+.sp
+.LP
+The search edit commands access your command history.
+.sp
+.LP
+The following search edit commands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]k\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the previous command. Each time \fBk\fR is entered, the previous command
+back in time is accessed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]-\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the previous command. Each time \fBk\fR is entered, the previous command
+back in time is accessed.
+.sp
+Equivalent to \fBk\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB][A\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the previous command. Each time \fBk\fR is entered, the previous command
+back in time is accessed.
+.sp
+Equivalent to \fBk\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]j\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the next command. Each time \fBj\fR is entered, the next command forward
+in time is accessed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]+\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the next command. Each time \fBj\fR is entered, the next command forward
+in time is accessed.
+.sp
+Equivalent to \fBj\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB][B\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch the next command. Each time \fBj\fR is entered, the next command forward
+in time is accessed.
+.sp
+Equivalent to \fBj\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]G\fR\fR
+.ad
+.RS 13n
+.rt
+Fetch command number \fIcount\fR. The default is the least recent history
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/\fR\fIstring\fR\fR
+.ad
+.RS 13n
+.rt
+Search backward through history for a previous command containing \fIstring\fR.
+\fIstring\fR is terminated by a RETURN or NEWLINE. If string is preceded by a
+\fB^\fR, the matched line must begin with \fIstring\fR. If \fIstring\fR is
+null, the previous string is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fIstring\fR\fR
+.ad
+.RS 13n
+.rt
+Search forward through history for a previous command containing \fIstring\fR.
+\fIstring\fR is terminated by a RETURN or NEWLINE. If string is preceded by a
+\fB^\fR, the matched line must begin with \fIstring\fR. If \fIstring\fR is
+null, the previous string is used.
+.sp
+Same as \fI/\fR except that search is in the forward direction.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBn\fR\fR
+.ad
+.RS 13n
+.rt
+Search in the backwards direction for the next match of the last pattern to
+\fI/\fR or \fI?\fR commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBN\fR\fR
+.ad
+.RS 13n
+.rt
+Search in the forward direction for next match of the last pattern to \fI/\fR
+or \fI?\fR.
+.RE
+
+.SS "Text Modification Edit Commands"
+.sp
+.LP
+The following commands modify the line:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.RS 19n
+.rt
+Enter input mode and enter text after the current character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA\fR\fR
+.ad
+.RS 19n
+.rt
+Append text to the end of the line. Equivalent to \fB$a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]c\fR\fImotion\fR\fR
+.ad
+.br
+.na
+\fB\fBc[\fR\fIcount\fR\fB]\fR\fImotion\fR\fR
+.ad
+.RS 19n
+.rt
+Delete current character through the character that \fImotion\fR would move the
+cursor to and enter input mode. If \fImotion\fR is \fBc\fR, the entire line is
+deleted and input mode entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBC\fR\fR
+.ad
+.RS 19n
+.rt
+Delete the current character through the end of line and enter input mode.
+Equivalent to \fBc$\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.RS 19n
+.rt
+Equivalent to \fBcc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]s\fR\fR
+.ad
+.RS 19n
+.rt
+Replace characters under the cursor in input mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD[\fR\fIcount\fR\fB]d\fR\fImotion\fR\fR
+.ad
+.RS 19n
+.rt
+Delete the current character through the end of line. Equivalent to d$.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd[\fR\fIcount\fR\fB]\fR\fImotion\fR\fR
+.ad
+.RS 19n
+.rt
+Delete current character through the character that \fImotion\fR would move to.
+If \fImotion\fR is d , the entire line is deleted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 19n
+.rt
+Enter input mode and insert text before the current character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBI\fR\fR
+.ad
+.RS 19n
+.rt
+Insert text before the beginning of the line. Equivalent to \fB0i\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]P\fR\fR
+.ad
+.RS 19n
+.rt
+Place the previous text modification before the cursor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]p\fR\fR
+.ad
+.RS 19n
+.rt
+Place the previous text modification after the cursor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBR\fR\fR
+.ad
+.RS 19n
+.rt
+Enter input mode and replace characters on the screen with characters you type
+overlay fashion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]r\fR\fIc\fR\fR
+.ad
+.RS 19n
+.rt
+Replace the \fIcount\fR characters starting at the current cursor position with
+\fIc\fR, and advance the cursor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]x\fR\fR
+.ad
+.RS 19n
+.rt
+Delete current character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fIcount\fR]X\fR\fR
+.ad
+.RS 19n
+.rt
+Delete preceding character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fIcount\fR].\fR\fR
+.ad
+.RS 19n
+.rt
+Repeat the previous text modification command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fIcount\fR]~\fR\fR
+.ad
+.RS 19n
+.rt
+Invert the case of the \fIcount\fR characters starting at the current cursor
+position and advance the cursor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fIcount\fR]_\fR\fR
+.ad
+.RS 19n
+.rt
+Causes the \fIcount\fR word of the previous command to be appended and input
+mode entered. The last word is used if \fIcount\fR is omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 19n
+.rt
+Causes an \fB*\fR to be appended to the current word and file name generation
+attempted. If no match is found, it rings the bell. Otherwise, the word is
+replaced by the matching pattern and input mode is entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\fR\fR
+.ad
+.RS 19n
+.rt
+Command or file name completion as described in this manual page.
+.RE
+
+.SS "Other Edit Commands"
+.sp
+.LP
+The following miscellaneous edit commands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]y\fR\fImotion\fR\fR
+.ad
+.br
+.na
+\fB\fBy[\fR\fIcount\fR\fB]\fR\fImotion\fR\fR
+.ad
+.RS 18n
+.rt
+Yank the current character through the character to which \fImotion\fR would
+move the cursor. Put the yanked characters in the delete buffer. The text and
+cursor position are unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fByy\fR\fR
+.ad
+.RS 18n
+.rt
+Yank the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBY\fR\fR
+.ad
+.RS 18n
+.rt
+Yank the current line from the current cursor location to the end of the line.
+Equivalent to \fBy$\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR\fR
+.ad
+.RS 18n
+.rt
+Undo the last text modifying command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBU\fR\fR
+.ad
+.RS 18n
+.rt
+Undo all the text modifying commands performed on current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]V\fR\fR
+.ad
+.RS 18n
+.rt
+Return the command :
+.sp
+.in +2
+.nf
+hist -e ${VISUAL:-${EDITOR:-vi}} \fIcount\fR
+.fi
+.in -2
+.sp
+
+in the input buffer. If \fIcount\fR is omitted, the current line is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^L\fR\fR
+.ad
+.RS 18n
+.rt
+Line feed and print the current line. This command only works in control mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^J\fR\fR
+.ad
+.RS 18n
+.rt
+New line. Execute the current line, regardless of mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^M\fR\fR
+.ad
+.RS 18n
+.rt
+Return. Execute the current line, regardless of mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 18n
+.rt
+If the first character of the command is a \fB#\fR , delete this \fB#\fR and
+each \fB#\fR that follows a NEWLINE.
+.sp
+Otherwise, send the line after inserting a \fB#\fR in front of each line in the
+command.
+.sp
+This is command is useful for causing the current line to be inserted in the
+history as a comment and un-commenting previously commented commands in the
+history file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIcount\fR\fB]=\fR\fR
+.ad
+.RS 18n
+.rt
+If \fIcount\fR is not specified, generate the list of matching commands or file
+names as described in this manual page.
+.sp
+Otherwise, replace the word at the current cursor location with the \fIcount\fR
+item from the most recently generated command or file list. If the cursor is
+not on a word, it is inserted after the current cursor location.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB@\fR\fIletter\fR\fR
+.ad
+.RS 18n
+.rt
+Search your alias list for an alias by the name \fIletter\fR. If an alias of
+this name is defined, insert its value on the input queue for processing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^V\fR\fR
+.ad
+.RS 18n
+.rt
+Display version of the shell.
+.RE
+
+.SS "Built-in Commands"
+.sp
+.LP
+The following simple-commands are executed in the shell process. Input and
+output redirection is permitted. Unless otherwise indicated, the output is
+written on file descriptor \fB1\fR and the exit status, when there is no syntax
+error, is \fB0\fR. Except for \fB:\fR, \fBtrue\fR, \fBfalse\fR, \fBecho\fR,
+\fBnewgrp\fR, and \fBlogin\fR, all built-in commands accept \fB--\fR to
+indicate the end of options. They also interpret the option \fB--man\fR as a
+request to display the manual page onto standard error and \fB-?\fR as a help
+request which prints a usage message on standard error.
+.sp
+.LP
+Commands that are preceded by one or two \fB++\fR symbols are special built-in
+commands and are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words following a command preceded by \fB++\fR that are in the format of a
+variable assignment are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ : [\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The command only expands parameters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ .\fR \fIname\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIname\fR is a function defined with the \fBfunction\fR \fBname\fR reserved
+word syntax, the function is executed in the current environment (as if it had
+been defined with the \fIname()\fR syntax.) Otherwise if \fIname\fR refers to a
+file, the file is read in its entirety and the commands are executed in the
+current shell environment. The search path specified by PATH is used to find
+the directory containing the file. If any arguments \fIarg\fR are specified,
+they become the positional parameters while processing the . command and the
+original positional parameters are restored upon completion. Otherwise the
+positional parameters are unchanged. The exit status is the exit status of the
+last command executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB++ alias [\fR\fB-ptx\fR\fB] [\fR\fIname\fR\fB[
+=\fR\fIvalue\fR\fB]] ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBalias\fR with no arguments prints the list of aliases in the form
+\fIname\fR\fB=\fR\fIvalue\fR on standard output. The \fB-p\fR option causes the
+word alias to be inserted before each one. When one or more arguments are
+specified, an \fIalias\fR is defined for each \fIname\fR whose \fIvalue\fR is
+specified. A trailing space in \fIvalue\fR causes the next word to be checked
+for alias substitution. The obsolete \fB-t\fR option is used to set and list
+tracked aliases. The value of a tracked alias is the full pathname
+corresponding to the specified \fIname\fR. The value becomes undefined when the
+value of \fBPATH\fR is reset but the alias remains tracked. Without the
+\fB-t\fR option, for each \fIname\fR in the argument list for which no
+\fIvalue\fR is specified, the name and value of the alias is printed. The
+obsolete -x option has no effect. The exit status is \fBnon-zero\fR if a
+\fIname\fR is specified, but no value, and no alias has been defined for the
+\fIname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbg [\fR \fIjob\fR\fB\&...]\fR\fR
+.ad
+.sp .6
+.RS 4n
+This command is only on systems that support job control. Puts each specified
+\fIjob\fR into the background. The current job is put in the background if
+\fIjob\fR is not specified. See the \fBJobs\fR section of this manual page for
+a description of the format of \fIjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+ break [\fR\fIn\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Exit from the enclosing \fBfor\fR, \fBwhile\fR, \fBuntil\fR, or \fBselect\fR
+loop, if any. If \fIn\fR is specified, then break \fIn\fR levels.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbuiltin [\fR\fB-ds\fR \fB] [\fR\fB-f\fR \fIfile\fR\fB]
+[\fR\fIname ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIname\fR is not specified, and no \fB-f\fR option is specified, the
+built-ins are printed on standard output. The \fB-s\fR option prints only the
+special built-ins. Otherwise, each \fIname\fR represents the pathname whose
+basename is the name of the built-in. The entry point function name is
+determined by prepending \fIb\fR to the built-in name. The ISO C/C++ prototype
+is \fBb\fR\fImycommand(int argc, char *argv[], void *context)\fR for the
+built-in command \fImycommand\fR where \fIargv\fR is an array of \fIargc\fR
+elements and \fIcontext\fR is an optional pointer to a \fBShell_t\fR structure
+as described in \fB<ast/shell.h>\fR Special built-ins cannot be bound to a
+pathname or deleted. The \fB-d\fR option deletes each of the specified
+built-ins. On systems that support dynamic loading, the \fB-f\fR option names a
+shared library containing the code for built-ins. The shared library prefix
+and/or suffix, which depend on the system, can be omitted. Once a library is
+loaded, its symbols become available for subsequent invocations of
+\fBbuiltin\fR. Multiple libraries can be specified with separate invocations of
+the \fBbuiltin\fR command. Libraries are searched in the reverse order in which
+they are specified. When a library is loaded, it looks for a function in the
+library whose name is \fBlib_init()\fR and invokes this function with an
+argument of \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR \fB[\fR\fB-LP\fR\fB] [\fR\fIarg\fR\fB]\fR\fR
+.ad
+.br
+.na
+\fB\fBcd\fR \fB[\fR\fB-LP\fR\fB]\fR \fIold\fR \fInew\fR\fR
+.ad
+.sp .6
+.RS 4n
+This command has two forms.
+.sp
+In the first form it changes the current directory to \fIarg\fR. If \fIarg\fR
+is a \fB-\fR, the directory is changed to the previous directory. The shell
+variable \fBHOME\fR is the default \fIarg\fR. The variable \fBPWD\fR is set to
+the current directory. The shell variable \fBCDPATH\fR defines the search path
+for the directory containing \fIarg\fR. Alternative directory names are
+separated by a colon (\fB:\fR). The default path is \fBNULL\fR (specifying the
+current directory). 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 \fIarg\fR begins with a \fB/\fR,
+the search path is not used. Otherwise, each directory in the path is searched
+for \fIarg\fR.
+.sp
+The second form of \fBcd\fR substitutes the string \fInew\fR for the string
+\fIold\fR in the current directory name, \fBPWD\fR, and tries to change to this
+new directory. By default, symbolic link names are treated literally when
+finding the directory name. This is equivalent to the \fB-L\fR option. The
+\fB-P\fR option causes symbolic links to be resolved when determining the
+directory. The last instance of \fB-L\fR or \fB-P\fR on the command line
+determines which method is used. The \fBcd\fR command cannot be executed by
+\fBrksh93\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcommand\fR \fB[\fR\fB-pvVx\fR\fB]\fR \fIname\fR
+\fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Without the \fB-v\fR or \fB-V\fR options, executes \fIname\fR with the
+arguments specified by \fIarg\fR.
+.sp
+The \fB-p\fR option causes a default path to be searched rather than the one
+defined by the value of \fBPATH\fR. Functions are not searched when finding
+\fIname\fR. In addition, if \fIname\fR refers to a special built-in, none of
+the special properties associated with the leading daggers are honored. For
+example, the predefined alias \fBredirect='command exec'\fR prevents a script
+from terminating when an invalid redirection is specified.
+.sp
+With the \fB-x\fR option, if command execution would result in a failure
+because there are too many arguments, \fBerrno E2BIG\fR, the shell invokes
+command \fIname\fR multiple times with a subset of the arguments on each
+invocation. Arguments that occur prior to the first word that expands to
+multiple arguments and after the last word that expands to multiple arguments
+are passed on each invocation. The exit status is the maximum invocation exit
+status.
+.sp
+With the \fB-v\fR option, \fBcommand\fR is equivalent to the built-in
+\fBwhence\fR command described in this section. The \fB-V\fR option causes
+\fBcommand\fR to act like \fBwhence -v\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+continue\fR \fB[\fR\fIn\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Resumes the next iteration of the enclosing \fBfor\fR, \fBwhile\fR,
+\fBuntil\fR, or \fBselect\fR loop. If \fIn\fR is specified, then resume at the
+\fIn\fRth enclosing loop.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisown\fR \fB[\fR\fIjob...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes the shell not to send a \fBHUP\fR signal to each specified \fIjob\fR, or
+all active jobs if \fIjob\fR is omitted, when a login shell terminates.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBecho\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+When the first \fIarg\fR does not begin with a \fB-\fR, and none of the
+arguments contain a backslash (\fB\e\fR), prints each of its arguments
+separated by a SPACE and terminated by a NEWLINE. Otherwise, the behavior of
+\fBecho\fR is system dependent and \fBprint\fR or \fBprintf\fR described in
+this section should be used. See \fBecho\fR(1) for usage and description.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+eval\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The arguments are read as input to the shell and the resulting commands are
+executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+exec\fR [\fB-c\fR] [\fB-a\fR \fIname ...\fR]
+\fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIarg\fR is specified, the command specified by the arguments is executed
+in place of this shell without creating a new process. The \fB-c\fR option
+causes the environment to be cleared before applying variable assignments
+associated with the exec invocation. The \fB-a\fR option causes \fIname\fR
+rather than the first \fIarg\fR, to become \fBargv[0]\fR for the new process.
+Input and output arguments can appear and affect the current process. If
+\fIarg\fR is not specified, the effect of this command is to modify file
+descriptors as prescribed by the input/output redirection list. In this case,
+any file descriptor numbers greater than \fB2\fR that are opened with this
+mechanism are closed when invoking another program.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+exit\fR \fB[\fR\fIn\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes the shell to exit with the exit status specified by \fIn\fR. The value
+is the least significant 8 bits of the specified status. If \fIn\fR is omitted,
+then the exit status is that of the last command executed. An end-of-file also
+causes the shell to exit except for a shell which has the \fBignoreeof\fR
+option turned on. See \fBset\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB++export\fR \fB[\fR\fB-p\fR\fB]\fR
+\fB[\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]] ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIname\fR is not specified, the names and values of each variable with the
+export attribute are printed with the values quoted in a manner that allows
+them to be re-entered. The \fB-p\fR option causes the word export to be
+inserted before each one. Otherwise, the specified \fIname\fRs are marked for
+automatic export to the environment of subsequently-executed commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfalse\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does nothing, and exits \fB1\fR. Used with \fBuntil\fR for infinite loops.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfg\fR \fB[\fR\fIjob ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+This command is only on systems that support job control. Each \fIjob\fR
+specified is brought to the foreground and waited for in the specified order.
+Otherwise, the current job is brought into the foreground. See \fBJobs\fR for a
+description of the format of \fIjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetconf\fR \fB[\fR\fIname\fR \fB[\fR\fIpathname\fR\fB]]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the current value of the configuration parameter specified by
+\fIname\fR. The configuration parameters are defined by the IEEE POSIX 1003.1
+and IEEE POSIX 1003.2 standards. See \fBpathconf\fR(2) and \fBsysconf\fR(3C).
+.sp
+The \fIpathname\fR argument is required for parameters whose value depends on
+the location in the file system. If no arguments are specified, \fBgetconf\fR
+prints the names and values of the current configuration parameters. The
+pathname \fB/\fR is used for each of the parameters that requires
+\fIpathname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetopts\fR \fB[\fR \fB-a\fR \fIname\fR\fB]\fR \fIoptstring\fR \fIvname\fR
+\fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Checks \fIarg\fR for legal options. If \fIarg\fR is omitted, the positional
+parameters are used. An option argument begins with a \fB+\fR or a \fB-\fR. An
+option that does not begin with \fB+\fR or \fB-\fR or the argument \fB--\fR
+ends the options. Options beginning with \fB+\fR are only recognized when
+\fIoptstring\fR begins with a \fB+\fR. \fIoptstring\fR contains the letters
+that \fBgetopts\fR recognizes. If a letter is followed by a \fB:\fR, that
+option is expected to have an argument. The options can be separated from the
+argument by blanks. The option \fB-?\fRcauses \fBgetopts\fR to generate a usage
+message on standard error. The \fB-a\fR option can be used to specify the name
+to use for the usage message, which defaults to $0. \fBgetopts\fR places the
+next option letter it finds inside variable \fIvname\fR each time it is
+invoked. The option letter is prepended with a \fB+\fR when \fIarg\fR begins
+with a \fB+\fR. The index of the next \fIarg\fR is stored in \fBOPTIND\fR. The
+option argument, if any, gets stored in \fBOPTARG\fR. A leading : in
+\fIoptstring\fR causes \fBgetopts\fR to store the letter of an invalid option
+in \fBOPTARG\fR, and to set \fIvname\fR to \fB?\fR for an unknown option and
+to: when a required option argument is missing. Otherwise, \fBgetopts\fR prints
+an error message. The exit status is \fBnon-zero\fR when there are no more
+options. There is no way to specify any of the options \fB:\fR, \fB+\fR,
+\fB-\fR, \fB?\fR, \fB[\fR, and \fB]\fR. The option \fB#\fR can only be
+specified as the first option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhist\fR \fB[\fR \fB-e\fR \fIename\fR\fB]\fR\fB[\fR\fB-nlr\fR\fB]\fR
+\fB[\fR \fIfirst\fR\fB[\fR\fIlast\fR \fB] ]\fR\fR
+.ad
+.br
+.na
+\fB\fR
+.ad
+.br
+.na
+\fB\fBhist\fR \fB-s\fR \fB[\fR \fIold\fR\fB=\fR\fInew\fR \fB] [\fR
+\fIcommand\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+In the first form, a range of commands from \fIfirst\fR to \fIlast\fR is
+selected from the last \fBHISTSIZE\fR commands that were typed at the terminal.
+The arguments \fIfirst\fR and \fIlast\fR can be specified as a number or as a
+string. A string is used to locate the most recent command starting with the
+specified string. A negative number is used as an offset to the current command
+number. If the -l option is selected, the commands are listed on standard
+output. Otherwise, the editor program \fIename\fR is invoked on a file
+containing these keyboard commands. If \fIename\fR is not supplied, then the
+value of the variable \fBHISTEDIT\fR is used. If \fBHISTEDIT\fR is not set,
+then \fBFCEDIT\fR (default \fB/bin/ed\fR) is used as the editor. When editing
+is complete, the edited command(s) is executed if the changes have been saved.
+If \fIlast\fR is not specified, then it is set to \fIfirst\fR. If \fIfirst\fR
+is not specified, the default is the previous command for editing and \fB-16\fR
+for listing. The option \fB-r\fR reverses the order of the commands and the
+option \fB-n\fR suppresses command numbers when listing. In the second form,
+\fIcommand\fR is interpreted as \fIfirst\fR described in this section and
+defaults to the last command executed. The resulting command is executed after
+the optional substitution \fIold\fR\fB=\fR\fInew\fR is performed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBjobs\fR \fB-lnp\fR \fB[\fR\fIjob ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists information about each specified job, or all active jobs if \fIjob\fR is
+omitted. The \fB-l\fR option lists process ids in addition to the normal
+information. The \fB-n\fR option only displays jobs that have stopped or exited
+since last notified. The \fB-p\fR option causes only the process group to be
+listed. See \fBJobs\fR for a description of the format of \fIjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkill\fR \fB[\fR\fB-s\fR \fIsigname\fR\fB]\fR \fIjob ...\fR\fR
+.ad
+.br
+.na
+\fB\fBkill\fR \fB[\fR\fB-n\fR \fIsignum\fR\fB]\fR \fIjob ...\fR\fR
+.ad
+.br
+.na
+\fB\fBkill\fR \fB-l\fR \fB[\fR\fIsig ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sends either the \fBTERM\fR (terminate) signal or the specified signal to the
+specified jobs or processes. Signals are either specified by number with the
+\fB-n\fR option or by name with the \fB-s\fR option (as specified in
+\fB<signal.h\fR>, stripped of the prefix `\fBSIG\fR with the exception that
+\fBSIGCLD\fR is named \fBCHLD\fR). For backward compatibility, the \fBn\fR and
+\fBs\fR can be omitted and the number or name placed immediately after the
+\fB-\fR. If the signal being sent is \fBTERM\fR (terminate) or \fBHUP\fR (hang
+up), then the job or process is sent a \fBCONT\fR (continue) signal if it is
+stopped. The argument \fIjob\fR can be the process id of a process that is not
+a member of one of the active jobs. See \fBJobs\fR for a description of the
+format of \fIjob\fR. In the third form, \fBkill -l\fR, if \fIsig\fR is not
+specified, the signal names are listed. Otherwise, for each \fIsig\fR that is a
+name, the corresponding signal number is listed. For each \fIsig\fR that is a
+number, the signal name corresponding to the least significant 8 bits of
+\fIsig\fR is listed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlet\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each \fIarg\fR is a separate arithmetic expression to be evaluated. See the
+\fBArithmetic Evaluation\fR section of this manual page for a description of
+arithmetic expression evaluation. The exit status is \fB0\fR if the value of
+the last expression is \fBnon-zero\fR, and \fB1\fR otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+newgrp\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Equivalent to \fBexec\fR \fB/bin/newgrp\fR \fIarg ...\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprint\fR [\fB-Renprs\fR] \fB[\fR \fB-u\fR \fIunit\fR\fB] [\fR \fB-f\fR
+\fIformat\fR \fB] [\fR \fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+With no options or with option \fB-\fR or \fB--\fR, each \fIarg\fR is printed
+on standard output. The \fB-f\fR option causes the arguments to be printed as
+described by \fBprintf\fR. In this case, any \fBe\fR, \fBn\fR, \fBr\fR, or
+\fBR\fR options are ignored. Otherwise, unless the \fB-R\fR or \fB-r,\fR are
+specified, the following escape conventions are applied:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ea\fR\fR
+.ad
+.RS 8n
+.rt
+Alert character (\fBASCII\fR 07)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eb\fR\fR
+.ad
+.RS 8n
+.rt
+Backspace character (\fBASCII\fR 010)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ec\fR\fR
+.ad
+.RS 8n
+.rt
+Causes print to end without processing more arguments and not adding a NEWLINE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ef\fR\fR
+.ad
+.RS 8n
+.rt
+Form-feed character (\fBASCII\fR 014)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\en\fR\fR
+.ad
+.RS 8n
+.rt
+NEWLINE character (\fBASCII\fR 012)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\er\fR\fR
+.ad
+.RS 8n
+.rt
+RETURN character (\fBASCII\fR 015)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\et\fR\fR
+.ad
+.RS 8n
+.rt
+TAB character (\fBASCII\fR 011)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ev\fR\fR
+.ad
+.RS 8n
+.rt
+Vertical TAB character (\fBASCII\fR 013)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eE\fR\fR
+.ad
+.RS 8n
+.rt
+Escape character (\fBASCII\fR 033)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\e\fR\fR
+.ad
+.RS 8n
+.rt
+Backslash character \fB\e\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e0\fR\fIx\fR\fR
+.ad
+.RS 8n
+.rt
+Character defined by the 1, 2, or 3-digit octal string specified by \fIx\fR
+.RE
+
+The \fB-R\fR option prints all subsequent arguments and options other than
+\fB-n\fR. The \fB-e\fR causes the escape conventions to be applied This is the
+default behavior. It reverses the effect of an earlier \fB-r\fR. The \fB-p\fR
+option causes the arguments to be written onto the pipe of the process spawned
+with \fB|&\fR instead of standard output. The \fB-s\fR option causes the
+arguments to be written onto the history file instead of standard output. The
+\fB-u\fR option can be used to specify a one digit file descriptor unit number
+\fIunit\fR on which the output is placed. The default is \fB1\fR. If the option
+\fB-n\fR is used, no NEWLINE is added to the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprintf\fR \fIformat\fR\fB[\fR\fIarg ...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The arguments \fIarg\fR are printed on standard output in accordance with the
+\fBANSI-C\fR formatting rules associated with the format string \fIformat\fR.
+If the number of arguments exceeds the number of format specifications, the
+format string is reused to format remaining arguments. The following extensions
+can also be used: A \fB%b\fR format can be used instead of \fB%s\fR to cause
+escape sequences in the corresponding \fIarg\fR to be expanded as described in
+\fBprint\fR. A \fB%B\fR option causes each of the arguments to be treated as
+variable names and the binary value of the variables is printed. This is most
+useful for variables with an attribute of b. A \fB%H\fR format can be used
+instead of \fB%s\fR to cause characters in \fIarg\fR that are special in
+\fBHTML\fR and \fBXML\fR to be output as their entity name. A \fB%P\fR format
+can be used instead of \fB%s\fR to cause \fIarg\fR to be interpreted as an
+extended regular expression and be printed as a shell pattern. A \fB%R\fR
+format can be used instead of \fB%s\fR to cause \fIarg\fR to be interpreted as
+a shell pattern and to be printed as an extended regular expression. A \fB%q\fR
+format can be used instead of \fB%\fRs to cause the resulting string to be
+quoted in a manner than can be input again to the shell. A
+\fB%(\fR\fIdate-format\fR\fB)T\fR format can be use to treat an argument as a
+date/time string and to format the date/time according to the \fIdate-format\fR
+as defined for the \fBdate\fR(1) command. A \fB%Z\fR format outputs a byte
+whose value is 0. The precision field of the %d format can be followed by a .
+and the output base. In this case, the \fB#\fR flag character causes
+\fBbase\fR\fI#\fR to be prepended. The \fB#\fR flag when used with the \fBd\fR
+specifier without an output base, causes the output to be displayed in
+thousands units with one of the suffixes \fBk\fR \fBM\fR \fBG\fR \fBT\fR
+\fBP\fR \fBE\fR to indicate the unit. The \fB#\fR flag when used with the i
+specifier causes the output to be displayed in \fB1024\fR with one of the
+suffixes \fBKi\fR \fBMi\fR \fBGi\fR \fBTi\fR \fBPi\fR \fBEi\fR to indicate the
+unit. The \fB=\fR flag has been added to center the output within the specified
+field width.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpwd\fR [\fB-LP\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Outputs the value of the current working directory. The \fB-L\fR option is the
+default. It prints the logical name of the current directory. If the \fB-P\fR
+option is specified, all symbolic links are resolved from the name. The last
+instance of \fB-L\fR or \fB-P\fR on the command line determines which method is
+used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBread\fR \fB[\fR\fB-Aprs\fR\fB] [\fR\fB-d\fR \fIdelim\fR\fB] [\fR \fB-n\fR
+\fIn\fR\fB] [[\fR \fB-N\fR \fIn\fR\fB] [[\fR\fB-t\fR \fItimeout\fR\fB]
+[\fR\fB-u\fR \fIunit\fR\fB] [\fR\fIvname\fR\fB?\fR\fIprompt\fR\fB] [\fR
+\fIvname ...\fR \fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shell input mechanism. One line is read and is broken up into fields using
+the characters in IFS as separators. The escape character, \fB\e\fR, is used to
+remove any special meaning for the next character and for line continuation.
+The \fB-d\fR option causes the read to continue to the first character of
+\fIdelim\fR rather than \fBNEWLINE\fR. The \fB-n\fR option causes at most
+\fIn\fR bytes to read rather a full line but returns when reading from a slow
+device as soon as any characters have been read. The \fB-N\fR option causes
+exactly \fIn\fR to be read unless an end-of-file has been encountered or the
+read times out because of the \fB-t\fR option. In raw mode, \fB-r\fR, the
+\fB\e\fR character is not treated specially. The first field is assigned to the
+first \fIvname\fR, the second field to the second \fIvname\fR, etc., with
+leftover fields assigned to the last \fIvname\fR. When \fIvname\fR has the
+binary attribute and \fB-n\fR or \fB-N\fR is specified, the bytes that are read
+are stored directly into the variable. If the -v is specified, then the value
+of the first \fIvname\fR is used as a default value when reading from a
+terminal device. The \fB-A\fR option causes the variable \fIvname\fR to be
+unset and each field that is read to be stored in successive elements of the
+indexed array \fIvname\fR. The \fB-p\fR option causes the input line to be
+taken from the input pipe of a process spawned by the shell using \fB|&\fR. If
+the \fB-s\fR option is present, the input is saved as a command in the history
+file. The option \fB-u\fR can be used to specify a one digit file descriptor
+unit \fIunit\fR to read from. The file descriptor can be opened with the
+\fBexec\fR special built-in command. The default value of unit \fIn\fR is
+\fB0\fR. The option \fB-t\fR is used to specify a time out in seconds when
+reading from a terminal or pipe. If \fIvname\fR is omitted, then REPLY is used
+as the default \fIvname\fR. An end-of-file with the \fB-p\fR option causes
+cleanup for this process so that another can be spawned. If the first argument
+contains a \fB?\fR, the remainder of this word is used as a prompt on standard
+error when the shell is interactive. The exit status is \fB0\fR unless an
+end-of-file is encountered or read has timed out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB++readonly\fR \fB[\fR\fB-p\fR\fB] [\fR
+\fIvname\fR\fB[=\fR\fIvalue\fR\fB]] ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fIvname\fR is not specified, the names and values of each variable with the
+read-only attribute is printed with the values quoted in a manner that allows
+them to be input again. The \fB-p\fR option causes the word \fBreadonly\fR to
+be inserted before each one. Otherwise, the specified \fIvname\fRs are marked
+\fBreadonly\fR and these names cannot be changed by subsequent assignment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+return\fR \fB[\fR\fIn\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes a shell function or script to return to the invoking script with the
+exit status specified by \fIn\fR. The value is the least significant 8 bits of
+the specified status. If \fBn\fR is omitted, then the return status is that of
+the last command executed. If return is invoked while not in a function or a
+script, then it behaves the same as exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+set [ \(+-BCGabefhkmnoprstuvx] [\(+-o [\fR \fIoption\fR \fB] ] ... [
+\(+-A\fR \fIvname\fR\fB]\fR \fB[\fR\fIarg...\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBset\fR command supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+All subsequent variables that are defined are automatically exported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.sp .6
+.RS 4n
+Array assignment. Unset the variable \fIvname\fR and assign values sequentially
+from the \fIarg\fR list. If \fB+A\fR is used, the variable \fIvname\fR is not
+unset first.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints job completion messages as soon as a background job changes state rather
+than waiting for the next prompt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable brace pattern field generation. This is the default behavior.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prevents redirection (\fB>\fR) from truncating existing files. Files that are
+created are opened with the \fBO_EXCL\fR mode. Requires \fB>|\fR to truncate a
+file when turned on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.sp .6
+.RS 4n
+If a command has a \fBnon-zero\fR exit status, execute the \fBERR\fR trap, if
+set, and exit. This mode is disabled while reading profiles.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables file name generation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes the pattern \fB**\fR by itself to match files and zero or more
+directories and subdirectories when used for file name generation. If followed
+by a \fB/\fR only directories and subdirectories are matched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each command becomes a tracked alias when first encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.sp .6
+.RS 4n
+Obsolete. All variable assignment arguments are placed in the environment for a
+command, not just those that precede the command name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.sp .6
+.RS 4n
+Background jobs run in a separate process group and a line prints upon
+completion. The exit status of background jobs is reported in a completion
+message. On systems with job control, this option is turned on automatically
+for interactive shells.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read commands and check them for syntax errors, but do not execute them.
+Ignored for interactive shells.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.sp .6
+.RS 4n
+If no option name is supplied, the list of options and their current settings
+are written to standard output. When invoked with a \fB+\fR, the options are
+written in a format that can be input again to the shell to restore the
+settings. This option can be repeated to enable or disable multiple options.
+.sp
+The following argument can be one of the following option names:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBallexport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbgnice\fR\fR
+.ad
+.sp .6
+.RS 4n
+All background jobs are run at a lower priority. This is the default mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbraceexpand\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-\fRB.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBemacs\fR\fR
+.ad
+.sp .6
+.RS 4n
+Puts you in an \fBemacs\fR style inline editor for command entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerrexit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-e\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBglobstar\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-G\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgmacs\fR\fR
+.ad
+.sp .6
+.RS 4n
+Puts you in a \fBgmacs\fR style inline editor for command entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignoreeof\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shell does not exit on end-of-file. The command \fBexit\fR must be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyword\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-k\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmarkdirs\fR\fR
+.ad
+.sp .6
+.RS 4n
+All directory names resulting from file name generation have a trailing /
+appended.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmonitor\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-m\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmultiline\fR\fR
+.ad
+.sp .6
+.RS 4n
+The built-in editors use multiple lines on the screen for lines that are longer
+than the width of the screen. This might not work for all terminals.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoclobber\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-C\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoexec\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-n\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoglob\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-f\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnolog\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not save function definitions in the history file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnotify\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnounset\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-u\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpipefail\fR\fR
+.ad
+.sp .6
+.RS 4n
+A pipeline does not complete until all components of the pipeline have
+completed, and the return value is the value of the last \fBnon-zero\fR command
+to fail or zero if no command has failed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprivileged\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshowme\fR\fR
+.ad
+.sp .6
+.RS 4n
+When enabled, simple commands or pipelines preceded by a a semicolon (\fB;\fR)
+is displayed as if the \fBxtrace\fR option were enabled but is not executed.
+Otherwise, the leading \fB;\fR is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrackall\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-h\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-v\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvi\fR\fR
+.ad
+.sp .6
+.RS 4n
+Puts you in insert mode of a \fBvi\fR style inline editor until you hit the
+escape character 033. This puts you in control mode. A return sends the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBviraw\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each character is processed as it is typed in \fBvi\fR mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxtrace\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fB-x\fR.
+.sp
+If no option name is supplied, the current options settings are printed.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables processing of the \fB$HOME/.profile\fR file and uses the file
+\fB/etc/suid_profile\fR instead of the \fBENV\fR file. This mode is on whenever
+the effective \fBuid\fR (\fBgid\fR) is not equal to the real \fBuid\fR
+(\fBgid\fR). Turning this off causes the effective \fBuid\fR and \fBgid\fR to
+be set to the real \fBuid\fR and \fBgid\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables the restricted shell. This option cannot be unset once set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sort the positional parameters lexicographically.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Obsolete. Exit after reading and executing one command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.sp .6
+.RS 4n
+Treat \fBunset\fR parameters as an error when substituting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print shell input lines as they are read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print commands and their arguments as they are executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not change any of the options. This is useful in setting \fB$1\fR to a value
+beginning with \fB-\fR. If no arguments follow this option then the positional
+parameters are unset.
+.RE
+
+As an obsolete feature, if the first \fIarg\fR is - then the \fB-x\fR and
+\fB-v\fR options are turned off and the next \fIarg\fR is treated as the first
+argument. Using \fB+\fR rather than \fB-\fR causes these options to be turned
+off. These options can also be used upon invocation of the shell. The current
+set of options can be found in \fB$-\fR. Unless \fB-A\fR is specified, the
+remaining arguments are positional parameters and are assigned, in order, to
+\fB$1 $2 \&....\fR If no arguments are specified, then the names and values of
+all variables are printed on the standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+shift\fR \fB[\fR\fIn\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The positional parameters from \fB$\fR\fIn\fR\fB+1 ...\fR are renamed
+\fB$1 ...\fR, the default \fIn\fR is \fB1\fR. The parameter \fIn\fR can be any
+arithmetic expression that evaluates to a non-negative number less than or
+equal to \fB$#\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsleep\fR \fIseconds\fR\fR
+.ad
+.sp .6
+.RS 4n
+Suspends execution for the number of decimal seconds or fractions of a second
+specified by \fIseconds\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+trap\fR \fB-p\fR \fB[\fR\fIaction\fR\fB]\fR
+\fB[\fR\fIsig\fR\fB] ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB-p\fR option causes the trap action associated with each trap as
+specified by the arguments to be printed with appropriate quoting. Otherwise,
+\fIaction\fR is processed as if it were an argument to \fBeval\fR when the
+shell receives signal(s) \fIsig\fR. Each \fIsig\fR can be specified as a number
+or as the name of the signal. Trap commands are executed in order of signal
+number. Any attempt to set a trap on a signal that was ignored on entry to the
+current shell is ineffective. If \fIaction\fR is omitted and the first
+\fIsig\fR is a number, or if \fIaction\fR is \fB-\fR, then the trap(s) for each
+\fIsig\fR are reset to their original values. If \fIaction\fR is the null
+string then this signal is ignored by the shell and by the commands it invokes.
+If \fIsig\fR is \fBERR\fR then \fIaction\fR is executed whenever a command has
+a \fBnon-zero\fR exit status. If \fIsig\fR is \fBDEBUG\fR then \fIaction\fR is
+executed before each command. The variable \fB\&.sh.command\fR contains the
+contents of the current command line when \fIaction\fR is running. If \fIsig\fR
+is \fB0\fR or \fBEXIT\fR and the trap statement is executed inside the body of
+a function defined with the \fBfunction\fR \fIname\fR syntax, then the command
+\fIaction\fR is executed after the function completes. If \fIsig\fR is \fB0\fR
+or \fBEXIT\fR for a trap set outside any function then the command \fIaction\fR
+is executed on exit from the shell. If \fIsig\fR is \fBKEYBD\fR, then
+\fIaction\fR is executed whenever a key is read while in \fBemacs\fR,
+\fBgmacs\fR, or \fBvi\fR mode. The \fBtrap\fR command with no arguments prints
+a list of commands associated with each signal number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrue\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does nothing, and exits \fB0\fR. Used with while for infinite loops.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB++typeset [\(+-AHflabnprtux ] [ \(+-EFLRZi[\fR\fIn\fR\fB] ] [\fR
+\fIvname\fR\fB[=\fR\fIvalue\fR \fB] ]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets attributes and values for shell variables and functions. When invoked
+inside a function defined with the \fBfunction\fR \fIname\fR syntax, a new
+instance of the variable \fIvname\fR is created, and the variable's value and
+type are restored when the function completes.
+.sp
+Using \fB+\fR rather than \fB-\fR causes these options to be turned off. If no
+\fIvname\fR arguments are specified, a list of \fIvname\fRs (and optionally the
+\fIvalue\fRs) of the variables is printed. Using \fB+\fR rather than \fB-\fR
+keeps the values from being printed.) The \fB-p\fR option causes \fBtypeset\fR
+followed by the option letters to be printed before each name rather than the
+names of the options. If any option other than \fB-p\fR is specified, only
+those variables which have all of the specified options are printed. Otherwise,
+the \fIvname\fRs and \fIattributes\fR of all variables that have attributes are
+printed.
+.sp
+The following list of attributes can be specified:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Declares \fIvname\fR to be an indexed array. This is optional unless except for
+compound variable assignments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 6n
+.rt
+Declares \fIvname\fR to be an associative array. Sub-scripts are strings rather
+than arithmetic expressions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 6n
+.rt
+The variable can hold any number of bytes of data. The data can be text or
+binary. The value is represented by the \fBbase64\fR encoding of the data. If
+\fB-Z\fR is also specified, the size in bytes of the data in the buffer is
+determined by the size associated with the \fB-Z\fR. If the \fBbase64\fR string
+assigned results in more data, it is truncated. Otherwise, it is filled with
+bytes whose value is zero. The \fBprintf\fR format \fB%B\fR can be used to
+output the actual data in this buffer instead of the \fBbase64\fR encoding of
+the data.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.RS 6n
+.rt
+Declares \fIvname\fR to be a double precision floating point number. If \fIn\fR
+is \fBnon-zero\fR, it defines the number of significant figures that are used
+when expanding \fIvname\fR. Otherwise, ten significant figures is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+The names refer to function names rather than variable names. No assignments
+can be made and the only other valid options are \fB-t\fR, \fB-u\fR, and
+\fB-x.\fR The \fB-t\fR option turns on execution tracing for this function. The
+\fB-u\fR option causes this function to be marked undefined. The \fBFPATH\fR
+variable is searched to find the function definition when the function is
+referenced. If no options other than \fB-f\fR is specified, then the function
+definition is displayed on standard output. If \fB+f\fR is specified, then a
+line containing the function name followed by a shell comment containing the
+line number and path name of the file where this function was defined, if any,
+is displayed.
+.sp
+The \fB-i\fR attribute cannot be specified with \fB-f\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Declares \fIvname\fR to be a double precision floating point number. If \fIn\fR
+is \fBnon-zero\fR, it defines the number of places after the decimal point that
+are used when expanding \fIvname\fR. Otherwise ten places after the decimal
+point is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+This option provides UNIX to hostname file mapping on non-UNIX machines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Declares \fIvname\fR to be represented internally as integer. The right hand
+side of an assignment is evaluated as an arithmetic expression when assigning
+to an integer. If \fIn\fR is \fBnon-zero\fR, it defines the output arithmetic
+base, otherwise the output base is ten.
+.sp
+The \fB-i\fR attribute cannot be specified along with \fB-R\fR, \fB-L\fR,
+\fB-Z\fR, or \fB-f\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+All uppercase characters are converted to lowercase. The uppercase option,
+\fB-u\fR, is turned off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Left justify and remove leading blanks from \fIvalue\fR. If \fIn\fR is
+\fBnon-zero\fR, it defines the width of the field, otherwise it is determined
+by the width of the value of first assignment. When the variable is assigned
+to, it is filled on the right with blanks or truncated, if necessary, to fit
+into the field. The \fB-R\fR option is turned off.
+.sp
+The \fB-i\fR attribute cannot be specified with \fB-L\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Declares \fIvname\fR to be a reference to the variable whose name is defined by
+the value of variable \fIvname\fR. This is usually used to reference a variable
+inside a function whose name has been passed as an argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Right justify and fill with leading blanks. If \fIn\fR is \fBnon-zero\fR, it
+defines the width of the field, otherwise it is determined by the width of the
+value of first assignment. The field is left filled with blanks or truncated
+from the end if the variable is reassigned. The \fB-L\fR option is turned off.
+.sp
+The \fB-i\fR attribute cannot be specified with \fB-R\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+The specified \fIvname\fRs are marked read-only and these names cannot be
+changed by subsequent assignment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Tags the variables. Tags are user definable and have no special meaning to the
+shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+All lowercase characters are converted to uppercase. The lowercase option,
+\fB-l\fR, is turned off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+The specified \fIvname\fRs are marked for automatic export to the environment
+of subsequently-executed commands. Variables whose names contain a . cannot be
+exported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.RS 6n
+.rt
+Right justify and fill with leading zeros if the first non-blank character is a
+digit and the \fB-L\fR option has not been set. Remove leading zeros if the
+\fB-L\fR option is also set. If \fIn\fR is \fBnon-zero\fR, it defines the width
+of the field, otherwise it is determined by the width of the value of first
+assignment.
+.sp
+The \fB-i\fR attribute cannot be specified with \fB-Z\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBulimit [\fR\fB-HSacdfmnpstv\fR\fB] [\fR \fIlimit\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set or display a resource limit. Many systems do not support one or more of
+these limits. The limit for a specified resource is set when \fIlimit\fR is
+specified. The value of \fIlimit\fR can be a number in the unit specified with
+each resource, or the value unlimited. When more than one resource is
+specified, then the limit name and unit is printed before the value.
+.sp
+If no option is specified, \fB-f\fR is assumed.
+.sp
+The following are the available resource limits:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Lists all of the current resource limits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+The number of 512-byte blocks on the size of core dumps.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+The number of Kbytes on the size of the data area.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+The number of 512-byte blocks on files that can be written by the current
+process or by child processes (files of any size can be read).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies a hard limit for the specified resource.
+.sp
+A hard limit cannot be increased once it is set.
+.sp
+If neither the \fB-H\fR nor \fB-S\fR option is specified, the limit applies to
+both. The current resource limit is printed when \fIlimit\fR is omitted. In
+this case, the soft limit is printed unless \fB-H\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+The number of Kbytes on the size of physical memory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+The number of file descriptors plus 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+The number of 512-byte blocks for pipe buffering.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+The number of Kbytes on the size of the stack area.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies a soft limit for the specified resource.
+.sp
+A soft limit can be increased up to the value of the hard limit.
+.sp
+If neither the \fB-H\fR nor \fB-S\fR option is specified, the limit applies to
+both. The current resource limit is printed when \fIlimit\fR is omitted. In
+this case, the soft limit is printed unless \fB-H\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+The number of CPU seconds to be used by each process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+The number of Kbytes for virtual memory.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBumask\fR \fB[\fR\fB-S\fR\fB]\fR\fB[\fR\fImask\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+The user file-creation mask is set to \fImask\fR. \fImask\fR can either be an
+octal number or a symbolic value as described in \fBchmod\fR(1).
+.sp
+If a symbolic value is specified, the new \fBumask\fR value is the complement
+of the result of applying \fImask\fR to the complement of the previous
+\fBumask\fR value. If \fImask\fR is omitted, the current value of the mask is
+printed. The \fB-S\fR option causes the mode to be printed as a symbolic value.
+Otherwise, the mask is printed in octal.
+.sp
+See \fBumask\fR(2)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+unalias\fR \fB[\fR\fB-a\fR\fB]\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+The aliases specified by the list of \fIname\fRs are removed from the alias
+list. The \fB-a\fR option causes all the aliases to be unset.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+unset\fR \fB[\fR\fB-fnv\fR\fB]\fR \fIvname\fR\fR
+.ad
+.sp .6
+.RS 4n
+The variables specified by the list of \fIvname\fRs are unassigned, i.e., their
+values and attributes are erased. Read-only variables cannot be unset. If the
+\fB-f\fR option is set, then the names refer to function names. If the \fB-v\fR
+option is set, then the names refer to variable names. The \fB-f\fR option
+overrides \fB-v\fR. If \fB-n\fR is set and \fIname\fR is a name reference, then
+\fIname\fR is unset rather than the variable that it references. The default is
+equivalent to \fB-v\fR. Unsetting \fBLINENO\fR, \fBMAILCHECK\fR, \fBOPTARG\fR,
+\fBOPTIND\fR, \fBRANDOM\fR, \fBSECONDS\fR, \fBTMOUT\fR, and \fB_\fR removes
+their special meaning even if they are subsequently assigned to.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwait\fR \fB[\fR\fIjob\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Wait for the specified job and report its termination status. If \fIjob\fR is
+not specified, then all currently active child processes are waited for. The
+exit status from this command is that of the last process waited for if
+\fIjob\fR is specified; otherwise it is zero. See \fBJobs\fR for a description
+of the format of \fIjob\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwhence\fR \fB[\fR\fB-afpv\fR\fB]\fR \fIname ...\fR\fR
+.ad
+.sp .6
+.RS 4n
+For each \fIname\fR, indicate how it would be interpreted if used as a command
+name. The \fB-v\fR option produces a more verbose report. The \fB-f\fR option
+skips the search for functions. The \fB-p\fR option does a path search for
+\fIname\fR even if name is an alias, a function, or a reserved word. The
+\fB-a\fR option is similar to the -v option but causes all interpretations of
+the specified name to be reported.
+.RE
+
+.SS "Invocation"
+.sp
+.LP
+If the shell is invoked by \fBexec\fR(2), and the first character of argument
+zero (\fB$0\fR) is \fB-\fR, then the shell is assumed to be a login shell and
+commands are read from \fB/etc/profile\fR and then from either .\fBprofile\fR
+in the current directory or \fB$HOME/.profile\fR, if either file exists. Next,
+for interactive shells, commands are read first from \fB/etc/ksh.kshrc\fR, and
+then from the file named by performing parameter expansion, command
+substitution, and arithmetic substitution on the value of the environment
+variable \fBENV\fR if the file exists. If the \fB-s\fR option is not present
+and \fIarg\fR and a file by the name of \fIarg\fR exists, then it reads and
+executes this script. Otherwise, if the first \fIarg\fR does not contain a
+\fB/\fR, a path search is performed on the first \fIarg\fR to determine the
+name of the script to execute. The script \fIarg\fR must have execute
+permission and any \fBsetuid\fR and \fBsetgid\fR settings are ignored. If the
+script is not found on the path, \fIarg\fR is processed as if it named a
+built-in command or function.
+.sp
+.LP
+Commands are then read as described, and the following options are interpreted
+by the shell when it is invoked:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 15n
+.rt
+If the \fB-c\fR option is present, then commands are read from the first
+\fIarg\fR. Any remaining arguments become positional parameters starting at
+\fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 15n
+.rt
+A list of all double quoted strings that are preceded by a \fB$\fR is printed
+on standard output and the shell exits. This set of strings is subject to
+language translation when the locale is not C or POSIX. No commands are
+executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 15n
+.rt
+If the \fB-i\fR option is present or if the shell input and output are attached
+to a terminal (as told by \fBtcgetattr\fR(3C), this shell is interactive. In
+this case \fBTERM\fR is ignored (so that \fBkill 0\fR does not kill an
+interactive shell) and \fBINTR\fR is caught and ignored (so that wait is
+interruptible). In all cases, \fBQUIT\fR is ignored by the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+The \fB-R\fR \fIfilename\fR option is used to generate a cross reference
+database that can be used by a separate utility to find definitions and
+references for variables and commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 15n
+.rt
+If the \fB-r\fR option is present, the shell is a restricted shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 15n
+.rt
+If the \fB-s\fR option is present or if no arguments remain, then commands are
+read from the standard input. Shell output, except for the output of the
+\fBSpecial Commands\fR listed, is written to file descriptor 2.
+.RE
+
+.sp
+.LP
+The remaining options and arguments are described under the \fBset\fR command.
+An optional \fB-\fR as the first argument is ignored.
+.SS "\fBrksh93\fR Only"
+.sp
+.LP
+\fBrksh93\fR is used to set up login names and execution environments whose
+capabilities are more controlled than those of the standard shell.
+.sp
+.LP
+The actions of \fBrksh93\fR are identical to those of \fBksh93\fR, except that
+the following are disallowed:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Unsetting the restricted option
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Changing directory. See \fBcd\fR(1).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Setting or unsetting the value or attributes of \fBSHELL\fR, \fBENV\fR,
+\fBFPATH\fR, or \fBPATH\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Specifying path or command names containing \fB/\fR,
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Redirecting output (\fB>\fR, \fB>\fR\fB|\fR, \fB<>\fR, and \fB>>\fR).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Adding or deleting built-in commands.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Using \fBcommand\fR \fB-p\fR to invoke a command.
+.RE
+.sp
+.LP
+These restrictions are enforced after .\fBprofile\fR and the \fBENV\fR files
+are interpreted.
+.sp
+.LP
+When a command to be executed is found to be a shell procedure, \fBrksh93\fR
+invokes \fBksh93\fR 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 imposing 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 .\fBprofile\fR has complete
+control over user actions, by performing guaranteed setup actions and leaving
+the user in an appropriate directory (probably not the login directory). The
+system administrator often sets up a directory of commands, for example,
+\fB/usr/rbin\fR, that can be safely invoked by \fBrksh\fR.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBksh93\fR and
+\fBrksh93\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
+bytes).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnon-zero\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns \fBnon-zero\fR when errors, such as syntax errors, are detected by the
+shell.
+.sp
+If the shell is being used non-interactively, then execution of the shell file
+is abandoned unless the error occurs inside a sub-shell in which case the
+sub-shell is abandoned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexit status of last command executed\fR\fR
+.ad
+.sp .6
+.RS 4n
+Returns the exit status of the last command executed.
+.sp
+Run time errors detected by the shell are reported by printing the command or
+function name and the error condition. If the line number that the error
+occurred on is greater than one, then the line number is also printed in square
+brackets (\fB[]\fR) after the command or function name.
+.sp
+See the \fBksh93 exit\fR command for additional details.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/profile\fR\fR
+.ad
+.sp .6
+.RS 4n
+The system initialization file, executed for login shells.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/ksh.kshrc\fR\fR
+.ad
+.sp .6
+.RS 4n
+The system wide startup file, executed for interactive shells.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.profile\fR\fR
+.ad
+.sp .6
+.RS 4n
+The personal initialization file, executed for login shells after
+\fB/etc/profile\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.kshrc\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default personal initialization file, executed after \fB/etc/ksh.kshrc\fR, for
+interactive shells when \fBENV\fR is not set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/suid-profile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Alternative initialization file, executed instead of the personal
+initialization file when the real and effective user or group id do not match.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/null\fR\fR
+.ad
+.sp .6
+.RS 4n
+NULL device.
+.RE
+
+.SH AUTHORS
+.sp
+.LP
+David Korn, \fBdgk@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The scripting interface is Uncommitted. The environment variables,
+\fB\&.paths\fR feature, and editing modes are Volatile.
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBcd\fR(1), \fBchmod\fR(1), \fBcut\fR(1), \fBdate\fR(1),
+\fBegrep\fR(1), \fBecho\fR(1), \fBegrep\fR(1), \fBenv\fR(1), \fBfgrep\fR(1),
+\fBgrep\fR(1), \fBlogin\fR(1), \fBnewgrp\fR(1), \fBpaste\fR(1),
+\fBprintf\fR(1), \fBstty\fR(1), \fBtest\fR(1), \fBumask\fR(1), \fBvi\fR(1),
+\fBdup\fR(2), \fBexec\fR(2), \fBfork\fR(2), \fBioctl\fR(2), \fBlseek\fR(2),
+\fBpathconf\fR(2), \fBpipe\fR(2), \fBsysconf\fR(3C), \fBulimit\fR(2),
+\fBumask\fR(2), \fBrand\fR(3C)\fBtcgetattr\fR(3C), \fBwait\fR(3C),
+\fBa.out\fR(4), \fBprofile\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
+.sp
+.LP
+Bolsky, Morris I. and Korn, David G., \fIThe New KornShell Command and
+Programming Language\fR, Prentice Hall, 1995.
+.sp
+.LP
+\fIPOSIX-Part 2: Shell and Utilities, IEEE Std 1003.2-1992, ISO/IEC 9945-2\fR,
+IEEE, 1993.
+.SH NOTES
+.sp
+.LP
+\fBksh93\fR scripts should choose shell function names outside the namespace
+used by reserved keywords of the ISO C99, C++ and JAVA languages to avoid
+collisions with future enhancements to \fBksh93\fR.
+.sp
+.LP
+If a command is executed, and then 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 continues to \fBexec\fR the original command. Use the
+\fB-t\fR option of the alias command to correct this situation.
+.sp
+.LP
+Some very old shell scripts contain a caret (\fB^\fR) as a synonym for the pipe
+character (\fB|\fR).
+.sp
+.LP
+Using the \fBhist\fR built-in command within a compound command causes the
+whole command to disappear from the history file.
+.sp
+.LP
+The built-in command \fB\&.\fR \fIfile\fR reads the whole file before any
+commands are executed. \fBalias\fR and \fBunalias\fR commands in the file do
+not apply to any commands defined in the file.
+.sp
+.LP
+Traps are not processed while a job is waiting for a foreground process. Thus,
+a trap on \fBCHLD\fR is not executed until the foreground job terminates.
+.sp
+.LP
+It is a good idea to leave a space after the comma operator in arithmetic
+expressions to prevent the comma from being interpreted as the decimal point
+character in certain locales.
+.sp
+.LP
+There might be some restrictions on creating a \fB\&.paths\fR file which is
+portable across other operating systems.
+.sp
+.LP
+If the system supports the 64-bit instruction set, \fB/bin/ksh93\fR executes
+the 64-bit version of \fBksh93\fR.
diff --git a/usr/src/man/man1/ktutil.1 b/usr/src/man/man1/ktutil.1
new file mode 100644
index 0000000000..b228087441
--- /dev/null
+++ b/usr/src/man/man1/ktutil.1
@@ -0,0 +1,224 @@
+'\" te
+.\" Copyright 1987, 1989 by the Student Information Processing Board of the Massachusetts Institute of Technology. For copying and distribution information, please see the file kerberosv5/mit-sipb-copyright.h.
+.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ktutil 1 "16 Nov 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+ktutil \- Kerberos keytab maintenance utility
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ktutil\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBktutil\fR command is an interactive command-line interface utility for
+managing the keylist in keytab files. You must read in a keytab's keylist
+before you can manage it. Also, the user running the \fBktutil\fR command must
+have read/write permissions on the keytab. For example, if a keytab is owned by
+root, which it typically is, \fBktutil\fR must be run as root to have the
+appropriate permissions.
+.SH COMMANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclear_list\fR\fR
+.ad
+.br
+.na
+\fB\fBclear\fR\fR
+.ad
+.RS 23n
+.rt
+Clears the current keylist.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBread_kt\fR \fIfile\fR\fR
+.ad
+.br
+.na
+\fB\fBrkt\fR \fIfile\fR\fR
+.ad
+.RS 23n
+.rt
+Reads a keytab into the current keylist. You must specify a keytab \fIfile\fR
+to read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwrite_kt\fR \fIfile\fR\fR
+.ad
+.br
+.na
+\fB\fBwkt\fR \fIfile\fR\fR
+.ad
+.RS 23n
+.rt
+Writes the current keylist to a keytab \fIfile\fR. You must specify a keytab
+file to write. If the keytab file already exists, the current keylist is
+appended to the existing keytab file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBadd_entry\fR \fInumber\fR\fR
+.ad
+.br
+.na
+\fB\fBaddent\fR \fInumber\fR\fR
+.ad
+.RS 23n
+.rt
+Adds an entry to the current keylist. Specify the entry by the keylist slot
+number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdelete_entry\fR \fInumber\fR\fR
+.ad
+.br
+.na
+\fB\fBdelent\fR \fInumber\fR\fR
+.ad
+.RS 23n
+.rt
+Deletes an entry from the current keylist. Specify the entry by the keylist
+slot number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist\fR\fR
+.ad
+.br
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 23n
+.rt
+Lists the current keylist.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist_request\fR\fR
+.ad
+.br
+.na
+\fB\fBlr\fR\fR
+.ad
+.RS 23n
+.rt
+Lists available requests (commands).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquit\fR\fR
+.ad
+.br
+.na
+\fB\fBexit\fR\fR
+.ad
+.br
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 23n
+.rt
+Exits utility.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDeleting a principal from a file
+.sp
+.LP
+The following example deletes the \fBhost/denver@ACME.com\fR principal from the
+\fB/etc/krb5/krb5.keytab\fR file. Notice that if you want to delete an entry
+from an existing keytab, you must first write the keylist to a temporary keytab
+and then overwrite the existing keytab with the temporary keytab. This is
+because the \fBwkt\fR command actually appends the current keylist to an
+existing keytab, so you can't use it to overwrite a keytab.
+
+.sp
+.in +2
+.nf
+example# \fB/usr/krb5/bin/ktutil\fR
+ ktutil: rkt /etc/krb5/krb5.keytab
+ ktutil: list
+slot KVNO Principal
+---- ---- ---------------------------------------
+ 1 8 host/vail@ACME.COM
+ 2 5 host/denver@ACME.COM
+ ktutil:delent 2
+ ktutil:l
+slot KVNO Principal
+---- ---- --------------------------------------
+ 1 8 host/vail@ACME.COM
+ ktutil:wkt /tmp/krb5.keytab
+ ktutil:q
+example# \fBmv /tmp/krb5.keytab /etc/krb5/krb5.keytab\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.keytab\fR\fR
+.ad
+.RS 25n
+.rt
+keytab file for Kerberos clients
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command arguments are Evolving. The command output is Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBkadmin\fR(1M), \fBk5srvutil\fR(1M), \fBattributes\fR(5), \fBkerberos\fR(5)
diff --git a/usr/src/man/man1/lari.1 b/usr/src/man/man1/lari.1
new file mode 100644
index 0000000000..cc4c72ba55
--- /dev/null
+++ b/usr/src/man/man1/lari.1
@@ -0,0 +1,738 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lari 1 "28 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+lari \- link analysis of runtime interfaces
+.SH SYNOPSIS
+.LP
+.nf
+\fBlari\fR [\fB-bCDsVv\fR] [\fB-a\fR | \fB-i\fR | \fB-o\fR] \fIfile\fR | \fIdirectory\fR...
+.fi
+
+.LP
+.nf
+\fBlari\fR [\fB-CDosv\fR] [\fB-m\fR [\fB-d\fR \fImapdir\fR]] \fIfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlari\fR utility analyzes the interface requirements of dynamic \fBELF\fR
+objects. Two basic modes of operation are available. The first mode displays
+runtime interface information. The second mode generates interface definitions.
+.sp
+.LP
+Dynamic objects offer symbolic definitions that represent the interface that
+the object provides for external consumers. At runtime, bindings are
+established from the symbolic references of one object to the symbolic
+definitions of another object. \fBlari\fR analyzes both the interface
+definitions and runtime bindings of the specified objects.
+.sp
+.LP
+When displaying runtime interface information, \fBlari\fR can analyze a number
+of files and/or directories. \fBlari\fR analyzes each \fIfile\fR that is
+specified on the command line. \fBlari\fR recursively descends into each
+\fIdirectory\fR that is specified on the command line, processing each file
+that is found.
+.sp
+.LP
+When generating interface definitions, \fBlari\fR can only process a single
+\fIfile\fR specified on the command line.
+.sp
+.LP
+Without the \fB-D\fR option, \fBlari\fR processes files as dynamic \fBELF\fR
+objects by using \fBldd\fR(1). This processing uses the following options:
+.sp
+.in +2
+.nf
+\fB-r\fR and \fB-e\fR \fBLD_DEBUG=files,bindings,detail\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+These options provide information on all bindings that are established as part
+of loading the object. Notice that by using \fBldd\fR, the specified object is
+not executed, and hence no user controlled loading of objects, by
+\fBdlopen\fR(3C) for example, occurs. To capture all binding information from
+an executing process, the following environment variables can be passed
+directly to the runtime linker, \fBld.so.1\fR(1):
+.sp
+.in +2
+.nf
+\fBLD_DEBUG=files,bindings,detail LD_DEBUG_OUTPUT=lari.dbg \
+LD_BIND_NOW=yes\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The resulting debug output, \fBlari.dbg.\fIpid\fR\fR, can be processed by
+\fBlari\fR using the \fB-D\fR option. \fBNote:\fR \fBlari\fR attempts to
+analyze each object that has been processed using the path name defined in the
+debug output. Each object must therefore be accessible to \fBlari\fR for a
+complete, accurate analysis to be provided. The debug output file must be
+generated in the \fBC\fR locale.
+.sp
+.LP
+When displaying interface information, \fBlari\fR analyzes the interfaces of
+the processed dynamic objects and, by default, displays any interesting
+information. See \fBInteresting Information\fR under EXTENDED DESCRIPTION. The
+information that is displayed is also suitable for piping to other tools. This
+capability can aid developers in analyzing process bindings or debugging
+complex binding scenarios.
+.sp
+.LP
+The generation of interface definitions by \fBlari\fR can be used to refine the
+interface requirements of the dynamic objects that are processed. When creating
+a dynamic object, you should define an explicit, versioned interface. This
+definition controls the symbol definitions that are available to external
+users. In addition, this definition frequently reduces the overall runtime
+execution cost of the object. Interface definitions can be assigned to an
+object during its creation by the link-editor using the \fB-M\fR option and the
+associated \fImapfile\fR directives. See the \fILinker and Libraries Guide\fR
+for more details on using \fImapfiles\fR to version objects. An initial version
+of these \fImapfiles\fR can be created by \fBlari\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 13n
+.rt
+Displays all interface information for the objects analyzed. \fBNote:\fR The
+output from this option can be substantial, but is often useful for piping to
+other analysis tools.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 13n
+.rt
+Limits the interface information to those symbols that have been explicitly
+bound to. \fBNote:\fR Symbols defined as protected might have been bound to
+from within the defining object. This binding is satisfied at link-edit time
+and is therefore not visible to the runtime environment. Protected symbols are
+displayed with this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 13n
+.rt
+Demangles C++ symbol names. This option is useful for augmenting runtime
+interface information. When generating interface definitions, demangled names
+are added to the \fImapfiles\fR as comments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fImapdir\fR\fR
+.ad
+.RS 13n
+.rt
+Defines the directory, \fImapdir\fR, in which \fImapfiles\fR are created. By
+default, the current working directory is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 13n
+.rt
+Interprets any input \fIfiles\fR as debugging information rather than as
+dynamic objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 13n
+.rt
+Displays interesting interface binding information. This mode is the default if
+no other output controlling option is supplied. See \fBInteresting
+Information\fR under EXTENDED DESCRIPTION.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 13n
+.rt
+Creates \fImapfiles\fR for each dynamic object that is processed. These
+\fImapfiles\fR reflect the interface requirements of each object as required by
+the input file being processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 13n
+.rt
+Limits the interface information to those symbols that are deemed an overhead.
+When creating \fImapfiles\fR, any overhead symbols are itemized as local
+symbols. See \fBOverhead Information\fR under EXTENDED DESCRIPTION.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Saves the bindings information produced from \fBldd\fR(1) for further analysis.
+See FILES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 13n
+.rt
+Appends interesting symbol visibilities. Symbols that are defined as
+\fBsingleton\fR or are defined \fBprotected\fR are identified with this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 13n
+.rt
+Ignores any objects that are already versioned. Versioned objects have had
+their interfaces defined, but can contribute to the interface information
+displayed. For example, a versioned shared object might reveal overhead symbols
+for a particular process. Shared objects are frequently designed for use by
+multiple processes, and thus the interfaces these objects provide can extend
+beyond the requirements of any one process. The \fB-v\fR option therefore, can
+reduce noise when displaying interface information.
+.RE
+
+.sp
+.LP
+The runtime interface information produced from \fBlari\fR has the following
+format:
+.sp
+.in +2
+.nf
+[information]: \fIsymbol-name\fR [demangled-name]: \fIobject-name\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Each line describes the interface symbol, \fBsymbol-name\fR, together with the
+object, \fBobject-name\fR, in which the symbol is defined. If the symbol
+represents a function, the symbol name is followed by \fB()\fR. If the symbol
+represents a data object, the symbol name is followed by the symbols size,
+enclosed within \fB[]\fR. If the \fB-C\fR option is used, the symbol name is
+accompanied by the symbols demangled name, \fBdemangled-name\fR. The
+information field provides one or more of the following tokens that describe
+the symbol's use:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcnt\fR:\fIbnd\fR\fR
+.ad
+.RS 11n
+.rt
+Two decimal values indicate the symbol count, \fBcnt\fR, and the number of
+bindings to this object, \fBbnd\fR. The symbol count is the number of
+occurrences of this symbol definition that have been found in the objects that
+are analyzed. A count that is greater than \fB1\fR indicates multiple instances
+of a symbol definition. The number of bindings indicate the number of objects
+that have been bound to this symbol definition by the runtime linker.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBE\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition has been bound to from an external object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition has been bound to from the same object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition has been directly bound to.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBI\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition provides for an interposer. An object that explicitly
+identifies itself as an interposor defines all global symbols as interposers.
+See the \fB-z\fR \fBinterpose\fR option of \fBld\fR(1), and the
+\fBLD_PRELOAD\fR variable of \fBld.so.1\fR(1). Individual symbols within a
+dynamic executable can be defined as interposers by using the \fBINTERPOSE\fR
+\fBmapfile\fR directive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBC\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition is the reference data of a copy-relocation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition resides in a filtee.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol is defined as protected. This symbol might have an internal binding
+from the object in which the symbol is declared. Any internal bindings with
+this attribute can not be interposed upon by another symbol definition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition is the address of a procedure linkage table entry within
+a dynamic executable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBU\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol lookup originated from a user request, for example,
+\fBdlsym\fR(3C).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBR\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition is acting as a filter, and provides for redirection to a
+filtee.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 11n
+.rt
+A binding to this symbol was rejected at some point during a symbol search. A
+rejection can occur when a direct binding request finds a symbol that has been
+tagged to prevent direct binding. In this scenario, the symbol search is
+repeated using a default search model. The binding can still resolve to the
+original, rejected symbol. A rejection can also occur when a non-default symbol
+search finds a symbol identified as a \fBsingleton\fR. Again, the symbol search
+is repeated using a default search model.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBN\fR\fR
+.ad
+.RS 11n
+.rt
+This symbol definition explicitly prohibits directly binding to the definition.
+.RE
+
+.sp
+.LP
+See the \fILinker and Libraries Guide\fR for more details of these symbol
+classifications.
+.SH EXTENDED DESCRIPTION
+.SS "Interesting Information"
+.sp
+.LP
+By default, or specifically using the \fB-i\fR option, \fBlari\fR filters any
+runtime interface information to present interesting events. This filtering is
+carried out mainly to reduce the amount of information that can be generated
+from large applications. In addition, this information is intended to be the
+focus in debugging complex binding scenarios, and often highlights problem
+areas. However, classifying what information is interesting for any particular
+application is an inexact science. You are still free to use the \fB-a\fR
+option and to search the binding information for events that are unique to the
+application being investigated.
+.sp
+.LP
+When an interesting symbol definition is discovered, all other definitions of
+the same symbol are output.
+.sp
+.LP
+The focus of interesting interface information is the existence of multiple
+definitions of a symbol. In this case, one symbol typically interposes on one
+or more other symbol definitions. This interposition is seen when the binding
+count, \fBbnd\fR, of one definition is non-zero, while the binding count of all
+other definitions is zero. Interposition that results from the compilation
+environment, or the linking environment, is not characterized as interesting.
+Examples of these interposition occurrences include copy relocations
+(\fB[C]\fR) and the binding to procedure linkage addresses (\fB[A]\fR).
+.sp
+.LP
+Interposition is often desirable. The intent is to overload, or replace, the
+symbolic definition from a shared object. Interpositioning objects can be
+explicitly tagged (\fB[I]\fR), using the \fB-z interpose\fR option of
+\fBld\fR(1). These objects can safely interpose on symbols, no matter what
+order the objects are loaded in a process. However, be cautious when
+non-explicit interposition is employed, as this interposition is a consequence
+of the load-order of the objects that make up the process.
+.sp
+.LP
+User-created, multiply-defined symbols are output from \fBlari\fR as
+interesting. In this example, two definitions of \fBinterpose1()\fR exist, but
+only the definition in \fBmain\fR is referenced:
+.sp
+.in +2
+.nf
+[2:1E]: interpose1(): ./main
+[2:0]: interpose1(): ./libA.so
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Interposition can also be an undesirable and surprising event, caused by an
+unexpected symbol name clash. A symptom of this interposition might be that a
+function is never called although you know a reference to the function exists.
+This scenario can be identified as a multiply defined symbol, as covered in the
+previous example. However, a more surprising scenario is often encountered when
+an object both defines and references a specific symbol.
+.sp
+.LP
+An example of this scenario is if two dynamic objects define and reference the
+same function, \fBinterpose2()\fR. Any reference to this symbol binds to the
+first dynamic object loaded with the process. In this case, the definition of
+\fBinterpose2()\fR in object \fBlibA.so\fR interposes on, and hides, the
+definition of \fBinterpose2()\fR in object \fBlibB.so\fR. The output from
+\fBlari\fR might be:
+.sp
+.in +2
+.nf
+[2:2ES]: interpose2(): ./libA.so
+[2:0]: interpose2(): ./libB.so
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Multiply defined symbols can also be bound to separately. Separate bindings can
+be the case when direct bindings are in effect (\fB[D]\fR), or because a symbol
+has protected visibility (\fB[P]\fR). Although separate bindings can be
+explicitly established, instances can exist that are unexpected and surprising.
+Directly bound symbols, and symbols with protected visibility, are output as
+interesting information.
+.SS "Overhead Information"
+.sp
+.LP
+When using the \fB-o\fR option, \fBlari\fR displays symbol definitions that
+might be considered overhead.
+.sp
+.LP
+Global symbols that are not referenced are considered an overhead. The symbol
+information that is provided within the object unnecessarily adds to the size
+of the object's text segment. In addition, the symbol information can increase
+the processing required to search for other symbolic references within the
+object at runtime.
+.sp
+.LP
+Global symbols that are only referenced from the same object have the same
+characteristics. The runtime search for a symbolic reference, that results in
+binding to the same object that made the reference, is an additional overhead.
+.sp
+.LP
+Both of these symbol definitions are candidates for reduction to local scope by
+defining the object's interface. Interface definitions can be assigned to a
+file during its creation by the link-editor using the \fB-M\fR option and the
+associated \fImapfile\fR directives. See the \fILinker and Libraries Guide\fR
+for more details on \fImapfiles\fR. Use \fBlari\fR with the \fB-m\fR option to
+create initial versions of these \fImapfiles\fR.
+.sp
+.LP
+If \fBlari\fR is used to generate \fImapfiles\fR, versioned shared objects will
+have \fImapfiles\fR created indicating that their overhead symbols should be
+reduced to locals. This model allows \fBlari\fR to generate \fImapfiles\fR for
+comparison with existing interface definitions. Use the \fB-v\fR option to
+ignore versioned shared objects when creating \fImapfiles\fR.
+.sp
+.LP
+Copy-relocations are also viewed as an overhead and generally should be
+avoided. The size of the copied data is a definition of its interface. This
+definition restricts the ability to change the data size in newer versions of
+the shared object in which the data is defined. This restriction, plus the cost
+of processing a copy relocation, can be avoided by referencing data using a
+functional interface. The output from \fBlari\fR for a copy relocation might
+be:
+.sp
+.in +2
+.nf
+[2:1EC]: __iob[0x140]: ./main
+[2:0]: __iob[0x140]: ./libA.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that a number of small copy relocations, such as \fB__iob\fR used in the
+previous example, exist because of historic programming interactions with
+system libraries.
+.sp
+.LP
+Another example of overhead information is the binding of a dynamic object to
+the procedure linkage table entry of a dynamic executable. If a dynamic
+executable references an external function, a procedure linkage table entry is
+created. This structure allows the reference binding to be deferred until the
+function call is actually made. If a dynamic object takes the address of the
+same referenced function, the dynamic object binds to the dynamic executables
+procedure linkage table entry. An example of this type of event reveals the
+following:
+.sp
+.in +2
+.nf
+[2:1EA]: foo(): ./main
+[2:1E]: foo(): ./libA.so
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+A small number of bindings of this type are typically not cause for concern.
+However, a large number of these bindings, perhaps from a jump-table
+programming technique, can contribute to start up overhead. Address relocation
+bindings of this type require relocation processing at application start up,
+rather than the deferred relocation processing used when calling functions
+directly. Use of this address also requires an indirection at runtime.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAnalyzing a case of multiple bindings
+.sp
+.LP
+The following example shows the analysis of a process in which multiple symbol
+definitions exist. The shared objects \fBlibX.so\fR and \fBlibY.so\fR both call
+the function \fBinterpose()\fR. This function exists in both the application
+\fBmain\fR, and the shared object \fBlibA.so\fR. Because of interposition, both
+references bind to the definition of \fBinterpose()\fR in \fBmain\fR.
+
+.sp
+.LP
+The shared objects \fBlibX.so\fR and \fBlibY.so\fR also both call the function
+\fBfoo()\fR. This function exists in the application \fBmain\fR, and the shared
+objects \fBlibA.so\fR, \fBlibX.so\fR, and \fBlibY.so\fR. Because both
+\fBlibX.so\fR and \fBlibY.so\fR were built with direct bindings enabled, each
+object binds to its own definition.
+
+.sp
+.in +2
+.nf
+example% \fBlari ./main\fR
+[3:0]: foo(): ./libA.so
+[3:1SD]: foo(): ./libX.so
+[3:1SD]: foo(): ./libY.so
+[2:0]: interpose(): ./libA.so
+[2:2EP]: interpose(): ./main
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To analyze binding information more thoroughly, the bindings data can be saved
+for further inspection. For example, the previous output indicates that the
+function \fBinterpose()\fR was called from two objects external to \fBmain\fR.
+Inspection of the binding output reveals where the references to this function
+originated.
+
+.sp
+.in +2
+.nf
+example% \fBlari -s ./main\fR
+lari: ./main: bindings information saved as: /usr/tmp/lari.dbg.main
+\&.....
+example% \fBfgrep foo /usr/tmp/lari.dbg.main\fR
+binding file=./libX.so to file=./main: symbol `interpose'
+binding file=./libY.so to file=./main: symbol `interpose'
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBNote:\fR The bindings output is typically more extensive than shown here, as
+the output is accompanied with process identifier, address and other bindings
+information.
+
+.LP
+\fBExample 2 \fRGenerating an interface definition
+.sp
+.LP
+The following example creates interface definitions for an application and its
+dependency, while ignoring any versioned system libraries. The application
+\fBmain\fR makes reference to the interfaces \fBone()\fR, \fBtwo()\fR, and
+\fBthree()\fR in \fBfoo.so\fR:
+
+.sp
+.in +2
+.nf
+example% \fBlari -omv ./main\fR
+example% \fBcat mapfile-foo.so\fR
+#
+# Interface Definition mapfile for:
+# Dynamic Object: ./foo.so
+# Process: ./main
+#
+
+foo.so {
+ global:
+ one;
+ three;
+ two;
+ local:
+ _one;
+ _three;
+ _two;
+ *;
+};
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$TMPDIR/lari.dbg.\fIfile\fR\fR\fR
+.ad
+.RS 25n
+.rt
+Binding output produced by \fBldd\fR(1).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Uncommitted. The options are Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBld\fR(1), \fBldd\fR(1), \fBld.so.1\fR(1), \fBdlopen\fR(3C), \fBdlsym\fR(3C),
+\fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/last.1 b/usr/src/man/man1/last.1
new file mode 100644
index 0000000000..91995ecbe4
--- /dev/null
+++ b/usr/src/man/man1/last.1
@@ -0,0 +1,117 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH last 1 "24 Jul 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+last \- display login and logout information about users and terminals
+.SH SYNOPSIS
+.LP
+.nf
+\fBlast\fR [\fB-a\fR] [\fB-n\fR \fInumber\fR | \fB-number\fR] [\fB-f\fR \fIfilename\fR]
+ [\fIname\fR | \fItty\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlast\fR command looks in the \fB/var/adm/wtmpx\fR file, which records
+all logins and logouts, for information about a user, a terminal, or any group
+of users and terminals. Arguments specify names of users or terminals of
+interest. If multiple arguments are given, the information applicable to any of
+the arguments is printed. For example, \fBlast\fR \fBroot\fR \fBconsole\fR
+lists all of root's sessions, as well as all sessions on the console terminal.
+\fBlast\fR displays the sessions of the specified users and terminals, most
+recent first, indicating the times at which the session began, the duration of
+the session, and the terminal on which the session took place. \fBlast\fR also
+indicates whether the session is continuing or was cut short by a reboot.
+.sp
+.LP
+The pseudo-user reboot logs in when the system is shutdown and when it reboots.
+Thus,
+.sp
+.in +2
+.nf
+last reboot
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+gives an approximate record of when the operating system instance was shutdown
+and when it rebooted. This can be used to calculate the availability of the
+operating system over time.
+.sp
+.LP
+\fBlast\fR with no arguments displays a record of all logins and logouts, in
+reverse order.
+.sp
+.LP
+If \fBlast\fR is interrupted, it indicates how far the search has progressed in
+\fB/var/adm/wtmpx\fR. If interrupted with a quit signal (generated by a
+CTRL\(mi\e), \fBlast\fR indicates how far the search has progressed, and then
+continues the search.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 25n
+.rt
+Displays the hostname in the last column.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI filename\fR\fR
+.ad
+.RS 25n
+.rt
+Uses \fIfilename\fR as the name of the accounting file instead of
+\fB/var/adm/wtmpx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI number\||\|\fR\fB-\fR\fInumber\fR\fR
+.ad
+.RS 25n
+.rt
+Limits the number of entries displayed to that specified by \fInumber\fR. These
+options are identical; the \fB-\fR\fInumber\fR option is provided as a
+transition tool only and is removed in future releases.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+Date and time format is based on locale specified by the \fBLC_ALL\fR,
+\fBLC_TIME\fR, or \fBLANG\fR environments, in that order of priority.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/wtmpx\fR\fR
+.ad
+.RS 18n
+.rt
+accounting file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fButmpx\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/lastcomm.1 b/usr/src/man/man1/lastcomm.1
new file mode 100644
index 0000000000..0378f4cef5
--- /dev/null
+++ b/usr/src/man/man1/lastcomm.1
@@ -0,0 +1,196 @@
+'\" te
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lastcomm 1 "10 Jan 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+lastcomm \- display the last commands executed, in reverse order
+.SH SYNOPSIS
+.LP
+.nf
+\fBlastcomm\fR [\fB-f\fR \fIfile\fR] [\fB-x\fR] [\fIcommand-name\fR] ... [\fIuser-name\fR] ...
+ [\fIterminal-name\fR] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlastcomm\fR command gives information on previously executed commands.
+\fBlastcomm\fR with no arguments displays information about all the commands
+recorded during the current accounting file's lifetime. If called with
+arguments, \fBlastcomm\fR only displays accounting entries with a matching
+\fIcommand-name\fR, \fIuser-name\fR, or \fIterminal-name\fR. If extended
+process accounting is active (see \fBacctadm\fR(1M)) and is recording the
+appropriate data items, \fBlastcomm\fR attempts to take data from the current
+extended process accounting file. If standard process accounting is active,
+\fBlastcomm\fR takes data from the current standard accounting file (see
+\fBacct\fR(2)).
+.sp
+.LP
+If \fIterminal-name\fR is `\fB- -\fR', there was no controlling \fBTTY\fR for
+the process. The process was probably executed during boot time. If
+\fIterminal-name\fR is `\fB??\fR', the controlling \fBTTY\fR could not be
+decoded into a printable name.
+.sp
+.LP
+For each process entry, \fBlastcomm\fR displays the following items of
+information:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The command name under which the process was called.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+One or more flags indicating special information about the process. The flags
+have the following meanings:
+.RS
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR\fR
+.ad
+.RS 5n
+.rt
+The process performed a \fBfork\fR but not an \fBexec\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.RS 5n
+.rt
+The process ran as a set-user-id program.
+.RE
+
+.RE
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The name of the user who ran the process.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The terminal which the user was logged in on at the time (if applicable).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The amount of \fBCPU\fR time used by the process (in seconds).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The date and time the process exited.
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+Uses \fIfile\fR as the source of accounting data. \fIfile\fR may be either an
+extended process accounting file or a standard process accounting file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 11n
+.rt
+Uses the currently active extended process accounting file. If extended
+processing accounting is inactive, no output will be produced.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRListing executions of named commands
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% \fBlastcomm a.out root term/01\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces a listing of all the executions of commands named \fBa.out\fR by user
+\fBroot\fR while using the terminal \fBterm/01\fR.
+
+.LP
+\fBExample 2 \fRListing all user commands
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% \fBlastcomm root\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces a listing of all the commands executed by user \fBroot\fR.
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/pacct\fR\fR
+.ad
+.RS 24n
+.rt
+standard accounting file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/exacct/proc\fR\fR
+.ad
+.RS 24n
+.rt
+extended accounting file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlast\fR(1), \fBacctadm\fR(1M), \fBacct\fR(2), \fBacct.h\fR(3HEAD),
+\fBsigvec\fR(3UCB), \fBcore\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ld.1 b/usr/src/man/man1/ld.1
new file mode 100644
index 0000000000..4acda64771
--- /dev/null
+++ b/usr/src/man/man1/ld.1
@@ -0,0 +1,1820 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ld 1 "18 Sep 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ld \- link-editor for object files
+.SH SYNOPSIS
+.LP
+.nf
+\fBld\fR [\fB-32\fR | \fB-64\fR] [\fB-a\fR | \fB-r\fR] [\fB-b\fR] [\fB-B\fRdirect | nodirect]
+[\fB-B\fR dynamic | static] [\fB-B\fR eliminate] [\fB-B\fR group] [\fB-B\fR local]
+[\fB-B\fR reduce] [\fB-B\fR symbolic] [\fB-c\fR \fIname\fR] [\fB-C\fR] [\fB-d\fR y | n]
+[\fB-D\fR \fItoken\fR,...] [\fB-e\fR \fIepsym\fR] [\fB-f\fR \fIname\fR | \fB-F\fR \fIname\fR] [\fB-G\fR] [\fB-h\fR \fIname\fR]
+[\fB-i\fR] [\fB-I\fR \fIname\fR] [\fB-l\fR \fIx\fR] [\fB-L\fR \fIpath\fR] [\fB-m\fR] [\fB-M\fR \fImapfile\fR]
+[\fB-N\fR \fIstring\fR] [\fB-o\fR \fIoutfile\fR] [\fB-p\fR \fIauditlib\fR] [\fB-P\fR \fIauditlib\fR]
+[\fB-Q\fR y | n] [\fB-R\fR \fIpath\fR] [\fB-s\fR] [\fB-S\fR \fIsupportlib\fR] [\fB-t\fR]
+[\fB-u\fR \fIsymname\fR] [\fB-V\fR] [\fB-Y P\fR\fI,dirlist\fR] [\fB-z\fR absexec]
+[\fB-z\fR allextract | defaultextract | weakextract ]
+[\fB-z\fR altexec64] [\fB-z\fR combreloc | nocombreloc ] [\fB-z\fR defs | nodefs]
+[\fB-z\fR direct | nodirect] [\fB-z\fR endfiltee] [\fB-z\fR finiarray=\fIfunction\fR]
+[\fB-z\fR globalaudit] [\fB-z\fR groupperm | nogroupperm] [\fB-z\fR help ]
+[\fB-z\fR ignore | record] [\fB-z\fR initarray=\fIfunction\fR] [\fB-z\fR initfirst]
+[\fB-z\fR interpose] [\fB-z\fR lazyload | nolazyload]
+[\fB-z\fR ld32=\fIarg1\fR,\fIarg2\fR,...] [\fB-z\fR ld64=\fIarg1\fR,\fIarg2\fR,...]
+[\fB-z\fR loadfltr] [\fB-z\fR muldefs] [\fB-z\fR nocompstrtab] [\fB-z\fR nodefaultlib]
+[\fB-z\fR nodelete] [\fB-z\fR nodlopen] [\fB-z\fR nodump] [\fB-z\fR noldynsym]
+[\fB-z\fR nopartial] [\fB-z\fR noversion] [\fB-z\fR now] [\fB-z\fR origin]
+[\fB-z\fR preinitarray=\fIfunction\fR] [\fB-z\fR redlocsym] [\fB-z\fR relaxreloc]
+[\fB-z\fR rescan-now] [\fB-z\fR recan] [\fB-z\fR rescan-start \fI\&...\fR \fB-z\fR rescan-end]]
+[\fB-z\fR target=sparc|x86] [\fB-z\fR text | textwarn | textoff]
+[\fB-z\fR verbose] [\fB-z\fR wrap=\fIsymbol\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The link-editor, \fBld\fR, combines relocatable object files by resolving
+symbol references to symbol definitions, together with performing relocations.
+\fBld\fR operates in two modes, static or dynamic, as governed by the \fB-d\fR
+option. In all cases, the output of \fBld\fR is left in the file \fBa.out\fR by
+default. See NOTES.
+.sp
+.LP
+In dynamic mode, \fB-dy\fR, the default, relocatable object files that are
+provided as arguments are combined to produce an executable object file. This
+file is linked at execution with any shared object files that are provided as
+arguments. If the \fB-G\fR option is specified, relocatable object files are
+combined to produce a shared object. Without the \fB-G\fR option, a dynamic
+executable is created.
+.sp
+.LP
+In static mode, \fB-dn\fR, relocatable object files that are provided as
+arguments are combined to produce a static executable file. If the \fB-r\fR
+option is specified, relocatable object files are combined to produce one
+relocatable object file. See \fBStatic Executables\fR.
+.sp
+.LP
+Dynamic linking is the most common model for combining relocatable objects, and
+the eventual creation of processes within Solaris. This environment tightly
+couples the work of the link-editor and the runtime linker, \fBld.so.1\fR(1).
+Both of these utilities, together with their related technologies and
+utilities, are extensively documented in the \fILinker and Libraries Guide\fR.
+.sp
+.LP
+If any argument is a library, \fBld\fR by default searches the library exactly
+once at the point the library is encountered on the argument list. The library
+can be either a shared object or relocatable archive. See \fBar.h\fR(3HEAD)).
+.sp
+.LP
+A shared object consists of an indivisible, whole unit that has been generated
+by a previous link-edit of one or more input files. When the link-editor
+processes a shared object, the entire contents of the shared object become a
+logical part of the resulting output file image. The shared object is not
+physically copied during the link-edit as its actual inclusion is deferred
+until process execution. This logical inclusion means that all symbol entries
+defined in the shared object are made available to the link-editing process.
+See Chapter 4, \fIShared Objects,\fR in \fILinker and Libraries Guide\fR
+.sp
+.LP
+For an archive library, \fBld\fR loads only those routines that define an
+unresolved external reference. \fBld\fR searches the symbol table of the
+archive library sequentially to resolve external references that can be
+satisfied by library members. This search is repeated until no external
+references can be resolved by the archive. Thus, the order of members in the
+library is functionally unimportant, unless multiple library members exist that
+define the same external symbol. Archive libraries that have interdependencies
+can require multiple command line definitions, or the use of one of the
+\fB-z\fR \fBrescan\fR options. See \fIArchive Processing\fR in \fILinker and
+Libraries Guide\fR.
+.sp
+.LP
+\fBld\fR is a cross link-editor, able to link 32-bit objects or 64-bit objects,
+for Sparc or x86 targets. \fBld\fR uses the \fBELF\fR class and machine type of
+the first relocatable object on the command line to govern the mode in which to
+operate. The mixing of 32-bit objects and 64-bit objects is not permitted.
+Similarly, only objects of a single machine type are allowed. See the
+\fB-32\fR, \fB-64\fR and \fB-z target\fR options, and the \fBLD_NOEXEC_64\fR
+environment variable.
+.SS "Static Executables"
+.sp
+.LP
+The creation of static executables has been discouraged for many releases. In
+fact, 64-bit system archive libraries have never been provided. Because a
+static executable is built against system archive libraries, the executable
+contains system implementation details. This self-containment has a number of
+drawbacks.
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The executable is immune to the benefits of system patches delivered as shared
+objects. The executable therefore, must be rebuilt to take advantage of many
+system improvements.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The ability of the executable to run on future releases can be compromised.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The duplication of system implementation details negatively affects system
+performance.
+.RE
+.sp
+.LP
+With Solaris 10, 32-bit system archive libraries are no longer provided.
+Without these libraries, specifically \fBlibc.a\fR, the creation of static
+executables is no longer achievable without specialized system knowledge.
+However, the capability of \fBld\fR to process static linking options, and the
+processing of archive libraries, remains unchanged.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-32\fR | \fB-64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Creates a 32-bit, or 64-bit object.
+.sp
+By default, the class of the object being generated is determined from the
+first \fBELF\fR object processed from the command line. If no objects are
+specified, the class is determined by the first object encountered within the
+first archive processed from the command line. If there are no objects or
+archives, the link-editor creates a 32-bit object.
+.sp
+The \fB-64\fR option is required to create a 64-bit object solely from a
+mapfile.
+.sp
+This \fB-32\fR or \fB-64\fR options can also be used in the rare case of
+linking entirely from an archive that contains a mixture of 32 and 64-bit
+objects. If the first object in the archive is not the class of the object that
+is required to be created, then the \fB-32\fR or \fB-64\fR option can be used
+to direct the link-editor. See \fIThe 32-bit link-editor and 64-bit
+link-editor\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+In static mode only, produces an executable object file. Undefined references
+are not permitted. This option is the default behavior for static mode. The
+\fB-a\fR option can not be used with the \fB-r\fR option. See \fBStatic
+Executables\fR under DESCRIPTION.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only, provides no special processing for dynamic executable
+relocations that reference symbols in shared objects. Without the \fB-b\fR
+option, the link-editor applies techniques within a dynamic executable so that
+the text segment can remain read-only. One technique is the creation of special
+position-independent relocations for references to functions that are defined
+in shared objects. Another technique arranges for data objects that are defined
+in shared objects to be copied into the memory image of an executable at
+runtime.
+.sp
+The \fB-b\fR option is intended for specialized dynamic objects and is not
+recommended for general use. Its use suppresses all specialized processing
+required to ensure an object's shareability, and can even prevent the
+relocation of 64-bit executables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBdirect\fR | \fBnodirect\fR\fR
+.ad
+.sp .6
+.RS 4n
+These options govern direct binding. \fB-B\fR \fBdirect\fR establishes direct
+binding information by recording the relationship between each symbol reference
+together with the dependency that provides the definition. In addition, direct
+binding information is established between each symbol reference and an
+associated definition within the object being created. The runtime linker uses
+this information to search directly for a symbol in the associated object
+rather than to carry out a default symbol search.
+.sp
+Direct binding information can only be established to dependencies specified
+with the link-edit. Thus, you should use the \fB-z\fR \fBdefs\fR option.
+Objects that wish to interpose on symbols in a direct binding environment
+should identify themselves as interposers with the \fB-z\fR \fBinterpose\fR
+option. The use of \fB-B\fR \fBdirect\fR enables \fB-z\fR \fBlazyload\fR for
+all dependencies.
+.sp
+The \fB-B\fR \fBnodirect\fR option prevents any direct binding to the
+interfaces offered by the object being created. The object being created can
+continue to directly bind to external interfaces by specifying the \fB-z\fR
+\fBdirect\fR option. See Appendix D, \fIDirect Bindings,\fR in \fILinker and
+Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBdynamic\fR | \fBstatic\fR\fR
+.ad
+.sp .6
+.RS 4n
+Options governing library inclusion. \fB-B\fR \fBdynamic\fR is valid in dynamic
+mode only. These options can be specified any number of times on the command
+line as toggles: if the \fB-B\fR \fBstatic\fR option is given, no shared
+objects are accepted until \fB-B\fR \fBdynamic\fR is seen. See the \fB-l\fR
+option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBeliminate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes any global symbols, not assigned to a version definition, to be
+eliminated from the symbol table. Version definitions can be supplied by means
+of a \fBmapfile\fR to indicate the global symbols that should remain visible in
+the generated object. This option achieves the same symbol elimination as the
+\fIauto-elimination\fR directive that is available as part of a \fBmapfile\fR
+version definition. This option can be useful when combining versioned and
+non-versioned relocatable objects. See also the \fB-B\fR \fBlocal\fR option and
+the \fB-B\fR \fBreduce\fR option. See \fIDefining Additional Symbols with a
+mapfile\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBgroup\fR\fR
+.ad
+.sp .6
+.RS 4n
+Establishes a shared object and its dependencies as a group. Objects within the
+group are bound to other members of the group at runtime. This mode is similar
+to adding the object to the process by using \fBdlopen\fR(3C) with the
+\fBRTLD_GROUP\fR mode. An object that has an explicit dependency on a object
+identified as a group, becomes a member of the group.
+.sp
+As the group must be self contained, use of the \fB-B\fR \fBgroup\fR option
+also asserts the \fB-z\fR \fBdefs\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBlocal\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes any global symbols, not assigned to a version definition, to be reduced
+to local. Version definitions can be supplied by means of a \fBmapfile\fR to
+indicate the global symbols that should remain visible in the generated object.
+This option achieves the same symbol reduction as the \fIauto-reduction\fR
+directive that is available as part of a \fBmapfile\fR version definition. This
+option can be useful when combining versioned and non-versioned relocatable
+objects. See also the \fB-B\fR \fBeliminate\fR option and the \fB-B\fR
+\fBreduce\fR option. See \fIDefining Additional Symbols with a mapfile\fR in
+\fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBreduce\fR\fR
+.ad
+.sp .6
+.RS 4n
+When generating a relocatable object, causes the reduction of symbolic
+information defined by any version definitions. Version definitions can be
+supplied by means of a \fBmapfile\fR to indicate the global symbols that should
+remain visible in the generated object. By default, when a relocatable object
+is generated, version definitions are only recorded in the output image. The
+actual reduction of symbolic information is carried out when the object is used
+in the construction of a dynamic executable or shared object. The \fB-B\fR
+\fBreduce\fR option is applied automatically when a dynamic executable or
+shared object is created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fBsymbolic\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only. When building a shared object, binds references to global
+symbols to their definitions, if available, within the object. Normally,
+references to global symbols within shared objects are not bound until runtime,
+even if definitions are available. This model allows definitions of the same
+symbol in an executable or other shared object to override the object's own
+definition. \fBld\fR issues warnings for undefined symbols unless \fB-z\fR
+\fBdefs\fR overrides.
+.sp
+The \fB-B\fR \fBsymbolic\fR option is intended for specialized dynamic objects
+and is not recommended for general use. To reduce the runtime relocation
+processing that is required an object, the creation of a version definition is
+recommended.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Records the configuration file \fIname\fR for use at runtime. Configuration
+files can be employed to alter default search paths, provide a directory cache,
+together with providing alternative object dependencies. See \fBcrle\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.sp .6
+.RS 4n
+Demangles C++ symbol names displayed in diagnostic messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fBy\fR | \fBn\fR\fR
+.ad
+.sp .6
+.RS 4n
+When \fB-d\fR \fBy\fR, the default, is specified, \fBld\fR uses dynamic
+linking. When \fB-d\fR \fBn\fR is specified, \fBld\fR uses static linking. See
+\fBStatic Executables\fR under DESCRIPTION, and \fB-B\fR
+\fBdynamic\fR|\fBstatic\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fItoken\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Prints debugging information as specified by each \fItoken\fR, to the standard
+error. The special token \fBhelp\fR indicates the full list of tokens
+available. See \fIDebugging Aids\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIepsym\fR\fR
+.ad
+.br
+.na
+\fB\fB--entry\fR \fIepsym\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the entry point address for the output file to be the symbol \fIepsym\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIname\fR\fR
+.ad
+.br
+.na
+\fB\fB--auxiliary\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Useful only when building a shared object. Specifies that the symbol table of
+the shared object is used as an auxiliary filter on the symbol table of the
+shared object specified by \fIname\fR. Multiple instances of this option are
+allowed. This option can not be combined with the \fB-F\fR option. See
+\fIGenerating Auxiliary Filters\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIname\fR\fR
+.ad
+.br
+.na
+\fB\fB--filter\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Useful only when building a shared object. Specifies that the symbol table of
+the shared object is used as a filter on the symbol table of the shared object
+specified by \fIname\fR. Multiple instances of this option are allowed. This
+option can not be combined with the \fB-f\fR option. See \fIGenerating Standard
+Filters\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR\fR
+.ad
+.br
+.na
+\fB\fB-shared\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only, produces a shared object. Undefined symbols are allowed.
+See Chapter 4, \fIShared Objects,\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIname\fR\fR
+.ad
+.br
+.na
+\fB\fB--soname\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only, when building a shared object, records \fIname\fR in the
+object's dynamic section. \fIname\fR is recorded in any dynamic objects that
+are linked with this object rather than the object's file system name.
+Accordingly, \fIname\fR is used by the runtime linker as the name of the shared
+object to search for at runtime. See \fIRecording a Shared Object Name\fR in
+\fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ignores \fBLD_LIBRARY_PATH\fR. This option is useful when an
+\fBLD_LIBRARY_PATH\fR setting is in effect to influence the runtime library
+search, which would interfere with the link-editing being performed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIname\fR\fR
+.ad
+.br
+.na
+\fB\fB--dynamic-linker\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+When building an executable, uses \fIname\fR as the path name of the
+interpreter to be written into the program header. The default in static mode
+is no interpreter. In dynamic mode, the default is the name of the runtime
+linker, \fBld.so.1\fR(1). Either case can be overridden by \fB-I\fR \fIname\fR.
+\fBexec\fR(2) loads this interpreter when the \fBa.out\fR is loaded, and passes
+control to the interpreter rather than to the \fBa.out\fR directly.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIx\fR\fR
+.ad
+.br
+.na
+\fB\fB--library\fR \fIx\fR\fR
+.ad
+.sp .6
+.RS 4n
+Searches a library \fBlib\fR\fIx\fR\fB\&.so\fR or \fBlib\fR\fIx\fR\fB\&.a\fR,
+the conventional names for shared object and archive libraries, respectively.
+In dynamic mode, unless the \fB-B\fR \fBstatic\fR option is in effect, \fBld\fR
+searches each directory specified in the library search path for a
+\fBlib\fR\fIx\fR\fB\&.so\fR or \fBlib\fR\fIx\fR\fB\&.a\fR file. The directory
+search stops at the first directory containing either. \fBld\fR chooses the
+file ending in \fB\&.so\fR if \fB-l\fR\fIx\fR expands to two files with names
+of the form \fBlib\fR\fIx\fR\fB\&.so\fR and \fBlib\fR\fIx\fR\fB\&.a\fR. If no
+\fBlib\fR\fIx\fR\fB\&.so\fR is found, then \fBld\fR accepts
+\fBlib\fR\fIx\fR\fB\&.a\fR. In static mode, or when the \fB-B\fR \fBstatic\fR
+option is in effect, \fBld\fR selects only the file ending in \fB\&.a\fR.
+\fBld\fR searches a library when the library is encountered, so the placement
+of \fB-l\fR is significant. See \fILinking With Additional Libraries\fR in
+\fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fIpath\fR\fR
+.ad
+.br
+.na
+\fB\fB--library-path\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Adds \fIpath\fR to the library search directories. \fBld\fR searches for
+libraries first in any directories specified by the \fB-L\fR options and then
+in the standard directories. This option is useful only if the option precedes
+the \fB-l\fR options to which the \fB-L\fR option applies. See \fIDirectories
+Searched by the Link-Editor\fR in \fILinker and Libraries Guide\fR.
+.sp
+The environment variable \fBLD_LIBRARY_PATH\fR can be used to supplement the
+library search path, however the \fB-L\fR option is recommended, as the
+environment variable is also interpreted by the runtime environment. See
+\fBLD_LIBRARY_PATH\fR under ENVIRONMENT VARIABLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.sp .6
+.RS 4n
+Produces a memory map or listing of the input/output sections, together with
+any non-fatal multiply-defined symbols, on the standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fImapfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Reads \fImapfile\fR as a text file of directives to \fBld\fR. This option can
+be specified multiple times. If \fImapfile\fR is a directory, then all regular
+files, as defined by \fBstat\fR(2), within the directory are processed. See
+Chapter 9, \fIMapfile Option,\fR in \fILinker and Libraries Guide\fR. Example
+mapfiles are provided in \fB/usr/lib/ld\fR. See FILES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIstring\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option causes a \fBDT_NEEDED\fR entry to be added to the \fB\&.dynamic\fR
+section of the object being built. The value of the \fBDT_NEEDED\fR string is
+the \fIstring\fR that is specified on the command line. This option is position
+dependent, and the \fBDT_NEEDED\fR \fB\&.dynamic\fR entry is relative to the
+other dynamic dependencies discovered on the link-edit line. This option is
+useful for specifying dependencies within device driver relocatable objects
+when combined with the \fB-dy\fR and \fB-r\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutfile\fR\fR
+.ad
+.br
+.na
+\fB\fB--output\fR \fIoutfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Produces an output object file that is named \fIoutfile\fR. The name of the
+default object file is \fBa.out\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIauditlib\fR\fR
+.ad
+.sp .6
+.RS 4n
+Identifies an audit library, \fIauditlib\fR. This audit library is used to
+audit the object being created at runtime. A shared object identified as
+requiring auditing with the \fB-p\fR option, has this requirement inherited by
+any object that specifies the shared object as a dependency. See the \fB-P\fR
+option. See \fIRuntime Linker Auditing Interface\fR in \fILinker and Libraries
+Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIauditlib\fR\fR
+.ad
+.sp .6
+.RS 4n
+Identifies an audit library, \fIauditlib\fR. This audit library is used to
+audit the dependencies of the object being created at runtime. Dependency
+auditing can also be inherited from dependencies that are identified as
+requiring auditing. See the \fB-p\fR option, and the \fB-z\fR \fBglobalaudit\fR
+option. See \fIRuntime Linker Auditing Interface\fR in \fILinker and Libraries
+Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR \fBy\fR | \fBn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Under \fB-Q\fR \fBy\fR, an \fBident\fR string is added to the \fB\&.comment\fR
+section of the output file. This string identifies the version of the \fBld\fR
+used to create the file. This results in multiple \fBld\fR \fBidents\fR when
+there have been multiple linking steps, such as when using \fBld\fR \fB-r\fR.
+This identification is identical with the default action of the \fBcc\fR
+command. \fB-Q\fR \fBn\fR suppresses version identification. \fB\&.comment\fR
+sections can be manipulated by the \fBmcs\fR(1) utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB--relocatable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Combines relocatable object files to produce one relocatable object file.
+\fBld\fR does not complain about unresolved references. This option cannot be
+used with the \fB-a\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIpath\fR\fR
+.ad
+.br
+.na
+\fB\fB-rpath\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+A colon-separated list of directories used to specify library search
+directories to the runtime linker. If present and not NULL, the path is
+recorded in the output object file and passed to the runtime linker. Multiple
+instances of this option are concatenated together with each \fIpath\fR
+separated by a colon. See \fIDirectories Searched by the Runtime Linker\fR in
+\fILinker and Libraries Guide\fR.
+.sp
+The use of a runpath within an associated object is preferable to setting
+global search paths such as through the \fBLD_LIBRARY_PATH\fR environment
+variable. Only the runpaths that are necessary to find the objects dependencies
+should be recorded. \fBldd\fR(1) can also be used to discover unused runpaths
+in dynamic objects, when used with the \fB-U\fR option.
+.sp
+Various tokens can also be supplied with a runpath that provide a flexible
+means of identifying system capabilities or an objects location. See Appendix
+C, \fIEstablishing Dependencies with Dynamic String Tokens,\fR in \fILinker and
+Libraries Guide\fR. The \fB$ORIGIN\fR token is especially useful in allowing
+dynamic objects to be relocated to different locations in the file system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--strip-all\fR\fR
+.ad
+.sp .6
+.RS 4n
+Strips symbolic information from the output file. Any debugging information,
+that is, \fB\&.line\fR, \fB\&.debug*\fR, and \fB\&.stab*\fR sections, and their
+associated relocation entries are removed. Except for relocatable files, a
+symbol table \fBSHT_SYMTAB\fR and its associated string table section are not
+created in the output object file. The elimination of a \fBSHT_SYMTAB\fR symbol
+table can reduce the \fB\&.stab*\fR debugging information that is generated
+using the compiler drivers \fB-g\fR option. See the \fB-z\fR \fBredlocsym\fR
+and \fB-z\fR \fBnoldynsym\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIsupportlib\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shared object \fIsupportlib\fR is loaded with \fBld\fR and given
+information regarding the linking process. Shared objects that are defined by
+using the \fB-S\fR option can also be supplied using the \fBSGS_SUPPORT\fR
+environment variable. See \fILink-Editor Support Interface\fR in \fILinker and
+Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Turns off the warning for multiply-defined symbols that have different sizes or
+different alignments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIsymname\fR\fR
+.ad
+.br
+.na
+\fB\fB--undefined\fR \fIsymname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enters \fIsymname\fR as an undefined symbol in the symbol table. This option is
+useful for loading entirely from an archive library. In this instance, an
+unresolved reference is needed to force the loading of the first routine. The
+placement of this option on the command line is significant. This option must
+be placed before the library that defines the symbol. See \fIDefining
+Additional Symbols with the u option\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.br
+.na
+\fB\fB--version\fR\fR
+.ad
+.sp .6
+.RS 4n
+Outputs a message giving information about the version of \fBld\fR being used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR \fBP,\fR\fIdirlist\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes the default directories used for finding libraries. \fIdirlist\fR is a
+colon-separated path list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBabsexec\fR\fR
+.ad
+.sp .6
+.RS 4n
+Useful only when building a dynamic executable. Specifies that references to
+external absolute symbols should be resolved immediately instead of being left
+for resolution at runtime. In very specialized circumstances, this option
+removes text relocations that can result in excessive swap space demands by an
+executable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBallextract\fR | \fBdefaultextract\fR | \fBweakextract\fR\fR
+.ad
+.br
+.na
+\fB\fB--whole-archive\fR | \fB--no-whole-archive\fR\fR
+.ad
+.sp .6
+.RS 4n
+Alters the extraction criteria of objects from any archives that follow. By
+default, archive members are extracted to satisfy undefined references and to
+promote tentative definitions with data definitions. Weak symbol references do
+not trigger extraction. Under the \fB-z\fR \fBallextract\fR or
+\fB--whole-archive\fR options, all archive members are extracted from the
+archive. Under \fB-z\fR \fBweakextract\fR, weak references trigger archive
+extraction. The \fB-z\fR \fBdefaultextract\fR or \fB--no-whole-archive\fR
+options provide a means of returning to the default following use of the former
+extract options. See \fIArchive Processing\fR in \fILinker and Libraries
+Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBaltexec64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Execute the 64-bit \fBld\fR. The creation of very large 32-bit objects can
+exhaust the virtual memory that is available to the 32-bit \fBld\fR. The
+\fB-z\fR \fBaltexec64\fR option can be used to force the use of the associated
+64-bit \fBld\fR. The 64-bit \fBld\fR provides a larger virtual address space
+for building 32-bit objects. See \fIThe 32-bit link-editor and 64-bit
+link-editor\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBcombreloc\fR | \fBnocombreloc\fR\fR
+.ad
+.sp .6
+.RS 4n
+By default, \fBld\fR combines multiple relocation sections when building
+executables or shared objects. This section combination differs from
+relocatable objects, in which relocation sections are maintained in a
+one-to-one relationship with the sections to which the relocations must be
+applied. The \fB-z\fR \fBnocombreloc\fR option disables this merging of
+relocation sections, and preserves the one-to-one relationship found in the
+original relocatable objects.
+.sp
+\fBld\fR sorts the entries of data relocation sections by their symbol
+reference. This sorting reduces runtime symbol lookup. When multiple relocation
+sections are combined, this sorting produces the least possible relocation
+overhead when objects are loaded into memory, and speeds the runtime loading of
+dynamic objects.
+.sp
+Historically, the individual relocation sections were carried over to any
+executable or shared object, and the \fB-z\fR \fBcombreloc\fR option was
+required to enable the relocation section merging previously described.
+Relocation section merging is now the default. The \fB-z\fR \fBcombreloc\fR
+option is still accepted for the benefit of old build environments, but the
+option is unnecessary, and has no effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBdefs\fR | \fBnodefs\fR\fR
+.ad
+.br
+.na
+\fB\fB--no-undefined\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB-z\fR \fBdefs\fR option and the \fB--no-undefined\fR option force a
+fatal error if any undefined symbols remain at the end of the link. This mode
+is the default when an executable is built. For historic reasons, this mode is
+\fBnot\fR the default when building a shared object. Use of the \fB-z\fR
+\fBdefs\fR option is recommended, as this mode assures the object being built
+is self-contained. A self-contained object has all symbolic references resolved
+internally, or to the object's immediate dependencies.
+.sp
+The \fB-z\fR \fBnodefs\fR option allows undefined symbols. For historic
+reasons, this mode is the default when a shared object is built. When used with
+executables, the behavior of references to such undefined symbols is
+unspecified. Use of the \fB-z\fR \fBnodefs\fR option is not recommended.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBdirect\fR | \fBnodirect\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables or disables direct binding to any dependencies that follow on the
+command line. These options allow finer control over direct binding than the
+global counterpart \fB-B\fR \fBdirect\fR. The \fB-z\fR \fBdirect\fR option also
+differs from the \fB-B\fR \fBdirect\fR option in the following areas. Direct
+binding information is not established between a symbol reference and an
+associated definition within the object being created. Lazy loading is not
+enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBendfiltee\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks a filtee so that when processed by a filter, the filtee terminates any
+further filtee searches by the filter. See \fIReducing Filtee Searches\fR in
+\fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBfiniarray=\fR\fIfunction\fR\fR
+.ad
+.sp .6
+.RS 4n
+Appends an entry to the \fB\&.finiarray\fR section of the object being built.
+If no \fB\&.finiarray\fR section is present, a section is created. The new
+entry is initialized to point to \fIfunction\fR. See \fIInitialization and
+Termination Sections\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBglobalaudit\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option supplements an audit library definition that has been recorded with
+the \fB-P\fR option. This option is only meaningful when building a dynamic
+executable. Audit libraries that are defined within an object with the \fB-P\fR
+option typically allow for the auditing of the immediate dependencies of the
+object. The \fB-z\fR \fBglobalaudit\fR promotes the auditor to a global
+auditor, thus allowing the auditing of all dependencies. See \fIInvoking the
+Auditing Interface\fR in \fILinker and Libraries Guide\fR.
+.sp
+An auditor established with the \fB-P\fR option and the \fB-z\fR
+\fBglobalaudit\fR option, is equivalent to the auditor being established with
+the \fBLD_AUDIT\fR environment variable. See \fBld.so.1\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBgroupperm\fR | \fBnogroupperm\fR\fR
+.ad
+.sp .6
+.RS 4n
+Assigns, or deassigns each dependency that follows to a unique group. The
+assignment of a dependency to a group has the same effect as if the dependency
+had been built using the \fB-B\fR \fBgroup\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBhelp\fR\fR
+.ad
+.br
+.na
+\fB\fB--help\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print a summary of the command line options on the standard output and exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBignore\fR | \fBrecord\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ignores, or records, dynamic dependencies that are not referenced as part of
+the link-edit. Ignores, or records, unreferenced \fBELF\fR sections from the
+relocatable objects that are read as part of the link-edit. By default,
+\fB-z\fR \fBrecord\fR is in effect.
+.sp
+If an \fBELF\fR section is ignored, the section is eliminated from the output
+file being generated. A section is ignored when three conditions are true. The
+eliminated section must contribute to an allocatable segment. The eliminated
+section must provide no global symbols. No other section from any object that
+contributes to the link-edit, must reference an eliminated section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBinitarray=\fR\fIfunction\fR\fR
+.ad
+.sp .6
+.RS 4n
+Appends an entry to the \fB\&.initarray\fR section of the object being built.
+If no \fB\&.initarray\fR section is present, a section is created. The new
+entry is initialized to point to \fIfunction\fR. See \fIInitialization and
+Termination Sections\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBinitfirst\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object so that its runtime initialization occurs before the runtime
+initialization of any other objects brought into the process at the same time.
+In addition, the object runtime finalization occurs after the runtime
+finalization of any other objects removed from the process at the same time.
+This option is only meaningful when building a shared object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBinterpose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object as an interposer. At runtime, an object is identified as an
+explicit interposer if the object has been tagged using the \fB-z interpose\fR
+option. An explicit interposer is also established when an object is loaded
+using the \fBLD_PRELOAD\fR environment variable. Implicit interposition can
+occur because of the load order of objects, however, this implicit
+interposition is unknown to the runtime linker. Explicit interposition can
+ensure that interposition takes place regardless of the order in which objects
+are loaded. Explicit interposition also ensures that the runtime linker
+searches for symbols in any explicit interposers when direct bindings are in
+effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBlazyload\fR | \fBnolazyload\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables or disables the marking of dynamic dependencies to be lazily loaded.
+Dynamic dependencies which are marked \fBlazyload\fR are not loaded at initial
+process start-up. These dependencies are delayed until the first binding to the
+object is made. \fBNote:\fR Lazy loading requires the correct declaration of
+dependencies, together with associated runpaths for each dynamic object used
+within a process. See \fILazy Loading of Dynamic Dependencies\fR in \fILinker
+and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBld32\fR=\fIarg1\fR,\fIarg2\fR,...\fR
+.ad
+.br
+.na
+\fB\fB-z\fR \fBld64\fR=\fIarg1\fR,\fIarg2\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+The class of the link-editor is affected by the class of the output file being
+created and by the capabilities of the underlying operating system. The
+\fB-z\fR \fBld\fR[\fB32\fR|\fB64\fR] options provide a means of defining any
+link-editor argument. The defined argument is only interpreted, respectively,
+by the 32-bit class or 64-bit class of the link-editor.
+.sp
+For example, support libraries are class specific, so the correct class of
+support library can be ensured using:
+.sp
+.in +2
+.nf
+\fBld ... -z ld32=-Saudit32.so.1 -z ld64=-Saudit64.so.1 ...\fR
+.fi
+.in -2
+.sp
+
+The class of link-editor that is invoked is determined from the \fBELF\fR class
+of the first relocatable file that is seen on the command line. This
+determination is carried out \fBprior\fR to any \fB-z\fR
+\fBld\fR[\fB32\fR|\fB64\fR] processing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBloadfltr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks a filter to indicate that filtees must be processed immediately at
+runtime. Normally, filter processing is delayed until a symbol reference is
+bound to the filter. The runtime processing of an object that contains this
+flag mimics that which occurs if the \fBLD_LOADFLTR\fR environment variable is
+in effect. See the \fBld.so.1\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBmuldefs\fR\fR
+.ad
+.br
+.na
+\fB\fB--allow-multiple-definition\fR\fR
+.ad
+.sp .6
+.RS 4n
+Allows multiple symbol definitions. By default, multiple symbol definitions
+that occur between relocatable objects result in a fatal error condition. This
+option, suppresses the error condition, allowing the first symbol definition to
+be taken.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnocompstrtab\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables the compression of \fBELF\fR string tables. By default, string
+compression is applied to \fBSHT_STRTAB\fR sections, and to \fBSHT_PROGBITS\fR
+sections that have their \fBSHF_MERGE\fR and \fBSHF_STRINGS\fR section flags
+set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnodefaultlib\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object so that the runtime default library search path, used after
+any \fBLD_LIBRARY_PATH\fR or runpaths, is ignored. This option implies that all
+dependencies of the object can be satisfied from its runpath.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnodelete\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object as non-deletable at runtime. This mode is similar to adding
+the object to the process by using \fBdlopen\fR(3C) with the
+\fBRTLD_NODELETE\fR mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnodlopen\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object as not available to \fBdlopen\fR(3C), either as the object
+specified by the \fBdlopen()\fR, or as any form of dependency required by the
+object specified by the \fBdlopen()\fR. This option is only meaningful when
+building a shared object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnodump\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object as not available to \fBdldump\fR(3C).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnoldynsym\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prevents the inclusion of a \fB\&.SUNW_ldynsym\fR section in dynamic
+executables or sharable libraries. The \fB\&.SUNW_ldynsym\fR section augments
+the \fB\&.dynsym\fR section by providing symbols for local functions. Local
+function symbols allow debuggers to display local function names in stack
+traces from stripped programs. Similarly, \fBdladdr\fR(3C) is able to supply
+more accurate results.
+.sp
+The \fB-z\fR \fBnoldynsym\fR option also prevents the inclusion of the two
+symbol sort sections that are related to the \fB\&.SUNW_ldynsym\fR section. The
+\fB\&.SUNW_dynsymsort\fR section provides sorted access to regular function and
+variable symbols. The \fB\&.SUNW_dyntlssort\fR section provides sorted access
+to thread local storage (\fBTLS\fR) variable symbols.
+.sp
+The \fB\&.SUNW_ldynsym\fR, \fB\&.SUNW_dynsymsort\fR, and
+\fB\&.SUNW_dyntlssort\fR sections, which becomes part of the allocable text
+segment of the resulting file, cannot be removed by \fBstrip\fR(1). Therefore,
+the \fB-z\fR \fBnoldynsym\fR option is the only way to prevent their inclusion.
+See the \fB-s\fR and \fB-z\fR \fBredlocsym\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnopartial\fR\fR
+.ad
+.sp .6
+.RS 4n
+Partially initialized symbols, that are defined within relocatable object
+files, are expanded in the output file being generated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnoversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does not record any versioning sections. Any version sections or associated
+\fB\&.dynamic\fR section entries are not generated in the output image.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBnow\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object as requiring non-lazy runtime binding. This mode is similar to
+adding the object to the process by using \fBdlopen\fR(3C) with the
+\fBRTLD_NOW\fR mode. This mode is also similar to having the \fBLD_BIND_NOW\fR
+environment variable in effect. See \fBld.so.1\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBorigin\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks the object as requiring immediate \fB$ORIGIN\fR processing at runtime.
+This option is only maintained for historic compatibility, as the runtime
+analysis of objects to provide for \fB$ORIGIN\fR processing is now default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBpreinitarray=\fR\fIfunction\fR\fR
+.ad
+.sp .6
+.RS 4n
+Appends an entry to the \fB\&.preinitarray\fR section of the object being
+built. If no \fB\&.preinitarray\fR section is present, a section is created.
+The new entry is initialized to point to \fIfunction\fR. See \fIInitialization
+and Termination Sections\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBredlocsym\fR\fR
+.ad
+.sp .6
+.RS 4n
+Eliminates all local symbols except for the \fISECT\fR symbols from the symbol
+table \fBSHT_SYMTAB\fR. All relocations that refer to local symbols are updated
+to refer to the corresponding \fISECT\fR symbol. This option allows specialized
+objects to greatly reduce their symbol table sizes. Eliminated local symbols
+can reduce the \fB\&.stab*\fR debugging information that is generated using the
+compiler drivers \fB-g\fR option. See the \fB-s\fR and \fB-z\fR \fBnoldynsym\fR
+options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBrelaxreloc\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBld\fR normally issues a fatal error upon encountering a relocation using a
+symbol that references an eliminated COMDAT section. If \fB-z\fR
+\fBrelaxreloc\fR is enabled, \fBld\fR instead redirects such relocations to the
+equivalent symbol in the COMDAT section that was kept. \fB-z\fR
+\fBrelaxreloc\fR is a specialized option, mainly of interest to compiler
+authors, and is not intended for general use.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBrescan-now\fR\fR
+.ad
+.br
+.na
+\fB\fB-z\fR \fBrescan\fR\fR
+.ad
+.sp .6
+.RS 4n
+These options rescan the archive files that are provided to the link-edit. By
+default, archives are processed once as the archives appear on the command
+line. Archives are traditionally specified at the end of the command line so
+that their symbol definitions resolve any preceding references. However,
+specifying archives multiple times to satisfy their own interdependencies can
+be necessary.
+.sp
+\fB-z\fR \fBrescan-now\fR is a positional option, and is processed by the
+link-editor immediately when encountered on the command line. All archives seen
+on the command line up to that point are immediately reprocessed in an attempt
+to locate additional archive members that resolve symbol references. This
+archive rescanning is repeated until a pass over the archives occurs in which
+no new members are extracted.
+.sp
+\fB-z\fR \fBrescan\fR is a position independent option. The link-editor defers
+the rescan operation until after it has processed the entire command line, and
+then initiates a final rescan operation over all archives seen on the command
+line. The \fB-z\fR \fBrescan\fR operation can interact incorrectly
+with objects that contain initialization (.init) or finalization (.fini)
+sections, preventing the code in those sections from running. For this reason,
+\fB-z\fR \fBrescan\fR is deprecated, and use of \fB-z\fR \fBrescan-now\fR is
+advised.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBrescan-start\fR ... \fB-z\fR \fBrescan-end\fR\fR
+.ad
+.br
+.na
+\fB\fB--start-group\fR ... \fB--end-group\fR\fR
+.ad
+.br
+.na
+\fB\fB-(\fR ... \fB-)\fR\fR
+.ad
+.sp .6
+.RS 4n
+Defines an archive rescan group. This is a positional construct, and is
+processed by the link-editor immediately upon encountering the closing
+delimiter option. Archives found within the group delimiter options are
+reprocessed as a group in an attempt to locate additional archive members that
+resolve symbol references. This archive rescanning is repeated until a pass
+over the archives On the occurs in which no new members are extracted.
+Archive rescan groups cannot be nested.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBtarget=sparc|x86\fR \fI\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the machine type for the output object. Supported targets are Sparc
+and x86. The 32-bit machine type for the specified target is used unless the
+\fB-64\fR option is also present, in which case the corresponding 64-bit
+machine type is used. By default, the machine type of the object being
+generated is determined from the first \fBELF\fR object processed from the
+command line. If no objects are specified, the machine type is determined by
+the first object encountered within the first archive processed from the
+command line. If there are no objects or archives, the link-editor assumes the
+native machine. This option is useful when creating an object directly with
+\fBld\fR whose input is solely from a \fBmapfile\fR. See the \fB-M\fR option.
+It can also be useful in the rare case of linking entirely from an archive that
+contains objects of different machine types for which the first object is not
+of the desired machine type. See \fIThe 32-bit link-editor and 64-bit
+link-editor\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBtext\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only, forces a fatal error if any relocations against
+non-writable, allocatable sections remain. For historic reasons, this mode is
+not the default when building an executable or shared object. However, its use
+is recommended to ensure that the text segment of the dynamic object being
+built is shareable between multiple running processes. A shared text segment
+incurs the least relocation overhead when loaded into memory. See
+\fIPosition-Independent Code\fR in \fILinker and Libraries Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBtextoff\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only, allows relocations against all allocatable sections,
+including non-writable ones. This mode is the default when building a shared
+object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBtextwarn\fR\fR
+.ad
+.sp .6
+.RS 4n
+In dynamic mode only, lists a warning if any relocations against non-writable,
+allocatable sections remain. This mode is the default when building an
+executable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fBverbose\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option provides additional warning diagnostics during a link-edit.
+Presently, this option conveys suspicious use of displacement relocations. This
+option also conveys the restricted use of static \fBTLS\fR relocations when
+building shared objects. In future, this option might be enhanced to provide
+additional diagnostics that are deemed too noisy to be generated by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fBwrap=\fR\fIsymbol\fR\fR
+.ad
+.br
+.na
+\fB\fB-wrap=\fR \fIsymbol\fR\fR
+.ad
+.br
+.na
+\fB\fB--wrap=\fR \fIsymbol\fR\fR
+.ad
+.sp .6
+.RS 4n
+Rename undefined references to \fIsymbol\fR in order to allow wrapper code to
+be linked into the output object without having to modify source code. When
+\fB-z wrap\fR is specified, all undefined references to \fIsymbol\fR are
+modified to reference \fB__wrap_\fR\fIsymbol\fR, and all references to
+\fB__real_\fR\fIsymbol\fR are modified to reference \fIsymbol\fR. The user is
+expected to provide an object containing the \fB__wrap_\fR\fIsymbol\fR
+function. This wrapper function can call \fB__real_\fR\fIsymbol\fR in order to
+reference the actual function being wrapped.
+.sp
+The following is an example of a wrapper for the \fBmalloc\fR(3C) function:
+.sp
+.in +2
+.nf
+void *
+__wrap_malloc(size_t c)
+{
+ (void) printf("malloc called with %zu\n", c);
+ return (__real_malloc(c));
+}
+.fi
+.in -2
+
+If you link other code with this file using \fB-z\fR \fBwrap=malloc\fR to
+compile all the objects, then all calls to \fBmalloc\fR will call the function
+\fB__wrap_malloc\fR instead. The call to \fB__real_malloc\fR will call the real
+\fBmalloc\fR function.
+.sp
+The real and wrapped functions should be maintained in separate source files.
+Otherwise, the compiler or assembler may resolve the call instead of leaving
+that operation for the link-editor to carry out, and prevent the wrap from
+occurring.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_ALTEXEC\fR\fR
+.ad
+.sp .6
+.RS 4n
+An alternative link-editor path name. \fBld\fR executes, and passes control to
+this alternative link-editor. This environment variable provides a generic
+means of overriding the default link-editor that is called from the various
+compiler drivers. See the \fB-z altexec64\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_LIBRARY_PATH\fR\fR
+.ad
+.sp .6
+.RS 4n
+A list of directories in which to search for the libraries specified using the
+\fB-l\fR option. Multiple directories are separated by a colon. In the most
+general case, this environment variable contains two directory lists separated
+by a semicolon:
+.sp
+.in +2
+.nf
+\fIdirlist1\fR\fB;\fR\fIdirlist2\fR
+.fi
+.in -2
+.sp
+
+If \fBld\fR is called with any number of occurrences of \fB-L\fR, as in:
+.sp
+.in +2
+.nf
+\fBld ... -L\fIpath1\fR ... -L\fIpathn\fR ...\fR
+.fi
+.in -2
+.sp
+
+then the search path ordering is:
+.sp
+.in +2
+.nf
+\fB\fIdirlist1 path1\fR ... \fIpathn dirlist2\fR LIBPATH\fR
+.fi
+.in -2
+.sp
+
+When the list of directories does not contain a semicolon, the list is
+interpreted as \fIdirlist2\fR.
+.sp
+The \fBLD_LIBRARY_PATH\fR environment variable also affects the runtime linkers
+search for dynamic dependencies.
+.sp
+This environment variable can be specified with a _32 or _64 suffix. This makes
+the environment variable specific, respectively, to 32-bit or 64-bit processes
+and overrides any non-suffixed version of the environment variable that is in
+effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOEXEC_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Suppresses the automatic execution of the 64-bit link-editor. By default, the
+link-editor executes the 64-bit version when the \fBELF\fR class of the first
+relocatable file identifies a 64-bit object. The 64-bit image that a 32-bit
+link-editor can create, has some limitations. However, some link-edits might
+find the use of the 32-bit link-editor faster.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_OPTIONS\fR\fR
+.ad
+.sp .6
+.RS 4n
+A default set of options to \fBld\fR. \fBLD_OPTIONS\fR is interpreted by
+\fBld\fR just as though its value had been placed on the command line,
+immediately following the name used to invoke \fBld\fR, as in:
+.sp
+.in +2
+.nf
+\fBld $LD_OPTIONS ... \fIother-arguments\fR ...\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_RUN_PATH\fR\fR
+.ad
+.sp .6
+.RS 4n
+An alternative mechanism for specifying a runpath to the link-editor. See the
+\fB-R\fR option. If both \fBLD_RUN_PATH\fR and the \fB-R\fR option are
+specified, \fB-R\fR supersedes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSGS_SUPPORT\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a colon-separated list of shared objects that are loaded with the
+link-editor and given information regarding the linking process. This
+environment variable can be specified with a _32 or _64 suffix. This makes the
+environment variable specific, respectively, to the 32-bit or 64-bit class of
+\fBld\fR and overrides any non-suffixed version of the environment variable
+that is in effect. See the \fB-S\fR option.
+.RE
+
+.sp
+.LP
+Notice that environment variable-names that begin with the
+characters '\fBLD_\fR' are reserved for possible future enhancements to \fBld\fR and
+\fBld.so.1\fR(1).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlib\fIx\fR.so\fR\fR
+.ad
+.RS 15n
+.rt
+shared object libraries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlib\fIx\fR.a\fR\fR
+.ad
+.RS 15n
+.rt
+archive libraries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa.out\fR\fR
+.ad
+.RS 15n
+.rt
+default output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fILIBPATH\fR\fR
+.ad
+.RS 15n
+.rt
+For 32-bit libraries, the default search path is \fB/usr/ccs/lib\fR, followed
+by \fB/lib\fR, and finally \fB/usr/lib\fR. For 64-bit libraries, the default
+search path is \fB/lib/64\fR, followed by \fB/usr/lib/64\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/ld\fR\fR
+.ad
+.RS 15n
+.rt
+A directory containing several \fBmapfiles\fR that can be used during
+link-editing. These \fBmapfiles\fR provide various capabilities, such as
+defining memory layouts, aligning bss, and defining non-executable stacks.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBas\fR(1), \fBcrle\fR(1), \fBgprof\fR(1), \fBld.so.1\fR(1), \fBldd\fR(1),
+\fBmcs\fR(1), \fBpvs\fR(1), \fBexec\fR(2), \fBstat\fR(2), \fBdlopen\fR(3C),
+\fBdldump\fR(3C), \fBelf\fR(3ELF), \fBar.h\fR(3HEAD), \fBa.out\fR(4),
+\fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.SH NOTES
+.sp
+.LP
+Default options applied by \fBld\fR are maintained for historic reasons. In
+today's programming environment, where dynamic objects dominate, alternative
+defaults would often make more sense. However, historic defaults must be
+maintained to ensure compatibility with existing program development
+environments. Historic defaults are called out wherever possible in this
+manual. For a description of the current recommended options, see Appendix A,
+\fILink-Editor Quick Reference,\fR in \fILinker and Libraries Guide\fR.
+.sp
+.LP
+If the file being created by \fBld\fR already exists, the file is unlinked
+after all input files have been processed. A new file with the specified name
+is then created. This allows \fBld\fR to create a new version of the file,
+while simultaneously allowing existing processes that are accessing the old
+file contents to continue running. If the old file has no other links, the disk
+space of the removed file is freed when the last process referencing the file
+terminates.
+.sp
+.LP
+The behavior of \fBld\fR when the file being created already exists was changed
+with \fBSXCE\fR build \fB43\fR. In older versions, the existing file was
+rewritten in place, an approach with the potential to corrupt any running
+processes that is using the file. This change has an implication for output
+files that have multiple hard links in the file system. Previously, all links
+would remain intact, with all links accessing the new file contents. The new
+\fBld\fR behavior \fBbreaks\fR such links, with the result that only the
+specified output file name references the new file. All the other links
+continue to reference the old file. To ensure consistent behavior, applications
+that rely on multiple hard links to linker output files should explicitly
+remove and relink the other file names.
diff --git a/usr/src/man/man1/ld.so.1.1 b/usr/src/man/man1/ld.so.1.1
new file mode 100644
index 0000000000..7a6ef269a9
--- /dev/null
+++ b/usr/src/man/man1/ld.so.1.1
@@ -0,0 +1,787 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ld.so.1 1 "26 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ld.so.1 \- runtime linker for dynamic objects
+.SH SYNOPSIS
+.LP
+.nf
+\fB/lib/ld.so.1\fR
+.fi
+
+.LP
+.nf
+\fB/lib/ld.so.1\fR [\fB-e\fR \fIenvar\fR] \fIdynamic-object\fR [\fIobject args\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Dynamic applications consist of one or more dynamic objects. A dynamic
+application is typically a dynamic executable and one or more shared object
+dependencies. As part of the initialization and execution of a dynamic
+application, an \fBinterpreter\fR is called. This interpreter completes the
+binding of the application to its shared object dependencies. In Solaris, this
+interpreter is referred to as the runtime linker.
+.sp
+.LP
+During the link-editing of a dynamic executable, a special \fB\&.interp\fR
+section, together with an associated program header, is created. This section
+contains a path name specifying the program's interpreter. An interpreter path
+name can be specified when the executable is constructed using the \fB-I\fR
+option to \fBld\fR(1), the link-editor. The default name supplied by the
+link-editor is the name of the runtime linker, \fBld.so.1\fR.
+.sp
+.LP
+During the process of executing a dynamic executable, the kernel maps the file,
+and locates the required interpreter. See \fBexec\fR(2) and \fBmmapobj\fR(2).
+The kernel maps in, and transfers control to, this interpreter. Sufficient
+information is passed to the interpretor to allow the interpreter to continue
+to bind, and then execute the application.
+.sp
+.LP
+In addition to initializing an application, the runtime linker provides
+services that allow the application to extend its address space. Additional
+shared objects can be mapped, and symbols within the shared objects can be
+bound to.
+.sp
+.LP
+The runtime linker performs the following functions:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A configuration file, if in existence, is processed. Configuration files can be
+employed to alter default search paths, provide a directory cache, and provide
+alternative object dependencies. See \fBcrle\fR(1). By default, for 32-bit
+objects, the configuration file \fB/var/ld/ld.config\fR is used. For 64-bit
+objects, the default configuration file \fB/var/ld/64/ld.config\fR is used.
+Alternative configuration files can be specified with the \fBLD_CONFIG\fR
+environment variable. Alternative configuration files can also be encoded
+within a dynamic executable by using the \fB-c\fR option of \fBld\fR(1).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The runtime linker analyzes the application's dynamic information section,
+\fB\&.dynamic\fR, to determine which shared object dependencies are required.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The runtime linker then locates and maps in these dependencies. The dynamic
+information section of each dependency is then analyzed to determine if any
+additional dependencies are required.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Once all the shared object dependencies are loaded, the runtime linker performs
+any necessary relocations. These relocations bind the shared objects in
+preparation for process execution.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Any initialization functions provided by the shared object dependencies and,
+possibly, by the dynamic executable are called. The functions are called in the
+reverse order of the topologically sorted dependencies. If cyclic dependencies
+exist, the initialization functions are called using the sorted order with the
+cycle removed. \fBldd\fR(1) can be used to display the initialization order of
+shared object dependencies.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Control is passed to the application.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+During the application's execution, the runtime linker can be called upon to
+perform any delayed function binding.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If any shared objects are deleted from the process, finalization functions are
+called. By default, these functions are called in the order of the
+topologically sorted dependencies.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The application can also call upon the services of the runtime linker to
+acquire additional shared objects by using \fBdlopen\fR(3C). Symbols provided
+by these objects, can be bound to using \fBdlsym\fR(3C).
+.RE
+.sp
+.LP
+Further details on each of the previous topics can be found in the \fILinker
+and Libraries Guide\fR.
+.sp
+.LP
+The runtime linker uses a prescribed search path for locating the dynamic
+dependencies of an object. The default search paths are the runpath recorded in
+the object, followed by a series of defaults. For 32-bit objects, the defaults
+are \fB/lib\fR followed by \fB/usr/lib\fR. For 64-bit objects, the defaults are
+\fB/lib/64\fR followed by \fB/usr/lib/64\fR. These defaults component can be
+modified using a configuration file that is created with \fBcrle\fR(1). The
+runpath is specified when the dynamic object is constructed using the \fB-R\fR
+option to \fBld\fR(1). The environment variable \fBLD_LIBRARY_PATH\fR can be
+used to indicate directories to be searched before the default directories.
+.SS "Command Line Usage"
+.sp
+.LP
+Typically, the runtime linker is invoked indirectly through executing a dynamic
+executable that declares the runtime linker as its interpreter. The runtime
+linker can also be executed directly from the command line. This mechanism is
+most often employed to experiment with new implementations of the runtime
+linker. Arguments that are supplied on the command line consist of options that
+are applicable to the runtime linker. Following these options is the name of
+the dynamic object to be executed, and any options required by this object.
+Effectively, the runtime linker replaces any interpreter specified by the
+dynamic object.
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\ envar\fR
+.ad
+.RS 13n
+.rt
+Specify a runtime linker specific environment variable. See ENVIRONMENT
+VARIABLES.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+Each environment variable can be specified with a \fB_32\fR or \fB_64\fR
+suffix. This makes the environment variable specific, respectively, to 32-bit
+or 64-bit processes. This environment variable overrides any non-suffixed
+version of the environment variable that might be in effect. Environment
+variables specified without a value, that have a \fB_32\fR or \fB_64\fR suffix,
+effectively cancel any associated generic environment variable setting.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_AUDIT\fR, \fBLD_AUDIT_32\fR, and \fBLD_AUDIT_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+A colon-separated list of objects that are loaded by the runtime linker. As
+each object is loaded, the object is examined for \fILink-Auditing\fR interface
+routines. The routines that are present are called as specified in the
+\fILink-Auditing\fR interface described in the \fILinker and Libraries
+Guide\fR. Also, see the \fB-p\fR and \fB-P\fR options of \fBld\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_BIND_LAZY\fR, \fBLD_BIND_LAZY_32\fR, and \fBLD_BIND_LAZY_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+The runtime linker's default mode of performing lazy binding can be enforced by
+setting the environment variable \fBLD_BIND_LAZY\fR to any non-null value. This
+setting causes the runtime linker to perform only \fBlazy\fR reference
+relocations for all objects that are loaded into the process. Individual
+objects can request that \fBlazy\fR reference relocations are performed when
+the object is loaded. See the \fB-z\fR \fBnow\fR option of \fBld\fR(1), and
+\fBdlopen\fR(3C) with the mode \fBRTLD_NOW\fR. Such requests to perform
+\fBlazy\fR reference relocations are suppressed when \fBLD_BIND_LAZY\fR is in
+effect.
+.sp
+If both \fBLD_BIND_LAZY\fR and \fBLD_BIND_NOW\fR are specified, then
+\fBLD_BIND_NOW\fR takes precedence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_BIND_NOW\fR, \fBLD_BIND_NOW_32\fR, and \fBLD_BIND_NOW_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+The runtime linker's default mode of performing lazy binding can be overridden
+by setting the environment variable \fBLD_BIND_NOW\fR to any non-null value.
+This setting causes the runtime linker to perform both \fBimmediate\fR
+reference and \fBlazy\fR reference relocations for all objects that are loaded
+into the process. Individual objects can request that \fBlazy\fR reference
+relocations are performed when the object is loaded. See the \fB-z\fR \fBnow\fR
+option of \fBld\fR(1), and \fBdlopen\fR(3C) with the mode \fBRTLD_NOW\fR.
+.sp
+If both \fBLD_BIND_NOW\fR and \fBLD_BIND_LAZY\fR are specified, then
+\fBLD_BIND_NOW\fR takes precedence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_CONFIG\fR, \fBLD_CONFIG_32\fR, and \fBLD_CONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides an alternative configuration file. Configuration files can be employed
+to alter default search paths, provide a directory cache, and provide alternate
+object dependencies. See \fBcrle\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_DEBUG\fR, \fBLD_DEBUG_32\fR, and \fBLD_DEBUG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a comma, or colon-separated list of tokens to cause the runtime linker
+to print debugging information to standard error. The special token \fBhelp\fR
+indicates the full list of tokens available. The environment variable
+\fBLD_DEBUG_OUTPUT\fR can also be supplied to specify a file to which the
+debugging information is sent. The filename is suffixed with the process
+\fBID\fR of the application generating the debugging information. See
+\fBlari\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_DEMANGLE\fR, \fBLD_DEMANGLE_32\fR, and \fBLD_DEMANGLE_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Any symbol name used as part of a diagnostic message is shown as defined within
+an \fBELF\fR file. When \fBLD_DEMANGLE\fR is set to any non-null value, the
+runtime linker attempts to decode (demangle) any C++ symbol name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_FLAGS\fR, \fBLD_FLAGS_32\fR, and \fBLD_FLAGS_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides an alternative means of supplying environment variable information.
+Any of the \fBLD_\fR\fIXXX\fR environment variables can be specified as a
+\fIxxx\fR token. Multiple tokens can be supplied separated by commas. See
+EXAMPLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_LIBRARY_PATH\fR, \fBLD_LIBRARY_PATH_32\fR, and
+\fBLD_LIBRARY_PATH_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBLD_LIBRARY_PATH\fR environment variable, if set, is used to enhance the
+search path that the runtime linker uses to find dynamic dependencies.
+\fBLD_LIBRARY_PATH\fR specifies a colon-separated list of directories that are
+searched before the default directories. Also notice that \fBLD_LIBRARY_PATH\fR
+adds additional semantics to \fBld\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_LOADFLTR\fR, \fBLD_LOADFLTR_32\fR, and \fBLD_LOADFLTR_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Filters are a form of shared object. Filters allow an alternative shared object
+to be selected at runtime that provide the implementation for any symbols that
+are defined within the filter. See the \fB-f\fR and \fB-F\fR options of
+\fBld\fR(1). By default, the alternative shared object processing is deferred
+until symbol resolution occurs against the filter. When \fBLD_LOADFLTR\fR is
+set to any non-null value, any filters are processed immediately when the
+filter is loaded. Also, see the \fB-z\fR \fBloadfltr\fR option of \fBld\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOAUDIT\fR, \fBLD_NOAUDIT_32\fR, and \fBLD_NOAUDIT_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Local auditing libraries can be defined within applications and shared objects.
+See the \fB-p\fR and \fB-P\fR options of \fBld\fR(1). When \fBLD_NOAUDIT\fR is
+set to any non-null value, the runtime linker ignores any local auditing
+libraries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOAUXFLTR\fR, \fBLD_NOAUXFLTR_32\fR, and \fBLD_NOAUXFLTR_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Auxiliary filters are a form of shared object. Auxiliary filters allow an
+alternative shared object to be selected at runtime which provides the
+implementation for any symbols that are defined within the filter. See the
+\fB-f\fR option of \fBld\fR(1). When \fBLD_NOAUXFLTR\fR is set to any non-null
+value, the runtime linker disables this alternative shared object lookup.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOCONFIG\fR, \fBLD_NOCONFIG_32\fR, and \fBLD_NOCONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+By default the runtime linker attempts to open and process a configuration
+file. When \fBLD_NOCONFIG\fR is set to any non-null value, the runtime linker
+disables this configuration file processing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NODIRCONFIG\fR, \fBLD_NODIRCONFIG_32\fR, and
+\fBLD_NODIRCONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a subset of \fBLD_NOCONFIG\fR in that any directory cache information
+provided in a configuration file is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NODIRECT\fR, \fBLD_NODIRECT_32\fR, and \fBLD_NODIRECT_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Direct binding information instructs the runtime linker to search directly for
+a symbol in an associated object. See the \fB-B\fR \fBdirect\fR option of
+\fBld\fR(1). Without direct binding, the symbol search performed by the runtime
+linker follows the default model. When \fBLD_NODIRECT\fR is set to any non-null
+value, the runtime linker ignores any direct binding information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOENVCONFIG\fR, \fBLD_NOENVCONFIG_32\fR, and
+\fBLD_NOENVCONFIG_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a subset of \fBLD_NOCONFIG\fR in that any environment variables
+provided in a configuration file are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOLAZYLOAD\fR, \fBLD_NOLAZYLOAD_32\fR, and \fBLD_NOLAZYLOAD_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Dependencies that are labeled for lazy loading are not loaded into memory until
+explicit reference to the dependency has been made. See the \fB-z\fR
+\fBlazyload\fR option of \fBld\fR(1). When \fBLD_NOLAZYLOAD\fR is set to any
+non-null value, the runtime linker ignores a dependencies lazy loading label
+and loads the dependency immediately.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOOBJALTER\fR, \fBLD_NOOBJALTER_32\fR, and \fBLD_NOOBJALTER_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a subset of \fBLD_NOCONFIG\fR in that any alternative object
+dependencies provided in a configuration file are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_NOVERSION\fR, \fBLD_NOVERSION_32\fR, and \fBLD_NOVERSION_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+By default, the runtime linker verifies version dependencies for the primary
+executable and all of its dependencies. When \fBLD_NOVERSION\fR is set to any
+non-null value, the runtime linker disables this version checking.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_ORIGIN\fR, \fBLD_ORIGIN_32\fR, and \fBLD_ORIGIN_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+The immediate processing of \fB$ORIGIN\fR can be triggered by setting the
+environment variable \fBLD_ORIGIN\fR to any non-null value. Before Solaris 9,
+this option was useful for applications that invoked \fBchdir\fR(2) prior to
+locating dependencies that employed the \fB$ORIGIN\fR string token. The
+establishment of the current working directory by the runtime linker is now
+default thus making this option redundant.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_PRELOAD\fR, \fBLD_PRELOAD_32\fR, and \fBLD_PRELOAD_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a list of shared objects, separated by spaces. These objects are
+loaded after the program being executed but before any other shared objects
+that the program references. Symbol definitions provided by the preloaded
+objects interpose on references made by the shared objects that the program
+references. Symbol definitions provided by the preloaded objects do not
+interpose on the symbol definitions provided by the program.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_PROFILE\fR, \fBLD_PROFILE_32\fR, and \fBLD_PROFILE_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Defines a shared object to be profiled by the runtime linker. When profiling is
+enabled, a profiling buffer file is created and mapped. The name of the buffer
+file is the name of the shared object being profiled with a \fB\&.profile\fR
+extension. By default, this buffer is placed under \fB/var/tmp\fR. The
+environment variable \fBLD_PROFILE_OUTPUT\fR can also be supplied to indicate
+an alternative directory in which to place the profiling buffer.
+.sp
+The profiling buffer contains \fBprofil\fR(2) and call count information. This
+information is similar to the \fIgmon.out\fR information generated by programs
+that have been linked with the \fB-xpg\fR option of \fBcc\fR. Any applications
+that use the named shared object and run while this environment variable is
+set, accumulate data in the profile buffer. See also NOTES. The profile buffer
+information can be examined using \fBgprof\fR(1).
+.sp
+The \fBLD_PROFILE\fR profiling technique is an alternative to other techniques
+that might be provided by the compilation system. The shared object being
+profiled does not have to be instrumented in any way, and \fBLD_PROFILE\fR
+should not be combined with a profile-instrumented application. See the
+\fILinker and Libraries Guide\fR for more information on profiling shared
+objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLD_SIGNAL\fR, \fBLD_SIGNAL_32\fR, and \fBLD_SIGNAL_64\fR\fR
+.ad
+.sp .6
+.RS 4n
+Provides a \fBnumeric\fR signal number that the runtime linker uses to kill the
+process in the event of a fatal runtime error. See \fBthr_kill\fR(3C). By
+default, \fBSIGKILL\fR is used. For example, providing the alternative signal
+number \fB6\fR (\fBSIGABRT\fR), can provide for the creation of a core file to
+aid debugging. See also the \fBRTLD_DI_SETSIGNAL\fR request to
+\fBdlinfo\fR(3C).
+.RE
+
+.sp
+.LP
+Notice that environment variable names beginning with the
+characters '\fBLD_\fR' are reserved for possible future enhancements to \fBld\fR(1) and
+\fBld.so.1\fR.
+.SH SECURITY
+.sp
+.LP
+Secure processes have some restrictions applied to the evaluation of their
+dependencies and runpaths to prevent malicious dependency substitution or
+symbol interposition.
+.sp
+.LP
+The runtime linker categorizes a process as secure if the \fBissetugid\fR(2)
+system call returns true for the process.
+.sp
+.LP
+For 32-bit objects, the default trusted directories that are known to the
+runtime linker are \fB/lib/secure\fR and \fB/usr/lib/secure\fR. For 64-bit
+objects, the default trusted directories are \fB/lib/secure/64\fR and
+\fB/usr/lib/secure/64\fR. The utility \fBcrle\fR(1) can be used to specify
+additional trusted directories that are applicable for secure applications.
+Administrators who use this technique should ensure that the target directories
+are suitably protected from malicious intrusion.
+.sp
+.LP
+If an \fBLD_LIBRARY_PATH\fR family environment variable is in effect for a
+secure process, only the \fBtrusted\fR directories specified by this variable
+are used to augment the runtime linker's search rules.
+.sp
+.LP
+In a secure process, runpath components that are provided by the application or
+any of its dependencies are used, provided the component is a full path name,
+that is, the path name starts with a '\fB/\fR'.
+.sp
+.LP
+In a secure process, the expansion of the \fB$ORIGIN\fR string is allowed only
+if the string expands to a \fBtrusted\fR directory. However, should a
+\fB$ORIGIN\fR expansion match a directory that has already provided
+dependencies, then the directory is implicitly secure. This directory can be
+used to provide additional dependencies.
+.sp
+.LP
+In a secure process, \fBLD_CONFIG\fR is ignored. However, a configuration file
+that is recorded in a secure application is used. See the \fB-c\fR option of
+\fBld\fR(1). A recorded configuration file must be a full path name, that is,
+the path name starts with a '\fB/\fR'. A recorded configuration file that
+employs the \fB$ORIGIN\fR string is restricted to known trusted directories.
+Developers who record a configuration file within a secure application should
+ensure that the configuration file directory is suitably protected from
+malicious intrusion. In the absence of a recorded configuration file, a secure
+process uses the default configuration file, if a configuration file exists.
+See \fBcrle\fR(1).
+.sp
+.LP
+In a secure process, \fBLD_SIGNAL\fR is ignored.
+.sp
+.LP
+Additional objects can be loaded with a secure process using the
+\fBLD_PRELOAD\fR, or \fBLD_AUDIT\fR environment variables. These objects must
+be specified as \fBfull\fR path names or \fBsimple\fR file names. Full path
+names are restricted to known \fBtrusted\fR directories. Simple file names, in
+which no '\fB/\fR' appears in the name, are located subject to the search path
+restrictions previously described. Simple file names resolve only to known
+\fBtrusted\fR directories.
+.sp
+.LP
+In a secure process, any dependencies that consist of simple filenames are
+processed using the path name restrictions previously described. Dependencies
+expressed as full path names or relative path names are used as is. Therefore,
+the developer of a secure process should ensure that the target directory
+referenced as a full path name or relative path name dependency is suitably
+protected from malicious intrusion.
+.sp
+.LP
+When creating a secure process, relative path names should \fBnot\fR be used to
+express dependencies, or to construct \fBdlopen\fR(3C) path names. This
+restriction should be applied to the application and to \fBall\fR dependencies.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing LD_FLAGS to group environment variable information
+.sp
+.LP
+The following use of \fBLD_FLAGS\fR is equivalent to setting the individual
+environment variables \fBLD_BIND_NOW\fR and \fBLD_LIBRARY_PATH\fR for 32-bit
+applications:
+
+.sp
+.in +2
+.nf
+example% \fBLD_FLAGS_32=bind_now,library_path=/lib/one:/lib/two\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following use of \fBLD_FLAGS\fR is equivalent to setting the individual
+environment variables \fBLD_LIBRARY_PATH\fR and \fBLD_PRELOAD\fR for 64-bit
+applications:
+
+.sp
+.in +2
+.nf
+example% \fBLD_FLAGS_64=library_path=/lib/one/64,preload=foo.so\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/lib/ld.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default runtime linker.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/lib/libc.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Alternate interpreter for \fBSVID ABI\fR compatibility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/ld.so\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBAOUT\fR (\fBBCP\fR) runtime linker.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/0@0.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+A compatibility library to support null character pointers. See NOTES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/lib/secure\fR and \fB/usr/lib/secure\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBLD_PRELOAD\fR location for secure applications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/lib/secure/64\fR and \fB/usr/lib/secure/64\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBLD_PRELOAD\fR location for secure 64-bit applications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/lib/64/ld.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default runtime linker for 64-bit applications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/64/0@0.so.1\fR\fR
+.ad
+.sp .6
+.RS 4n
+A 64-bit compatibility library to support null character pointers. See NOTES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/ld/ld.config\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default configuration file for 32-bit applications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/ld/64/ld.config\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default configuration file for 64-bit applications.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcrle\fR(1), \fBgprof\fR(1), \fBlari\fR(1), \fBld\fR(1), \fBldd\fR(1),
+\fBexec\fR(2), \fBissetugid\fR(2), \fBmmapobj\fR(2), \fBprofil\fR(2),
+\fBdladdr\fR(3C), \fBdlclose\fR(3C), \fBdldump\fR(3C), \fBdlerror\fR(3C),
+\fBdlinfo\fR(3C), \fBdlopen\fR(3C), \fBdlsym\fR(3C), \fBthr_kill\fR(3C),
+\fBproc\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.SH NOTES
+.sp
+.LP
+Care should be exercised when using \fBLD_PROFILE\fR in combination with other
+process monitoring techniques, such as users of \fBproc\fR(4). Multiple process
+monitoring techniques can result in deadlock conditions that leave the profile
+buffer locked. A locked buffer blocks any processes that try to record
+profiling information. To reduce this likelihood, the runtime linker's profile
+implementation determines if the process is being monitored at startup. If so,
+profiling of the process is silently disabled. However, this mechanism can not
+catch monitoring processes that attach to the process during its execution.
+.sp
+.LP
+The user compatibility library \fB/usr/lib/0@0.so.1\fR provides a mechanism
+that establishes a value of \fB0\fR at location 0. Some applications exist that
+erroneously assume a null character pointer should be treated the same as a
+pointer to a null string. A segmentation violation occurs in these applications
+when a null character pointer is accessed. If this library is added to such an
+application at runtime using \fBLD_PRELOAD\fR, the library provides an
+environment that is sympathetic to this errant behavior. However, the user
+compatibility library is intended neither to enable the generation of such
+applications, nor to endorse this particular programming practice.
+.sp
+.LP
+In many cases, the presence of \fB/usr/lib/0@0.so.1\fR is benign, and it can be
+pre-loaded into programs that do not require it. However, there are exceptions.
+Some applications, such as the JVM (Java Virtual Machine), require that a
+segmentation violation be generated from a null pointer access. Applications
+such as the JVM should not preload \fB/usr/lib/0@0.so\fR.
diff --git a/usr/src/man/man1/ldap.1 b/usr/src/man/man1/ldap.1
new file mode 100644
index 0000000000..96715889c3
--- /dev/null
+++ b/usr/src/man/man1/ldap.1
@@ -0,0 +1,340 @@
+'\" te
+.\" Copyright (C) 1990, Regents of the University of Michigan. All Rights Reserved.
+.\" Portions Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldap 1 "28 Aug 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+ldap \- LDAP as a naming repository
+.SH DESCRIPTION
+.sp
+.LP
+LDAP refers to Lightweight Directory Access Protocol, which is an industry
+standard for accessing directory servers. By initializing the client using
+\fBldapclient\fR(1M) and using the keyword \fBldap\fR in the name service
+switch file, \fB/etc/nsswitch.conf\fR, Solaris clients can obtain naming
+information from an LDAP server. Information such as usernames, hostnames, and
+passwords are stored on the LDAP server in a Directory Information Tree or
+\fBDIT\fR. The \fBDIT\fR consists of entries which in turn are composed of
+attributes. Each attribute has a type and one or more values.
+.sp
+.LP
+Solaris LDAP clients use the LDAP v3 protocol to access naming information from
+LDAP servers. The LDAP server must support the object classes and attributes
+defined in \fIRFC2307bis (draft)\fR, which maps the naming service model on to
+LDAP. As an alternate to using the schema defined in \fIRFC2307bis (draft)\fR,
+the system can be configured to use other schema sets and the schema mapping
+feature is configured to map between the two. Refer to the \fISystem
+Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)\fR for
+more details.
+.sp
+.LP
+The \fBldapclient\fR(1M) utility can make a Solaris machine an LDAP client by
+setting up the appropriate directories, files, and configuration information.
+The LDAP client caches this configuration information in local cache files.
+This configuration information is accessed through the \fBldap_cachemgr\fR(1M)
+daemon. This daemon also refreshes the information in the configuration files
+from the LDAP server, providing better performance and security. The
+\fBldap_cachemgr\fR must run at all times for the proper operation of the
+naming services.
+.sp
+.LP
+There are two types of configuration information, the information available
+through a profile, and the information configured per client. The profile
+contains all the information as to how the client accesses the directory. The
+credential information for proxy user is configured on a per client basis and
+is not downloaded through the profile.
+.sp
+.LP
+The profile contains server-specific parameters that are required by all
+clients to locate the servers for the desired LDAP domain. This information
+could be the server's IP address and the search base Distinguished Name (DN),
+for instance. It is configured on the client from the default profile during
+client initialization and is periodically updated by the \fBldap_cachemgr\fR
+daemon when the expiration time has elapsed.
+.sp
+.LP
+Client profiles can be stored on the LDAP server and can be used by the
+\fBldapclient\fR utility to initialize an LDAP client. Using the client profile
+is the easiest way to configure a client machine. See \fBldapclient\fR(1M).
+.sp
+.LP
+Credential information includes client-specific parameters that are used by a
+client. This information could be the Bind DN (LDAP "login" name) of the client
+and the password. If these parameters are required, they are manually defined
+during the initialization through \fBldapclient\fR(1M).
+.sp
+.LP
+The naming information is stored in containers on the LDAP server. A container
+is a non-leaf entry in the DIT that contains naming service information.
+Containers are similar to maps in NIS and tables in NIS+. A default mapping
+between the NIS databases and the containers in LDAP is presented below. The
+location of these containers as well as their names can be overridden through
+the use of \fBserviceSearchDescriptors\fR. For more information, see
+\fBldapclient\fR(1M).
+.sp
+
+.sp
+.TS
+tab() box;
+cw(1.83i) |cw(1.83i) |cw(1.83i)
+lw(1.83i) |lw(1.83i) |lw(1.83i)
+.
+DatabaseObject ClassContainer
+_
+passwdposixAccountou=people,dc=...
+shadowAccount
+_
+groupposixGroupou=Group,dc=...
+_
+servicesipServiceou=Services,dc=...
+_
+protocolsipProtocolou=Protocols,dc=...
+_
+rpconcRpcou=Rpc,dc=...
+_
+hostsipHostou=Hosts,dc=...
+ipnodesipHostou=Hosts,dc=...
+_
+ethersieee802Deviceou=Ethers,dc=...
+_
+bootparamsbootableDeviceou=Ethers,dc=...
+_
+networksipNetworkou=Networks,dc=...
+netmasksipNetwork ou=Networks,dc=...
+_
+netgroupnisNetgroupou=Netgroup,dc=...
+_
+aliasesmailGroupou=Aliases,dc=...
+_
+publickeynisKeyObject 
+_
+genericnisObjectnisMapName=...,dc=...
+_
+printersprinterServiceou=Printers,dc=...
+_
+auth_attrSolarisAuthAttrou=SolarisAuthAttr,dc=...
+_
+prof_attrSolarisProfAttrou=SolarisProfAttr,dc=...
+_
+exec_attrSolarisExecAttrou=SolarisProfAttr,dc=...
+_
+user_attrSolarisUserAttrou=people,dc=...
+_
+audit_userSolarisAuditUserou=people,dc=...
+.TE
+
+.sp
+.LP
+The security model for clients is defined by a combination of the credential
+level to be used, the authentication method, and the PAM modules to be used.
+The credential level defines what credentials the client should use to
+authenticate to the directory server, and the authentication method defines the
+method of choice. Both these can be set with multiple values. The Solaris LDAP
+supports the following values for credential level :
+.br
+.in +2
+\fBanonymous\fR
+.in -2
+.br
+.in +2
+\fBproxy\fR
+.in -2
+.br
+.in +2
+\fBself\fR
+.in -2
+.sp
+.LP
+The Solaris LDAP supports the following values for authentication method:
+.br
+.in +2
+\fBnone\fR
+.in -2
+.br
+.in +2
+\fBsimple\fR
+.in -2
+.br
+.in +2
+\fBsasl/CRAM-MD5\fR
+.in -2
+.br
+.in +2
+\fBsasl/DIGEST-MD5\fR
+.in -2
+.br
+.in +2
+\fBsasl/GSSAPI\fR
+.in -2
+.br
+.in +2
+\fBtls:simple\fR
+.in -2
+.br
+.in +2
+\fBtls:sasl/CRAM-MD5\fR
+.in -2
+.br
+.in +2
+\fBtls:sasl/DIGEST-MD5\fR
+.in -2
+.sp
+.LP
+When the credential level is configured as \fBself\fR, DNS must be configured
+and the authentication method must be \fBsasl/GSSAPI\fR. The \fBhosts\fR and
+\fBipnodes\fR in \fB/etc/nsswitch.conf\fR must be configured to use DNS, for
+example \fBhosts: dns files\fR and \fBipnodes: dns files\fR.
+.sp
+.LP
+\fBsasl/GSSAPI\fR automatically uses \fBGSSAPI\fR confidentiality and integrity
+options, if they are configured on the directory server.
+.sp
+.LP
+The credential level of \fBself\fR enables per-user naming service lookups, or
+lookups that use the \fBGSSAPI\fR credentials of the user when connecting to
+the directory server. Currently the only \fBGSSAPI\fR mechanism supported in
+this model is Kerberos V5. Kerberos must be configured before you can use this
+credential level. See \fBkerberos\fR(5) for details.
+.sp
+.LP
+More protection can be provided by means of access control, allowing the server
+to grant access for certain containers or entries. Access control is specified
+by Access Control Lists (ACLs) that are defined and stored in the LDAP server.
+The Access Control Lists on the LDAP server are called Access Control
+Instructions (ACIs) by the the SunOne Directory Server. Each ACL or ACI
+specifies one or more directory objects, for example, the \fBcn\fR attribute in
+a specific container, one or more clients to whom you grant or deny access, and
+one or more access rights that determine what the clients can do to or with the
+objects. Clients can be users or applications. Access rights can be specified
+as read and write, for example. Refer to the \fISystem Administration Guide:
+Naming and Directory Services (DNS, NIS, and LDAP)\fR regarding the
+restrictions on ACLs and ACIs when using LDAP as a naming repository.
+.sp
+.LP
+A sample \fBnsswitch.conf\fR(4) file called \fBnsswitch.ldap\fR is provided in
+the \fB/etc\fR directory. This is copied to \fB/etc/nsswitch.conf\fR by the
+\fBldapclient\fR(1M) utility. This file uses LDAP as a repository for the
+different databases in the \fBnsswitch.conf\fR file.
+.sp
+.LP
+The following is a list of the user commands related to LDAP:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBidsconfig\fR(1M)\fR
+.ad
+.RS 18n
+.rt
+Prepares a SunOne Directory Server to be ready to support Solaris LDAP clients.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBldapaddent\fR(1M)\fR
+.ad
+.RS 18n
+.rt
+Creates LDAP entries from corresponding \fB/etc\fR files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBldapclient\fR(1M)\fR
+.ad
+.RS 18n
+.rt
+Initializes LDAP clients, or generates a configuration profile to be stored in
+the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBldaplist\fR(1)\fR
+.ad
+.RS 18n
+.rt
+Lists the contents of the LDAP naming space.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/ldap/ldap_client_cred\fR\fR
+.ad
+.br
+.na
+\fB\fB/var/ldap/ldap_client_file\fR\fR
+.ad
+.RS 30n
+.rt
+Files that contain the LDAP configuration of the client. Do not manually modify
+these files. Their content is not guaranteed to be human readable. Use
+\fBldapclient\fR(1M) to update them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nsswitch.conf\fR\fR
+.ad
+.RS 30n
+.rt
+Configuration file for the name-service switch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nsswitch.ldap\fR\fR
+.ad
+.RS 30n
+.rt
+Sample configuration file for the name-service switch configured with LDAP and
+files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/pam.conf\fR\fR
+.ad
+.RS 30n
+.rt
+PAM framework configuration file.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldaplist\fR(1), \fBidsconfig\fR(1M), \fBldap_cachemgr\fR(1M),
+\fBldapaddent\fR(1M), \fBldapclient\fR(1M), \fBnsswitch.conf\fR(4),
+\fBpam.conf\fR(4), \fBkerberos\fR(5)\fBpam_authtok_check\fR(5),
+\fBpam_authtok_get\fR(5), \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5),
+\fBpam_ldap\fR(5), \fBpam_passwd_auth\fR(5), \fBpam_unix_account\fR(5),
+\fBpam_unix_auth\fR(5), \fBpam_unix_session\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Naming and Directory Services (DNS, NIS, and
+LDAP)\fR
+.SH NOTES
+.sp
+.LP
+The \fBpam_unix\fR(5) module is no longer supported. Similar functionality is
+provided by \fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5),
+\fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_passwd_auth\fR(5),
+\fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5),
+and\fBpam_unix_session\fR(5).
diff --git a/usr/src/man/man1/ldapdelete.1 b/usr/src/man/man1/ldapdelete.1
new file mode 100644
index 0000000000..0d4ff64f42
--- /dev/null
+++ b/usr/src/man/man1/ldapdelete.1
@@ -0,0 +1,597 @@
+'\" te
+.\" Copyright (C) 1990, Regents of the University of Michigan. All Rights Reserved.
+.\" Portions Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldapdelete 1 "15 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ldapdelete \- ldap delete entry tool
+.SH SYNOPSIS
+.LP
+.nf
+\fBldapdelete\fR [\fB-n\fR] [\fB-v\fR] [\fB-c\fR] [\fB-d\fR \fIdebuglevel\fR] [\fB-f\fR \fIfile\fR]
+ [\fB-D\fR \fIbindDN\fR] [\fB-w\fR \fIpasswd\fR | \fB-j\fR \fIfile\fR] [\fB-J\fR [:\fIcriticality\fR]]
+ [\fB-?\fR] [\fB-H\fR] [\fB-h\fR \fIldaphost\fR] [\fB-V\fR \fIversion\fR] [\fB-i\fR \fIlocale\fR]
+ [\fB-k\fR \fIpath\fR] [\fB-P\fR \fIpath\fR] [\fB-N\fR \fIcertificate\fR] [\fB-y\fR \fIproxyid\fR]
+ [\fB-p\fR \fIldapport\fR] [\fB-O\fR \fIhoplimit\fR] [\fB-o\fR \fIattributename\fR=\fIvalue\fR]
+ [\fB-W\fR \fIpassword\fR] [\fIdn\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBldapdelete\fR utility opens a connection to an \fBLDAP\fR server, then
+binds and deletes one or more entries. If one or more \fIdn\fR arguments are
+provided, entries with those distinguished names are deleted. If no \fIdn\fR
+arguments are provided, a list of \fBDN\fRs is read from \fIfile\fR, if the
+\fB-f\fR option is specified, or from standard input.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Bypass confirmation question when deleting a branch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Continuous operation mode. Errors are reported, but \fBldapdelete\fR will
+continue with deletions. The default is to exit after reporting an error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdebuglevel\fR \fR
+.ad
+.sp .6
+.RS 4n
+Sets the \fBLDAP\fR debugging level. Useful levels of debugging for
+\fBldapdelete\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 7n
+.rt
+Trace
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 7n
+.rt
+Packets
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 7n
+.rt
+Arguments
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR\fR
+.ad
+.RS 7n
+.rt
+Filters
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB128\fR\fR
+.ad
+.RS 7n
+.rt
+Access control
+.RE
+
+To request more than one category of debugging information, add the masks. For
+example, to request trace and filter information, specify a \fIdebuglevel\fR of
+\fB33\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIbindDN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the distinguished name \fIbindDN\fR to bind to the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ask server to expose (report) bind identity by means of authentication response
+control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Reads the entry deletion information from \fIfile\fR instead of from standard
+input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIldaphost\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an alternate host on which the LDAP server is running.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIlocale\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the character set to use for command-line input. The default is the
+character set specified in the \fBLANG\fR environment variable. You might want
+to use this option to perform the conversion from the specified character set
+to UTF8, thus overriding the \fBLANG\fR setting.
+.sp
+Using this argument, you can input the bind DN and the target DNs in the
+specified character set. The \fBldapdelete\fR tool converts the input from
+these arguments before it processes the search request. For example, \fB-i\fR
+\fBno\fR indicates that the bind DN and target DNs are provided in Norwegian.
+.sp
+This option affects only the command-line input. That is, if you specify a file
+containing DNs (with the \fB-f\fR option), \fBldapdelete\fR will not convert
+the data in the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIfilename\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a file containing the password for the bind DN or the password for the
+SSL client's key database. To protect the password, use this option in scripts
+and place the password in a secure file. This option is mutually exclusive of
+the \fB-w\fR and \fB-W\fR options. The \fB-j\fR option is the more secure
+alternative between \fB-j\fR and \fB-w\fR/\fB-W\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-J\fR [:\fIcriticality\fR[:\fIvalue\fR|::\fIb64value\fR|\fIb64value\fR|:\
+fIfileurl\fR]]\fR
+.ad
+.sp .6
+.RS 4n
+Criticality is a boolean value (default is \fBfalse\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path to a directory containing conversion routines. These routines
+are used if you want to specify a locale that is not supported by default by
+your directory server. This is for NLS support.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.sp .6
+.RS 4n
+Manage smart referrals. When they are the target of the operation, delete the
+actual entry containing the referral instead of the entry obtained by following
+the referral.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Shows what would be done, but does not actually delete entries. Useful in
+conjunction with options \fB-v\fR and \fB-d\fR for debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIcertificate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the certificate name to use for certificate-based client
+authentication. For example: \fB-N\fR \fB"Directory-Cert"\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIattributename\fR=\fIvalue\fR\fR
+.ad
+.sp .6
+.RS 4n
+For SASL mechanisms and other options such as security properties, mode of
+operation, authorization ID, authentication ID, and so forth.
+.sp
+The different attribute names and their values are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsecProp\fR=\fI"number"\fR\fR
+.ad
+.RS 20n
+.rt
+For defining SASL security properties.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrealm\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies SASL realm (default is \fBrealm=none\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthzid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authorization ID name for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authentication ID for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmech\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the various SASL mechanisms.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIhopLimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the maximum number of referral hops to follow while finding an entry to
+delete. By default, there is no limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIldapport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an alternate \fBTCP\fR port where the LDAP server is listening.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path and filename of the client's certificate database. For
+example:
+.sp
+.in +2
+.nf
+-P /home/uid/.netscape/cert7.db
+.fi
+.in -2
+
+When using the command on the same host as the directory server, you can use
+the server's own certificate database. For example:
+.sp
+.in +2
+.nf
+-P \fIinstallDir\fR/lapd-serverID/alias/cert7.db
+.fi
+.in -2
+
+Use the \fB-P\fR option alone to specify server authentication only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses verbose mode, with diagnostics written to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR \fIversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the LDAP protocol version number to be used for the delete operation,
+either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to
+servers that do not support v3.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIpassword\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the password for the client's key database given in the \fB-P\fR
+option. This option is required for certificate-based client authentication.
+Specifying \fIpassword\fR on the command line has security issues because the
+password can be seen by others on the system by means of the \fBps\fR command.
+Use the \fB-j\fR instead to specify the password from the file. This option is
+mutually exclusive of \fB-j\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIpasswd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use \fIpasswd\fR as the password for authentication to the directory. When you
+use \fB-w\fR\fI passwd\fR to specify the password to be used for
+authentication, the password is visible to other users of the system by means
+of the \fBps\fR command, in script files or in shell history. If you use the
+\fBldapdelete\fR command without this option, the command will prompt for the
+password and read it from standard in. When used without the \fB-w\fR option,
+the password will not be visible to other users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR \fIproxyid\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the proxy DN (proxied authorization id) to use for the delete
+operation, usually in double quotes ("") for the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify that SSL be used to provide certificate-based client authentication.
+This option requires the \fB-N\fR and SSL password and any other of the SSL
+options needed to identify the certificate and the key database.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdn\fR\fR
+.ad
+.RS 6n
+.rt
+Specifies one or several distinguished names of entries to delete.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDeleting an Entry
+.sp
+.LP
+To delete the entry named with commonName \fBDelete Me\fR directly below the
+\fBXYZ\fR Corporation organizational entry, use the following command:
+
+.sp
+.in +2
+.nf
+example% \fBldapdelete -D "cn=Administrator, o=XYZ, c=US" \e
+ "cn=Delete Me, o=XYZ, c=US"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDeleting an Entry Using SASL Authentication
+.sp
+.LP
+To delete the entry named with \fBcommonName\fR "Delete Me" directly below the
+XYZ Corporation organizational entry, use the following command:
+
+.sp
+.in +2
+.nf
+example% \fBldapdelete -o mech=DIGEST-MD5 -o secProp=noanonymous \e
+-o realm=none -o authid="dn:uid=foo,o=XYZ, c=US" \e
+"cn=Delete Me, o=XYZ, c=US"\fR
+.fi
+.in -2
+.sp
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for a description of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+Stability LevelEvolving
+.TE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 13n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBNon-zero \fR
+.ad
+.RS 13n
+.rt
+An error occurred. A diagnostic message is written to standard error.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldapadd\fR(1), \fBldapmodify\fR(1), \fBldapmodrdn\fR(1),
+\fBldapsearch\fR(1), \fBldap_get_option\fR(3LDAP),
+\fBldap_set_option\fR(3LDAP), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fB-M\fR \fIauthentication\fR option is obsolete.
diff --git a/usr/src/man/man1/ldaplist.1 b/usr/src/man/man1/ldaplist.1
new file mode 100644
index 0000000000..9ee7235527
--- /dev/null
+++ b/usr/src/man/man1/ldaplist.1
@@ -0,0 +1,540 @@
+'\" te
+.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldaplist 1 "7 Jun 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+ldaplist \- search and list naming information from an LDAP directory using the
+configured profile
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ldaplist\fR [\fB-dlv\fR] [\fB-h\fR \fILDAP_server\fR[\fB:\fR\fIserverPort\fR] [\fB-M\fR \fIdomainName\fR]
+ [\fB-N\fR \fIprofileName\fR] [\fB-a\fR \fIauthenticationMethod\fR] [\fB-P\fR \fIcertifPath\fR]
+ [\fB-D\fR \fIbindDN\fR] [\fB-w\fR \fIbindPassword\fR] [\fB-j\fR \fIpasswdFile\fR]]
+ [\fIdatabase\fR [\fIkey\fR]...]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ldaplist\fR \fB-g\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ldaplist\fR \fB-h\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+If the \fB-h\fR \fILDAP_server\fR\fB[:\fR\fIserverPort\fR\fB]\fR option is
+specified, \fBldaplist\fR establishes a connection to the server pointed to by
+the option to obtain a \fIDUAProfile\fR specified by the \fB-N\fR option. Then
+\fBldaplist\fR lists the information from the directory described by the
+configuration obtained.
+.sp
+.LP
+By default (if the \fB-h\fR \fILDAP_server\fR\fB[:\fR\fIserverPort\fR\fB]\fR
+option is not specified), the utility searches for and lists the naming
+information from the LDAP directory service defined in the LDAP configuration
+files generated by\fBldapclient\fR(1M) during the client initialization phase.
+To use the utility in the default mode, the Solaris LDAP client must be set up
+in advance.
+.sp
+.LP
+The database is either a container name or a database name as defined in
+\fBnsswitch.conf\fR(4). A container is a non-leaf entry in the Directory
+Information Tree (DIT) that contains naming service information. The container
+name is the LDAP Relative Distinguished Name (RDN) of the container relative to
+the \fBdefaultSearchBase\fR as defined in the configuration files. For example,
+for a container named \fBou=people\fR, the database name is the database
+specified in \fBnsswitch.conf\fR. This database is mapped to a container, for
+example, \fBpasswd\fR maps to \fBou=people\fR. If an invalid database is
+specified, it is mapped to a generic container, for example,
+\fBnisMapName=name\fR).
+.sp
+.LP
+The key is the attribute value to be searched in the database. You can specify
+more than one key to be searched in the same database. The key can be specified
+in either of two forms: \fIattribute\fR=\fIvalue\fR or \fIvalue\fR. In the
+first case, \fBldaplist\fR passes the search key to the server. In the latter
+case, an attribute is assigned depending on how the database is specified. If
+the database is a container name, then the "\fBcn\fR" attribute type is used.
+If the database is a valid database name as defined in the \fBnsswitch.conf\fR,
+then a predefined attribute type is used (see table below). If the database is
+an invalid database name, then \fBcn\fR is used as the attribute type.
+.sp
+.LP
+The \fBldaplist\fR utility relies on the Schema defined in the \fIRFC
+2307bis\fR, currently an IETF draft. The data stored on the LDAP server must be
+stored based on this Schema, unless the profile contains schema mapping
+definitions. For more information on schema mapping see \fBldapclient\fR(1M).
+The following table lists the default mapping from the database names to the
+container, the LDAP object class, and the attribute type used if not defined in
+the key.
+.sp
+.in +2
+.nf
+Database Object Class Attribute Type Container
+
+aliases mailGroup cn ou=Aliases
+automount nisObject cn automountMapName=auto_*
+bootparams bootableDevice cn ou=Ethers
+ethers ieee802Device cn ou=Ethers
+group posixgroup cn ou=Group
+hosts ipHost cn ou=Hosts
+ipnodes ipHost cn ou=Hosts
+netgroup ipNetgroup cn ou=Netgroup
+netmasks ipNetwork ipnetworknumber ou=Networks
+networks ipNetwork ipnetworknumber ou=Networks
+passwd posixAccount uid ou=People
+protocols ipProtocol cn ou=Protocols
+publickey nisKeyObject uidnumber ou=People
+ cn ou=Hosts
+rpc oncRpc cn ou=Rpc
+services ipService cn ou=Services
+printers printerService printer-uri ou=printers
+auth_attr SolarisAuthAttr nameT ou=SolarisAuthAttr
+prof_attr SolarisProfAttr nameT ou=SolarisProfAttr
+exec_attr SolarisExecAttr nameT ou=SolarisProfAttr
+user_attr SolarisUserAttr uidT ou=people
+audit_user SolarisAuditUser uidT ou=people
+projects SolarisProject SolarisProjectID ou=projects
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following databases are available only if the system is configured with
+Trusted Extensions:
+.sp
+.in +2
+.nf
+tnrhtp ipTnetTemplate ipTnetTemplateName ou=ipTnet
+tnrhdb ipTnetHost ipTnetNumber ou=ipTnet
+.fi
+.in -2
+.sp
+
+.RS +4
+.TP
+.ie t \(bu
+.el o
+For the \fBautomount\fR database, \fBauto_*\fR, in the container column,
+represents \fBauto_home\fR, \fBauto_direct\fR, \&.\|.\|.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+For the \fBpublickey\fR database, if the key starts with a digit, it is
+interpreted as an uid number. If the key starts with a non-digit, it is
+interpreted as a host name.
+.RE
+.sp
+.LP
+The \fBldaplist\fR utility supports substring search by using the wildcard
+"\fB*\fR" in the key. For example, "\fBmy*\fR" matches any strings that starts
+with "\fBmy\fR". In some shell environments, keys containing the wildcard might
+need to be quoted.
+.sp
+.LP
+If the key is not specified, all the containers in the current search
+\fBbaseDN\fR is listed.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIauthenticationMethod\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the authentication method. The default value is what has been
+configured in the profile. The supported authentication methods are:
+.sp
+.in +2
+.nf
+simple
+sasl/CRAM-MD5
+sasl/DIGEST-MD5
+tls:simple
+tls:sasl/CRAM-MD5
+tls:sasl/DIGEST-MD5
+.fi
+.in -2
+.sp
+
+Selecting \fBsimple\fR causes passwords to be sent over the network in clear
+text. Its use is strongly discouraged.
+.sp
+Additionally, if the client is configured with a profile which uses no
+authentication, that is, either the \fIcredentialLevel\fR attribute is set to
+\fBanonymous\fR or \fIauthenticationMethod\fR is set to \fBnone\fR, the user
+must use this option to provide an authentication method.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists the attributes for the specified database, rather than the entries. By
+default, the entries are listed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIbindDN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an entry which has read permission to the requested database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists the database mapping.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists the database mapping.
+.sp
+This option has been deprecated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fILDAP_server[:serverPort]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an address (or a name) and a port of the LDAP server from which the
+entries are read. The current naming service specified in the
+\fBnsswitch.conf\fR file is used. The default value for the port is \fB389\fR,
+unless when TLS is specified in the authentication method. In this case, the
+default LDAP server port number is \fB636\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIpasswdFile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies a file containing the password for the bind DN or the password for
+the SSL client's key database. To protect the password, use this option in
+scripts and place the password in a secure file.
+.sp
+This option is mutually exclusive of the \fB-w\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists all the attributes for each entry matching the search criteria. By
+default, \fBldaplist\fR lists only the Distinguished Name of the entries found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fIdomainName\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the name of a domain served by the specified server. If this option
+is not specified, the default domain name is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIprofileName\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies a DUAProfile name. A profile with such a name is supposed to exist on
+the server specified by \fB-H\fR option. The default value is default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIcertifPath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the certificate path to the location of the certificate database. The
+value is the path where security database files reside. This is used for TLS
+support, which is specified in the \fIauthenticationMethod\fR and
+\fIserviceAuthenticationMethod\fR attributes. The default is \fB/var/ldap\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIbindPassword\fR\fR
+.ad
+.sp .6
+.RS 4n
+Password to be used for authenticating the \fIbindDN\fR. If this parameter is
+missing, the command prompts for a password. NULL passwords are not supported
+in LDAP.
+.sp
+When you use \fB-w\fR \fIbind_password\fR to specify the password to be used
+for authentication, the password is visible to other users of the system by
+means of the \fBps\fR command, in script files or in shell history.
+.sp
+If the value of \fB-\fR is supplied as a password, the command prompts for a
+password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets verbose mode. The \fBldaplist\fR utility also prints the filter used to
+search for the entry. The filter is prefixed with "\fB+++\fR".
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRListing All Entries in the Hosts Database
+.sp
+.LP
+The following example lists all entries in the \fBhosts\fR database:
+
+.sp
+.in +2
+.nf
+example% \fBldaplist hosts\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRListing All Entries in a Non-Standard Database \fBou=new\fR
+.sp
+.LP
+The following example lists all entries in a non-standard database:
+
+.sp
+.in +2
+.nf
+example% \fBldaplist ou=new\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRFinding \fBuser1\fR in the \fBpasswd\fR Database
+.sp
+.LP
+The following example finds \fBuser1\fR in the \fBpasswd\fR database:
+
+.sp
+.in +2
+.nf
+example% \fBldaplist passwd user1\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRFinding the Entry With Service Port of \fB4045\fR in the
+\fBservices\fR Database
+.sp
+.LP
+The following example finds the entry with the service port of \fB4045\fR in
+the \fBservices\fR database:
+
+.sp
+.in +2
+.nf
+example% \fBldaplist services ipServicePort=4045\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRFinding All Users With Username Starting with \fBnew\fR in the
+\fBpasswd\fR Database
+.sp
+.LP
+The following example finds all users with the username starting with \fBnew\fR
+in the \fBpasswd\fR database:
+
+.sp
+.in +2
+.nf
+example% \fBldaplist passwd 'new*'\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRListing the Attributes for the \fBhosts\fR Database
+.sp
+.LP
+The following example lists the attributes for the \fBhosts\fR database:
+
+.sp
+.in +2
+.nf
+example% \fBldaplist -d hosts\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRFinding \fBuser1\fR in the \fBpasswd\fR Database
+.sp
+.LP
+The following example finds \fBuser1\fR in the \fBpasswd\fR database. An LDAP
+server is specified explicitly.
+
+.sp
+.in +2
+.nf
+example% \fBldaplist -H 10.10.10.10:3890 \e
+ -M another.domain.name -N special_duaprofile \e
+ -D "cn=directory manager" -w secret \e
+ user1\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successfully matched some entries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Successfully searched the table and no matches were found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred. An error message is output.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/ldap/ldap_client_file\fR\fR
+.ad
+.br
+.na
+\fB\fB/var/ldap/ldap_client_cred\fR\fR
+.ad
+.RS 30n
+.rt
+Files that contain the LDAP configuration of the client. Do not manually modify
+these files. Their content is not guaranteed to be human readable. To update
+these files, use \fBldapclient\fR(1M)
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldap\fR(1), \fBldapadd\fR(1), \fBldapdelete\fR(1), \fBldapmodify\fR(1),
+\fBldapmodrdn\fR(1), \fBldapsearch\fR(1), \fBidsconfig\fR(1M),
+\fBldap_cachemgr\fR(1M), \fBldapaddent\fR(1M), \fBldapclient\fR(1M),
+\fBsuninstall\fR(1M), \fBresolv.conf\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fIRFC 2307bis\fR is an IETF informational document in draft stage that defines
+an approach for using \fBLDAP\fR as a naming service.
+.sp
+.LP
+Currently StartTLS is not supported by \fBlibldap.so.5\fR, therefore the port
+number provided refers to the port used during a TLS open, versus the port used
+as part of a StartTLS sequence. For example, \fB-h foo:1000 -a tls:simple\fR,
+refers to a raw TLS open on host \fBfoo\fR, port 1000, not a open, StartTLS
+sequence on an unsecured port 1000. If port 1000 is unsecured the connection is
+not made.
diff --git a/usr/src/man/man1/ldapmodify.1 b/usr/src/man/man1/ldapmodify.1
new file mode 100644
index 0000000000..0907f51e86
--- /dev/null
+++ b/usr/src/man/man1/ldapmodify.1
@@ -0,0 +1,827 @@
+'\" te
+.\" Copyright (C) 1990, Regents of the University of Michigan. All Rights Reserved.
+.\" Portions Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldapmodify 1 "15 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ldapmodify, ldapadd \- ldap entry addition and modification tools
+.SH SYNOPSIS
+.LP
+.nf
+\fBldapmodify\fR [\fB-a\fR] [\fB-c\fR] [\fB-r\fR] [\fB-n\fR] [\fB-v\fR] [\fB-F\fR] [\fB-b\fR] [\fB-A\fR] [\fB-q\fR]
+ [\fB-H\fR] [\fB-?\fR] [\fB-E\fR] [\fB-J\fR] [\fB-Z\fR] [\fB-M\fR] [\fB-d\fR \fIdebuglevel\fR]
+ [\fB-D\fR \fIbindDN\fR] [\fB-j\fR \fIfilename\fR] [\fB-J\fR [:\fIcriticality\fR]]
+ [\fB-B\fR \fIbaseDN\fR] [\fB-V\fR \fIversion\fR] [\fB-Y\fR \fIproxyDN\fR] [\fB-O\fR \fIhopLimit\fR]
+ [\fB-i\fR \fIlocale\fR] [\fB-k\fR \fIpath\fR] [\fB-e\fR \fIerrorFile\fR] [\fB-P\fR \fIpath\fR]
+ [\fB-N\fR \fIcertificate\fR] [\fB-w\fR \fIpasswd\fR] [\fB-o\fR \fIattributename\fR=\fIvalue\fR]
+ [\fB-h\fR \fIldaphost\fR] [\fB-W\fR \fIpassword\fR] [\fB-p\fR \fIldapport\fR] [\fB-f\fR \fIfile\fR]
+ [\fB-l\fR \fInb-ldap-connections\fR]
+.fi
+
+.LP
+.nf
+\fBldapadd\fR [\fB-c\fR] [\fB-n\fR] [\fB-v\fR] [\fB-F\fR]
+ [ [\fB-b\fR] [\fB-A\fR] [\fB-q\fR] [\fB-H\fR] [\fB-?\fR] [\fB-E\fR] [\fB-J\fR] [\fB-Z\fR] [\fB-M\fR]\fB-d\fR \fIdebuglevel\fR]
+ [\fB-D\fR \fIbindDN\fR] [\fB-j\fR \fIfilename\fR] [\fB-B\fR \fIbaseDN\fR] [\fB-V\fR \fIversion\fR]
+ [\fB-Y\fR \fIproxyDN\fR] [\fB-O\fR \fIhopLimit\fR] [\fB-i\fR \fIlocale\fR] [\fB-k\fR \fIpath\fR]
+ [\fB-e\fR \fIerrorFile\fR] [\fB-P\fR \fIpath\fR] [\fB-N\fR \fIcertificate\fR] [\fB-w\fR \fIpasswd\fR]
+ [\fB-o\fR \fIattributename\fR=\fIvalue\fR] [\fB-h\fR \fIldaphost\fR] [\fB-W\fR \fIpassword\fR]
+ [\fB-p\fR \fIldapport\fR] [\fB-f\fR \fIfile\fR] [\fB-l\fR \fInb-ldap-connections\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBldapmodify\fR utility opens a connection to an \fBLDAP\fR server, binds
+and modifies or adds entries. The entry information is read from standard input
+or from \fIfile\fR, specified using the \fB-f\fR option. The \fBldapadd\fR
+utility is implemented as a hard link to the \fBldapmodify\fR tool. When
+invoked as \fBldapadd\fR, the \fB-a\fR (add new entry) option is turned on
+automatically.
+.sp
+.LP
+Both \fBldapadd\fR and \fBldapmodify\fR reject duplicate attribute-name/value
+pairs for the same entry.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Adds new entries. The default for \fBldapmodify\fR is to modify existing
+entries. If invoked as \fBldapadd\fR, this option is always set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.sp .6
+.RS 4n
+Non-ASCII mode: display non-ASCII values, in conjunction with the \fB-v\fR
+option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.sp .6
+.RS 4n
+Handle binary files. The \fBldapmodify\fR tool will scan every attribute value
+in the input to determine whether it is a valid file reference. If the
+reference is valid, it will use the contents of the file as the attribute's
+value. This option is used to input binary data, such as a JPEG image, for an
+attribute. For example, the corresponding LDIF input would be: "\fB jpegPhoto:
+/tmp/photo.jpg\fR" The \fBldapmodify\fR tool also supports the LDIF \fB:<
+\fIURL\fR\fR notation for directly including file contents.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\ \fIbaseDN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the base DN when performing additions, usually in double quotes
+(\fB""\fR) for the shell. All entries will be placed under this suffix, thus
+providing bulk import functionality.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies continuous operation mode. Errors are reported, but \fBldapmodify\fR
+and \fBldapadd\fR continue with modifications. The default is to exit after
+reporting an error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIbindDN\fR \fR
+.ad
+.sp .6
+.RS 4n
+Uses the distinguished name \fIbindDN\fR to bind to the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdebuglevel\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the \fBLDAP\fR debugging level. Useful levels of debugging for
+\fBldapmodify\fR and \fBldapadd\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 7n
+.rt
+Trace
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 7n
+.rt
+Packets
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 7n
+.rt
+Arguments
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR\fR
+.ad
+.RS 7n
+.rt
+Filters
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB128\fR\fR
+.ad
+.RS 7n
+.rt
+Access control
+.RE
+
+To request more than one category of debugging information, add the masks. For
+example, to request trace and filter information, specify a \fIdebuglevel\fR of
+33.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\ \fIerrorFile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Invalid update statements in the input will be copied to the \fIerrorFile\fR
+for debugging. Use with the \fB-c\fR option to correct errors when processing
+large LDIF input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ask server to expose (report) bind identity by means of authentication response
+control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces application of all changes regardless of the content of input lines that
+begin with \fBreplica:\fR. By default, \fBreplica:\fR lines are compared
+against the \fBLDAP\fR server host and port in use to decide whether a replog
+record should be applied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Reads the entry modification information from \fIfile\fR instead of from
+standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIldaphost\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an alternate host on which the LAPD server is running.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIlocale\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the character set to use for the \fB-f\fR \fILDIFfile\fR or standard
+input. The default is the character set specified in the \fBLANG\fR environment
+variable. You might choose to use this option to perform the conversion from
+the specified character set to UTF8, thus overriding the \fBLANG\fR setting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIfilename\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a file containing the password for the bind DN or the password for the
+SSL client's key database. To protect the password, use this option in scripts
+and place the password in a secure file. This option is mutually exclusive of
+the \fB-w\fR and \fB-W\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-J\fR [:\fIcriticality\fR[:\fIvalue\fR|::\fIb64value\fR|\fIb64value\fR|:\
+fIfileurl\fR]]\fR
+.ad
+.sp .6
+.RS 4n
+Criticality is a boolean value (default is \fBfalse\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path to a directory containing conversion routines. These routines
+are used if you want to specify a locale that is not supported by default by
+your directory server. This is for NLS support.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI nb-ldap-connections\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the number of \fBLDAP\fR connections that \fBldapadd\fR or
+\fBldapmodify\fR will open to process the modifications in the directory. The
+default is one connection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.sp .6
+.RS 4n
+Manage smart referrals. When they are the target of the operation, modify the
+entry containing the referral instead of the entry obtained by following the
+referral.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.sp .6
+.RS 4n
+Previews modifications, but makes no changes to entries. Useful in conjunction
+with \fB-v\fR and \fB-d\fR for debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIcertificate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the certificate name to use for certificate-based client
+authentication. For example: \fB-N\fR \fB"Directory-Cert"\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIattributename\fR=\fIvalue\fR\fR
+.ad
+.sp .6
+.RS 4n
+For SASL mechanisms and other options such as security properties, mode of
+operation, authorization ID, authentication ID, and so forth.
+.sp
+The different attribute names and their values are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsecProp\fR=\fI"number"\fR\fR
+.ad
+.RS 20n
+.rt
+For defining SASL security properties.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrealm\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies SASL realm (default is \fBrealm=none\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthzid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authorization ID name for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authentication ID for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmech\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the various SASL mechanisms.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIhopLimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the maximum number of referral hops to follow while finding an entry to
+modify. By default, there is no limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIldapport\fR \fR
+.ad
+.sp .6
+.RS 4n
+Specifies an alternate \fBTCP\fR port where the secure LDAP server is
+listening.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path and filename of the client's certificate database. For
+example:
+.sp
+.in +2
+.nf
+-P /home/uid/.netscape/cert7.db
+.fi
+.in -2
+
+When using the command on the same host as the directory server, you can use
+the server's own certificate database. For example:
+.sp
+.in +2
+.nf
+-P \fIinstallDir\fR/lapd-serverID/alias/cert7.db
+.fi
+.in -2
+
+Use the \fB-P\fR option alone to specify server authentication only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fR
+.ad
+.sp .6
+.RS 4n
+Replaces existing value with the specified value. This is the default for
+\fBldapmodify\fR. When \fBldapadd\fR is called, or if the \fB-a\fR option is
+specified, the \fB-r\fR option is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fR
+.ad
+.sp .6
+.RS 4n
+Uses verbose mode, with diagnostics written to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR \fIversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the LDAP protocol version number to be used for the delete operation,
+either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to
+servers that do not support v3.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIpassword\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the password for the client's key database given in the \fB-P\fR
+option. This option is required for certificate-based client authentication.
+Specifying \fIpassword\fR on the command line has security issues because the
+password can be seen by others on the system by means of the \fBps\fR command.
+Use the \fB-j\fR instead to specify the password from the file. This option is
+mutually exclusive of \fB-j\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIpasswd\fR \fR
+.ad
+.sp .6
+.RS 4n
+Use \fIpasswd\fR as the password for authentication to the directory. When you
+use \fB-w\fR\fI passwd\fR to specify the password to be used for
+authentication, the password is visible to other users of the system by means
+of the \fBps\fR command, in script files or in shell history. If you use either
+the \fBldapmodify\fR command or the \fBldapadd\fR command without this option,
+the command will prompt for the password and read it from standard in. When
+used without the \fB-w\fR option, the password will not be visible to other
+users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR \fIproxyid\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the proxy DN (proxied authorization id) to use for the modify
+operation, usually in double quotes ("") for the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify that SSL be used to provide certificate-based client authentication.
+This option requires the \fB-N\fR and SSL password and any other of the SSL
+options needed to identify the certificate and the key database.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 13n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBNon-zero \fR
+.ad
+.RS 13n
+.rt
+An error occurred. A diagnostic message is written to standard error.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The format of the content of \fIfile\fR (or standard input if no \fB-f\fR
+option is specified) is illustrated in the following examples.
+.LP
+\fBExample 1 \fRModifying an Entry
+.sp
+.LP
+The file \fB/tmp/entrymods\fR contains the following modification instructions:
+
+.sp
+.in +2
+.nf
+ dn: cn=Modify Me, o=XYZ, c=US
+ changetype: modify
+ replace: mail
+ mail: modme@atlanta.xyz.com
+ -
+ add: title
+ title: System Manager
+ -
+ add: jpegPhoto
+ jpegPhoto:< file:///tmp/modme.jpeg
+ -
+ delete: description
+ -
+.fi
+.in -2
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% \fBldapmodify -r -f /tmp/entrymods\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+modifies the \fBModify Me\fR entry as follows:
+
+.RS +4
+.TP
+1.
+The current value of the \fBmail\fR attribute is replaced with the value,
+\fBmodme@atlanta.xyz.com\fR.
+.RE
+.RS +4
+.TP
+2.
+A \fBtitle\fR attribute with the value, \fBSystem Manager\fR, is added.
+.RE
+.RS +4
+.TP
+3.
+A \fBjpegPhoto\fR attribute is added, using the contents of the file,
+\fB/tmp/modme.jpeg\fR, as the attribute value.
+.RE
+.RS +4
+.TP
+4.
+The \fBdescription\fR attribute is removed.
+.RE
+.LP
+\fBExample 2 \fRCreating a New Entry
+.sp
+.LP
+The file, \fB/tmp/newentry\fR, contains the following information for creating
+a new entry:
+
+.sp
+.in +2
+.nf
+ dn: cn=Ann Jones, o=XYZ, c=US
+ objectClass: person
+ cn: Ann Jones
+ cn: Annie Jones
+ sn: Jones
+ title: Director of Research and Development
+ mail: ajones@londonrd.xyz.us.com
+ uid: ajones
+.fi
+.in -2
+
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% \fBldapadd -f /tmp/newentry\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+adds a new entry for \fBAnn Jones\fR, using the information in the file.
+
+.LP
+\fBExample 3 \fRCreating a New Entry on an IPv6 Server
+.sp
+.LP
+The file, \fB/tmp/newentry\fR, contains the following information for creating
+a new entry: on an IPv6 server.
+
+.sp
+.in +2
+.nf
+ dn: cn=Ann Jones, o=XYZ, c=US
+ objectClass: person
+ cn: Ann Jones
+ cn: Annie Jones
+ sn: Jones
+ title: Director of Research and Development
+ mail: ajones@londonrd.xyz.us.com
+ uid: ajones
+.fi
+.in -2
+
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+example% \fBldapadd -c -v -h '['fec0::111:a00:20ff:feaa:a364']':389 \e
+ -D cn=Directory Manager -w secret \e
+ -f /tmp/entry \fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+adds a new entry for \fBDirectory Manager\fR, using the information in the
+file.
+
+.LP
+\fBExample 4 \fRDeleting an Entry
+.sp
+.LP
+The file, \fB/tmp/badentry\fR, contains the following information about an
+entry to be deleted:
+
+.sp
+.in +2
+.nf
+ dn: cn=Ann Jones, o=XYZ, c=US
+ changetype: delete
+.fi
+.in -2
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% \fBldapmodify -f /tmp/badentry\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+removes Ann Jones' entry.
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for a description of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+Stability LevelEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldap\fR(1), \fBldapdelete\fR(1), \fBldaplist\fR(1), \fBldapmodrdn\fR(1),
+\fBldapsearch\fR(1), \fBldapaddent\fR(1M), \fBldap_cachemgr\fR(1M),
+\fBldap_get_option\fR(3LDAP), \fBldap_set_option\fR(3LDAP), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ldapmodrdn.1 b/usr/src/man/man1/ldapmodrdn.1
new file mode 100644
index 0000000000..ef8d6b7401
--- /dev/null
+++ b/usr/src/man/man1/ldapmodrdn.1
@@ -0,0 +1,580 @@
+'\" te
+.\" Portions Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldapmodrdn 1 "15 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ldapmodrdn \- ldap modify entry RDN tool
+.SH SYNOPSIS
+.LP
+.nf
+\fBldapmodrdn\fR [\fB-r\fR] [\fB-n\fR] [\fB-v\fR] [\fB-c\fR] [\fB-E\fR] [\fB-H\fR] [\fB-?\fR] [\fB-M\fR] [\fB-R\fR]
+ [\fB-Z\fR] [\fB-V\fR \fIversion\fR] [\fB-d\fR \fIdebuglevel\fR] [\fB-D\fR \fIbindDN\fR]
+ [\fB-w\fR \fIpasswd\fR] [\fB-h\fR \fIldaphost\fR] [\fB-i\fR \fIlocale\fR] [\fB-j\fR \fIfilename\fR]
+ [\fB-J\fR [:\fIcriticality\fR]] [\fB-k\fR \fIpath\fR] [\fB-N\fR \fIcertificate\fR]
+ [\fB-O\fR \fIhopLimit\fR] [\fB-P\fR \fIpath\fR] [\fB-W\fR \fIpassword\fR] [\fB-p\fR \fIldapport\fR]
+ [\fB-o\fR \fIattributename\fR=\fIvalue\fR] [\fB-f\fR \fIfile\fR] [\fB-Y\fR \fIproxyDN\fR]
+ [\fIdn\fR \fIrdn\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBldapmodrdn\fR opens a connection to an LDAP server, binds, and modifies the
+RDN of entries. The entry information is read from standard input, from
+\fBfile\fR through the use of the \fB-f\fR option, or from the command-line
+pair \fIdn\fR and \fIrdn\fR.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Continuous operation mode. Errors are reported, but ldapmodify continues with
+modifications. The default is to exit after reporting an error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fI bindDN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use the distinguished name \fIbinddn\fR to bind to the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI debuglevel\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the LDAP debugging level. Useful values of \fIdebuglevel\fR for
+\fBldapmodrdn\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 8n
+.rt
+Trace
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR \fR
+.ad
+.RS 8n
+.rt
+Packets
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR \fR
+.ad
+.RS 8n
+.rt
+Arguments
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR \fR
+.ad
+.RS 8n
+.rt
+Filters
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB128\fR \fR
+.ad
+.RS 8n
+.rt
+Access control
+.RE
+
+To request more than one category of debugging information, add the masks. For
+example, to request trace and filter information, specify a \fIdebuglevel\fR of
+33.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ask server to expose (report) bind identity by means of authentication response
+control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read the entry modification information from \fBfile\fR instead of from
+standard input or the command-line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fI ldaphost\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify an alternate host on which the LDAP server is running.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIlocale\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the character set to use for the \fB-f\fR \fILDIFfile\fR or standard
+input. The default is the character set specified in the \fBLANG\fR environment
+variable. You might choose to use this option to perform the conversion from
+the specified character set to UTF8, thus overriding the \fBLANG\fR setting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-J\fR [:\fIcriticality\fR[:\fIvalue\fR|::\fIb64value\fR|\fIb64value\fR|:\
+fIfileurl\fR]]\fR
+.ad
+.sp .6
+.RS 4n
+Criticality is a boolean value (default is \fBfalse\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIfilename\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a file containing the password for the bind DN or the password for the
+SSL client's key database. To protect the password, use this option in scripts
+and place the password in a secure file. This option is mutually exclusive of
+the \fB-w\fR and \fB-W\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path to a directory containing conversion routines. These routines
+are used if you want to specify a locale that is not supported by default by
+your directory server. This is for NLS support.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.sp .6
+.RS 4n
+Manage smart referrals. When they are the target of the operation, modify the
+entry containing the referral instead of the entry obtained by following the
+referral.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.sp .6
+.RS 4n
+Previews modifications, but makes no changes to entries. Useful in conjunction
+with \fB-v\fR and \fB-d\fR for debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIcertificate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the certificate name to use for certificate-based client
+authentication. For example: \fB-N\fR \fB"Directory-Cert"\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Show what would be done, but do not actually change entries. Useful in
+conjunction with \fB-v\fR for debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIattributename\fR=\fIvalue\fR\fR
+.ad
+.sp .6
+.RS 4n
+For SASL mechanisms and other options such as security properties, mode of
+operation, authorization ID, authentication ID, and so forth.
+.sp
+The different attribute names and their values are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsecProp\fR=\fI"number"\fR\fR
+.ad
+.RS 20n
+.rt
+For defining SASL security properties.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrealm\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies SASL realm (default is \fBrealm=none\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthzid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authorization ID name for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authentication ID for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmech\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the various SASL mechanisms.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIhopLimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the maximum number of referral hops to follow while finding an entry to
+modify. By default, there is no limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path and filename of the client's certificate database. For
+example:
+.sp
+.in +2
+.nf
+-P /home/uid/.netscape/cert7.db
+.fi
+.in -2
+
+When using the command on the same host as the directory server, you can use
+the server's own certificate database. For example:
+.sp
+.in +2
+.nf
+-P \fIinstallDir\fR/lapd-serverID/alias/cert7.db
+.fi
+.in -2
+
+Use the \fB-P\fR option alone to specify server authentication only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI ldapport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify an alternate TCP port where the secure LAPD server is listening.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not automatically follow referrals returned while searching.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Remove old RDN values from the entry. By default, old values are kept.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR \fIversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the LDAP protocol version number to be used for the delete operation,
+either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to
+servers that do not support v3.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use verbose mode, with diagnostics written to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIpassword\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the password for the client's key database given in the \fB-P\fR
+option. This option is required for certificate-based client authentication.
+Specifying \fIpassword\fR on the command line has security issues because the
+password can be seen by others on the system by means of the \fBps\fR command.
+Use the \fB-j\fR instead to specify the password from the file. This option is
+mutually exclusive of \fB-j\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fI passwd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use \fIpasswd\fR as the password for authentication to the directory. When you
+use \fB-w\fR\fI passwd\fR to specify the password to be used for
+authentication, the password is visible to other users of the system by means
+of the \fBps\fR command, in script files or in shell history. If you use the
+\fBldapmodrdn\fR command without this option, the command will prompt for the
+password and read it from standard in. When used without the \fB-w\fR option,
+the password will not be visible to other users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR \fIproxyid\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the proxy DN (proxied authorization id) to use for the modify
+operation, usually in double quotes ("") for the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify that SSL be used to provide certificate-based client authentication.
+This option requires the \fB-N\fR and SSL password and any other of the SSL
+options needed to identify the certificate and the key database.
+.RE
+
+.SS "Input Format"
+.sp
+.LP
+If the command-line arguments \fIdn\fR and \fIrdn\fR are given, \fIrdn\fR
+replaces the RDN of the entry specified by the DN, \fIdn\fR.
+.sp
+.LP
+Otherwise, the contents of \fBfile\fR (or standard input if the \fB-\fR \fBf\fR
+option is not specified) must consist of one or more pair of lines:
+.sp
+.in +2
+.nf
+ Distinguished Name (DN)
+ Relative Distinguished Name (RDN)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Use one or more blank lines to separate each DN/RDN pair.
+.SH EXAMPLES
+.sp
+.LP
+The file \fB/tmp/entrymods\fR contains:
+.sp
+.in +2
+.nf
+cn=Modify Me, o=XYZ, c=US
+cn=The New Me
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command:
+.sp
+.in +2
+.nf
+example% ldapmodify -r -f /tmp/entrymods
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+changes the RDN of the "Modify Me" entry from "Modify Me" to "The New Me" and
+the old cn, "Modify Me" is removed.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for a description of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+Stability LevelEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldapadd\fR(1), \fBldapdelete\fR(1), \fBldapmodify\fR(1),
+\fBldapsearch\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+Exit status is \fB0\fR if no errors occur. Errors result in a non-zero exit
+status and a diagnostic message being written to standard error.
diff --git a/usr/src/man/man1/ldapsearch.1 b/usr/src/man/man1/ldapsearch.1
new file mode 100644
index 0000000000..2029dd14be
--- /dev/null
+++ b/usr/src/man/man1/ldapsearch.1
@@ -0,0 +1,975 @@
+'\" te
+.\" Copyright (C) 1990, Regents of the University of Michigan. All Rights Reserved.
+.\" Portions Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldapsearch 1 "6 Jan 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+ldapsearch \- ldap search tool
+.SH SYNOPSIS
+.LP
+.nf
+\fBldapsearch\fR [\fB-n\fR] [\fB-u\fR] [\fB-v\fR] [\fB-t\fR] [\fB-A\fR] [\fB-B\fR] [\fB-L\fR] [\fB-R\fR] [\fB-H\fR]
+ [\fB-?\fR] [\fB-t\fR] [\fB-T\fR] [\fB-B\fR] [\fB-E\fR] [\fB-J\fR] [\fB-e\fR] [\fB-l\fR] [\fB-Z\fR] [\fB-r\fR]
+ [\fB-M\fR] [\fB-d\fR \fIdebuglevel\fR] [\fB-F\fR \fIsep\fR] [\fB-f\fR \fIfile\fR] [\fB-D\fR \fIbindDN\fR]
+ [\fB-j\fR \fIfilename\fR] [\fB-V\fR \fIversion\fR] [\fB-Y\fR \fIproxyDN\fR] [\fB-O\fR \fIhopLimit\fR]
+ [\fB-i\fR \fIlocale\fR] [\fB-k\fR \fIpath\fR] [\fB-S\fR [\fB-\fR] \fIattribute\fR] [\fB-C\fR \fIpattern\fR]
+ [\fB-c\fR \fIauthzid\fR] [\fB-P\fR \fIpath\fR] [\fB-N\fR \fIcertificate\fR] [\fB-w\fR \fIpasswd\fR]
+ [\fB-h\fR \fIldaphost\fR] [\fB-p\fR \fIldapport\fR] [\fB-o\fR \fIattributename\fR=\fIvalue\fR]
+ [\fB-b\fR \fIsearchbase\fR] [\fB-s\fR \fIscope\fR] [\fB-a\fR \fIderef\fR] [\fB-l\fR \fItimelimit\fR]
+ [\fB-z\fR \fIsizelimit\fR] \fIfilter\fR [\fIattrs\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBldapsearch\fR utility opens a connection to an LDAP server, binds, and
+performs a search using the filter \fIfilter\fR.
+.sp
+.LP
+If \fBldapsearch\fR finds one or more entries, the attributes specified by
+\fIattrs\fR are retrieved and the entries and values are printed to standard
+output. If no \fIattrs\fR are listed, all attributes are returned.
+.SS "Output Format"
+.sp
+.LP
+If one or more entries are found, each entry is written to standard output in
+the form:
+.sp
+.in +2
+.nf
+dn: Distinguished Name (DN)
+ attributename: value
+ attributename: value
+ attributename: value
+\&...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Multiple entries are separated with a single blank line. If the \fB-F\fR option
+is used to specify a different separator character, this character is used
+instead of the \fB:\fR character. If the \fB-t\fR option is used, the name of a
+temporary file is returned in place of the actual value. If the \fB-A\fR option
+is given, only the "attributename" is returned and not the attribute value.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.sp .6
+.RS 4n
+Retrieve attributes only (no values). This is useful when you just want to see
+whether an attribute is present in an entry and are not interested in the
+specific value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIderef\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify how aliases dereferencing is done. The possible values for \fIderef\fR
+are \fBnever\fR, \fBalways\fR, \fBsearch\fR, or \fBfind\fR to specify
+respectively that aliases are never dereferenced, always dereferenced,
+dereferenced when searching, or dereferenced only when finding the base object
+for the search. The default is to never dereference aliases.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display non-ASCII values and use the old non-LDIF format. This option disables
+the default \fB-L\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIsearchbase\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use \fIsearchbase\fR as the starting point for the search instead of the
+default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIpattern\fR\fR
+.ad
+.sp .6
+.RS 4n
+Persistent search. Perform a search that keeps the connection open and displays
+results whenever entries matching the scope and filter of the search are added,
+modified, or removed. With this option, the \fBldapsearch\fR tool runs
+indefinitely; you must type Control-c to stop it. The pattern has the following
+format:
+.sp
+.in +2
+.nf
+ps:changeType[:changesOnly[:entryChangeControls]]
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIauthzid\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the \fBgetEffectiveRights\fR control \fIauthzid\fR. For example:
+.sp
+.in +2
+.nf
+dn:uid=bjensen,dc=example,dc=com
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIbindDN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use the distinguished name \fIbindDN\fR to bind to the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdebuglevel\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the \fBLDAP\fR debugging level. Useful levels of debugging for
+\fBldapsearch\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 7n
+.rt
+Trace
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 7n
+.rt
+Packets
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 7n
+.rt
+Arguments
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR\fR
+.ad
+.RS 7n
+.rt
+Filters
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB128\fR\fR
+.ad
+.RS 7n
+.rt
+Access control
+.RE
+
+To request more than one category of debugging information, add the masks. For
+example, to request trace and filter information, specify a debuglevel of 33.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ask server to expose (report) bind identity by means of authentication response
+control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.sp .6
+.RS 4n
+Minimize base-64 encoding of values.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIsep\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use \fIsep\fR as the field separator between attribute names and values. If
+this option has been specified, the \fB-L\fR option is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read a series of lines from \fIfile\fR, performing one \fBLDAP\fR search for
+each line. In this case, the \fIfilter\fR given on the command line is treated
+as a pattern where the first occurrence of \fB%s\fR is replaced with a line
+from \fIfile\fR. If \fIfile\fR is a single \fI-\fR character, then the lines
+are read from standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIpattern\fR\fR
+.ad
+.sp .6
+.RS 4n
+Virtual list view. Retrieve only a portion of all results, as determined by the
+index or value of the search target and the number of entries to be returned
+before and after the target. This option always requires the \fB-S\fR and
+\fB-x\fR options to specify the sorting order on the server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the usage help text that briefly describes all options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIldaphost\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify an alternate host on which the secure LDAP server is running.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIlocale\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the character set to use for command-line input. The default is the
+character set specified in the \fBLANG\fR environment variable. You might want
+to use this option to perform the conversion from the specified character set
+to UTF8, thus overriding the \fBLANG\fR setting. Using this argument, you can
+input the bind DN, base DN, and the search filter pattern in the specified
+character set. The \fBldapsearch\fR tool converts the input from these
+arguments before it processes the search request. For example, \fB-i\fR
+\fBno\fR indicates that the bind DN, base DN, and search filter are provided in
+Norwegian. This argument only affects the command-line input. If you specify a
+file containing a search filter (with the \fB-f\fR option), \fBldapsearch\fR
+does not convert the data in the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIfilename\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a file containing the password for the bind DN or the password for the
+SSL client's key database. To protect the password, use this option in scripts
+and place the password in a secure file. This option is mutually exclusive of
+the \fB-w\fR and \fB-W\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-J\fR [:\fIcriticality\fR[:\fIvalue\fR|::\fIb64value\fR|\fIb64value\fR|:\
+fIfileurl\fR]]\fR
+.ad
+.sp .6
+.RS 4n
+Criticality is a boolean value (default is \fBfalse\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path to a directory containing conversion routines. These routines
+are used if you want to specify a locale that is not supported by default by
+your directory server. This is for NLS support.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.sp .6
+.RS 4n
+ Display search results in LDIF format. This option also turns on the \fB-B\fR
+option. This behavior is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fItimelimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Wait at most \fItimelimit\fR seconds for a search to complete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.sp .6
+.RS 4n
+Manage smart referrals. When they are the target of the operation, search the
+entry containing the referral instead of the entry obtained by following the
+referral.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIcertificate\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the certificate name to use for certificate-based client
+authentication. For example: \fB-N\fR \fB"Directory-Cert"\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Show what would be done, but do not actually perform the search. Useful in
+conjunction with \fB-v\fR and \fB-d\fR for debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIhopLimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the maximum number of referral hops to follow while finding an entry to
+modify. By default, there is no limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIattributename\fR=\fIvalue\fR\fR
+.ad
+.sp .6
+.RS 4n
+For SASL mechanisms and other options such as security properties, mode of
+operation, authorization ID, authentication ID, and so forth.
+.sp
+The different attribute names and their values are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsecProp\fR=\fI"number"\fR\fR
+.ad
+.RS 20n
+.rt
+For defining SASL security properties.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrealm\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies SASL realm (default is \fBrealm=none\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthzid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authorization ID name for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthid\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specify the authentication ID for SASL bind.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmech\fR=\fI"value"\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the various SASL mechanisms.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the path and filename of the client's certificate database. For
+example:
+.sp
+.in +2
+.nf
+-P /home/uid/.netscape/cert7.db
+.fi
+.in -2
+.sp
+
+When using the command on the same host as the directory server, you can use
+the server's own certificate database. For example:
+.sp
+.in +2
+.nf
+-P \fIinstallDir\fR/lapd-serverID/alias/cert7.db
+.fi
+.in -2
+.sp
+
+Use the \fB-P\fR option alone to specify server authentication only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIldapport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify an alternate TCP port where the secure LAPD server is listening.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not automatically follow referrals returned while searching.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the output of the \fBldapsearch\fR command in the old format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR [-]\fIattribute\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify an attribute for sorting the entries returned by the search. The sort
+criteria is alphabetical on the attribute's value or reverse alphabetical with
+the form \fB-attribute\fR. You can give multiple \fB-S\fR options to refine the
+sorting, For example:
+.sp
+.in +2
+.nf
+-S sn -S \fIgivenname\fR
+.fi
+.in -2
+.sp
+
+By default, the entries are not sorted. Use the \fB-x\fR option to perform
+server-side sorting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIscope\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the scope of the search. The possible values of \fIscope\fR are
+\fBbase\fR, \fBone\fR, or \fBsub\fR to specify respectively a base object,
+one-level, or subtree search. The default is \fBsub\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.sp .6
+.RS 4n
+Format the output of search results so that no line breaks are used within
+individual attribute values.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Write retrieved values to a set of temporary files. This is useful for dealing
+with non-ASCII values such as jpegPhoto or audio.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.sp .6
+.RS 4n
+URL format (valid only with the \fB-t\fR option). When using temporary file
+output, the standard output of the tool includes the URL of the file instead of
+the attributes value. For example:
+.sp
+.in +2
+.nf
+jpegPhoto:< file:/tmp/ldapsearch-jpegPhoto-YzaOMh
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.sp .6
+.RS 4n
+Include the user-friendly form of the Distinguished Name (DN) in the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR \fIversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the LDAP protocol version number to be used for the delete operation,
+either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to
+servers that do not support v3.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Run in verbose mode, with diagnostics written to standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fIpassword\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the password for the client's key database given in the \fB-P\fR
+option. This option is required for certificate-based client authentication.
+Specifying \fIpassword\fR on the command line has security issues because the
+password can be seen by others on the system by means of the \fBps\fR command.
+Use the \fB-j\fR instead to specify the password from the file. This option is
+mutually exclusive of \fB-j\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIpasswd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use \fIpasswd\fR as the password for authentication to the directory. When you
+use \fB-w\fR \fIpasswd\fR to specify the password to be used for
+authentication, the password is visible to other users of the system by means
+of the \fBps\fR command, in script files or in shell history. If you use the
+\fBldapsearch\fR command without this option, the command prompts for the
+password and read it from standard in. When used without the \fB-w\fR option,
+the password is not visible to other users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use with the \fB-S\fR option to specify that search results be sorted on the
+server rather than by the \fBldapsearch\fR command running on the client. This
+is useful if you want to sort according to a matching rule, as with an
+international search. It is usually faster to sort on the server, if that is
+supported, rather than on the client.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR \fIproxyDN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the proxy DN (proxied authorization id) to use for the modify
+operation, usually in double quotes (" ") for the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify that SSL be used to provide certificate-based client authentication.
+This option requires the \fB-N\fR and SSL password and any other of the SSL
+options needed to identify the certificate and the key database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIsizelimit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Retrieve at most \fIsizelimit\fR entries for a search to complete.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPerforming a Subtree Search
+.sp
+.LP
+The following command performs a subtree search (using the default search base)
+for entries with a commonName of "mark smith". The commonName and
+telephoneNumber values is retrieved and printed to standard output. Use the
+\fB-r\fR option to display this output in the old format.
+
+.sp
+.in +2
+.nf
+example% ldapsearch "cn=mark smith" cn telephoneNumber
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The output looks something like this:
+
+.sp
+.in +2
+.nf
+dn: Mark D Smith, ou=Sales, ou=Atlanta, ou=People, o=XYZ, c=US
+cn: Mark Smith
+cn: Mark David Smith
+cn: Mark D Smith 1
+cn: Mark D Smith
+telephoneNumber: +1 123 456-7890
+
+dn: Mark C Smith, ou=Distribution, ou=Atlanta, ou=People, o=XYZ, c=US
+cn: Mark Smith
+cn: Mark C Smith 1
+cn: Mark C Smith
+telephoneNumber: +1 123 456-9999
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRPerforming a Subtree Search Using the Default Search Base
+.sp
+.LP
+The following command performs a subtree search using the \fB-r\fR option to
+display in old style format with a default search base for entries with user id
+of \fBmcs\fR. The user-friendly form of the entry's DN is output after the line
+that contains the DN itself, and the \fBjpegPhoto\fR and \fBaudio\fR values are
+retrieved and written to temporary files.
+
+.sp
+.in +2
+.nf
+ldapsearch -r -u -t "uid=mcs" -r jpegPhoto audio
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The output might look like this if one entry with one value for each of the
+requested attributes is found:
+
+.sp
+.in +2
+.nf
+cn=Mark C Smith, ou=Distribution, ou=Atlanta, ou=People, o=XYZ, c=US
+Mark C Smith, Distribution, Atlanta, People, XYZ, US
+audio=/tmp/ldapsearch-audio-a19924
+jpegPhoto=/tmp/ldapsearch-jpegPhoto-a19924
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPerforming a One-Level Search
+.sp
+.LP
+The following command performs a one-level search at the c=US level for all
+organizations whose organizationName begins with XY.
+
+.sp
+.in +2
+.nf
+example% ldapsearch -s one -b "c=US" "o=XY*" o description
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBorganizationName\fR and \fBdescription\fR attribute values are retrieved
+and printed to standard output, resulting in output similar to this:
+
+.sp
+.in +2
+.nf
+dn: o=XYZ c=US
+ o: XYZ
+ description: XYZ Corporation
+
+ dn: o="XY Trading Company", c=US
+ o: XY Trading Company
+ description: Import and export specialists
+
+ dn: o=XYInternational, c=US
+ o: XYInternational
+ o: XYI
+ o: XY International
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRPerforming a Subtree Search on an IPv6 Server
+.sp
+.LP
+The following command performs a subtree search using the default search base
+for entries with a user id of \fBmcs\fR on an IPv6 (that is, \fB-h\fR) server:
+
+.sp
+.in +2
+.nf
+example% ldapsearch -u -h '['fec0::111:a00:20ff:fea3:edcf']' \e
+ -t "uid=mcs" jpegPhoto audio
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred. A diagnostic message is written to standard error.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for a description of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+Stability LevelEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBldapadd\fR(1), \fBldapdelete\fR(1), \fBldapmodify\fR(1),
+\fBldapmodrdn\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ldd.1 b/usr/src/man/man1/ldd.1
new file mode 100644
index 0000000000..bfdd18db7c
--- /dev/null
+++ b/usr/src/man/man1/ldd.1
@@ -0,0 +1,527 @@
+'\" te
+.\" Copyright 1989 AT&T All Rights Reserved
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ldd 1 "3 Jun 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+ldd \- list dynamic dependencies of executable files or shared objects
+.SH SYNOPSIS
+.LP
+.nf
+\fBldd\fR [\fB-d\fR | \fB-r\fR] [\fB-c\fR] [\fB-e\fR \fIenvar\fR] [\fB-f\fR] [\fB-i\fR] [\fB-L\fR] [\fB-l\fR] [\fB-p\fR] [\fB-s\fR]
+ [\fB-U\fR | \fB-u\fR] [\fB-v\fR] [\fB-w\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBldd\fR utility lists the dynamic dependencies of executable files or
+shared objects. \fBldd\fR uses the runtime linker, \fBld.so.1\fR, to generate
+the diagnostics. The runtime linker takes the object being inspected and
+prepares the object as would occur in a running process. By default, \fBldd\fR
+triggers the loading of any lazy dependencies.
+.sp
+.LP
+\fBldd\fR lists the path names of all shared objects that would be loaded when
+\fIfilename\fR is loaded. \fBldd\fR expects the shared objects that are being
+inspected to have execute permission. If a shared object does not have execute
+permission, \fBldd\fR issues a warning before attempting to process the file.
+.sp
+.LP
+\fBldd\fR processes its input one file at a time. For each file, \fBldd\fR
+performs one of the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Lists the object dependencies if the dependencies exist.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Succeeds quietly if dependencies do not exist.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Prints an error message if processing fails.
+.RE
+.sp
+.LP
+The dynamic objects that are inspected by \fBldd\fR are not executed.
+Therefore, \fBldd\fR does not list any shared objects explicitly attached using
+\fBdlopen\fR(3C). To display all the objects in use by a process, or a core
+file, use \fBpldd\fR(1).
+.SH OPTIONS
+.sp
+.LP
+\fBldd\fR can also check the compatibility of \fIfilename\fR with the shared
+objects \fIfilename\fR uses. With the following options, \fBldd\fR prints
+warnings for any unresolved symbol references that would occur when
+\fIfilename\fR is loaded.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Check \fBimmediate\fR references.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Check both \fBimmediate\fR references and \fBlazy\fR references.
+.RE
+
+.sp
+.LP
+Only one of the options \fB-d\fR or \fB-r\fR can be specified during any single
+invocation of \fBldd\fR.
+.sp
+.LP
+\fBimmediate\fR references are typically to data items used by the executable
+or shared object code. \fBimmediate\fR references are also pointers to
+functions, and even calls to functions made from a position \fBdependent\fR
+shared object. \fBlazy\fR references are typically calls to global functions
+made from a position \fBindependent\fR shared object, or calls to external
+functions made from an executable. For more information on these types of
+reference, see When Relocations Are Performed in the \fILinker and Libraries
+Guide\fR. Object loading can also be affected by relocation processing. See
+\fBLazy Loading\fR under USAGE for more details.
+.sp
+.LP
+Some unresolved symbol references are not reported by default. These unresolved
+references can be reported with the following options. These options are only
+useful when combined with either the \fB-d\fR or the \fB-r\fR options.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Expose any unresolved symbol errors to explicit \fBparent\fR and \fBexternal\fR
+references.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 6n
+.rt
+Expose any unresolved \fBweak\fR symbol references.
+.RE
+
+.sp
+.LP
+A shared object can make reference to symbols that should be supplied by the
+caller of the shared object. These references can be explicitly classified when
+the shared object is created, as being available from a \fBparent\fR, or simply
+as being \fBexternal\fR. See the \fB-M\fR \fBmapfile\fR option of \fBld\fR(1),
+and the \fBPARENT\fR and \fBEXTERN\fR symbol definition keywords. When
+examining a dynamic executable, a \fBparent\fR or \fBexternal\fR reference that
+can not be resolved is flagged as an error. However by default, when examining
+a shared object, a \fBparent\fR or \fBexternal\fR reference that can not be
+resolved is not flagged as an error. The \fB-p\fR option, when used with either
+the \fB-d\fR or \fB-r\fR options, causes any unresolved \fBparent\fR or
+\fBexternal\fR reference to be flagged as a relocation error.
+.sp
+.LP
+Symbols that are used by relocations may be defined as \fBweak\fR references.
+By default, if a weak symbol reference can not be resolved, the relocation is
+ignored and a zero written to the relocation offset. The \fB-w\fR option, when
+used with either the \fB-d\fR or the \fB-r\fR options, causes any unresolved
+relocation against a weak symbol reference to be flagged as a relocation error.
+.sp
+.LP
+\fBldd\fR can also check dependency use. With each of the following options,
+\fBldd\fR prints warnings for any unreferenced, or unused dependencies that are
+loaded when \fIfilename\fR is loaded. Only when a symbol reference is bound to
+a dependency, is that dependency deemed used. These options are therefore only
+useful when symbol references are being checked. If the \fB-r\fR option is not
+in effect, the \fB-d\fR option is enabled.
+.sp
+.LP
+A dependency that is defined by an object but is not bound to from that object
+is an unreferenced dependency. A dependency that is not bound to by any other
+object when \fIfilename\fR is loaded is an unused object.
+.sp
+.LP
+Dependencies can be located in default system locations, or in locations that
+must be specified by search paths. Search paths may be specified globally, such
+as the environment variable \fBLD_LIBRARY_PATH\fR. Search paths can also be
+defined in dynamic objects as runpaths. See the \fB-R\fR option to \fBld\fR(1).
+Search paths that are not used to satisfy any dependencies cause unnecessary
+file system processing.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.RS 6n
+.rt
+Displays any unreferenced, or unused dependencies. If an unreferenced
+dependency is not bound to by other objects loaded with \fIfilename\fR, the
+dependency is also flagged as unused. Cyclic dependencies that are not bound to
+from objects outside of the cycle are also deemed unreferenced.
+.sp
+This option also displays any unused search paths.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Displays any unused objects.
+.RE
+
+.sp
+.LP
+Only one of the options \fB-U\fR or \fB-u\fR can be specified during any single
+invocation of \fBldd\fR, although \fB-U\fR is a superset of \fB-u\fR. Objects
+that are found to be unreferenced, or unused when using the \fB-r\fR option,
+should be removed as dependencies. These objects provide no references, but
+result in unnecessary overhead when \fIfilename\fR is loaded. When using the
+\fB-d\fR option, any objects that are found to be unreferenced, or unused are
+not immediately required when \fIfilename\fR is loaded. These objects are
+candidates for lazy loading. See \fBLazy Loading\fR under USAGE for more
+details.
+.sp
+.LP
+The removal of unused dependencies reduces runtime-linking overhead. The
+removal of unreferenced dependencies reduces runtime-linking overhead to a
+lesser degree. However, the removal of unreferenced dependencies guards against
+a dependency being unused when combined with different objects, or as the other
+object dependencies evolve.
+.sp
+.LP
+The removal of unused search paths can reduce the work required to locate
+dependencies. This can be significant when accessing files from a file server
+over a network. Note, a search path can be encoded within an object to satisfy
+the requirements of \fBdlopen\fR(3C). This search path might not be required to
+obtain the dependencies of this object, and hence will look unused to
+\fBldd\fR.
+.sp
+.LP
+The following additional options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 12n
+.rt
+Disables any configuration file use. Configuration files can be employed to
+alter default search paths, and provide alternative object dependencies. See
+\fBcrle\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIenvar\fR\fR
+.ad
+.RS 12n
+.rt
+Sets the environment variable \fIenvar\fR.
+.sp
+This option is useful for experimenting with environment variables that are
+recognized by the runtime linker that can adversely affect \fBldd\fR, for
+example, \fBLD_PRELOAD\fR.
+.sp
+This option is also useful for extracting additional information solely from
+the object under inspection, for example, \fBLD_DEBUG\fR. See \fBld.so.1\fR(1)
+and \fBlari\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 12n
+.rt
+Forces \fBldd\fR to check for an executable file that is not secure. When
+\fBldd\fR is invoked by a superuser, by default \fBldd\fR does not process any
+executable that is not secure. An executable is not considered secure if the
+interpreter that the executable specifies does not reside under \fB/lib\fR,
+\fB/usr/lib\fR or \fB/etc/lib\fR. An executable is also not considered secure
+if the interpreter cannot be determined. See \fBSecurity\fR under USAGE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 12n
+.rt
+Displays the order of execution of initialization sections. The order that is
+discovered can be affected by use of the \fB-d\fR or \fB-r\fR options. See
+\fBInitialization Order\fR under USAGE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 12n
+.rt
+Enables lazy loading. Lazy loading is the default mode of operation when the
+object under inspection is loaded as part of a process. In this case, any lazy
+dependencies, or filters, are only loaded into the process when reference is
+made to a symbol that is defined within the lazy object. The \fB-d\fR or
+\fB-r\fR options, together with the \fB-L\fR option, can be used to inspect the
+dependencies, and their order of loading as would occur in a running process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 12n
+.rt
+Forces the immediate processing of any filters so that all filtees, and their
+dependencies, are listed. The immediate processing of filters is now the
+default mode of operation for \fBldd\fR. However, under this default any
+auxiliary filtees that cannot be found are silently ignored. Under the \fB-l\fR
+option, missing auxiliary filtees generate an error message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 12n
+.rt
+Displays the search path used to locate shared object dependencies.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 12n
+.rt
+Displays all dependency relationships incurred when processing \fIfilename\fR.
+This option also displays any dependency version requirements. See
+\fBpvs\fR(1).
+.RE
+
+.SH USAGE
+.SS "Security"
+.sp
+.LP
+A superuser should use the \fB-f\fR option only if the executable to be
+examined is known to be trustworthy. The use of \fB-f\fR on an untrustworthy
+executable while superuser can compromise system security. If an executables
+trustworthyness is unknown, a superuser should temporarily become a regular
+user. Then invoke \fBldd\fR as this regular user.
+.sp
+.LP
+Untrustworthy objects can be safely examined with \fBdump\fR(1) and with
+\fBmdb\fR(1), as long as the \fB:r\fR subcommand is not used. In addition, a
+non-superuser can use either the \fB:r\fR subcommand of \fBmdb\fR, or
+\fBtruss\fR(1) to examine an untrustworthy executable without too much risk of
+compromise. To minimize risk when using \fBldd\fR, \fBadb :r\fR, or \fBtruss\fR
+on an untrustworthy executable, use the \fBUID\fR \fB"nobody"\fR.
+.SS "Lazy Loading"
+.sp
+.LP
+Lazy loading can be applied directly by specified lazy dependencies. See the
+\fB-z\fR \fBlazyload\fR option of \fBld\fR(1). Lazy loading can also be applied
+indirectly through filters. See the \fB-f\fR option and \fB-F\fR option of
+\fBld\fR(1). Objects that employ lazy loading techniques can experience
+variations in \fBldd\fR output due to the options used. If an object expresses
+all its dependencies as lazy, the default operation of \fBldd\fR lists all
+dependencies in the order in which the dependencies are recorded in that
+object:
+.sp
+.in +2
+.nf
+example% \fBldd main\fR
+ libelf.so.1 => /lib/libelf.so.1
+ libnsl.so.1 => /lib/libnsl.so.1
+ libc.so.1 => /lib/libc.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The lazy loading behavior that occurs when this object is used at runtime can
+be enabled using the \fB-L\fR option. In this mode, lazy dependencies are
+loaded when reference is made to a symbol that is defined within the lazy
+object. Therefore, combining the \fB-L\fR option with use of the \fB-d\fR and
+\fB-r\fR options reveals the dependencies that are needed to satisfy the
+immediate, and lazy references respectively:
+.sp
+.in +2
+.nf
+example% \fBldd\fR \fB-L\fR \fBmain\fR
+example% \fBldd\fR \fB-d\fR \fBmain\fR
+ libc.so.1 => /lib/libc.so.1
+example% \fBldd\fR \fB-r\fR \fBmain\fR
+ libc.so.1 => /lib/libc.so.1
+ libelf.so.1 => /lib/libelf.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that in this example, the order of the dependencies that are listed is
+not the same as displayed from \fBldd\fR with no options. Even with the
+\fB-r\fR option, the lazy reference to dependencies might not occur in the same
+order as would occur in a running program.
+.sp
+.LP
+Observing lazy loading can also reveal objects that are not required to satisfy
+any references. These objects, in this example, \fBlibnsl.so.1\fR, are
+candidates for removal from the link-line used to build the object being
+inspected.
+.SS "Initialization Order"
+.sp
+.LP
+Objects that do not explicitly define their required dependencies might observe
+variations in the initialization section order displayed by \fBldd\fR due to
+the options used. For example, a simple application might reveal:
+.sp
+.in +2
+.nf
+example% \fBldd -i main\fR
+ libA.so.1 => ./libA.so.1
+ libc.so.1 => /lib/libc.so.1
+ libB.so.1 => ./libB.so.1
+
+ init object=./libB.so.1
+ init object=./libA.so.1
+ init object=/lib/libc.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+whereas, when relocations are applied, the initialization section order is:
+.sp
+.in +2
+.nf
+example% \fBldd -ir main\fR
+ .........
+
+ init object=/lib/libc.so.1
+ init object=./libB.so.1
+ init object=./libA.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this case, \fBlibB.so.1\fR makes reference to a function in
+\fB/usr/lib/libc.so.1\fR. However, \fBlibB.so.1\fR has no explicit dependency
+on this library. Only after a relocation is discovered is a dependency then
+established. This implicit dependency affects the initialization section order.
+.sp
+.LP
+Typically, the initialization section order established when an application is
+executed, is equivalent to \fBldd\fR with the \fB-d\fR option. The optimum
+order can be obtained if all objects fully define their dependencies. Use of
+the \fBld\fR(1) options \fB-z\|defs\fR and \fB-z\|ignore\fR when building
+dynamic objects is recommended.
+.sp
+.LP
+Cyclic dependencies can result when one or more dynamic objects reference each
+other. Cyclic dependencies should be avoided, as a unique initialization sort
+order for these dependencies can not be established.
+.sp
+.LP
+Users that prefer a more static analysis of object files can inspect
+dependencies using tools such as \fBdump\fR(1) and \fBelfdump\fR(1).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lddstub\fR\fR
+.ad
+.RS 23n
+.rt
+Fake 32-bit executable loaded to check the dependencies of shared objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/64/lddstub\fR\fR
+.ad
+.RS 23n
+.rt
+Fake 64-bit executable loaded to check the dependencies of shared objects.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcrle\fR(1), \fBdump\fR(1), \fBelfdump\fR(1), \fBlari\fR(1), \fBld\fR(1),
+\fBld.so.1\fR(1), \fBmdb\fR(1), \fBpldd\fR(1), \fBpvs\fR(1), \fBtruss\fR(1),
+\fBdlopen\fR(3C), \fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBldd\fR prints the record of shared object path names to \fBstdout\fR. The
+optional list of symbol resolution problems is printed to \fBstderr\fR. If
+\fIfilename\fR is not an executable file or a shared object, or if
+\fIfilename\fR cannot be opened for reading, a non-zero exit status is
+returned.
+.SH NOTES
+.sp
+.LP
+Use of the \fB-d\fR or \fB-r\fR option with shared objects can give misleading
+results. \fBldd\fR does a worst case analysis of the shared objects. However,
+in practice, the symbols reported as unresolved might be resolved by the
+executable file referencing the shared object. The runtime linkers preloading
+mechanism can be employed to add dependencies to the object being inspected.
+See \fBLD_PRELOAD\fR.
+.sp
+.LP
+\fBldd\fR uses the same algorithm as the runtime linker to locate shared
+objects.
diff --git a/usr/src/man/man1/let.1 b/usr/src/man/man1/let.1
new file mode 100644
index 0000000000..10f3b59825
--- /dev/null
+++ b/usr/src/man/man1/let.1
@@ -0,0 +1,95 @@
+'\" te
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH let 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+let \- shell built-in function to evaluate one or more arithmetic expressions
+.SH SYNOPSIS
+.SS "ksh"
+.LP
+.nf
+\fBlet\fR \fIarg\fR...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBlet\fR [\fIexpr\fR...]
+.fi
+
+.SH DESCRIPTION
+.SS "ksh"
+.sp
+.LP
+Each \fIarg\fR is a separate arithmetic expression to be evaluated.
+.SS "ksh93"
+.sp
+.LP
+\fBlet\fR evaluates each \fIexpr\fR in the current shell environment as an
+arithmetic expression using ANSI C syntax. Variables names are shell variables
+and they are recursively evaluated as arithmetic expressions to get numerical
+values. \fBlet\fR has been made obsolete by the \fB((...))\fR syntax of
+\fBksh93\fR(1) which does not require quoting of the operators to pass them as
+command arguments.
+.SH EXIT STATUS
+.SS "ksh"
+.sp
+.LP
+\fBksh\fR returns the following exit values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+The value of the last expression is \fBnon-zero\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+The value of the last expression is zero.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+\fBksh93\fR returns the following exit values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The last \fIexpr\fR evaluates to a \fBnon-zero\fR value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+The last \fIexpr\fR evaluates to \fB0\fR or an error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh\fR(1), \fBksh93\fR(1), \fBset\fR(1), \fBtypeset\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/lex.1 b/usr/src/man/man1/lex.1
new file mode 100644
index 0000000000..438df0fa3c
--- /dev/null
+++ b/usr/src/man/man1/lex.1
@@ -0,0 +1,1045 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lex 1 "22 Aug 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+lex \- generate programs for lexical tasks
+.SH SYNOPSIS
+.LP
+.nf
+\fBlex\fR [\fB-cntv\fR] [\fB-e\fR | \fB-w\fR] [\fB-V\fR \fB-Q\fR [y | n]] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlex\fR utility generates C programs to be used in lexical processing of
+character input, and that can be used as an interface to \fByacc\fR. The C
+programs are generated from \fBlex\fR source code and conform to the ISO C
+standard. Usually, the \fBlex\fR utility writes the program it generates to the
+file \fBlex.yy.c\fR. The state of this file is unspecified if \fBlex\fR exits
+with a non-zero exit status. See \fBEXTENDED DESCRIPTION\fR for a complete
+description of the \fBlex\fR input language.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 12n
+.rt
+Indicates C-language action (default option).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fR
+.ad
+.RS 12n
+.rt
+Generates a program that can handle \fBEUC\fR characters (cannot be used with
+the \fB-w\fR option). \fByytext[\|]\fR is of type \fBunsigned char[\|]\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.RS 12n
+.rt
+Suppresses the summary of statistics usually written with the \fB-v\fR option.
+If no table sizes are specified in the \fBlex\fR source code and the \fB-v\fR
+option is not specified, then \fB-n\fR is implied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fR
+.ad
+.RS 12n
+.rt
+Writes the resulting program to standard output instead of \fBlex.yy.c\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fR
+.ad
+.RS 12n
+.rt
+Writes a summary of \fBlex\fR statistics to the standard error. (See the
+discussion of \fBlex\fR table sizes under the heading \fBDefinitions in
+lex\fR.) If table sizes are specified in the \fBlex\fR source code, and if the
+\fB-n\fR option is not specified, the \fB-v\fR option may be enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fR
+.ad
+.RS 12n
+.rt
+Generates a program that can handle \fBEUC\fR characters (cannot be used with
+the \fB-e\fR option). Unlike the \fB-e\fR option, \fByytext[\|]\fR is of type
+\fBwchar_t[\|]\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR \fR
+.ad
+.RS 12n
+.rt
+Prints out version information on standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-Q\fR\fB[y|n]\fR \fR
+.ad
+.RS 12n
+.rt
+Prints out version information to output file \fBlex.yy.c\fR by using
+\fB-Qy\fR. The \fB-Qn\fR option does not print out version information and is
+the default.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 9n
+.rt
+A pathname of an input file. If more than one such \fIfile\fR is specified, all
+files will be concatenated to produce a single \fBlex\fR program. If no
+\fIfile\fR operands are specified, or if a \fIfile\fR operand is \fB\(mi\fR,
+the standard input will be used.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The \fBlex\fR output files are described below.
+.SS "Stdout"
+.sp
+.LP
+If the \fB-t\fR option is specified, the text file of C source code output of
+\fBlex\fR will be written to standard output.
+.SS "Stderr"
+.sp
+.LP
+If the \fB-t\fR option is specified informational, error and warning messages
+concerning the contents of \fBlex\fR source code input will be written to the
+standard error.
+.sp
+.LP
+If the \fB-t\fR option is not specified:
+.RS +4
+.TP
+1.
+Informational error and warning messages concerning the contents of
+\fBlex\fR source code input will be written to either the standard output or
+standard error.
+.RE
+.RS +4
+.TP
+2.
+If the \fB-v\fR option is specified and the \fB-n\fR option is not
+specified, \fBlex\fR statistics will also be written to standard error. These
+statistics may also be generated if table sizes are specified with a \fB%\fR
+operator in the \fBDefinitions\fR \fBin\fR \fBlex\fR section (see \fBEXTENDED
+DESCRIPTION\fR), as long as the \fB-n\fR option is not specified.
+.RE
+.SS "Output Files"
+.sp
+.LP
+A text file containing C source code will be written to \fBlex.yy.c\fR, or to
+the standard output if the \fB-t\fR option is present.
+.SH EXTENDED DESCRIPTION
+.sp
+.LP
+Each input file contains \fBlex\fR source code, which is a table of regular
+expressions with corresponding actions in the form of C program fragments.
+.sp
+.LP
+When \fBlex.yy.c\fR is compiled and linked with the \fBlex\fR library (using
+the \fB\fR\fB-l\fR\fB l\fR operand with \fBc89\fR or \fBcc\fR), the resulting
+program reads character input from the standard input and partitions it into
+strings that match the given expressions.
+.sp
+.LP
+When an expression is matched, these actions will occur:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The input string that was matched is left in \fIyytext\fR as a null-terminated
+string; \fIyytext\fR is either an external character array or a pointer to a
+character string. As explained in \fBDefinitions in lex\fR, the type can be
+explicitly selected using the \fB%array\fR or \fB%pointer\fR declarations, but
+the default is \fB%array\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The external \fBint\fR \fIyyleng\fR is set to the length of the matching
+string.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The expression's corresponding program fragment, or action, is executed.
+.RE
+.sp
+.LP
+During pattern matching, \fBlex\fR searches the set of patterns for the single
+longest possible match. Among rules that match the same number of characters,
+the rule given first will be chosen.
+.sp
+.LP
+The general format of \fBlex\fR source is:
+.sp
+.in +2
+.nf
+\fIDefinitions\fR
+%%
+\fIRules\fR
+%%
+\fIUser Subroutines\fR
+.fi
+.in -2
+
+.sp
+.LP
+The first \fB%%\fR is required to mark the beginning of the rules (regular
+expressions and actions); the second \fB%%\fR is required only if user
+subroutines follow.
+.sp
+.LP
+Any line in the \fBDefinitions\fR \fBin\fR \fBlex\fR section beginning with a
+blank character will be assumed to be a C program fragment and will be copied
+to the external definition area of the \fBlex.yy.c\fR file. Similarly, anything
+in the \fBDefinitions\fR \fBin\fR \fBlex\fR section included between delimiter
+lines containing only \fB%{\fR and \fB%}\fR will also be copied unchanged to
+the external definition area of the \fBlex.yy.c\fR file.
+.sp
+.LP
+Any such input (beginning with a blank character or within \fB%{\fR and
+\fB%}\fR delimiter lines) appearing at the beginning of the \fIRules\fR section
+before any rules are specified will be written to \fBlex.yy.c\fR after the
+declarations of variables for the \fByylex\fR function and before the first
+line of code in \fByylex\fR. Thus, user variables local to \fByylex\fR can be
+declared here, as well as application code to execute upon entry to
+\fByylex\fR.
+.sp
+.LP
+The action taken by \fBlex\fR when encountering any input beginning with a
+blank character or within \fB%{\fR and \fB%}\fR delimiter lines appearing in
+the \fIRules\fR section but coming after one or more rules is undefined. The
+presence of such input may result in an erroneous definition of the \fByylex\fR
+function.
+.SS "Definitions in lex"
+.sp
+.LP
+\fBDefinitions\fR \fBin\fR \fBlex\fR appear before the first \fB%%\fR
+delimiter. Any line in this section not contained between \fB%{\fR and \fB%}\fR
+lines and not beginning with a blank character is assumed to define a \fBlex\fR
+substitution string. The format of these lines is:
+.sp
+.in +2
+.nf
+\fIname substitute\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If a \fIname\fR does not meet the requirements for identifiers in the ISO C
+standard, the result is undefined. The string \fIsubstitute\fR will replace the
+string \fI{\fR \fIname\fR \fI}\fR when it is used in a rule. The \fIname\fR
+string is recognized in this context only when the braces are provided and when
+it does not appear within a bracket expression or within double-quotes.
+.sp
+.LP
+In the \fBDefinitions\fR \fBin\fR \fBlex\fR section, any line beginning with a
+\fB%\fR (percent sign) character and followed by an alphanumeric word beginning
+with either \fBs\fR or \fBS\fR defines a set of start conditions. Any line
+beginning with a \fB%\fR followed by a word beginning with either \fBx\fR or
+\fBX\fR defines a set of exclusive start conditions. When the generated scanner
+is in a \fB%s\fR state, patterns with no state specified will be also active;
+in a \fB%x\fR state, such patterns will not be active. The rest of the line,
+after the first word, is considered to be one or more blank-character-separated
+names of start conditions. Start condition names are constructed in the same
+way as definition names. Start conditions can be used to restrict the matching
+of regular expressions to one or more states as described in \fBRegular
+expressions in lex\fR.
+.sp
+.LP
+Implementations accept either of the following two mutually exclusive
+declarations in the \fBDefinitions\fR \fBin\fR \fBlex\fR section:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%array\fR \fR
+.ad
+.RS 13n
+.rt
+Declare the type of \fIyytext\fR to be a null-terminated character array.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%pointer\fR \fR
+.ad
+.RS 13n
+.rt
+Declare the type of \fIyytext\fR to be a pointer to a null-terminated character
+string.
+.RE
+
+.sp
+.LP
+\fBNote:\fR When using the \fB%pointer\fR option, you may not also use the
+\fByyless\fR function to alter \fIyytext\fR.
+.sp
+.LP
+\fB%array\fR is the default. If \fB%array\fR is specified (or neither
+\fB%array\fR nor \fB%pointer\fR is specified), then the correct way to make an
+external reference to \fIyyext\fR is with a declaration of the form:
+.sp
+.LP
+\fBextern char\fR\fI yytext\fR\fB[\|]\fR
+.sp
+.LP
+If \fB%pointer\fR is specified, then the correct external reference is of the
+form:
+.sp
+.LP
+\fBextern char *\fR\fIyytext\fR\fB;\fR
+.sp
+.LP
+\fBlex\fR will accept declarations in the \fBDefinitions in lex\fR section for
+setting certain internal table sizes. The declarations are shown in the
+following table.
+.sp
+.LP
+\fBTable\fR \fBSize\fR \fBDeclaration\fR \fBin\fR \fBlex\fR
+.sp
+
+.sp
+.TS
+tab() box;
+cw(1.28i) cw(2.94i) cw(1.28i)
+lw(1.28i) lw(2.94i) lw(1.28i)
+.
+\fBDeclaration\fR\fBDescription\fR\fBDefault\fR
+_
+\fB%p\fR\fIn\fRNumber of positions2500
+\fB%n\fR\fIn\fRNumber of states500
+\fB%a\fR\fI n\fRNumber of transitions2000
+\fB%e\fR\fIn\fRNumber of parse tree nodes1000
+\fB%k\fR\fIn\fRNumber of packed character classes10000
+\fB%o\fR\fIn\fRSize of the output array3000
+.TE
+
+.sp
+.LP
+Programs generated by \fBlex\fR need either the \fB-e\fR or \fB-w\fR option to
+handle input that contains \fBEUC\fR characters from supplementary codesets. If
+neither of these options is specified, \fByytext\fR is of the type
+\fBchar[\|]\fR, and the generated program can handle only \fBASCII\fR
+characters.
+.sp
+.LP
+When the \fB-e\fR option is used, \fByytext\fR is of the type \fBunsigned\fR
+\fBchar[\|]\fR and \fByyleng\fR gives the total number of \fIbytes\fR in the
+matched string. With this option, the macros \fBinput()\fR,
+\fBunput(\fIc\fR)\fR, and \fBoutput(\fIc\fR)\fR should do a byte-based
+\fBI/O\fR in the same way as with the regular \fBASCII\fR \fBlex\fR. Two more
+variables are available with the \fB-e\fR option, \fByywtext\fR and
+\fByywleng\fR, which behave the same as \fByytext\fR and \fByyleng\fR would
+under the \fB-w\fR option.
+.sp
+.LP
+When the \fB-w\fR option is used, \fByytext\fR is of the type \fBwchar_t[\|]\fR
+and \fByyleng\fR gives the total number of \fIcharacters\fR in the matched
+string. If you supply your own \fBinput()\fR, \fBunput(\fIc\fR)\fR, or
+\fBoutput(\fR\fIc\fR\fB)\fR macros with this option, they must return or accept
+\fBEUC\fR characters in the form of wide character (\fBwchar_t\fR). This allows
+a different interface between your program and the lex internals, to expedite
+some programs.
+.SS "Rules in lex"
+.sp
+.LP
+The \fBRules\fR \fBin\fR \fBlex\fR source files are a table in which the left
+column contains regular expressions and the right column contains actions (C
+program fragments) to be executed when the expressions are recognized.
+.sp
+.in +2
+.nf
+\fIERE action\fR
+\fIERE action\fR
+\&...
+.fi
+.in -2
+
+.sp
+.LP
+The extended regular expression (ERE) portion of a row will be separated from
+\fIaction\fR by one or more blank characters. A regular expression containing
+blank characters is recognized under one of the following conditions:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The entire expression appears within double-quotes.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The blank characters appear within double-quotes or square brackets.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each blank character is preceded by a backslash character.
+.RE
+.SS "User Subroutines in lex"
+.sp
+.LP
+Anything in the user subroutines section will be copied to \fBlex.yy.c\fR
+following \fByylex\fR.
+.SS "Regular Expressions in lex"
+.sp
+.LP
+The \fBlex\fR utility supports the set of Extended Regular Expressions (EREs)
+described on \fBregex\fR(5) with the following additions and exceptions to the
+syntax:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\|.\|.\|.\fR \fR
+.ad
+.RS 14n
+.rt
+Any string enclosed in double-quotes will represent the characters within the
+double-quotes as themselves, except that backslash escapes (which appear in the
+following table) are recognized. Any backslash-escape sequence is terminated by
+the closing quote. For example, "\|\e\|01""1" represents a single string: the
+octal value 1 followed by the character 1.
+.RE
+
+.sp
+.LP
+\fI<\fR\fIstate\fR\fI>\fR\fIr\fR
+.sp
+.ne 2
+.mk
+.na
+\fB<\fIstate1\fR, \fIstate2\fR, \|.\|.\|.\|>\fIr\fR\fR
+.ad
+.sp .6
+.RS 4n
+The regular expression \fIr\fR will be matched only when the program is in one
+of the start conditions indicated by \fIstate\fR, \fIstate1\fR, and so forth.
+For more information, see \fBActions in lex\fR. As an exception to the
+typographical conventions of the rest of this document, in this case
+<\fIstate\fR> does not represent a metavariable, but the literal angle-bracket
+characters surrounding a symbol. The start condition is recognized as such only
+at the beginning of a regular expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIr\fR/\fIx\fR \fR
+.ad
+.sp .6
+.RS 4n
+The regular expression \fIr\fR will be matched only if it is followed by an
+occurrence of regular expression \fIx\fR. The token returned in \fIyytext\fR
+will only match \fIr\fR. If the trailing portion of \fIr\fR matches the
+beginning of \fIx\fR, the result is unspecified. The \fIr\fR expression cannot
+include further trailing context or the \fB$\fR (match-end-of-line) operator;
+\fIx\fR cannot include the \fB^\fR (match-beginning-of-line) operator, nor
+trailing context, nor the \fB$\fR operator. That is, only one occurrence of
+trailing context is allowed in a \fBlex\fR regular expression, and the \fB^\fR
+operator only can be used at the beginning of such an expression. A further
+restriction is that the trailing-context operator \fB/\fR (slash) cannot be
+grouped within parentheses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB{\fR\fIname\fR\fB}\fR \fR
+.ad
+.sp .6
+.RS 4n
+When \fIname\fR is one of the substitution symbols from the \fIDefinitions\fR
+section, the string, including the enclosing braces, will be replaced by the
+\fIsubstitute\fR value. The \fIsubstitute\fR value will be treated in the
+extended regular expression as if it were enclosed in parentheses. No
+substitution will occur if \fB{\fR\fIname\fR\fB}\fR occurs within a bracket
+expression or within double-quotes.
+.RE
+
+.sp
+.LP
+Within an \fBERE,\fR a backslash character (\fB\|\e\e\fR, \fB\e\|a\fR,
+\fB\e\|b\fR, \fB\e\|f\fR, \fB\e\|n\fR, \fB\e\|r\fR, \fB\e\|t\fR, \fB\e\|v\fR)
+is considered to begin an escape sequence. In addition, the escape sequences in
+the following table will be recognized.
+.sp
+.LP
+A literal newline character cannot occur within an \fBERE;\fR the escape
+sequence \fB\e\|n\fR can be used to represent a newline character. A newline
+character cannot be matched by a period operator.
+.sp
+.LP
+\fBEscape Sequences in lex\fR
+.sp
+
+.sp
+.TS
+tab() box;
+cw(1.22i) cw(2.92i) cw(1.36i)
+cw(1.22i) cw(2.92i) cw(1.36i)
+.
+Escape Sequences in lex
+_
+Escape SequenceDescription Meaning
+_
+\e\fIdigits\fRT{
+A backslash character followed by the longest sequence of one, two or three octal-digit characters (01234567). Ifall of the digits are 0, (that is, representation of the NUL character), the behavior is undefined.
+T}T{
+The character whose encoding is represented by the one-, two- or three-digit octal integer. Multi-byte characters require multiple, concatenated escape sequences of this type, including the leading \e for each byte.
+T}
+_
+\e\fBx\fR\fIdigits\fRT{
+A backslash character followed by the longest sequence of hexadecimal-digit characters (01234567abcdefABCDEF). If all of the digits are 0, (that is, representation of the NUL character), the behavior is undefined.
+T}T{
+The character whose encoding is represented by the hexadecimal integer.
+T}
+_
+\e\fIc\fRT{
+A backslash character followed by any character not described in this table. (\e\e, \ea, \eb, \ef, \een, \er, \et, \ev).
+T}The character c, unchanged.
+.TE
+
+.sp
+.LP
+The order of precedence given to extended regular expressions for \fBlex\fR is
+as shown in the following table, from high to low.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNote\fR: \fR
+.ad
+.RS 10n
+.rt
+The escaped characters entry is not meant to imply that these are operators,
+but they are included in the table to show their relationships to the true
+operators. The start condition, trailing context and anchoring notations have
+been omitted from the table because of the placement restrictions described in
+this section; they can only appear at the beginning or ending of an \fBERE.\fR
+.RE
+
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+ERE Precedence in lex
+_
+\fIcollation-related bracket symbols\fR\fB[= =] [: :] [. .]\fR
+\fIescaped characters\fR\fB\e<\fR\fIspecial character\fR>
+\fIbracket expression\fR\fB[ ]\fR
+\fIquoting\fR\fB".\|.\|."\fR
+\fIgrouping\fR\fB()\fR
+\fIdefinition\fR\fB{\fR\fIname\fR}
+\fIsingle-character RE duplication\fR\fB* + ?\fR
+\fIconcatenation\fR
+\fIinterval expression\fR\fB{\fR\fIm\fR,\fIn\fR}
+\fIalternation\fR\fB|\fR
+.TE
+
+.sp
+.LP
+The \fBERE\fR anchoring operators (\fB\|^\fR and \fB$\fR\|) do not appear in
+the table. With \fBlex\fR regular expressions, these operators are restricted
+in their use: the \fB^\fR operator can only be used at the beginning of an
+entire regular expression, and the \fB$\fR operator only at the end. The
+operators apply to the entire regular expression. Thus, for example, the
+pattern (\fB^abc)|(def$\fR) is undefined; it can instead be written as two
+separate rules, one with the regular expression \fB^abc\fR and one with
+\fBdef$\fR, which share a common action via the special \fB|\fR action (see
+below). If the pattern were written \fB^abc|def$\fR, it would match either of
+\fBabc\fR or \fBdef\fR on a line by itself.
+.sp
+.LP
+Unlike the general \fBERE\fR rules, embedded anchoring is not allowed by most
+historical \fBlex\fR implementations. An example of embedded anchoring would be
+for patterns such as (^)foo($) to match \fBfoo\fR when it exists as a complete
+word. This functionality can be obtained using existing \fBlex\fR features:
+.sp
+.in +2
+.nf
+^foo/[ \e\|n]|
+" foo"/[ \e\|n] /* found foo as a separate word */
+.fi
+.in -2
+
+.sp
+.LP
+Notice also that \fB$\fR is a form of trailing context (it is equivalent to
+\fB/\e\|n\fR and as such cannot be used with regular expressions containing
+another instance of the operator (see the preceding discussion of trailing
+context).
+.sp
+.LP
+The additional regular expressions trailing-context operator \fB/\fR (slash)
+can be used as an ordinary character if presented within double-quotes,
+\fB"\|/\|"\fR; preceded by a backslash, \fB\e\|/\fR; or within a bracket
+expression, \fB[\|/\|]\fR. The start-condition \fB<\fR and \fB>\fR operators
+are special only in a start condition at the beginning of a regular expression;
+elsewhere in the regular expression they are treated as ordinary characters.
+.sp
+.LP
+The following examples clarify the differences between \fBlex\fR regular
+expressions and regular expressions appearing elsewhere in this document. For
+regular expressions of the form \fIr\fR/\fIx\fR, the string matching \fIr\fR is
+always returned; confusion may arise when the beginning of \fIx\fR matches the
+trailing portion of \fIr\fR. For example, given the regular expression a*b/cc
+and the input \fBaaabcc\fR, \fIyytext\fR would contain the string \fBaaab\fR on
+this match. But given the regular expression x*/xy and the input \fBxxxy\fR,
+the token \fBxxx\fR, not \fBxx\fR, is returned by some implementations because
+\fBxxx\fR matches x*.
+.sp
+.LP
+In the rule ab*/bc, the b* at the end of \fIr\fR will extend \fIr\fR's match
+into the beginning of the trailing context, so the result is unspecified. If
+this rule were ab/bc, however, the rule matches the text \fBab\fR when it is
+followed by the text \fBbc\fR. In this latter case, the matching of \fIr\fR
+cannot extend into the beginning of \fIx\fR, so the result is specified.
+.SS "Actions in lex"
+.sp
+.LP
+The action to be taken when an \fBERE\fR is matched can be a C program fragment
+or the special actions described below; the program fragment can contain one or
+more C statements, and can also include special actions. The empty C statement
+\fB;\fR is a valid action; any string in the \fBlex.yy.c\fR input that matches
+the pattern portion of such a rule is effectively ignored or skipped. However,
+the absence of an action is not valid, and the action \fBlex\fR takes in such a
+condition is undefined.
+.sp
+.LP
+The specification for an action, including C statements and special actions,
+can extend across several lines if enclosed in braces:
+.sp
+.in +2
+.nf
+ERE <one or more blanks> { program statement
+program statement }
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The default action when a string in the input to a \fBlex.yy.c\fR program is
+not matched by any expression is to copy the string to the output. Because the
+default behavior of a program generated by \fBlex\fR is to read the input and
+copy it to the output, a minimal \fBlex\fR source program that has just
+\fB%%\fR generates a C program that simply copies the input to the output
+unchanged.
+.sp
+.LP
+Four special actions are available:
+.sp
+.in +2
+.nf
+| ECHO; REJECT; BEGIN
+.fi
+.in -2
+.sp
+
+.sp
+.ne 2
+.mk
+.na
+\fB|\fR
+.ad
+.RS 12n
+.rt
+The action | means that the action for the next rule is the action for this
+rule. Unlike the other three actions, | cannot be enclosed in braces or be
+semicolon-terminated. It must be specified alone, with no other actions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBECHO;\fR \fR
+.ad
+.RS 12n
+.rt
+Writes the contents of the string \fIyytext\fR on the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBREJECT;\fR \fR
+.ad
+.RS 12n
+.rt
+Usually only a single expression is matched by a given string in the input.
+\fBREJECT\fR means "continue to the next expression that matches the current
+input," and causes whatever rule was the second choice after the current rule
+to be executed for the same input. Thus, multiple rules can be matched and
+executed for one input string or overlapping input strings. For example, given
+the regular expressions \fBxyz\fR and \fBxy\fR and the input \fBxyz\fR, usually
+only the regular expression \fBxyz\fR would match. The next attempted match
+would start after z. If the last action in the \fBxyz\fR rule is \fBREJECT\fR ,
+both this rule and the \fBxy\fR rule would be executed. The \fBREJECT\fR action
+may be implemented in such a fashion that flow of control does not continue
+after it, as if it were equivalent to a \fBgoto\fR to another part of
+\fByylex\fR. The use of \fBREJECT\fR may result in somewhat larger and slower
+scanners.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBBEGIN\fR \fR
+.ad
+.RS 12n
+.rt
+The action:
+.sp
+\fBBEGIN\fR \fInewstate\fR\fB;\fR
+.sp
+switches the state (start condition) to \fInewstate\fR. If the string
+\fInewstate\fR has not been declared previously as a start condition in the
+\fBDefinitions\fR \fBin\fR \fBlex\fR section, the results are unspecified. The
+initial state is indicated by the digit \fB0\fR or the token \fBINITIAL\fR.
+.RE
+
+.sp
+.LP
+The functions or macros described below are accessible to user code included in
+the \fBlex\fR input. It is unspecified whether they appear in the C code output
+of \fBlex\fR, or are accessible only through the \fB\fR\fB-l\fR\fB l\fR operand
+to \fBc89\fR or \fBcc\fR (the \fBlex\fR library).
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR \fByylex(void)\fR \fR
+.ad
+.RS 21n
+.rt
+Performs lexical analysis on the input; this is the primary function generated
+by the \fBlex\fR utility. The function returns zero when the end of input is
+reached; otherwise it returns non-zero values (tokens) determined by the
+actions that are selected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR \fByymore(void)\fR \fR
+.ad
+.RS 21n
+.rt
+When called, indicates that when the next input string is recognized, it is to
+be appended to the current value of \fIyytext\fR rather than replacing it; the
+value in \fIyyleng\fR is adjusted accordingly.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR\fIyyless(int\fR\fB n\fR\fI)\fR \fR
+.ad
+.RS 21n
+.rt
+Retains \fIn\fR initial characters in \fIyytext\fR, NUL-terminated, and treats
+the remaining characters as if they had not been read; the value in
+\fIyyleng\fR is adjusted accordingly.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR \fBinput(void)\fR \fR
+.ad
+.RS 21n
+.rt
+Returns the next character from the input, or zero on end-of-file. It obtains
+input from the stream pointer \fIyyin\fR, although possibly via an intermediate
+buffer. Thus, once scanning has begun, the effect of altering the value of
+\fIyyin\fR is undefined. The character read is removed from the input stream of
+the scanner without any processing by the scanner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR \fBunput(int\fR \fB\fIc\fR\fR\fB)\fR \fR
+.ad
+.RS 21n
+.rt
+Returns the character \fIc\fR to the input; \fIyytext\fR and \fIyyleng\fR are
+undefined until the next expression is matched. The result of using \fIunput\fR
+for more characters than have been input is unspecified.
+.RE
+
+.sp
+.LP
+The following functions appear only in the \fBlex\fR library accessible through
+the \fB\fR\fB-l\fR\fB l\fR operand; they can therefore be redefined by a
+portable application:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR \fByywrap(void)\fR \fR
+.ad
+.sp .6
+.RS 4n
+Called by \fByylex\fR at end-of-file; the default \fByywrap\fR always will
+return 1. If the application requires \fByylex\fR to continue processing with
+another source of input, then the application can include a function
+\fByywrap\fR, which associates another file with the external variable
+\fBFILE\fR *\fIyyin\fR and will return a value of zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR \fBmain(int\fR \fB\fIargc\fR,\fR \fBchar\fR \fB*\fIargv\fR[\|])\fR
+\fR
+.ad
+.sp .6
+.RS 4n
+Calls \fByylex\fR to perform lexical analysis, then exits. The user code can
+contain \fBmain\fR to perform application-specific operations, calling
+\fByylex\fR as applicable.
+.RE
+
+.sp
+.LP
+The reason for breaking these functions into two lists is that only those
+functions in \fBlibl.a\fR can be reliably redefined by a portable application.
+.sp
+.LP
+Except for \fBinput\fR, \fBunput\fR and \fBmain\fR, all external and static
+names generated by \fBlex\fR begin with the prefix \fByy\fR or \fBYY\fR.
+.SH USAGE
+.sp
+.LP
+Portable applications are warned that in the \fBRules in lex\fR section, an
+\fBERE\fR without an action is not acceptable, but need not be detected as
+erroneous by \fBlex\fR. This may result in compilation or run-time errors.
+.sp
+.LP
+The purpose of \fBinput\fR is to take characters off the input stream and
+discard them as far as the lexical analysis is concerned. A common use is to
+discard the body of a comment once the beginning of a comment is recognized.
+.sp
+.LP
+The \fBlex\fR utility is not fully internationalized in its treatment of
+regular expressions in the \fBlex\fR source code or generated lexical analyzer.
+It would seem desirable to have the lexical analyzer interpret the regular
+expressions given in the \fBlex\fR source according to the environment
+specified when the lexical analyzer is executed, but this is not possible with
+the current \fBlex\fR technology. Furthermore, the very nature of the lexical
+analyzers produced by \fBlex\fR must be closely tied to the lexical
+requirements of the input language being described, which will frequently be
+locale-specific anyway. (For example, writing an analyzer that is used for
+French text will not automatically be useful for processing other languages.)
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing lex
+.sp
+.LP
+The following is an example of a \fBlex\fR program that implements a
+rudimentary scanner for a Pascal-like syntax:
+
+.sp
+.in +2
+.nf
+%{
+/* need this for the call to atof() below */
+#include <math.h>
+/* need this for printf(), fopen() and stdin below */
+#include <stdio.h>
+%}
+
+DIGIT [0-9]
+ID [a-z][a-z0-9]*
+%%
+
+{DIGIT}+ {
+ printf("An integer: %s (%d)\en", yytext,
+ atoi(yytext));
+ }
+
+{DIGIT}+"."{DIGIT}* {
+ printf("A float: %s (%g)\en", yytext,
+ atof(yytext));
+ }
+
+if|then|begin|end|procedure|function {
+ printf("A keyword: %s\en", yytext);
+ }
+
+{ID} printf("An identifier: %s\en", yytext);
+
+"+"|"-"|"*"|"/" printf("An operator: %s\en", yytext);
+
+"{"[^}\en]*"}" /* eat up one-line comments */
+
+[ \et\en]+ /* eat up white space */
+
+\&. printf("Unrecognized character: %s\en", yytext);
+
+%%
+
+int main(int argc, char *argv[\|])
+{
+ ++argv, --argc; /* skip over program name */
+ if (argc > 0)
+ yyin = fopen(argv[0], "r");
+ else
+ yyin = stdin;
+
+ yylex();
+}
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBlex\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fByacc\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBregex\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+If routines such as \fByyback()\fR, \fByywrap()\fR, and \fByylock()\fR
+in \fB\|.l\fR (ell) files are to be external C functions, the command line to
+compile a C++ program must define the \fB__EXTERN_C__\fR macro. For example:
+.sp
+.in +2
+.nf
+example% \fBCC -D__EXTERN_C__ ... file\fR
+.fi
+.in -2
+.sp
+
diff --git a/usr/src/man/man1/lgrpinfo.1 b/usr/src/man/man1/lgrpinfo.1
new file mode 100644
index 0000000000..d303879c3e
--- /dev/null
+++ b/usr/src/man/man1/lgrpinfo.1
@@ -0,0 +1,619 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lgrpinfo 1 "11 Sep 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+lgrpinfo \- display information about locality groups
+.SH SYNOPSIS
+.LP
+.nf
+\fBlgrpinfo\fR [\fB-aceGlLmrt\fR] [\fB-u \fR\fIunit\fR] [\fB-C\fR | \fB-P\fR] \fIlgrp\fR ...
+.fi
+
+.LP
+.nf
+\fBlgrpinfo\fR \fB-h\fR
+.fi
+
+.LP
+.nf
+\fBlgrpinfo\fR \fB-I\fR [\fB-c\fR] [\fB-G\fR] [\fB-C\fR | \fB-P\fR] \fIlgrp\fR ...
+.fi
+
+.LP
+.nf
+\fBlgrpinfo\fR [\fB-T\fR] [\fB-aceGlLmr\fR] [\fB-u \fR\fIunit\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBlgrpinfo\fR prints information about the locality group (\fBlgroup\fR)
+hierarchy and its contents.
+.sp
+.LP
+An lgroup represents the set of CPU and memory-like hardware devices that are
+at most some distance (latency) apart from each other. All lgroups in the
+system are identified by a unique integer called an \fBlgroup ID\fR.
+.sp
+.LP
+lgroups are organized into a hierarchy to facilitate finding the nearest
+resources. Leaf lgroups each contain a set of resources that are closest
+(local) to each other. Each parent lgroup in the hierarchy contains the
+resources of its child lgroups plus their next nearest resources. Finally, the
+\fBroot\fR lgroup contains all the resources in the domain within the largest
+latency.
+.sp
+.LP
+A Uniform Memory Access (UMA) machine is simply represented by the root lgroup.
+A Non Uniform Memory Access (NUMA) machine is represented by a hierarchy of
+lgroups to show the corresponding levels of locality. For example, a NUMA
+machine with two latencies (local and remote) has an \fBlgroup\fR hierarchy
+consisting of two levels with its leaves and the root.
+.sp
+.LP
+Every application thread is assigned a \fBhome\fR lgroup. When the system needs
+to allocate a CPU or memory resource for a thread, it searches lgroup hierarchy
+from the thread's home lgroup for the closest available resources to the
+thread's home. See \fBplgrp\fR(1) for details.
+.sp
+.LP
+Without arguments, \fBlgrpinfo\fR prints general information about all lgroups
+in the system. If any lgroup IDs are specified on the command line, the command
+only prints information about the specified lgroups. Various options control
+which lgroups are displayed and the exact information that is printed for each
+lgroup.
+.sp
+.LP
+lgroups can be specified on the command line as lgroup IDs or by using specific
+keywords. See \fBOPERANDS\fR.
+.SH OPTIONS
+.sp
+.LP
+You can combine options together and the order in which options are specified
+is not important. Lowercase options select what information should be printed
+about lgroups.
+.sp
+.LP
+Invoking \fBlgrpinfo\fR without arguments is equivalent to:
+.sp
+.in +2
+.nf
+lgrpinfo -c -e -l -m -r -t all
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 12n
+.rt
+Print topology, CPU, memory, load and latency information.
+.sp
+This option is a shorthand for
+.sp
+.in +2
+.nf
+lgrpinfo -t -c -e -m -r -l -L
+.fi
+.in -2
+.sp
+
+unless \fB-T\fR is specified as well. When \fB-T\fR is specified, the \fB-t\fR
+option is not included.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 12n
+.rt
+Print CPU information.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 12n
+.rt
+Replace each lgroup in the list with its children.
+.sp
+This option cannot be used with the \fB-P\fR or the \fB-T\fR option. When no
+arguments are specified, this option is applied to the lgroups displayed by
+default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 12n
+.rt
+Print lgroup load average. The lgroup load averages are only displayed for leaf
+lgroups.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR\fR
+.ad
+.RS 12n
+.rt
+Print OS view of lgroup hierarchy.
+.sp
+By default, the caller's view of the lgroup hierarchy is displayed which only
+includes what the caller can use, for example, only the CPUs in the caller's
+processor set is displayed. See \fBlgrp_init\fR(3LGRP) on the operating system
+and the caller's view.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 12n
+.rt
+Print short help message and exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.RS 12n
+.rt
+Print matching IDs only.
+.sp
+This option is intended for scripts and can be used with \fB-c\fR, \fB-G\fR,
+and \fB-C\fR or \fB-P\fR. If \fB-c\fR is specified, print list of CPUs
+contained in all matching lgroups. Otherwise, the IDs for the matching lgroups
+is displayed. See \fBEXAMPLES\fR.
+.sp
+When no arguments are specified, this option is applied to the lgroups
+displayed, which, by default is all lgroups.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 12n
+.rt
+Print information about lgroup latencies.
+.sp
+The latency value specified for each lgroup is defined by the operating system
+and is platform-specific. It can only be used for relative comparison of
+lgroups on the running system. It does not necessarily represent the actual
+latency between hardware devices and might not be applicable across platforms.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 12n
+.rt
+Print the lgroup latency table. The lgroup latency table displays the relative
+latency from each lgroup to each of the other lgroups including itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 12n
+.rt
+Print memory information.
+.sp
+Memory sizes are scaled to the unit of measure that yields an integer from
+\fB0\fR to \fB1023\fR unless the \fB-u\fR option is specified as well. The
+fractional part of the number is only displayed for values less than \fB10\fR.
+This behavior is similiar to using the \fB-h\fR option of \fBls\fR(1) or
+\fBdf\fR(1M) to display a human readable format.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 12n
+.rt
+Replace each lgroup in the list with its parents.
+.sp
+This option cannot be used with the \fB-C\fR or \fB-T\fR option. When no
+arguments are specified, this option is applied to the lgroups displayed,
+which, by default is all lgroups.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 12n
+.rt
+Print information about lgroup resources.
+.sp
+The resources are represented by a set of lgroups in which each member lgroup
+directly contains CPU and memory resources. If \fB-T\fR is specified as well,
+only information about resources of the intermediate lgroups is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 12n
+.rt
+Print information about lgroup topology.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 12n
+.rt
+Print the lgroup topology of a system graphically as a tree. This option can
+only be used with the \fB-a\fR, \fB-c\fR, \fB-e\fR, \fB-G\fR,
+\fB-l\fR,\fB-L\fR, \fB-m\fR, \fB-r\fR, and \fB-u\fR options. It only prints
+lgroup resources for intermediate lgroups when used with the \fB-r\fR. The
+\fB-t\fR option is omitted when \fB-T\fR is used with \fB-a\fR. No information
+is printed for the \fBroot\fR lgroup unless it is the only lgroup.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIunits\fR\fR
+.ad
+.RS 12n
+.rt
+Specify memory units. Units should be b, k, m, g, t, p, or e for bytes,
+kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes
+respectively. The fractional part of the number is only displayed for values
+less than 10. This behavior is similiar to using the \fB-h\fR option of
+\fBls\fR(1) or \fBdf\fR(1M) to display a human readable format.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlgrp\fR\fR
+.ad
+.RS 8n
+.rt
+lgroups can be specified on the command line as lgroup ID, by using one of the
+following keywords:
+.sp
+.ne 2
+.mk
+.na
+\fBall\fR
+.ad
+.RS 16n
+.rt
+All lgroups.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBintermediate\fR
+.ad
+.RS 16n
+.rt
+All intermediate lgroups. An intermediate lgroup is an lgroup that has a parent
+and children.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBleaves\fR
+.ad
+.RS 16n
+.rt
+All leaf lgroups. A leaf lgroup is an lgroup that has no children in the lgroup
+hierarchy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBroot\fR
+.ad
+.RS 16n
+.rt
+Root lgroup. Root lgroup contains all the resources in the domain within the
+largest latency and has no parent lgroup.
+.RE
+
+.RE
+
+.sp
+.LP
+If an invalid lgroup is specified, the lgrpinfo command prints a message on
+standard error showing the invalid ID and continues processing other lgroups
+specified on the command line. When none of the specified lgroups are valid,
+\fBlgrpinfo\fR exits with an exit status of \fB2\fR.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting Information about lgroups
+.sp
+.LP
+The following example prints general information about lgroups in the system.
+
+.sp
+.LP
+In this example, the system is a 2 CPU AMD Opteron machine with two nodes, each
+having one CPU and 2 gigabytes of memory. Each of these nodes is represented by
+a leaf lgroup. The root lgroup contains all the resources in the machine:
+
+.sp
+.in +2
+.nf
+$ lgrpinfo
+ lgroup 0 (root):
+ Children: 1 2
+ CPUs: 0 1
+ Memory: installed 4.0G, allocated 2.2G, free 1.8G
+ Lgroup resources: 1 2 (CPU); 1 2 (memory)
+ Latency: 83
+ lgroup 1 (leaf):
+ Children: none, Parent: 0
+ CPU: 0
+ Memory: installed 2.0G, allocated 1.2G, free 788M
+ Lgroup resources: 1 (CPU); 1 (memory)
+ Load: 0.793
+ Latency: 56
+ lgroup 2 (leaf):
+ Children: none, Parent: 0
+ CPU: 1
+ Memory: installed 2.0G, allocated 1017M, free 1.0G
+ Lgroup resources: 2 (CPU); 2 (memory)
+ Load: 0.817
+ Latency: 56
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRPrinting lgroup Topology
+.sp
+.LP
+The following example prints the lgroup topology tree on a 4 CPU AMD Opteron
+machine:
+
+.sp
+.in +2
+.nf
+$ lgrpinfo -T
+ 0
+ |-- 5
+ | `-- 1
+ |-- 6
+ | `-- 2
+ |-- 7
+ | `-- 3
+ `-- 8
+ `-- 4
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrinting lgroup Topology
+.sp
+.LP
+The following example prints the lgroup topology tree, resources, memory and
+CPU information on a 2 CPU AMD Opteron machine:
+
+.sp
+.in +2
+.nf
+$ lgrpinfo -Ta
+ 0
+ |-- 1
+ | CPU: 0
+ | Memory: installed 2.0G, allocated 1.2G, free 790M
+ | Load: 0.274
+ | Latency: 56
+ `-- 2
+ CPU: 1
+ Memory: installed 2.0G, allocated 1019M, free 1.0G
+ Load: 0.937
+ Latency: 56
+
+Lgroup latencies:
+
+------------
+ | 0 1 2
+ ------------
+ 0 | 83 83 83
+ 1 | 83 56 83
+ 2 | 83 83 56
+ ------------
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRPrinting lgroup IDs
+.sp
+.LP
+The following example prints lgroup IDs for children of the root lgroup:
+
+.sp
+.in +2
+.nf
+$ lgrpinfo -I -C root
+ 1 2
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRPrinting CPU IDs
+.sp
+.LP
+The following example prints CPU IDs for all CPUs in lgroup 1:
+
+.sp
+.in +2
+.nf
+$ lgrpinfo -c -I 1
+ 0
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRPrinting Information about lgropu Latencies
+.sp
+.LP
+The following example prints information about lgroup latencies:
+
+.sp
+.in +2
+.nf
+ $ lgrpinfo -l
+ lgroup 0 (root):
+ Latency: 83
+ lgroup 1 (leaf):
+ Latency: 56
+ lgroup 2 (leaf):
+ Latency: 5
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Unable to get lgroup information from the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+All lgroups specified are invalid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid syntax.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBls\fR(1), \fBplgrp\fR(1), \fBpmap\fR(1), \fBproc\fR(1), \fBps\fR(1),
+\fBdf\fR(1M), \fBprstat\fR(1M), \fBlgrp_init\fR(3LGRP), \fBliblgrp\fR(3LIB),
+\fBproc\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/limit.1 b/usr/src/man/man1/limit.1
new file mode 100644
index 0000000000..5a86860e8a
--- /dev/null
+++ b/usr/src/man/man1/limit.1
@@ -0,0 +1,934 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH limit 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+limit, ulimit, unlimit \- set or get limitations on the system resources
+available to the current shell and its descendents
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ulimit\fR [\fB-f\fR] [\fIblocks\fR]
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBulimit\fR [\fB-\fR [HS] [a | cdfnstv]]
+.fi
+
+.LP
+.nf
+\fBulimit\fR [\fB-\fR [HS] [c | d | f | n | s | t | v]] \fIlimit\fR
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBlimit\fR [\fB-h\fR] [\fIresource\fR [\fIlimit\fR]]
+.fi
+
+.LP
+.nf
+\fBunlimit\fR [\fB-h\fR] [\fIresource\fR]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBulimit\fR [\fB-HSacdfnstv\fR] [\fIlimit\fR]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBulimit\fR [\fB-HSacdfmnpstv\fR] [\fIlimit\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/ulimit"
+.sp
+.LP
+The \fBulimit\fR utility sets or reports the file-size writing limit imposed on
+files written by the shell and its child processes (files of any size can be
+read). Only a process with appropriate privileges can increase the limit.
+.SS "sh"
+.sp
+.LP
+The Bourne shell built-in function, \fBulimit\fR, prints or sets hard or soft
+resource limits. These limits are described in \fBgetrlimit\fR(2).
+.sp
+.LP
+If \fIlimit\fR is not present, \fBulimit\fR prints the specified limits. Any
+number of limits can be printed at one time. The \fB-a\fR option prints all
+limits.
+.sp
+.LP
+If \fIlimit\fR is present, \fBulimit\fR sets the specified limit to\fIlimit\fR.
+The string \fBunlimited\fR requests that the current limit, if any, be removed.
+Any user can set a soft limit to any value less than or equal to the hard
+limit. Any user can lower a hard limit. Only a user with appropriate privileges
+can raise or remove a hard limit. See \fBgetrlimit\fR(2).
+.sp
+.LP
+The \fB-H\fR option specifies a hard limit. The \fB-S\fR option specifies a
+soft limit. If neither option is specified, \fBulimit\fR sets both limits and
+prints the soft limit.
+.sp
+.LP
+The following options specify the resource whose limits are to be printed or
+set. If no option is specified, the file size limit is printed or set.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum core file size (in 512-byte blocks)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum size of data segment or heap (in Kbytes)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum file size (in 512-byte blocks)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum file descriptor plus 1
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum size of stack segment (in Kbytes)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum CPU time (in seconds)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Maximum size of virtual memory (in Kbytes)
+.RE
+
+.SS "csh"
+.sp
+.LP
+The C-shell built-in function, \fBlimit\fR, limits the consumption by the
+current process or any process it spawns, each not to exceed \fIlimit\fR on the
+specified \fIresource\fR. The string \fBunlimited\fR requests that the current
+limit, if any, be removed. If \fIlimit\fR is omitted, prints the current limit.
+If \fIresource\fR is omitted, displays all limits.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Use hard limits instead of the current limits. Hard limits impose a ceiling on
+the values of the current limits. Only the privileged user can raise the hard
+limits.
+.RE
+
+.sp
+.LP
+\fIresource\fR is one of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcputime\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum \fBCPU\fR seconds per process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfilesize\fR\fR
+.ad
+.RS 16n
+.rt
+Largest single file allowed. Limited to the size of the filesystem (see
+\fBdf\fR(1M)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdatasize\fR\fR
+.ad
+.RS 16n
+.rt
+The maximum size of a process's heap in kilobytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstacksize\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum stack size for the process. The default stack size is 2^64.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcoredumpsize\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum size of a core dump (file). This is limited to the size of the
+filesystem.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdescriptors\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum number of file descriptors. Run the \fBsysdef\fR(1M) command to obtain
+the maximum possible limits for your system. The values reported are in
+hexadecimal, but can be translated into decimal numbers using the \fBbc\fR(1)
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmemorysize\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum size of virtual memory.
+.RE
+
+.sp
+.LP
+\fIlimit\fR is a number, with an optional scaling factor, as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBh\fR\fR
+.ad
+.RS 9n
+.rt
+Hours (for \fBcputime\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBk\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR kilobytes. This is the default for all but \fBcputime\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBm\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR megabytes or minutes (for \fBcputime\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR\fB:\fR\fIss\fR\fR
+.ad
+.RS 9n
+.rt
+Minutes and seconds (for \fBcputime\fR).
+.RE
+
+.sp
+.LP
+\fBunlimit\fR removes a limitation on \fIresource\fR. If no \fIresource\fR is
+specified, then all resource limitations are removed. See the description of
+the \fBlimit\fR command for the list of resource names.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Remove corresponding hard limits. Only the privileged user can do this.
+.RE
+
+.SS "ksh"
+.sp
+.LP
+The Korn shell built-in function, \fBulimit\fR, sets or displays a resource
+limit. The available resources limits are listed below. Many systems do not
+contain one or more of these limits. The limit for a specified resource is set
+when \fIlimit\fR is specified. The value of \fIlimit\fR can be a number in the
+unit specified below with each resource, or the value \fBunlimited\fR. The
+string \fBunlimited\fR requests that the current limit, if any, be removed. The
+\fB-H\fR and \fB-S\fR flags specify whether the hard limit or the soft limit
+for the specified resource is set. A hard limit cannot be increased once it is
+set. A soft limit can be increased up to the value of the hard limit. If
+neither the \fB-H\fR or \fB-S\fR options is specified, the limit applies to
+both. The current resource limit is printed when \fIlimit\fR is omitted. In
+this case, the soft limit is printed unless \fB-H\fR is specified. When more
+than one resource is specified, then the limit name and unit is printed before
+the value.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Lists all of the current resource limits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+The number of 512-byte blocks on the size of core dumps.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+The number of K-bytes on the size of the data area.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+The number of 512-byte blocks on files written by child processes (files of any
+size can be read).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+The number of file descriptors plus 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+The number of K-bytes on the size of the stack area.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+The number of seconds (CPU time) to be used by each process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+The number of K-bytes for virtual memory.
+.RE
+
+.sp
+.LP
+If no option is specified, \fB-f\fR is assumed.
+.SS "Per-Shell Memory Parameters"
+.sp
+.LP
+The \fBheapsize\fR, \fBdatasize\fR, and \fBstacksize\fR parameters are not
+system tunables. The only controls for these are hard limits, set in a shell
+startup file, or system-wide soft limits, which, for the current version of the
+Solaris OS, is 2^64bytes.
+.SS "ksh93"
+.sp
+.LP
+\fBulimit\fR sets or displays resource limits. These limits apply to the
+current process and to each child process created after the resource limit has
+been set. If \fIlimit\fR is specified, the resource limit is set, otherwise,
+its current value is displayed on standard output.
+.sp
+.LP
+Increasing the limit for a resource usually requires special privileges. Some
+systems allow you to lower resource limits and later increase them. These are
+called soft limits. Once a hard limit is set the resource cannot be increased.
+.sp
+.LP
+Different systems allow you to specify different resources and some restrict
+how much you can raise the limit of the resource.
+.sp
+.LP
+The value of \fIlimit\fR depends on the unit of the resource listed for each
+resource. In addition, \fIlimit\fR can be "unlimited" to indicate no limit for
+that resource.
+.sp
+.LP
+If you do not specify \fB-H\fR or \fB-S\fR, \fB-S\fR is used for listing and
+both \fB-S\fR and \fB-H\fR are used for setting resources.
+.sp
+.LP
+If you do not specify any resource, the default is \fB-f.\fR
+.sp
+.LP
+The following options are available for \fBulimit\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 13n
+.rt
+Displays all current resource limits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.br
+.na
+\fB\fB--sbsize\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the socket buffer size in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--core\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the core file size in blocks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.br
+.na
+\fB\fB--data\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the data size in kbytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.br
+.na
+\fB\fB--fsize\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the file size in blocks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 13n
+.rt
+Displays or sets a hard limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.br
+.na
+\fB\fB--locks\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the number of file locks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--memlock\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the locked address space in Kbytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.br
+.na
+\fB\fB--as\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the address space limit in Kbytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.br
+.na
+\fB\fB--nofile\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the number of open files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.br
+.na
+\fB\fB--pipe\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the pipe buffer size in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.br
+.na
+\fB\fB--rss\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the resident set size in Kbytes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 13n
+.rt
+Displays or sets a soft limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--stack\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the stack size in Kbytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.br
+.na
+\fB\fB--threads\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the number of threads.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.br
+.na
+\fB\fB--cpu\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the CPU time in seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.br
+.na
+\fB\fB--nproc\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the number of processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.br
+.na
+\fB\fB--vmem\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the process size in Kbytes.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following option is supported by \fB/usr/bin/ulimit\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Sets (or reports, if no \fIblocks\fR operand is present), the file size limit
+in blocks. The \fB-f\fR option is also the default case.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported by \fB/usr/bin/ulimit\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIblocks\fR\fR
+.ad
+.RS 10n
+.rt
+The number of 512-byte blocks to use as the new file size limit.
+.RE
+
+.SH EXAMPLES
+.SS "/usr/bin/ulimit"
+.LP
+\fBExample 1 \fRLimiting the Stack Size
+.sp
+.LP
+The following example limits the stack size to 512 kilobytes:
+
+.sp
+.in +2
+.nf
+example% \fBulimit -s 512\fR
+example% \fBulimit -a\fR
+time(seconds) unlimited
+file(blocks) 100
+data(kbytes) 523256
+stack(kbytes) 512
+coredump(blocks) 200
+nofiles(descriptors) 64
+memory(kbytes) unlimited
+.fi
+.in -2
+.sp
+
+.SS "sh/ksh"
+.LP
+\fBExample 2 \fRLimiting the Number of File Descriptors
+.sp
+.LP
+The following command limits the number of file descriptors to 12:
+
+.sp
+.in +2
+.nf
+example$ \fBulimit -n 12\fR
+example$ \fBulimit -a\fR
+time(seconds) unlimited
+file(blocks) 41943
+data(kbytes) 523256
+stack(kbytes) 8192
+coredump(blocks) 200
+nofiles(descriptors) 12
+vmemory(kbytes) unlimited
+.fi
+.in -2
+.sp
+
+.SS "csh"
+.LP
+\fBExample 3 \fRLimiting the Core Dump File Size
+.sp
+.LP
+The following command limits the size of a core dump file size to 0 kilobytes:
+
+.sp
+.in +2
+.nf
+example% \fBlimit coredumpsize 0\fR
+example% \fBlimit\fR
+cputime unlimited
+filesize unlimited
+datasize 523256 kbytes
+stacksize 8192 kbytes
+coredumpsize 0 kbytes
+descriptors 64
+memorysize unlimited
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRRemoving the limitation for core file size
+.sp
+.LP
+The following command removes the above limitation for the core file size:
+
+.sp
+.in +2
+.nf
+example% \fBunlimit coredumpsize\fR
+example% \fBlimit\fR
+cputime unlimited
+filesize unlimited
+datasize 523256 kbytes
+stacksize 8192 kbytes
+coredumpsize unlimited
+descriptors 64
+memorysize unlimited
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBulimit\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned by \fBulimit\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+A request for a higher limit was rejected or an error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/ulimit, csh, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbc\fR(1), \fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1),
+\fBdf\fR(1M), \fBsu\fR(1M), \fBswap\fR(1M), \fBsysdef\fR(1M),
+\fBgetrlimit\fR(2), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/line.1 b/usr/src/man/man1/line.1
new file mode 100644
index 0000000000..79450ea09a
--- /dev/null
+++ b/usr/src/man/man1/line.1
@@ -0,0 +1,55 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH line 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+line \- read one line
+.SH SYNOPSIS
+.LP
+.nf
+\fBline\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBline\fR utility copies one line (up to and including a new-line) from
+the standard input and writes it on the standard output. It returns an exit
+status of 1 on \fB\fR\fBEOF\fR\fB\fR and always prints at least a new-line. It
+is often used within shell files to read from the user's terminal.
+.SH EXIT STATUS
+.sp
+.LP
+Exit status is:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+End-of-file on input.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsh\fR(1), \fBread\fR(2), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/list_devices.1 b/usr/src/man/man1/list_devices.1
new file mode 100644
index 0000000000..43561c0045
--- /dev/null
+++ b/usr/src/man/man1/list_devices.1
@@ -0,0 +1,409 @@
+'\" te
+.\" Copyright 2007 Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH list_devices 1 "30 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+list_devices \- list allocatable devices
+.SH SYNOPSIS
+.LP
+.nf
+\fBlist_devices\fR [\fB-s\fR] [\fB-U\fR \fIuid\fR] [\fB-z\fR \fIzonename\fR] [\fB-a\fR [\fB-w\fR]]
+ \fB-l\fR | \fB-n\fR | \fB-u\fR [\fIdevice\fR] | [\fB-l\fR | \fB-n\fR | \fB-u\fR] \fB-c\fR \fIdev-class\fR
+.fi
+
+.LP
+.nf
+\fBlist_devices\fR [\fB-s\fR] \fB-d\fR \fIdev-type\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlist_devices\fR utility lists the allocatable devices in the system
+according to specified qualifications.
+.sp
+.LP
+The \fIdevice\fR and all device special files associated with the device are
+listed. The device argument is optional and, if it is not present, all relevant
+devices are listed. If \fIdev-class\fR is present, devices belonging to the
+specified \fIdev-class\fR are listed. There is no default \fIdev-class\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR [\fB-c\fR \fIdev-class\fR | \fIdevice\fR]\fR
+.ad
+.RS 30n
+.rt
+Lists the pathnames of the device special files associated with the
+\fIdevice\fR that are allocatable to the current process.
+.sp
+If \fIdev-class\fR is specified, lists only the files associated with all
+devices of the specified device class.
+.sp
+If \fIdevice\fR is specified, lists only the files associated with the
+specified device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR [\fB-c\fR \fIdev-class\fR | \fIdevice\fR]\fR
+.ad
+.RS 30n
+.rt
+Lists the pathnames of the device special files associated with the device that
+are allocatable to the current process but are not currently allocated.
+.sp
+If \fIdev-class\fR is specified, lists only the files associated with all
+devices of the specified device class.
+.sp
+If \fIdevice\fR is specified, lists only the files associated with the
+specified device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 30n
+.rt
+Silent. Suppresses any diagnostic output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR [\fB-c\fR \fIdev-class\fR | \fIdevice\fR]\fR
+.ad
+.RS 30n
+.rt
+Lists the pathnames of device special files associated with the device that are
+allocated to the owner of the current process.
+.sp
+If \fIdev-class\fR is specified, lists only the files associated with all
+devices of the specified device class.
+.sp
+If \fIdevice\fR is specified, lists only the files associated with the
+specified device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR \fIuid\fR\fR
+.ad
+.RS 30n
+.rt
+Uses the user \fBID\fR \fIuid\fR instead of the real user \fBID\fR of the
+current process when performing the \fBlist_devices\fR operation. Only a user
+with the \fBsolaris.device.revoke\fR authorization can use this option.
+.RE
+
+.sp
+.LP
+The following options are supported when the system is configured with Trusted
+Extensions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Lists attributes like authorizations, cleaning programs and labels associated
+with a device.
+.sp
+The list is a single line of semicolon (\fB;\fR) separated
+\fIkey\fR\fB=\fR\fIvalue\fR pairs for each device in the format:
+.sp
+.in +2
+.nf
+device=\fIdevice-name\fR;type=\fIdevice-type\fR;\e
+auths=\fIauths\fR;clean=\fIdevice-exec\fR;\e
+\fIdevice-attributes\fR;\e
+files=\fIdevice-list\fR
+.fi
+.in -2
+.sp
+
+where \fIdevice-attributes\fR is the contents of the \fBreserved1\fR field of
+\fBdevice_allocate\fR(4). The field is colon (\fB:\fR) separated.)
+.sp
+See \fBdevice_allocate\fR(4) for a description of these attributes and their
+format.
+.sp
+The \fB-a\fR output has the following keys:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauths\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the list of authorizations. The value is \fBauths\fR is described in
+\fBdevice_allocate\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclean\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the device cleaning script. The value is \fBdevice-exec\fR as
+described in \fBdevice_allocate\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdevice\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the device name. The value is \fBdevice-name\fR as described in
+\fBdevice_allocate\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfiles\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the device file paths. The value is \fBdevice-list\fR as described in
+\fBdevice_maps\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the device type. The value is \fBdevice-type\fR as described in
+\fBdevice_allocate\fR(4).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 15n
+.rt
+Displays the system-supplied default attributes for the device types managed by
+device allocation. If \fIdev-type\fR is specified, it lists the default
+attributes for only that device type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 15n
+.rt
+This option can be used with \fB-a\fR to list the current owner of the device
+as the key value pair \fIowner\fR\fB=\fR\fIvalue\fR. \fIvalue\fR is the
+\fBuid\fR of the current owner of the device. If the device is unallocated,
+value is \fB/FREE\fR. If the device is in error state, value is \fB/ERROR\fR.
+This option also suppresses any diagnostic output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzonename\fR\fR
+.ad
+.RS 15n
+.rt
+When specified with the \fB-l\fR option, lists only those non-allocated devices
+whose label range includes the label of the zonename, and of the allocated
+devices, only those that are allocated at the same label as that of
+\fIzonename\fR.
+.sp
+When specified with the \fB-n\fR option, lists only those non-allocated devices
+whose label range includes the label of the \fIzonename\fR.
+.sp
+When specified with the \fB-u\fR option, lists only those devices that are
+allocated at the same label as that of \fIzonename\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRListing All Devices
+.sp
+.LP
+The following example lists all devices available to the caller for allocation:
+
+.sp
+.in +2
+.nf
+% list_devices -l
+device: audio type: audio \e
+files: /dev/audio /dev/audioctl /dev/sound/0 /dev/sound/0ctl
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRListing Attributes of All Devices
+.sp
+.LP
+On a system configured with Trusted Extensions, the following example lists
+attributes of all devices available to the caller for allocation:
+
+.sp
+.in +2
+.nf
+% list_devices -al
+device=audio1;type=audio;\e
+auths=solaris.device.allocate;\e
+clean=/etc/security/lib/audio_clean;\e
+minlabel=admin_low:maxlabel=admin_high;\e
+files=/dev/audio1 /dev/audio1ctl /dev/sound/1 /dev/sound/1ctl
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRListing Attributes Including the Device Owner
+.sp
+.LP
+On a system configured with Trusted Extensions, the following example lists
+attributes including the device owner of all devices allocated to the user:
+
+.sp
+.in +2
+.nf
+% list_devices -auw
+device=audio2;type=audio;auths=solaris.device.allocate;\e
+clean=/etc/security/lib/audio_clean;\e
+minlabel=admin_low:maxlabel=admin_high:zone=public;\e
+owner=1234;\e
+files=/dev/audio2 /dev/audio2ctl /dev/sound/2 /dev/sound/2ctl
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 15n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB20\fR\fR
+.ad
+.RS 15n
+.rt
+No entry for the specified device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIother value\fR\fR
+.ad
+.RS 15n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/security/device_allocate\fR
+.sp
+.LP
+\fB/etc/security/device_maps\fR
+.sp
+.LP
+\fB/etc/security/dev/*\fR
+.sp
+.LP
+\fB/usr/security/lib/*\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The invocation is Uncommitted. The options are Uncommitted. The output from the
+\fB-a\fR and \fB-w\fR options is Uncommitted. All other output is
+Not-an-Interface.
+.SH SEE ALSO
+.sp
+.LP
+\fBallocate\fR(1), \fBdeallocate\fR(1), \fBbsmconv\fR(1M), \fBdminfo\fR(1M),
+\fBmkdevalloc\fR(1M), \fBmkdevmaps\fR(1M), \fBdevice_allocate\fR(4),
+\fBdevice_maps\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fIControlling Access to Devices\fR
+.SH NOTES
+.sp
+.LP
+The functionality described in this man page is available only if Solaris
+Auditing has been enabled. See \fBbsmconv\fR(1M) for more information.
+.sp
+.LP
+On systems configured with Trusted Extensions, the functionality is enabled by
+default.
+.sp
+.LP
+\fB/etc/security/dev\fR, \fBmkdevalloc\fR(1M), and \fBmkdevmaps\fR(1M) might
+not be supported in a future release of the Solaris Operating Environment.
diff --git a/usr/src/man/man1/listusers.1 b/usr/src/man/man1/listusers.1
new file mode 100644
index 0000000000..faf9b48fc6
--- /dev/null
+++ b/usr/src/man/man1/listusers.1
@@ -0,0 +1,60 @@
+'\" te
+.\" Copyright (c) 1994, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH listusers 1 "18 Mar 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+listusers \- list user login information
+.SH SYNOPSIS
+.LP
+.nf
+\fBlistusers\fR [\fB-g\fR \fIgroups\fR] [\fB-l\fR \fIlogins\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+Executed without any options, this command lists all user logins sorted by
+login. The output shows the login \fBID\fR and the account field value from
+the system's password database as specified by \fB/etc/nsswitch.conf\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fI groups\fR\fR
+.ad
+.RS 13n
+.rt
+Lists all user logins belonging to \fBgroup\fR, sorted by login. Multiple
+groups can be specified as a comma-separated list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI logins\fR\fR
+.ad
+.RS 13n
+.rt
+Lists the user login or logins specified by \fBlogins\fR, sorted by login.
+Multiple logins can be specified as a comma-separated list.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBnsswitch.conf\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+A user login is one that has a \fBUID\fR of 100 or greater.
+.sp
+.LP
+The \fB-l\fR and \fB-g\fR options can be combined. User logins will only be
+listed once, even if they belong to more than one of the selected groups.
diff --git a/usr/src/man/man1/ln.1 b/usr/src/man/man1/ln.1
new file mode 100644
index 0000000000..926a9c76ab
--- /dev/null
+++ b/usr/src/man/man1/ln.1
@@ -0,0 +1,307 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ln 1 "25 Mar 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ln \- make hard or symbolic links to files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ln\fR [\fB-fns\fR] \fIsource_file\fR [\fItarget\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ln\fR [\fB-fns\fR] \fIsource_file\fR... \fItarget\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ln\fR [\fB-fs\fR] \fIsource_file\fR [\fItarget\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ln\fR [\fB-fs\fR] \fIsource_file\fR... \fItarget\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+In the first synopsis form, the \fBln\fR utility creates a new directory entry
+(link) for the file specified by \fIsource_file\fR, at the destination path
+specified by \fItarget\fR. If \fItarget\fR is not specified, the link is made
+in the current directory. This first synopsis form is assumed when the final
+operand does not name an existing directory; if more than two operands are
+specified and the final is not an existing directory, an error will result.
+.sp
+.LP
+In the second synopsis form, the \fBln\fR utility creates a new directory entry
+for each file specified by a \fIsource_file\fR operand, at a destination path
+in the existing directory named by \fItarget\fR.
+.sp
+.LP
+The \fBln\fR utility may be used to create both hard links and symbolic links.
+A hard link is a pointer to a file and is indistinguishable from the original
+directory entry. Any changes to a file are effective independent of the name
+used to reference the file. Hard links may not span file systems and may not
+refer to directories.
+.sp
+.LP
+\fBln\fR by default creates hard links. \fIsource_file\fR is linked to
+\fItarget\fR. If \fItarget\fR is a directory, another file named
+\fIsource_file\fR is created in \fItarget\fR and linked to the original
+\fIsource_file\fR.
+.sp
+.LP
+If \fItarget\fR is an existing file and the \fB-f\fR option is not specified,
+\fBln\fR will write a diagnostic message to standard error, do nothing more
+with the current \fIsource_file\fR, and go on to any remaining
+\fIsource_file\fRs.
+.sp
+.LP
+A symbolic link is an indirect pointer to a file; its directory entry contains
+the name of the file to which it is linked. Symbolic links may span file
+systems and may refer to directories.
+.sp
+.LP
+File permissions for \fItarget\fR may be different from those displayed with an
+\fB-l\fR listing of the \fBls\fR(1) command. To display the permissions of
+\fItarget\fR, use \fBls\fR \fB-lL\fR. See \fBstat\fR(2) for more information.
+.SS "/usr/bin/ln"
+.sp
+.LP
+If \fB/usr/bin/ln\fR determines that the mode of \fItarget\fR forbids writing,
+it prints the mode (see \fBchmod\fR(1)), asks for a response, and reads the
+standard input for one line. If the response is affirmative, the link occurs,
+if permissible. Otherwise, the command exits.
+.SS "/usr/xpg4/bin/ln"
+.sp
+.LP
+When creating a hard link, and the source file is itself a symbolic link, the
+target will be a hard link to the file referenced by the symbolic link, not to
+the symbolic link object itself (\fIsource_file\fR).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/ln\fR and
+\fB/usr/xpg4/bin/ln\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Links files without questioning the user, even if the mode of \fItarget\fR
+forbids writing. This is the default if the standard input is not a terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Creates a symbolic link.
+.sp
+If the \fB-s\fR option is used with two arguments, \fItarget\fR may be an
+existing directory or a non-existent file. If \fItarget\fR already exists and
+is not a directory, an error is returned. \fIsource_file\fR may be any path
+name and need not exist. If it exists, it may be a file or directory and may
+reside on a different file system from \fItarget\fR. If \fItarget\fR is an
+existing directory, a file is created in directory \fItarget\fR whose name is
+\fIsource_file\fR or the last component of \fIsource_file\fR. This file is a
+symbolic link that references \fIsource_file\fR. If \fItarget\fR does not
+exist, a file with name \fItarget\fR is created and it is a symbolic link that
+references \fIsource_file\fR.
+.sp
+If the \fB-s\fR option is used with more than two arguments, \fItarget\fR must
+be an existing directory or an error will be returned. For each
+\fIsource_file\fR, a link is created in \fItarget\fR whose name is the last
+component of \fIsource_file\fR. Each new \fIsource_file\fR is a symbolic link
+to the original \fIsource_file\fR. The files and \fItarget\fR may reside on
+different file systems.
+.RE
+
+.SS "/usr/bin/ln"
+.sp
+.LP
+The following option is supported for \fB/usr/bin/ln\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+If \fItarget\fR is an existing file, writes a diagnostic message to stderr and
+goes on to any remaining \fIsource_file\fRs. The \fB-f\fR option overrides this
+option. This is the default behavior for \fB/usr/bin/ln\fR and
+\fB/usr/xpg4/bin/ln\fR, and is silently ignored.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsource_file\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of a file to be linked. This can be either a regular or special
+file. If the \fB-s\fR option is specified, \fIsource_file\fR can also be a
+directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItarget\fR\fR
+.ad
+.RS 15n
+.rt
+The path name of the new directory entry to be created, or of an existing
+directory in which the new directory entries are to be created.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBln\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBln\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All the specified files were linked successfully
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/ln"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/ln"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBls\fR(1), \fBstat\fR(2), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+A symbolic link to a directory behaves differently than you might expect in
+certain cases. While an \fBls\fR(1) command on such a link displays the files
+in the pointed-to directory, entering \fBls\fR \fB-l\fR displays information
+about the link itself:
+.sp
+.in +2
+.nf
+example% \fBln -s dir link\fR
+example% \fBls link\fR
+file1 file2 file3 file4
+example% \fBls -l link\fR
+lrwxrwxrwx 1 user 7 Jan 11 23:27 link -> dir
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When you change to a directory (see \fBcd\fR(1)) through a symbolic link, using
+\fB/usr/bin/sh\fR or \fB/usr/bin/csh\fR, you wind up in the pointed-to location
+within the file system. This means that the parent of the new working directory
+is not the parent of the symbolic link, but rather, the parent of the
+pointed-to directory. This will also happen when using \fBcd\fR with the
+\fB-P\fR option from \fB/usr/bin/ksh\fR or \fB/usr/xpg4/bin/sh\fR. For
+instance, in the following case, the final working directory is \fB/usr\fR and
+not \fB/home/user/linktest\fR.
+.sp
+.in +2
+.nf
+example% \fBpwd\fR
+/home/user/linktest
+example% \fBln -s /usr/tmp symlink\fR
+example% \fBcd symlink\fR
+example% \fBcd .\|.\fR
+example% \fBpwd\fR
+/usr
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+C shell users can avoid any resulting navigation problems by using the
+\fBpushd\fR and \fBpopd\fR built-in commands instead of \fBcd\fR.
diff --git a/usr/src/man/man1/loadkeys.1 b/usr/src/man/man1/loadkeys.1
new file mode 100644
index 0000000000..5e808534ec
--- /dev/null
+++ b/usr/src/man/man1/loadkeys.1
@@ -0,0 +1,71 @@
+'\" te
+.\" Copyright (c) 1995 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH loadkeys 1 "20 Apr 1998" "SunOS 5.11" "User Commands"
+.SH NAME
+loadkeys, dumpkeys \- load and dump keyboard translation tables
+.SH SYNOPSIS
+.LP
+.nf
+\fBloadkeys\fR [\fIfilename\fR]
+.fi
+
+.LP
+.nf
+\fBdumpkeys\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBloadkeys\fR reads the file specified by \fIfilename\fR, and modifies the
+keyboard streams module's translation tables. If no file is specified,
+\fBloadkeys\fR loads the file:
+\fB/usr/share/lib/keytables/type_\fR\fItt\fR\fB/layout_\fR\fIdd,\fR where
+\fItt\fR is the value returned by the \fBKIOCTYPE\fR \fBioctl\fR, and \fBdd\fR
+is the value returned by the \fBKIOCLAYOUT\fR \fBioctl\fR (see \fBkb\fR(7M)).
+These keytable files specify only the entries that change between the specified
+layout and the default layout for the particular keyboard type. On
+self-identifying keyboards, the value returned by the \fBKIOCLAYOUT\fR
+\fBioctl\fR is set from the \fBDIP\fR switches.
+.sp
+.LP
+\fBdumpkeys\fR writes the current contents of the keyboard streams module's
+translation tables, in the format specified by \fBkeytables\fR(4), to the
+standard output.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/keytables/layout_\fR\fBdd\fR\fR
+.ad
+.sp .6
+.RS 4n
+default keytable files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+lw(2.75i) |lw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+\fBATTRIBUTE TYPE\fR\fBATTRIBUTE VALUE\fR
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkbd\fR(1), \fBkeytables\fR(4), \fBattributes\fR(5), \fBkb\fR(7M),
+\fBusbkbm\fR(7M)
diff --git a/usr/src/man/man1/locale.1 b/usr/src/man/man1/locale.1
new file mode 100644
index 0000000000..3b3816f12c
--- /dev/null
+++ b/usr/src/man/man1/locale.1
@@ -0,0 +1,274 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH locale 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+locale \- get locale-specific information
+.SH SYNOPSIS
+.LP
+.nf
+\fBlocale\fR [\fB-a\fR | \fB-m\fR]
+.fi
+
+.LP
+.nf
+\fBlocale\fR [\fB-ck\fR] \fIname\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlocale\fR utility writes information about the current locale
+environment, or all public locales, to the standard output. For the purposes of
+this section, a \fIpublic locale\fR is one provided by the implementation that
+is accessible to the application.
+.sp
+.LP
+When \fBlocale\fR is invoked without any arguments, it summarizes the current
+locale environment for each locale category as determined by the settings of
+the environment variables.
+.sp
+.LP
+When invoked with operands, it writes values that have been assigned to the
+keywords in the locale categories, as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Specifying a keyword name selects the named keyword and the category containing
+that keyword.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Specifying a category name selects the named category and all keywords in that
+category.
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Writes information about all available public locales. The available locales
+include \fBPOSIX\fR, representing the POSIX locale.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Writes the names of selected locale categories. The \fB-c\fR option increases
+readability when more than one category is selected (for example, via more than
+one keyword name or via a category name). It is valid both with and without the
+\fB-k\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+Writes the names and values of selected keywords. The implementation may omit
+values for some keywords; see OPERANDS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Writes names of available charmaps; see \fBlocaledef\fR(1).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 8n
+.rt
+The name of a locale category, the name of a keyword in a locale category, or
+the reserved name \fBcharmap\fR. The named category or keyword will be selected
+for output. If a single \fIname\fR represents both a locale category name and a
+keyword name in the current locale, the results are unspecified; otherwise,
+both category and keyword names can be specified as \fIname\fR operands, in any
+sequence.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the locale utility
+.sp
+.LP
+In the following examples, the assumption is that locale environment variables
+are set as follows:
+
+.sp
+.in +2
+.nf
+LANG=locale_x LC_COLLATE=locale_y
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command \fBlocale\fR would result in the following output:
+
+.sp
+.in +2
+.nf
+LANG=locale_x
+LC_CTYPE="locale_x"
+LC_NUMERIC="locale_x"
+LC_TIME="locale_x"
+LC_COLLATE=locale_y
+LC_MONETARY="locale_x"
+LC_MESSAGES="locale_x"
+LC_ALL=
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command
+
+.sp
+.in +2
+.nf
+\fBLC_ALL=POSIX locale -ck decimal_point\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+would produce:
+
+.sp
+.in +2
+.nf
+LC_NUMERIC
+decimal_point="."
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command shows an application of \fBlocale\fR to determine whether
+a user-supplied response is affirmative:
+
+.sp
+.in +2
+.nf
+\fBif printf "%s\en" "$response" | /usr/xpg4/bin/grep -Eq\e
+ "$(locale yesexpr)"
+then
+ affirmative processing goes here
+else
+ non-affirmative processing goes here
+fi\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for the descriptions of \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+The \fBLANG\fR, \fBLC_*\fR, and \fBNLSPATH\fR environment variables must
+specify the current locale environment to be written out. These environment
+variables will be used if the \fB-a\fR option is not specified.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All the requested information was found and output successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlocaledef\fR(1), \fBattributes\fR(5), \fBcharmap\fR(5), \fBenviron\fR(5),
+\fBlocale\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+If \fBLC_CTYPE\fR or keywords in the category \fBLC_CTYPE\fR are specified,
+only the values in the range \fB0x00\fR-\fB0x7f\fR are written out.
+.sp
+.LP
+If \fBLC_COLLATE\fR or keywords in the category \fBLC_COLLATE\fR are specified,
+no actual values are written out.
diff --git a/usr/src/man/man1/localedef.1 b/usr/src/man/man1/localedef.1
new file mode 100644
index 0000000000..41242263e6
--- /dev/null
+++ b/usr/src/man/man1/localedef.1
@@ -0,0 +1,529 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH localedef 1 "11 Oct 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+localedef \- define locale environment
+.SH SYNOPSIS
+.LP
+.nf
+\fBlocaledef\fR [\fB-c\fR] [\fB-C\fR \fIcompiler_options\fR] [\fB-f\fR \fIcharmap\fR]
+ [\fB-i\fR \fIsourcefile\fR] [\fB-L\fR \fIlinker_options\fR] [\fB-m\fR \fImodel\fR]
+ [\fB-u\fR \fIcode_set_name\fR] [\fB-W\fR cc, \fIarg\fR] [\fB-x\fR \fIextensions_file\fR] \fIlocalename\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlocaledef\fR utility converts source definitions for locale categories
+into a format usable by the functions and utilities whose operational behavior
+is determined by the setting of the locale environment variables; see
+\fBenviron\fR(5).
+.sp
+.LP
+The utility reads source definitions for one or more locale categories
+belonging to the same locale from the file named in the \fB-i\fR option (if
+specified) or from standard input.
+.sp
+.LP
+Each category source definition is identified by the corresponding environment
+variable name and terminated by an \fBEND\fR \fIcategory-name\fR statement. The
+following categories are supported.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR\fR
+.ad
+.RS 15n
+.rt
+Defines character classification and case conversion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_COLLATE\fR\fR
+.ad
+.RS 15n
+.rt
+Defines collation rules.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MONETARY\fR\fR
+.ad
+.RS 15n
+.rt
+Defines the format and symbols used in formatting of monetary information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_NUMERIC\fR\fR
+.ad
+.RS 15n
+.rt
+Defines the decimal delimiter, grouping and grouping symbol for non-monetary
+numeric editing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_TIME\fR\fR
+.ad
+.RS 15n
+.rt
+Defines the format and content of date and time information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR\fR
+.ad
+.RS 15n
+.rt
+Defines the format and values of affirmative and negative responses.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 23n
+.rt
+Creates permanent output even if warning messages have been issued.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIcompiler_options\fR\fR
+.ad
+.RS 23n
+.rt
+Passes the \fIcompiler_options\fR to the C compiler (\fBcc\fR). If more than
+one option is specified, then the options must be enclosed in quotes
+(\fB"\|"\fR).
+.sp
+This is an old option. Use the \fB-W\fR \fBcc\fR,\fIarg\fR option instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIcharmap\fR\fR
+.ad
+.RS 23n
+.rt
+Specifies the pathname of a file containing a mapping of character symbols and
+collating element symbols to actual character encodings. This option must be
+specified if symbolic names (other than collating symbols defined in a
+\fBcollating-symbol\fR keyword) are used. If the \fB-f\fR option is not
+present, the default character mapping will be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIsourcefile\fR\fR
+.ad
+.RS 23n
+.rt
+The path name of a file containing the source definitions. If this option is
+not present, source definitions will be read from standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fIlinker_options\fR\fR
+.ad
+.RS 23n
+.rt
+Passes the \fIlinker_options\fR to the C compiler (\fBcc\fR) that follows the C
+source filename. If more than one option is specified, then the options must be
+enclosed in quotes (\fB"\|"\fR).
+.sp
+This is an old option. Use the \fB-W\fR \fBcc\fR,\fIarg\fR option instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImodel\fR\fR
+.ad
+.RS 23n
+.rt
+Specifies whether \fBlocaledef\fR will generate a 64-bit or a 32-bit locale
+object.
+.sp
+Specify \fImodel\fR as \fBilp32\fR to generate a 32-bit locale object. Specify
+\fBlp64\fR to generate a 64-bit locale object. If the \fB-m\fR option is not
+specified, \fBlocaledef\fR generates a 32-bit locale object. And if no other
+options than \fB-c\fR, \fB-f\fR, and \fB-i\fR options are specified and if the
+system running \fBlocaledef\fR supports the 64-bit environment, \fBlocaledef\fR
+additionally generates a 64-bit locale object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIcode_set_name\fR\fR
+.ad
+.RS 23n
+.rt
+Specifies the name of a codeset used as the target mapping of character symbols
+and collating element symbols whose encoding values are defined in terms of the
+ISO/IEC 10646-1: 2000 standard position constant values. See NOTES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR \fBcc\fR,\fIarg\fR\fR
+.ad
+.RS 23n
+.rt
+Passes \fIarg\fR options to the C compiler. Each argument must be separated
+from the preceding by only a comma. A comma can be part of an argument by
+escaping it withan immediately preceding backslash character; the backslash is
+removed from the resulting argument.
+.sp
+Use this option instead of the \fB-C\fR and \fB-L\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIextensions_file\fR\fR
+.ad
+.RS 23n
+.rt
+Specifies the name of an extension file where various \fBlocaledef\fR options
+are listed. See \fBlocale\fR(5).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlocalename\fR\fR
+.ad
+.RS 14n
+.rt
+Identifies the locale. If the name contains one or more slash characters,
+\fIlocalename\fR will be interpreted as a path name where the created locale
+definitions will be stored. This capability may be restricted to users with
+appropriate privileges. (As a consequence of specifying one \fIlocalename\fR,
+although several categories can be processed in one execution, only categories
+belonging to the same locale can be processed.)
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+\fBlocaledef\fR creates a temporary C source file that represents the locale's
+data. \fBlocaledef\fR then calls the C compiler to compile this C source file
+into a shared object.
+.sp
+.LP
+If the \fB-m\fR \fBilp32\fR option is specified, \fBlocaledef\fR calls the C
+compiler for generating 32-bit objects and generates a 32-bit locale object. If
+the \fB-m\fR \fBlp64\fR option is specified, \fBlocaledef\fR calls the C
+compiler for generating 64-bit objects and generates a 64-bit locale object.
+.sp
+.LP
+If the \fB-m\fR option is not specified, \fBlocaledef\fR calls the C compiler
+for generating 32-bit objects and generates a 32-bit locale object. If no other
+options than \fB-c\fR, \fB-f\fR, and \fB-i\fR options are specified and if the
+system running \fBlocaledef\fR supports the 64-bit environment, \fBlocaledef\fR
+additionally calls the C compiler for generating 64-bit objects and generates a
+64-bit locale object.
+.sp
+.LP
+If no option to the C compiler is explicitly specified using the \fB-W\fR,
+\fB-C\fR, or \fB-L\fR options, \fBlocaledef\fR calls the C compiler with
+appropriate C compiler options to generate a locale object or objects.
+.sp
+.LP
+If the \fB-m\fR \fBilp32\fR option is specified, \fBlocaledef\fR generates a
+32-bit locale object named:
+.sp
+.LP
+\fIlocalename\fR.so.\fIversion_number\fR
+.sp
+.LP
+If the \fB-m\fR \fBlp64\fR option is specified, \fBlocaledef\fR generates a
+64-bit locale object named:
+.sp
+.LP
+\fIlocalename\fR.so.\fIversion_number\fR
+.sp
+.LP
+If the \fB-m\fR option is not specified, \fBlocaledef\fR generates a 32-bit
+locale object named:
+.sp
+.LP
+\fIlocalename\fR.so.\fIversion_number\fR
+.sp
+.LP
+and, if appropriate, generates a 64-bit locale object named:
+.sp
+.LP
+\fI64-bit_architecture_name\fR/\fIlocalename\fR.so.\fIversion_number\fR
+.sp
+.LP
+The shared object for the 32-bit environment must be moved to:
+.sp
+.LP
+\fB/usr/lib/locale/\fR\fIlocalename\fR\fB/\fR\fIlocalename\fR\fB\&.so.\fR\fIver
+sion_number\fR
+.sp
+.LP
+The shared object for the 64-bit environment on SPARC must be moved to:
+.sp
+.LP
+\fB/usr/lib/locale/\fR\fIlocalename\fR\fB/sparcv9/\fR\fIlocalename\fR\fB\&.so.\fR\fIversion_number\fR
+.sp
+.LP
+The shared object for the 64-bit environment on AMD64 must be moved to:
+.sp
+.LP
+\fB/usr/lib/locale/\fIlocalename\fR/amd64/\fIlocalename\fR\&.so.\fIversion_number\fR\fR
+.sp
+.LP
+\fBlocaledef\fR also generates a text file named \fIlocalename\fR that is used
+for information only.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for definitions of the following environment variables
+that affect the execution of \fBlocaledef\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+No errors occurred and the locales were successfully created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+Warnings occurred and the locales were successfully created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 6n
+.rt
+The locale specification exceeded implementation limits or the coded character
+set or sets used were not supported by the implementation, and no locale was
+created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 6n
+.rt
+The capability to create new locales is not supported by the implementation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>3\fR\fR
+.ad
+.RS 6n
+.rt
+Warnings or errors occurred and no output was created.
+.RE
+
+.sp
+.LP
+If an error is detected, no permanent output will be created.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/localedef/extensions/generic_eucbc.x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Describes what a generic \fBEUC\fR locale uses in the system. This file is used
+by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/localedef/extensions/single_byte.x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Describes a generic single-byte file used in the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fIlocalename\fR/\fIlocalename\fR.so.\fIversion_number\fR
+\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shared object for the 32-bit environment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fIlocalename\fR/sparcv9/\fIlocalename\fR.so.\fIversion_n
+umber\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shared object for the 64-bit environment on SPARC.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fI<localename>\fR/amd64/\fI<localename>\fR\&.so.\fI<vers
+ion_number>\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+The shared object for the 64-bit environment on AMD64.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlocale\fR(1), \fBiconv_open\fR(3C), \fBnl_langinfo\fR(3C),
+\fBstrftime\fR(3C), \fBattributes\fR(5), \fBcharmap\fR(5), \fBenviron\fR(5),
+\fBextensions\fR(5), \fBlocale\fR(5), \fBstandards\fR(5)
+.SH WARNINGS
+.sp
+.LP
+If warnings occur, permanent output will be created if the \fB-c\fR option was
+specified. The following conditions will cause warning messages to be issued:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If a symbolic name not found in the \fIcharmap\fR file is used for the
+descriptions of the \fBLC_CTYPE\fR or \fBLC_COLLATE\fR categories (for other
+categories, this will be an error conditions).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If optional keywords not supported by the implementation are present in the
+source.
+.RE
+.SH NOTES
+.sp
+.LP
+When the \fB-u\fR option is used, the \fIcode_set_name\fR option-argument is
+interpreted as a name of a codeset to which the ISO/IEC 10646-1: 2000 standard
+position constant values are converted. Both the ISO/IEC 10646-1: 2000 standard
+position constant values and other formats (decimal, hexadecimal, or octal) are
+valid as encoding values within the charmap file. The codeset can be any
+codeset that is supported by the \fBiconv_open\fR(3C) function on the system.
+.sp
+.LP
+When conflicts occur between the charmap specification of \fIcode_set_name\fR,
+\fImb_cur_max\fR, or \fImb_cur_min\fR and the corresponding value for the
+codeset represented by the \fB-u\fR option-argument \fIcode_set_name\fR, the
+\fBlocaledef\fR utility fails as an error.
+.sp
+.LP
+When conflicts occur between the charmap encoding values specified for symbolic
+names of characters of the portable character set and the character encoding
+values defined by the US-ASCII, the result is unspecified.
+.sp
+.LP
+If a non-printable character in the charmap has a width specified that is not
+\fB-1\fR, \fBlocaledef\fR generates a warning.
diff --git a/usr/src/man/man1/logger.1 b/usr/src/man/man1/logger.1
new file mode 100644
index 0000000000..842ede7950
--- /dev/null
+++ b/usr/src/man/man1/logger.1
@@ -0,0 +1,189 @@
+'\" te
+.\" Copyright (c) 1983 Regents of the University of California. Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH logger 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+logger \- add entries to the system log
+.SH SYNOPSIS
+.LP
+.nf
+\fBlogger\fR [\fB-i\fR] [\fB-f\fR \fIfile\fR] [\fB-p\fR \fIpriority\fR] [\fB-t\fR \fItag\fR] [\fImessage\fR] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlogger\fR command provides a method for adding one-line entries to the
+system log file from the command line. One or more \fImessage\fR arguments can
+be given on the command line, in which case each is logged immediately. If this
+is unspecified, either the file indicated with \fB-f\fR or the standard input
+is added to the log. Otherwise, a \fIfile\fR can be specified, in which case
+each line in the file is logged. If neither is specified, \fBlogger\fR reads
+and logs messages on a line-by-line basis from the standard input.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fIfile\fR\fR
+.ad
+.RS 14n
+.rt
+Uses the contents of \fIfile\fR as the message to log.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 14n
+.rt
+Logs the process \fBID\fR of the \fBlogger\fR process with each line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fIpriority\fR\fR
+.ad
+.RS 14n
+.rt
+Enters the message with the specified \fIpriority\fR. The message priority can
+be specified numerically, or as a \fIfacility\fR\fB\&.\fR\fIlevel\fR pair. For
+example, `\fB\fR\fB-p\fR\fB local3.info\fR' assigns the message priority to the
+\fBinfo\fR level in the \fBlocal3\fR facility. The default priority is
+\fBuser.notice\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fItag\fR\fR
+.ad
+.RS 14n
+.rt
+Marks each line added to the log with the specified \fItag\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fImessage\fR\fR
+.ad
+.RS 11n
+.rt
+One of the string arguments whose contents are concatenated together, in the
+order specified, separated by single space characters.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the logger command
+.sp
+.LP
+The following example:
+
+.sp
+.in +2
+.nf
+example% \fBlogger System rebooted\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+logs the message `\fBSystem rebooted\fR' to the default priority level
+\fBnotice\fR to be treated by \fBsyslogd\fR as are other messages to the
+facility \fBuser\fR.
+
+.sp
+.LP
+The next example:
+
+.sp
+.in +2
+.nf
+example% \fBlogger -p local0.notice -t HOSTIDM -f /dev/idmc\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+reads from the file \fB/dev/idmc\fR and logs each line in that file as a
+message with the tag `\fBHOSTIDM\fR' at priority level \fBnotice\fR to be
+treated by \fBsyslogd\fR as are other messages to the facility \fBlocal0\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBlogger\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmailx\fR(1), \fBwrite\fR(1), \fBsyslogd\fR(1M), \fBsyslog\fR(3C),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/login.1 b/usr/src/man/man1/login.1
new file mode 100644
index 0000000000..d38d2ba3df
--- /dev/null
+++ b/usr/src/man/man1/login.1
@@ -0,0 +1,940 @@
+'\" te
+.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH login 1 "7 Jan 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+login \- sign on to the system
+.SH SYNOPSIS
+.LP
+.nf
+\fBlogin\fR [\fB-p\fR] [\fB-d\fR \fIdevice\fR] [\fB-R\fR \fIrepository\fR] [\fB-s\fR \fIservice\fR]
+ [\fB-t\fR \fIterminal\fR] [\fB-u\fR \fIidentity\fR] [\fB-U\fR \fIruser\fR]
+ [\fB-h\fR \fIhostname\fR \fI[terminal]\fR | \fB-r\fR \fIhostname\fR]
+ [\fIname\fR [\fIenviron\fR]...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlogin\fR command is used at the beginning of each terminal session to
+identify oneself to the system. \fBlogin\fR is invoked by the system when a
+connection is first established, after the previous user has terminated the
+login shell by issuing the \fBexit\fR command.
+.sp
+.LP
+If \fBlogin\fR is invoked as a command, it must replace the initial command
+interpreter. To invoke \fBlogin\fR in this fashion, type:
+.sp
+.in +2
+.nf
+\fBexec login\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+from the initial shell. The C shell and Korn shell have their own built-ins of
+\fBlogin\fR. See \fBksh\fR(1), \fBksh93\fR(1), and \fBcsh\fR(1) for
+descriptions of login built-ins and usage.
+.sp
+.LP
+\fBlogin\fR asks for your user name, if it is not supplied as an argument, and
+your password, if appropriate. Where possible, echoing is turned off while you
+type your password, so it does not appear on the written record of the session.
+.sp
+.LP
+If you make any mistake in the login procedure, the message:
+.sp
+.in +2
+.nf
+Login incorrect
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+is printed and a new login prompt appears. If you make five incorrect login
+attempts, all five can be logged in \fB/var/adm/loginlog\fR, if it exists. The
+\fBTTY\fR line is dropped.
+.sp
+.LP
+If password aging is turned on and the password has aged (see \fBpasswd\fR(1)
+for more information), the user is forced to changed the password. In this case
+the \fB/etc/nsswitch.conf\fR file is consulted to determine password
+repositories (see \fBnsswitch.conf\fR(4)). The password update configurations
+supported are limited to the following five cases.
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files nis\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files nisplus\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: compat\fR (==> files nis)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: compat\fR (==> files nisplus)
+.sp
+\fBpasswd_compat: nisplus\fR
+.RE
+.sp
+.LP
+Failure to comply with the configurations prevents the user from logging onto
+the system because \fBpasswd\fR(1) fails. If you do not complete the login
+successfully within a certain period of time, it is likely that you are
+silently disconnected.
+.sp
+.LP
+After a successful login, accounting files are updated. Device owner, group,
+and permissions are set according to the contents of the
+\fB/etc/logindevperm\fR file, and the time you last logged in is printed (see
+\fBlogindevperm\fR(4)).
+.sp
+.LP
+The user-ID, group-ID, supplementary group list, and working directory are
+initialized, and the command interpreter (usually \fBksh\fR) is started.
+.sp
+.LP
+The basic \fIenvironment\fR is initialized to:
+.sp
+.in +2
+.nf
+HOME=\fIyour-login-directory\fR
+LOGNAME=\fIyour-login-name\fR
+PATH=/usr/bin:
+SHELL=\fIlast-field-of-passwd-entry\fR
+MAIL=/var/mail/
+TZ=\fItimezone-specification\fR
+.fi
+.in -2
+
+.sp
+.LP
+For Bourne shell and Korn shell logins, the shell executes \fB/etc/profile\fR
+and \fB$HOME/.profile\fR, if it exists.
+.sp
+.LP
+For the \fBksh93\fR Korn shell, an interactive shell then executes
+\fB/etc/ksh.kshrc\fR, followed by the file specified by the \fBENV\fR
+environment variable. If \fB$ENV\fR is not set, this defaults to
+\fB$HOME/.kshrc\fR. For the \fBksh\fR and \fB/usr/xpg4/bin/sh\fR Korn Shell, an
+interactive shell executes the file named by \fB$ENV\fR (no default).
+.sp
+.LP
+For C shell logins, the shell executes \fB/etc/.login\fR, \fB$HOME/.cshrc\fR,
+and \fB$HOME/.login\fR. The default \fB/etc/profile\fR and \fB/etc/.login\fR
+files check quotas (see \fBquota\fR(1M)), print \fB/etc/motd\fR, and check for
+mail. None of the messages are printed if the file \fB$HOME/.hushlogin\fR
+exists. The name of the command interpreter is set to \fB\(mi\fR (dash),
+followed by the last component of the interpreter's path name, for example,
+\fB\(mish\fR\&.
+.sp
+.LP
+If the \fIlogin-shell\fR field in the password file (see \fBpasswd\fR(4)) is
+empty, then the default command interpreter, \fB/usr/bin/sh\fR, is used. If
+this field is * (asterisk), then the named directory becomes the root
+directory. At that point, \fBlogin\fR is re-executed at the new level, which
+must have its own root structure.
+.sp
+.LP
+The environment can be expanded or modified by supplying additional arguments
+to \fBlogin\fR, either at execution time or when \fBlogin\fR requests your
+login name. The arguments can take either the form \fIxxx\fR or \fIxxx=yyy\fR.
+Arguments without an \fB=\fR (equal sign) are placed in the environment as:
+.sp
+.in +2
+.nf
+L\fIn=xxx\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where \fIn\fR is a number starting at \fB0\fR and is incremented each time a
+new variable name is required. Variables containing an \fB=\fR (equal sign) are
+placed in the environment without modification. If they already appear in the
+environment, then they replace the older values.
+.sp
+.LP
+There are two exceptions: The variables \fBPATH\fR and \fBSHELL\fR cannot be
+changed. This prevents people logged into restricted shell environments from
+spawning secondary shells that are not restricted. \fBlogin\fR understands
+simple single-character quoting conventions. Typing a \fB\e\fR\| (backslash) in
+front of a character quotes it and allows the inclusion of such characters as
+spaces and tabs.
+.sp
+.LP
+Alternatively, you can pass the current environment by supplying the \fB-p\fR
+flag to \fBlogin\fR. This flag indicates that all currently defined environment
+variables should be passed, if possible, to the new environment. This option
+does not bypass any environment variable restrictions mentioned above.
+Environment variables specified on the login line take precedence, if a
+variable is passed by both methods.
+.sp
+.LP
+To enable remote logins by root, edit the \fB/etc/default/login\fR file by
+inserting a \fB#\fR (pound sign) before the \fBCONSOLE=/dev/console\fR entry.
+See FILES.
+.SH SECURITY
+.sp
+.LP
+For accounts in name services which support automatic account locking, the
+account can be configured to be automatically locked (see \fBuser_attr\fR(4)
+and \fBpolicy.conf\fR(4)) if successive failed login attempts equals or exceeds
+\fBRETRIES\fR. Currently, only the files repository (see \fBpasswd\fR(4) and
+\fBshadow\fR(4)) supports automatic account locking. See also
+\fBpam_unix_auth\fR(5).
+.sp
+.LP
+The \fBlogin\fR command uses \fBpam\fR(3PAM) for authentication, account
+management, session management, and password management. The \fBPAM\fR
+configuration policy, listed through \fB/etc/pam.conf\fR, specifies the modules
+to be used for \fBlogin\fR. Here is a partial \fBpam.conf\fR file with entries
+for the \fBlogin\fR command using the UNIX authentication, account management,
+and session management modules:
+.sp
+.in +2
+.nf
+login auth required pam_authtok_get.so.1
+login auth required pam_dhkeys.so.1
+login auth required pam_unix_auth.so.1
+login auth required pam_dial_auth.so.1
+
+login account requisite pam_roles.so.1
+login account required pam_unix_account.so.1
+
+login session required pam_unix_session.so.1
+.fi
+.in -2
+
+.sp
+.LP
+The Password Management stack looks like the following:
+.sp
+.in +2
+.nf
+other password required pam_dhkeys.so.1
+other password requisite pam_authtok_get.so.1
+other password requisite pam_authtok_check.so.1
+other password required pam_authtok_store.so.1
+.fi
+.in -2
+
+.sp
+.LP
+If there are no entries for the service, then the entries for the \fBother\fR
+service is used. If multiple authentication modules are listed, then the user
+can be prompted for multiple passwords.
+.sp
+.LP
+When \fBlogin\fR is invoked through \fBrlogind\fR or \fBtelnetd\fR, the service
+name used by \fBPAM\fR is \fBrlogin\fR or \fBtelnet\fR, respectively.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdevice\fR\fR
+.ad
+.RS 26n
+.rt
+\fBlogin\fR accepts a device option, \fIdevice\fR. \fIdevice\fR is taken to be
+the path name of the \fBTTY\fR port \fBlogin\fR is to operate on. The use of
+the device option can be expected to improve \fBlogin\fR performance, since
+\fBlogin\fR does not need to call \fBttyname\fR(3C). The \fB-d\fR option is
+available only to users whose \fBUID\fR and effective \fBUID\fR are root. Any
+other attempt to use \fB-d\fR causes \fBlogin\fR to quietly exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhostname\fR [\fIterminal\fR]\fR
+.ad
+.RS 26n
+.rt
+Used by \fBin.telnetd\fR(1M) to pass information about the remote host and
+terminal type.
+.sp
+Terminal type as a second argument to the \fB-h\fR option should not start with
+a hyphen (\fB-\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 26n
+.rt
+Used to pass environment variables to the login shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIhostname\fR\fR
+.ad
+.RS 26n
+.rt
+Used by \fBin.rlogind\fR(1M) to pass information about the remote host.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIrepository\fR\fR
+.ad
+.RS 26n
+.rt
+Used to specify the \fBPAM\fR repository that should be used to tell \fBPAM\fR
+about the "\fBidentity\fR" (see option \fB-u\fR below). If no "\fBidentity\fR"
+information is passed, the repository is not used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIservice\fR\fR
+.ad
+.RS 26n
+.rt
+Indicates the \fBPAM\fR service name that should be used. Normally, this
+argument is not necessary and is used only for specifying alternative \fBPAM\fR
+service names. For example: "\fBktelnet\fR" for the Kerberized telnet process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIidentity\fR\fR
+.ad
+.RS 26n
+.rt
+Specifies the "\fBidentity\fR" string associated with the user who is being
+authenticated. This usually is \fBnot\fR be the same as that user's Unix login
+name. For Kerberized login sessions, this is the Kerberos principal name
+associated with the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR \fIruser\fR\fR
+.ad
+.RS 26n
+.rt
+Indicates the name of the person attempting to login on the remote side of the
+rlogin connection. When \fBin.rlogind\fR(1M) is operating in Kerberized mode,
+that daemon processes the terminal and remote user name information prior to
+invoking \fBlogin\fR, so the "\fBruser\fR" data is indicated using this command
+line parameter. Normally (non-Kerberos authenticated \fBrlogin\fR), the
+\fBlogin\fR daemon reads the remote user information from the client.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+Error.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.cshrc\fR\fR
+.ad
+.RS 23n
+.rt
+Initial commands for each \fBcsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.hushlogin\fR\fR
+.ad
+.RS 23n
+.rt
+Suppresses login messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.kshrc\fR\fR
+.ad
+.RS 23n
+.rt
+User's commands for interactive \fBksh93\fR, if \fB$ENV\fR is unset; executes
+after \fB/etc/ksh.kshrc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.login\fR\fR
+.ad
+.RS 23n
+.rt
+User's login commands for \fBcsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.profile\fR\fR
+.ad
+.RS 23n
+.rt
+User's login commands for \fBsh\fR, \fBksh\fR, and \fBksh93\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.rhosts\fR\fR
+.ad
+.RS 23n
+.rt
+Private list of trusted hostname/username combinations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/.login\fR\fR
+.ad
+.RS 23n
+.rt
+System-wide \fBcsh\fR login commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/issue\fR\fR
+.ad
+.RS 23n
+.rt
+Issue or project identification.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/ksh.kshrc\fR\fR
+.ad
+.RS 23n
+.rt
+System-wide commands for interactive \fBksh93\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/logindevperm\fR\fR
+.ad
+.RS 23n
+.rt
+Login-based device permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/motd\fR\fR
+.ad
+.RS 23n
+.rt
+Message-of-the-day.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nologin\fR\fR
+.ad
+.RS 23n
+.rt
+Message displayed to users attempting to login during machine shutdown.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 23n
+.rt
+Password file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/profile\fR\fR
+.ad
+.RS 23n
+.rt
+System-wide \fBsh\fR, \fBksh\fR, and \fBksh93\fR login commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/shadow\fR\fR
+.ad
+.RS 23n
+.rt
+List of users' encrypted passwords.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/sh\fR\fR
+.ad
+.RS 23n
+.rt
+User's default command interpreter.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/lastlog\fR\fR
+.ad
+.RS 23n
+.rt
+Time of last login.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/loginlog\fR\fR
+.ad
+.RS 23n
+.rt
+Record of failed login attempts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR\fR
+.ad
+.RS 23n
+.rt
+Accounting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/wtmpx\fR\fR
+.ad
+.RS 23n
+.rt
+Accounting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/mail/\fR\fIyour-name\fR\fR
+.ad
+.RS 23n
+.rt
+Mailbox for user \fIyour-name\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/default/login\fR\fR
+.ad
+.RS 23n
+.rt
+Default value can be set for the following flags in \fB/etc/default/login\fR.
+Default values are specified as comments in the \fB/etc/default/login\fR file,
+for example, \fBTIMEZONE=EST5EDT\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTIMEZONE\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the \fBTZ\fR environment variable of the shell (see \fBenviron\fR(5)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHZ\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the \fBHZ\fR environment variable of the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBULIMIT\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the file size limit for the login. Units are disk blocks. Default is zero
+(no limit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCONSOLE\fR\fR
+.ad
+.RS 24n
+.rt
+If set, root can login on that device only. This does not prevent execution of
+remote commands with \fBrsh\fR(1). Comment out this line to allow login by
+root.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPASSREQ\fR\fR
+.ad
+.RS 24n
+.rt
+Determines if login requires a non-null password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBALTSHELL\fR\fR
+.ad
+.RS 24n
+.rt
+Determines if login should set the \fBSHELL\fR environment variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the initial shell \fBPATH\fR variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSUPATH\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the initial shell \fBPATH\fR variable for root.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTIMEOUT\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the number of seconds (between \fB0\fR and \fB900\fR) to wait before
+abandoning a login session.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBUMASK\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the initial shell file creation mode mask. See \fBumask\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSYSLOG\fR\fR
+.ad
+.RS 24n
+.rt
+Determines whether the \fBsyslog\fR(3C) \fBLOG_AUTH\fR facility should be used
+to log all root logins at level \fBLOG_NOTICE\fR and multiple failed login
+attempts at\fBLOG_CRIT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDISABLETIME\fR\fR
+.ad
+.RS 24n
+.rt
+If present, and greater than zero, the number of seconds that \fBlogin\fR waits
+after \fBRETRIES\fR failed attempts or the \fBPAM \fRframework returns
+\fBPAM_ABORT\fR. Default is \fB20\fR seconds. Minimum is \fB0\fR seconds. No
+maximum is imposed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSLEEPTIME\fR\fR
+.ad
+.RS 24n
+.rt
+If present, sets the number of seconds to wait before the login failure message
+is printed to the screen. This is for any login failure other than
+\fBPAM_ABORT\fR. Another login attempt is allowed, providing \fBRETRIES\fR has
+not been reached or the \fBPAM\fR framework is returned \fBPAM_MAXTRIES\fR.
+Default is \fB4\fR seconds. Minimum is \fB0\fR seconds. Maximum is \fB5\fR
+seconds.
+.sp
+Both \fBsu\fR(1M) and \fBsulogin\fR(1M) are affected by the value of
+\fBSLEEPTIME\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRETRIES\fR\fR
+.ad
+.RS 24n
+.rt
+Sets the number of retries for logging in (see \fBpam\fR(3PAM)). The default is
+5. The maximum number of retries is 15. For accounts configured with automatic
+locking (see \fBSECURITY\fR above), the account is locked and \fBlogin\fR
+exits. If automatic locking has not been configured, \fBlogin\fR exits without
+locking the account.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSYSLOG_FAILED_LOGINS\fR\fR
+.ad
+.RS 24n
+.rt
+Used to determine how many failed login attempts are allowed by the system
+before a failed login message is logged, using the \fBsyslog\fR(3C)
+\fBLOG_NOTICE\fR facility. For example, if the variable is set to \fB0\fR,
+\fBlogin\fR logs \fIall\fR failed login attempts.
+.RE
+
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBexit\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBmail\fR(1),
+\fBmailx\fR(1), \fBnewgrp\fR(1), \fBpasswd\fR(1), \fBrlogin\fR(1),
+\fBrsh\fR(1), \fBsh\fR(1), \fBshell_builtins\fR(1), \fBtelnet\fR(1),
+\fBumask\fR(1), \fBin.rlogind\fR(1M), \fBin.telnetd\fR(1M), \fBlogins\fR(1M),
+\fBquota\fR(1M), \fBsu\fR(1M), \fBsulogin\fR(1M), \fBsyslogd\fR(1M),
+\fBuseradd\fR(1M), \fBuserdel\fR(1M), \fBpam\fR(3PAM), \fBrcmd\fR(3SOCKET),
+\fBsyslog\fR(3C), \fBttyname\fR(3C), \fBauth_attr\fR(4), \fBexec_attr\fR(4),
+\fBhosts.equiv\fR(4), \fBissue\fR(4), \fBlogindevperm\fR(4), \fBloginlog\fR(4),
+\fBnologin\fR(4), \fBnsswitch.conf\fR(4), \fBpam.conf\fR(4), \fBpasswd\fR(4),
+\fBpolicy.conf\fR(4), \fBprofile\fR(4), \fBshadow\fR(4), \fBuser_attr\fR(4),
+\fButmpx\fR(4), \fBwtmpx\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5), \fBpam_unix_session\fR(5),
+\fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5),
+\fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_passwd_auth\fR(5),
+\fBtermio\fR(7I)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLogin incorrect\fR\fR
+.ad
+.sp .6
+.RS 4n
+The user name or the password cannot be matched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNot on system console\fR\fR
+.ad
+.sp .6
+.RS 4n
+Root login denied. Check the \fBCONSOLE\fR setting in \fB/etc/default/login\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNo directory! Logging in with home=/\fR\fR
+.ad
+.sp .6
+.RS 4n
+The user's home directory named in the \fBpasswd\fR(4) database cannot be found
+or has the wrong permissions. Contact your system administrator.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNo shell\fR\fR
+.ad
+.sp .6
+.RS 4n
+Cannot execute the shell named in the \fBpasswd\fR(4) database. Contact your
+system administrator.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNO LOGINS: System going down in\fR \fIN\fR \fBminutes\fR\fR
+.ad
+.sp .6
+.RS 4n
+The machine is in the process of being shut down and logins have been disabled.
+.RE
+
+.SH WARNINGS
+.sp
+.LP
+Users with a \fBUID\fR greater than 76695844 are not subject to password aging,
+and the system does not record their last login time.
+.sp
+.LP
+If you use the \fBCONSOLE\fR setting to disable root logins, you should arrange
+that remote command execution by root is also disabled. See \fBrsh\fR(1),
+\fBrcmd\fR(3SOCKET), and \fBhosts.equiv\fR(4) for further details.
+.SH NOTES
+.sp
+.LP
+The \fBpam_unix\fR(5) module is no longer supported. Similar functionality is
+provided by \fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5),
+\fBpam_unix_session\fR(5), \fBpam_authtok_check\fR(5),
+\fBpam_authtok_get\fR(5), \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), and
+\fBpam_passwd_auth\fR(5).
diff --git a/usr/src/man/man1/logname.1 b/usr/src/man/man1/logname.1
new file mode 100644
index 0000000000..8eb3e380c6
--- /dev/null
+++ b/usr/src/man/man1/logname.1
@@ -0,0 +1,120 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH logname 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+logname \- return user's login name
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/logname\fR
+.fi
+
+.SS "ksh93"
+.sp
+.LP
+\fBlogname\fR
+.SH DESCRIPTION
+.SS "/usr/bin/logname"
+.sp
+.LP
+The \fBlogname\fR utility writes the user's login name to standard output. The
+login name is the string that would be returned by the \fBgetlogin\fR(3C)
+function. Under the conditions where \fBgetlogin()\fR would fail, \fBlogname\fR
+will write a diagnostic message to standard error and exit with a non-zero exit
+status.
+.SS "ksh93"
+.sp
+.LP
+The \fBlogname\fR utility writes the user's login name to standard output. The
+login name is the string that would be returned by the \fBgetlogin\fR(3C)
+function. If \fBgetlogin()\fR does not return successfully, the name
+corresponding to the real user IDof the calling process is used instead.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBlogname\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following error values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/profile\fR\fR
+.ad
+.RS 18n
+.rt
+environment for user at login time
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR\fR
+.ad
+.RS 18n
+.rt
+user and accounting information
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBenv\fR(1), \fBlogin\fR(1), \fBgetlogin\fR(3C), \fButmpx\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/logout.1 b/usr/src/man/man1/logout.1
new file mode 100644
index 0000000000..2aafca1a2e
--- /dev/null
+++ b/usr/src/man/man1/logout.1
@@ -0,0 +1,24 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1994 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH logout 1 "15 Apr 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+logout \- shell built-in function to exit from a login session
+.SH SYNOPSIS
+.SS "csh"
+.LP
+.nf
+\fBlogout\fR
+.fi
+
+.SH DESCRIPTION
+.SS "csh"
+.sp
+.LP
+Terminate a login shell.
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBlogin\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/look.1 b/usr/src/man/man1/look.1
new file mode 100644
index 0000000000..7eb63cac08
--- /dev/null
+++ b/usr/src/man/man1/look.1
@@ -0,0 +1,79 @@
+'\" te
+.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH look 1 "29 Mar 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+look \- find words in the system dictionary or lines in a sorted list
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/look\fR [\fB-d\fR] [\fB-f\fR] [\fB-t\fR\fIc\fR] \fIstring\fR [\fIfilename\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlook\fR command consults a sorted \fIfilename\fR and prints all lines
+that begin with \fIstring\fR.
+.sp
+.LP
+If no \fIfilename\fR is specified, \fBlook\fR uses
+\fB/usr/share/lib/dict/words\fR with collating sequence \fB-df\fR.
+.sp
+.LP
+\fBlook\fR limits the length of a word to search for to 256 characters.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 7n
+.rt
+Dictionary order. Only letters, digits, \fBTAB\fR and \fBSPACE\fR characters
+are used in comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 7n
+.rt
+Fold case. Upper case letters are not distinguished from lower case in
+comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fIc\fR\fR
+.ad
+.RS 7n
+.rt
+Set termination character. All characters to the right of \fIc\fR in
+\fIstring\fR are ignored.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/dict/words\fR\fR
+.ad
+.RS 29n
+.rt
+spelling list
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgrep\fR(1), \fBsort\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/lookbib.1 b/usr/src/man/man1/lookbib.1
new file mode 100644
index 0000000000..fedfdaa217
--- /dev/null
+++ b/usr/src/man/man1/lookbib.1
@@ -0,0 +1,96 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lookbib 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+lookbib \- find references in a bibliographic database
+.SH SYNOPSIS
+.LP
+.nf
+\fBlookbib\fR \fIdatabase\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+A bibliographic reference is a set of lines, constituting fields of
+bibliographic information. Each field starts on a line beginning with a
+`\fB%\fR', followed by a key-letter, then a blank, and finally the contents of
+the field, which may continue until the next line starting with `\fB%\fR'.
+.sp
+.LP
+The \fBlookbib\fR utility uses an inverted index made by \fBindxbib\fR to find
+sets of bibliographic references. It reads keywords typed after the `\fB>\fR'
+prompt on the terminal, and retrieves records containing all these keywords. If
+nothing matches, nothing is returned except another `\fB>\fR' prompt.
+.sp
+.LP
+It is possible to search multiple databases, as long as they have a common
+index made by \fBindxbib\fR(1). In that case, only the first argument given to
+\fBindxbib\fR is specified to \fBlookbib\fR.
+.sp
+.LP
+If \fBlookbib\fR does not find the index files (the \fB\&.i\fR[\fBabc\fR]
+files), it looks for a reference file with the same name as the argument,
+without the suffixes. It creates a file with a \fB\&.ig\fR suffix, suitable
+for use with \fBfgrep\fR (see \fBgrep\fR(1)). \fBlookbib\fR then uses this
+\fBfgrep\fR file to find references. This method is simpler to use, but the
+\fB\&.ig\fR file is slower to use than the \fB\&.i\fR[\fBabc\fR] files, and
+does not allow the use of multiple reference files.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIx\fR.ia\fR\fR
+.ad
+.RS 8n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIx\fR.ib\fR\fR
+.ad
+.RS 8n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIx\fR.ic\fR\fR
+.ad
+.RS 8n
+.rt
+index files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIx\fR.ig\fR\fR
+.ad
+.RS 8n
+.rt
+reference file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaddbib\fR(1), \fBgrep\fR(1), \fBindxbib\fR(1), \fBrefer\fR(1),
+\fBroffbib\fR(1), \fBsortbib\fR(1), \fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+Probably all dates should be indexed, since many disciplines refer to
+literature written in the 1800s or earlier.
diff --git a/usr/src/man/man1/lorder.1 b/usr/src/man/man1/lorder.1
new file mode 100644
index 0000000000..97820c85d5
--- /dev/null
+++ b/usr/src/man/man1/lorder.1
@@ -0,0 +1,84 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lorder 1 "29 Oct 1991" "SunOS 5.11" "User Commands"
+.SH NAME
+lorder \- find ordering relation for an object or library archive
+.SH SYNOPSIS
+.LP
+.nf
+\fBlorder\fR \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The input is one or more object or library archive \fIfilenames\fR (see
+\fBar\fR(1)). The standard output is a list of pairs of object file or archive
+member names; the first file of the pair refers to external identifiers defined
+in the second. The output may be processed by \fBtsort\fR(1) to find an
+ordering of a library suitable for one-pass access by \fBld\fR. Note that the
+link editor \fBld\fR is capable of multiple passes over an archive in the
+portable archive format (see \fBar.h\fR(3HEAD)) and does not require that
+\fBlorder\fR be used when building an archive. The usage of the \fBlorder\fR
+command may, however, allow for a more efficient access of the archive during
+the link edit process.
+.sp
+.LP
+The following example builds a new library from existing \fB\&.o\fR files.
+.sp
+.LP
+\fBar \|\fR\fB-cr\fR\fB \|library \|`\|lorder \|*.o \|| \|tsort\|` \fR
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMPDIR/*symref\fR\fR
+.ad
+.RS 18n
+.rt
+temporary files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMPDIR/*symdef\fR\fR
+.ad
+.RS 18n
+.rt
+temporary files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMPDIR\fR\fR
+.ad
+.RS 18n
+.rt
+usually \fB/var/tmp\fR but can be redefined by setting the environment variable
+\fBTMPDIR\fR (see \fBtempnam\fR() in \fBtmpnam\fR(3C))
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBld\fR(1), \fBtsort\fR(1), \fBtmpnam\fR(3C), \fBar.h\fR(3HEAD),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBlorder\fR will accept as input any object or archive file, regardless of its
+suffix, provided there is more than one input file. If there is but a single
+input file, its suffix must be \fB\&.o\fR.
+.sp
+.LP
+The length of the filename for \fBTMPDIR\fR is limited to whatever \fBsed\fR
+allows.
diff --git a/usr/src/man/man1/lp.1 b/usr/src/man/man1/lp.1
new file mode 100644
index 0000000000..e7de797532
--- /dev/null
+++ b/usr/src/man/man1/lp.1
@@ -0,0 +1,783 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lp 1 "31 May 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+lp \- submit print request
+.SH SYNOPSIS
+.LP
+.nf
+\fBlp\fR [\fB-c\fR] [\fB-m\fR] [\fB-p\fR] [\fB-s\fR] [\fB-w\fR] [\fB-d\fR \fIdestination\fR] [\fB-f\fR \fIform-name\fR]
+ [\fB-H\fR \fIspecial-handling\fR] [\fB-n\fR \fInumber\fR] [\fB-o\fR \fIoption\fR]
+ [\fB-P\fR \fIpage-list\fR] [\fB-q\fR \fIpriority-level\fR]
+ [\fB-S\fR \fIcharacter-set\fR | \fIprint-wheel\fR] [\fB-t\fR \fItitle\fR]
+ [\fB-T\fR \fIcontent-type\fR [\fB-r\fR]] [\fB-y\fR \fImode-list\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBlp\fR \fB-i\fR \fIrequest-ID\fR... [\fB-c\fR] [\fB-m\fR] [\fB-p\fR] [\fB-s\fR] [\fB-w\fR]
+ [\fB-d\fR \fIdestination\fR] [\fB-f\fR \fIform-name\fR] [\fB-H\fR \fIspecial-handling\fR]
+ [\fB-n\fR \fInumber\fR] [\fB-o\fR \fIoption\fR] [\fB-P\fR \fIpage-list\fR]
+ [\fB-q\fR \fIpriority-level\fR] [\fB-S\fR \fIcharacter-set\fR | \fIprint-wheel\fR]
+ [\fB-t\fR \fItitle\fR] [\fB-T\fR \fIcontent-type\fR [\fB-r\fR]] [\fB-y\fR \fImode-list\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlp\fR utility submits print requests to a destination. There are two
+formats of the \fBlp\fR command.
+.sp
+.LP
+The first form of \fBlp\fR prints files (\fIfile\fR) and associated information
+(collectively called a \fIprint request\fR). If \fIfile\fR is not specified,
+\fBlp\fR assumes the standard input. Use a hyphen (\fB\(mi\fR) with \fIfile\fR
+to specify the standard input. Files are printed in the order in which they
+appear on the command line.
+.sp
+.LP
+The second form of \fBlp\fR changes print request options. This form of
+\fBlp\fR can only be used with print services and protocols that support job
+modification. The LP print service allows print requests to be modified when
+they are in a queue local to the system that the lp commands was executed on.
+The Internet Print Protocol (IPP) allows job modification on remote ipp print
+services.
+.sp
+.LP
+The print request identified by \fIrequest-ID\fR is changed according to the
+printing options specified. The printing options available are the same as
+those with the first form of the \fBlp\fR. If the request has finished printing
+when the \fBlp\fR command is executed, the change is rejected. If the request
+is in the process of printing, it is stopped and restarted from the beginning
+(unless the \fB-P\fR option has been given).
+.sp
+.LP
+The print client commands locate destination information using the "printers"
+database in the name service switch. See \fBnsswitch.conf\fR(4),
+\fBprinters\fR(4), and \fBprinters.conf\fR(4) for details.
+.SH OPTIONS
+.sp
+.LP
+Printers that have a 4.\fIx\fR or \fBBSD-based print server\fR are not
+configured to handle \fBBSD\fR protocol extensions. \fBlp\fR handles print
+requests sent to such destinations differently (see NOTES).
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 23n
+.rt
+Copies \fIfile\fR before printing.
+.sp
+Unless \fB-c\fR is specified, users should not remove any \fIfile\fR before the
+print request has completely printed. Changes made to \fIfile\fR after the
+print request is made but before it is printed might be reflected in the
+printed output. \fIfile\fR is linked (as opposed to copied).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdestination\fR\fR
+.ad
+.RS 23n
+.rt
+Prints \fIfile\fR on a specific destination. The \fB-d\fR option is used to set
+the destination only when the job is first created. (\fBNote:\fR To move
+existing jobs to a different destination, see \fBlpmove\fR(1M).)
+\fIdestination\fR can be either a printer or a class of printers (see
+\fBlpadmin\fR(1M)). Specify \fIdestination\fR using atomic, URI-style
+(\fIscheme\fR://\fIendpoint\fR), or POSIX-style
+(\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(4) for
+more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIform-name\fR\fR
+.ad
+.RS 23n
+.rt
+Prints \fIfile\fR on \fIform-name\fR. The \fBLP\fR print service ensures that
+the form is mounted on the printer. The print request is rejected if the
+printer does not support \fIform-name\fR, if \fIform-name\fR is not defined for
+the system, or if the user is not allowed to use \fIform-name\fR (see
+\fBlpforms\fR(1M)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR \fIspecial-handling\fR\fR
+.ad
+.RS 23n
+.rt
+Prints the print request according to the value of \fIspecial-handling\fR. The
+following \fIspecial-handling\fR values are acceptable:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhold\fR\fR
+.ad
+.RS 13n
+.rt
+Do not print the print request until notified. If printing has already begun,
+stop it. Other print requests are placed ahead of a request that has been put
+on hold (\fIheld print request\fR) until the print request is resumed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBresume\fR\fR
+.ad
+.RS 13n
+.rt
+Resume a held print request. If the print request had begun to print when held,
+it is the next print request printed, unless it is superseded by an
+\fIimmediate\fR print request.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimmediate\fR\fR
+.ad
+.RS 13n
+.rt
+Print the print request next. If more than one print request is assigned, the
+most recent print request is printed next. If a print request is currently
+printing on the desired printer, a \fBhold\fR request must be issued to allow
+the immediate request to print. The \fBimmediate\fR request is only available
+to \fBLP\fR administrators.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIrequest-ID\fR\fR
+.ad
+.RS 23n
+.rt
+Changes options for the print request identified by \fIrequest-ID\fR. There
+must be a space between \fB-i\fR and \fIrequest-ID\fR.
+.sp
+This option applies to jobs that are in a local queue on a print server. This
+also applies to remote queues on when the remote print server supports IPP with
+job modification.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 23n
+.rt
+Sends mail after \fIfile\fR has printed (see \fBmail\fR(1)). By default, no
+mail is sent upon normal completion of a print request.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR\fR
+.ad
+.RS 23n
+.rt
+Prints a specific number of copies of \fIfile\fR. Specify \fInumber\fR as a
+digit. The default for \fInumber\fR is \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR\fR
+.ad
+.RS 23n
+.rt
+Specifies printer-dependent \fIoptions\fR. Specify several options by
+specifying \fB-o\fR \fIoption\fR multiple times (\fB-o\fR \fIoption\fR \fB-o\fR
+\fIoption\fR \fB-o\fR \fIoption\fR ). Printer-dependent options can also be
+specified using the \fB-o\fR keyletter once, followed by a list of options
+enclosed in double quotes (\fB-o\fR"\fIoption\fR \fIoption option\fR").
+.sp
+\fIoption\fRs take the following forms:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIkey\fR\fB=\fR\fIvalue\fR\fR
+.ad
+.RS 13n
+.rt
+Associates information with the request for use by the backend print service.
+The keys and values that can be used are specific to the backend print service
+and queue configuration.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[no]key\fR\fR
+.ad
+.RS 13n
+.rt
+ Associates boolean information with the request for use by the backend print
+service. The keys that can be used are specific to the backend print service
+and queue configuration.
+.RE
+
+The following options are commonly used with the LP print service:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnobanner\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does not print a banner page with the request. This option can be disallowed by
+the \fBLP\fR administrator.
+.sp
+On a system that is configured with Trusted Extensions, use of this option
+requires the \fBsolaris.print.nobanner\fR authorization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnofilebreak\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints multiple files without inserting a form feed between them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnolabels\fR\fR
+.ad
+.sp .6
+.RS 4n
+On a system that is configured with Trusted Extensions, specifies suppression
+of page header and footer labels. Use of this option requires the
+\fBsolaris.print.unlabeled\fR authorization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlength=\fR\fInumber\fR\fBi\fR | \fInumber\fR\fBc\fR | \fInumber\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the print request with pages of a specific length in inches,
+centimeters, or number of lines. Append the letter \fBi\fR for inches or
+\fBc\fR for centimenters to \fInumber\fR. Indicate the number of lines by
+specifying \fInumber\fR alone. \fBlength=66\fR indicates a page length of
+\fB66\fR lines. \fBlength=11i\fR indicates a page length of \fB11\fR inches.
+\fBlength=27.94c\fR indicates a page length of \fB27.94\fR centimeters.
+.sp
+This option can not be used with the \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwidth=\fR\fInumber\fR\fBi\fR | \fInumber\fR\fBc\fR | \fInumber\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the print request with pages of a specific width in inches, centimeters,
+or number of columns. Append the letter \fBi\fR for inches or \fBc\fR for
+centimeters to \fInumber\fR. Indicate the number of columns by specifying
+\fInumber\fR alone. \fBwidth=65\fR indicates a page width of \fB65\fR columns.
+\fBwidth=6.5i\fR indicates a page width of \fB6.5\fR inches. \fBwidth=10c\fR
+indicates a page width of \fB10\fR centimeters.
+.sp
+This option can not be used with the \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlpi=\fR\fInumber\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the print request with the line pitch set to \fInumber\fR lines in an
+inch. Use \fInumber\fR to specify the number of lines in an inch.
+.sp
+This option can not be used with the \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcpi=\fR\fIn\fR|\fBpica\fR|\fBelite\fR|\fBcompressed\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the print request with the character pitch set to \fInumber\fR
+characters in an inch. Use \fInumber\fR to specify the number of characters in
+an inch. Use \fBpica\fR to set character pitch to pica (\fB10\fR characters per
+inch), or \fBelite\fR to set character pitch to elite (\fB12\fR characters per
+inch) Use \fBcompressed\fR to set character pitch to as many characters as the
+printer can handle. There is no standard number of characters per inch for all
+printers; see the \fBterminfo\fR database (see \fBterminfo\fR(4)) for the
+default character pitch for your printer. This option can not be used with the
+\fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstty=\fR\fIstty-option-list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the request using a list of options valid for the \fBstty\fR command
+(see \fBstty\fR(1). Enclose the list in single quotes (\fB`'\fR) if it contains
+blanks.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpage-list\fR\fR
+.ad
+.RS 23n
+.rt
+Prints the pages specified in \fIpage-list\fR in ascending order. Specify
+\fIpage-list\fR as a of range of numbers, single page number, or a combination
+of both.
+.sp
+The \fB-P\fR option can only be used if there is a filter available to handle
+it; otherwise, the print request is rejected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 23n
+.rt
+Enables notification on completion of the print request. Delivery of the
+notification is dependent on additional software.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR \fIpriority-level\fR\fR
+.ad
+.RS 23n
+.rt
+Assigns the print request a priority in the print queue. Specify
+\fIpriority-level\fR as an integer between from \fB0\fR and \fB39\fR. Use
+\fB0\fR to indicate the highest priority; \fB39\fR to indicate the lowest
+priority. If no priority is specified, the default priority for a print service
+is assigned by the \fBLP\fR administrator. The \fBLP\fR administrator can also
+assign a default priority to individual users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 23n
+.rt
+Suppresses the display of messages sent from \fBlp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIcharacter-set\fR \fB|\fR\fR
+.ad
+.br
+.na
+\fB\fB-S\fR \fIprint-wheel\fR\fR
+.ad
+.RS 23n
+.rt
+Prints the request using the \fIcharacter-set\fR or \fIprint-wheel\fR. If a
+form was requested and requires a character set or print wheel other than the
+one specified with the \fB-S\fR option, the request is rejected. Printers using
+mountable print wheels or font cartridges use the print wheel or font cartridge
+mounted at the time of the print request, unless the \fB-S\fR option is
+specified.
+.sp
+Printers Using Print Wheels: If \fBprint\fR \fIwheel\fR is not one listed by
+the \fBLP\fR administrator as acceptable for the printer the request is
+rejected unless the print wheel is already mounted on the printer.
+.sp
+Printers Using Selectable or Programmable Character Sets: If the \fB-S\fR
+option is not specified, \fBlp\fR uses the standard character set. If
+\fIcharacter-set\fR is not defined in the \fBterminfo\fR database for the
+printer (see \fBterminfo\fR(4)), or is not an alias defined by the \fBLP\fR
+administrator, the request is rejected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItitle\fR\fR
+.ad
+.RS 23n
+.rt
+Prints a title on the banner page of the output. Enclose \fItitle\fR in quotes
+if it contains blanks. If \fItitle\fR is not not specified, the name of the
+file is printed on the banner page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-T\fR\fIcontent-type\fR [\fB-r\fR]\fR
+.ad
+.RS 23n
+.rt
+Prints the request on a printer that can support the specified
+\fIcontent-type\fR. If no printer accepts this type directly, a filter is used
+to convert the content into an acceptable type. If the \fB-r\fR option is
+specified, a filter is not used. If \fB-r\fR is specified, and no printer
+accepts the \fIcontent-type\fR directly, the request is rejected. If the
+\fIcontent-type\fR is not acceptable to any printer, either directly or with a
+filter, the request is rejected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 23n
+.rt
+Writes a message on the user's terminal after the \fIfile\fRs have been
+printed. If the user is not logged in, then mail is sent instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR \fImode-list\fR\fR
+.ad
+.RS 23n
+.rt
+Prints the request according to the printing modes listed in \fImode-list\fR.
+The allowed values for \fImode-list\fR are locally defined.
+.sp
+This option can be used only if there is a filter available to handle it;
+otherwise, the print request is rejected.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+The name of the file to be printed. Specify \fIfile\fR as a pathname or as a
+hyphen (\fB\(mi\fR) to indicate the standard input. If \fIfile\fR is not
+specified, \fBlp\fR uses the standard input.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBlp\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBlp\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and \fBPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_TIME\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the format and contents of date and time strings displayed in the
+\fBlp\fR banner page, if any.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLPDEST\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the destination. If the \fBLPDEST\fR environment variable is not set,
+the \fBPRINTER\fR environment variable shall be used. The \fB-d\fR \fIdest\fR
+option takes precedence over \fBLPDEST\fR. Results are undefined when \fB-d\fR
+is not specified and \fBLPDEST\fR contains a value that is not a valid
+destination name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPRINTER\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the output device or destination. If the \fBLPDEST\fR and
+\fBPRINTER\fR environment variables are not set, an unspecified output device
+is used. The \fB-d\fR \fIdest\fR option and the \fBLPDEST\fR environment
+variable shall take precedence over \fBPRINTER\fR. Results are undefined when
+\fB-d\fR is not specified, \fBLPDEST\fR is unset, and \fBPRINTER\fR contains a
+value that is not a valid device or destination name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the timezone used to calculate date and time strings displayed in the
+\fBlp\fR banner page, if any. If \fBTZ\fR is unset or null, an unspecified
+default timezone shall be used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/printers.conf\fR\fR
+.ad
+.RS 24n
+.rt
+System printer configuration database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.printers\fR\fR
+.ad
+.RS 24n
+.rt
+User-configurable printer database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBou=printers\fR\fR
+.ad
+.RS 24n
+.rt
+LDAP version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.conf.byname\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.org_dir\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS+\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled. See \fBNOTES\fR.
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcancel\fR(1), \fBenable\fR(1), \fBlpq\fR(1B), \fBlpr\fR(1B), \fBlprm\fR(1B),
+\fBlpstat\fR(1), \fBmail\fR(1), \fBpostprint\fR(1), \fBpr\fR(1), \fBstty\fR(1),
+\fBaccept\fR(1M), \fBlpadmin\fR(1M), \fBlpfilter\fR(1M), \fBlpforms\fR(1M),
+\fBlpmove\fR(1M), \fBlpsched\fR(1M), \fBlpshut\fR(1M), \fBlpsystem\fR(1M),
+\fBlpusers\fR(1M), \fBnsswitch.conf\fR(4), \fBprinters\fR(4),
+\fBprinters.conf\fR(4), \fBterminfo\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBCSI\fR-capability assumes that printer names are composed of \fBASCII\fR
+characters.
+.sp
+.LP
+Print jobs are assumed to contain one type of data. That type of data is either
+specified on the command line or autodetected (simple, PostScript) based on the
+contents of the first file in the job.
+.sp
+.LP
+When using the BSD printing protocol to send print requests to a remote print
+service, functionality is limited.
+.sp
+.LP
+Printers that have a 4.\fIx\fR or BSD-based print server are not configured to
+handle BSD protocol extensions. \fBlp\fR handles print requests sent to such
+printers in the following ways:
+.RS +4
+.TP
+1.
+Print requests with more than 52 filenames are truncated to 52 files.
+.RE
+.RS +4
+.TP
+2.
+The \fB-f\fR, \fB-H\fR, \fB-o\fR, \fB-P\fR, \fB-p\fR, \fB-q\fR, \fB-S\fR,
+\fB-T\fR, and \fB-y\fR options might require a protocol extension to pass to a
+print server. If \fBlp\fR cannot handle the print request, it displays a
+warning message.
+.sp
+\fBLP\fR administrators enable protocol extensions by setting a printer's
+\fBprinter-uri-supported\fR (or \fBbsdaddr\fR) entry in
+\fB/etc/printers.conf\fR. Changing the \fBprinter-uri-supported\fR entry in
+\fB/etc/printers.conf\fR to:
+.sp
+.in +2
+.nf
+\fBprinter-uri-supported=lpd\e://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIdestination\fR\fB#Solaris\fR
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+\fBbsdaddr=\fR\fIserver\fR\fB,\fR\fIdestination\fR\fB,Solaris\fR
+.fi
+.in -2
+.sp
+
+Adding \fBSolaris\fR to either of these values causes the \fBlp\fR command to
+generate a set of BSD print protocol extensions that can be processed by a
+Solaris print server.
+.RE
+.sp
+.LP
+As a result of several limitations in the BSD print protocol, it is recommended
+that the IPP protocol be used for communication with print servers.
+.sp
+.LP
+When IPP is in use, the user is prompted for a passphrase if the remote print
+service is configured to require authentication.
diff --git a/usr/src/man/man1/lpstat.1 b/usr/src/man/man1/lpstat.1
new file mode 100644
index 0000000000..36c086b859
--- /dev/null
+++ b/usr/src/man/man1/lpstat.1
@@ -0,0 +1,477 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH lpstat 1 "3 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+lpstat \- print information about the status of the print service
+.SH SYNOPSIS
+.LP
+.nf
+\fBlpstat\fR [\fB-d\fR] [\fB-r\fR] [\fB-R\fR] [\fB-s\fR] [\fB-t\fR] [\fB-a\fR [\fIlist\fR]] [\fB-c\fR [\fIlist\fR]]
+ [\fB-f\fR [\fIlist\fR]] [\fB-o\fR [\fIlist\fR]] [\fB-p\fR [\fIlist\fR] [\fB-D\fR]] [\fB-S\fR [\fIlist\fR]]
+ [\fB-u\fR [\fIlogin-\fR \fIID\fR \fI-list\fR]] [\fB-v\fR [\fIlist\fR]] [\fB-l\fR \fIlevel\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBlpstat\fR utility displays information about the current status of the
+\fBLP\fR print service to standard output.
+.sp
+.LP
+If no options are given, \fBlpstat\fR prints the status of all the user's print
+requests made by \fBlp\fR. See \fBlp\fR(1). Any arguments that are not
+\fIoptions\fR are assumed to be \fIrequest-IDs\fR as returned by \fBlp\fR. The
+\fBlpstat\fR command prints the status of such requests. \fIoptions\fR appears
+in any order and can be repeated and intermixed with other arguments. Some key
+letters can be followed by an optional \fIlist\fR that can be in one of two
+forms: a list of items separated from one another by a comma, or a list of
+items separated from one another by spaces enclosed in quotes. For example:
+.sp
+.in +2
+.nf
+example% \fBlpstat -u "user1 user2 user3"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Specifying \fBall\fR after any key letter that takes \fIlist\fR as an argument
+causes all information relevant to the key letter to be printed. For example,
+the command:
+.sp
+.in +2
+.nf
+example% \fBlpstat -o all\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints the status of all output requests.
+.sp
+.LP
+The omission of a \fIlist\fR following such key letters causes all information
+relevant to the key letter to be printed. For example, the command:
+.sp
+.in +2
+.nf
+example% \fBlpstat -o\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints the status of all output requests.
+.sp
+.LP
+The print client commands locate destination information using the "printers"
+database in the name service switch. See \fBnsswitch.conf\fR(4),
+\fBprinters\fR(4), and \fBprinters.conf\fR(4) for details.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR [\fIlist\fR]\fR
+.ad
+.RS 22n
+.rt
+Reports whether print destinations are accepting requests. \fIlist\fR is a list
+of intermixed printer names and class names.
+.sp
+If the print queue is remote and IPP is in use, the information provided is
+very close to that reported for local queues. If the print queue is remote and
+IPP is not in use (the print server is older than Solaris 9, Update 6 or
+another RFC-1179-based print service), this option does not report any useful
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR [\fIlist\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints name of all classes and their members. \fIlist\fR is a list of class
+names.
+.sp
+If the print queue is remote and IPP is in use, the information provided is
+very close to that reported for local queues. If the print queue is remote and
+IPP is not in use (the print server is older than Solaris 9, Update 6 or
+another RFC-1179-based print service), this option does not report any useful
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 22n
+.rt
+Prints the default destination for output requests.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-f\fR[\fIlist\fR] [\fB-l\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints a verification that the forms in \fIlist\fR are recognized by the
+\fBLP\fR print service. \fIlist\fR is a list of forms; the default is
+\fBall\fR. The \fB-l\fR option lists the form descriptions.
+.sp
+If the print queue is remote and IPP is in use, the information provided is
+very close to that reported for local queues. If the print queue is remote and
+IPP is not in use (the print server is older than Solaris 9, Update 6 or
+another RFC-1179-based print service), this option does not report any useful
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR [\fIlevel\fR]\fR
+.ad
+.RS 22n
+.rt
+Specifies the verbosity level for extended reporting of printer or job objects
+(\fB-o\fR, \fB-p\fR, \fB-r\fR, \fB-u\fR). Without this option, a level of
+\fB0\fR is used, which reports summary information. When no level is specified,
+a level of \fB1\fRis used, which provides more information about the object. A
+level of \fB2\fR or more enumerates all of the object's attributes.
+.sp
+If the print queue is remote and IPP is in use, the information provided is
+very close to that reported for local queues. If the print queue is remote and
+IPP is not in use (the print server is older than Solaris 9, Update 6 or
+another RFC-1179-based print service), this option does not report any useful
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR [\fIlist\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints the status of output requests. \fIlist\fR is a list of intermixed
+printer names, class names, and request-IDs. The key letter \fB-o\fR can be
+omitted.
+.sp
+Specify printer and class names using atomic, URI-style (scheme://endpoint), or
+POSIX-style (\fIserver\fR\fB:\fR\fIdestination\fR) names. See
+\fBprinters.conf\fR(4) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR [\fIlist\fR] [\fB-D\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints the status of printers. \fIlist\fR is a list of printer names. If the
+\fB-D\fR option is given, a brief description is printed for each printer in
+\fIlist\fR. If the \fB-l\fR option is given and the printer is on the local
+machine, a full description of each printer's configuration is returned,
+including the form mounted, the acceptable content and printer types, a printer
+description, and the interface used.
+.sp
+If the print queue is remote and IPP is in use, correct job id is reported. If
+the print queue is remote and IPP is not in use (the print server is older than
+Solaris 9, Update 6 or another RFC-1179-based print service), \fB-p
+[\fIlist\fR]\fR always reports the first job in the queue irrespective of its
+status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 22n
+.rt
+Prints the status of the \fBLP\fR request scheduler.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 22n
+.rt
+Prints a number showing the position of each request in the print queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 22n
+.rt
+Prints a status summary, including the status of the \fBLP\fR scheduler, the
+default destination, a list of printers and their associated devices, a list of
+the machines sharing print services, a list of all forms currently mounted, and
+a list of all recognized character sets and print wheels.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR [\fIlist\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints a verification that the character sets or the print wheels specified in
+\fIlist\fR are recognized by the \fBLP\fR print service. Items in \fIlist\fR
+can be character sets or print wheels; the default for the list is \fBall\fR.
+If the \fB-l\fR option is given, each line is appended by a list of printers
+that can handle the print wheel or character set. The list also shows whether
+the print wheel or character set is mounted, or specifies the built-in
+character set into which it maps.
+.sp
+If the print queue is remote and IPP is in use, the information provided is
+very close to that reported for local queues. If the print queue is remote and
+IPP is not in use (the print server is older than Solaris 9, Update 6 or
+another RFC-1179-based print service), this option does not report any useful
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 22n
+.rt
+Prints all status information. This includes all the information obtained with
+the \fB-s\fR option, plus the acceptance and idle/busy status of all printers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR [\fIlogin-ID-list\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints the status of output requests for users. The \fIlogin-ID-list\fR
+argument can include any or all of the following constructs:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlogin-ID\fR\fR
+.ad
+.RS 24n
+.rt
+a user on any system
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsystem_name\fR\fB!\fR\fIlogin-ID\fR\fR
+.ad
+.RS 24n
+.rt
+a user on system \fIsystem_name\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsystem_name\fR\fB!all\fR\fR
+.ad
+.RS 24n
+.rt
+all users on system \fIsystem_name\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBall!\fR\fIlogin-ID\fR\fR
+.ad
+.RS 24n
+.rt
+a user on all systems
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBall\fR\fR
+.ad
+.RS 24n
+.rt
+all users on all systems
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR [\fIlist\fR]\fR
+.ad
+.RS 22n
+.rt
+Prints the names of printers and the path names of the devices associated with
+them or remote system names for network printers. \fIlist\fR is a list of
+printer names.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/printers.conf\fR\fR
+.ad
+.RS 24n
+.rt
+System printer configuration database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.printers\fR\fR
+.ad
+.RS 24n
+.rt
+User-configurable printer database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBou=printers\fR\fR
+.ad
+.RS 24n
+.rt
+LDAP version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.conf.byname\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprinters.org_dir\fR\fR
+.ad
+.RS 24n
+.rt
+\fBNIS+\fR version of \fB/etc/printers.conf\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcancel\fR(1), \fBlp\fR(1), \fBlpq\fR(1B), \fBlpr\fR(1B), \fBlprm\fR(1B),
+\fBnsswitch.conf\fR(4), \fBprinters\fR(4), \fBprinters.conf\fR(4),
+\fBattributes\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+For remote print queues, the BSD print protocol provides a very limited set of
+information. The Internet Print Protocol (IPP) is preferred.
+.sp
+.LP
+When IPP is in use, the user is prompted for a passphrase if the remote print
+service is configured to require authentication.
diff --git a/usr/src/man/man1/ls.1 b/usr/src/man/man1/ls.1
new file mode 100644
index 0000000000..ebf1e60946
--- /dev/null
+++ b/usr/src/man/man1/ls.1
@@ -0,0 +1,2981 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ls 1 "3 Jun 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ls \- list contents of directory
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
+ [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
+ [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
+ [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
+ [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
+ [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
+ [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
+ [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
+ [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
+ [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+For each \fIfile\fR that is a directory, \fBls\fR lists the contents of the
+directory. For each \fIfile\fR that is an ordinary file, \fBls\fR repeats its
+name and any other information requested. The output is sorted alphabetically
+by default. When no argument is given, the current directory (\fB\&.\fR) is
+listed. When several arguments are given, the arguments are first sorted
+appropriately, but file arguments appear before directories and their contents.
+.sp
+.LP
+There are three major listing formats. The default format for output directed
+to a terminal is multi\(micolumn with entries sorted down the columns. The
+\fB-1\fR option allows single column output and \fB-m\fR enables stream output
+format. In order to determine output formats for the \fB-C\fR, \fB-x\fR, and
+\fB-m\fR options, \fBls\fR uses an environment variable, \fBCOLUMNS\fR, to
+determine the number of character positions available on one output line. If
+this variable is not set, the \fBterminfo\fR(4) database is used to determine
+the number of columns, based on the environment variable, \fBTERM\fR. If this
+information cannot be obtained, 80 columns are assumed. If the \fB-w\fR option
+is used, the argument overrides any other column width.
+.sp
+.LP
+The mode printed when the \fB-e\fR, \fB-E\fR, \fB-g\fR, \fB-l\fR, \fB-n\fR,
+\fB-o\fR, \fB-v\fR, \fB-V\fR, or \fB-@\fR option is in effect consists of
+eleven characters. The first character can be one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is a door.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is a symbolic link.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBb\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is a block special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is a character special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is a \fBFIFO\fR (or "named pipe") special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is an event port.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is an \fBAF_UNIX\fR address family socket.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.sp .6
+.RS 4n
+The entry is an ordinary file.
+.RE
+
+.sp
+.LP
+The next 9 characters are interpreted as three sets of three 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
+three characters indicate permission to read, to write, and to execute the file
+as a program, respectively. For a directory, \fBexecute\fR permission is
+interpreted to mean permission to search the directory for a specified file.
+The character after permissions is an ACL or extended attributes indicator.
+This character is an \fB@\fR if extended attributes are associated with the
+file and the \fB-@\fR option is in effect. Otherwise, this character is a plus
+sign (\fB+\fR) character if a non-trivial ACL is associated with the file or a
+space character if not.
+.sp
+.LP
+If \fB-/\fR and/or \fB-%\fR are in effect, then the extended system attributes
+are printed when filesystem supports extended system attributes. The display
+looks as follows:
+.sp
+.in +2
+.nf
+$ls -/ c file
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+ {AHRSadim-u}
+
+$ls -/ v file
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+ {archive,hidden,readonly,system,appendonly\e
+ nodump,immutable, av_modified,\e
+ noav_quarantined,nounlink}
+
+$ls -l -% all file
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+ timestamp: atime Jun 25 12:56:44 2007
+ timestamp: ctime May 10 14:20:23 2007
+ timestamp: mtime May 10 14:17:56 2007
+ timestamp: crtime May 10 14:17:56 2007
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+See the option descriptions of the \fB-/\fR and \fB-%\fR option for details.
+.sp
+.LP
+\fBls\fR \fB-l\fR (the long list) prints its output as follows for the POSIX
+locale:
+.sp
+.in +2
+.nf
+-rwxrwxrwx+ 1 smith dev 10876 May 16 9:42 part2
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Reading from right to left, you see that the current directory holds one file,
+named \fBpart2\fR. Next, the last time that file's contents were modified was
+\fB9:42 A.M.\fR on \fBMay 16\fR. The file contains 10,876 characters, or bytes.
+The owner of the file, or the user, belongs to the group \fBdev\fR (perhaps
+indicating \fBdevelopment\fR), and his or her login name is \fBsmith\fR. The
+number, in this case \fB1\fR, indicates the number of links to file \fBpart2\fR
+(see \fBcp\fR(1)). The plus sign indicates that there is an \fBACL\fR
+associated with the file. If the \fB-@\fR option has been specified, the
+presence of extended attributes supersede the presence of an \fBACL\fR and the
+plus sign is replaced with an 'at' sign (\fB@\fR). Finally, the dash and
+letters tell you that user, group, and others have permissions to read, write,
+and execute \fBpart2\fR.
+.sp
+.LP
+The execute (\fBx\fR) symbol occupies the third position of the three-character
+sequence. A \fB\(mi\fR in the third position would have indicated a denial of
+execution permissions.
+.sp
+.LP
+The permissions are indicated as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.sp .6
+.RS 4n
+The file is readable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fR\fR
+.ad
+.sp .6
+.RS 4n
+The file is writable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.sp .6
+.RS 4n
+The file is executable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.sp .6
+.RS 4n
+The indicated permission is \fInot\fR granted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBs\fRet-user-ID or \fBs\fRet-group-ID bit is on, and the corresponding
+user or group execution bit is also on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.sp .6
+.RS 4n
+Undefined bit-state (the set-user-ID or set-group-id bit is on and the user or
+group execution bit is off). For group permissions, this applies only to
+non-regular files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.sp .6
+.RS 4n
+The 1000 (octal) bit, or sticky bit, is on (see \fBchmod\fR(1)), and execution
+is on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT\fR\fR
+.ad
+.sp .6
+.RS 4n
+The 1000 bit is turned on, and execution is off (undefined bit-state).
+.RE
+
+.SS "/usr/bin/ls"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mandatory locking occurs during access (on a regular file, the set-group-ID bit
+is on and the group execution bit is off).
+.RE
+
+.SS "/usr/xpg4/bin/ls and /usr/xpg6/bin/ls"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBL\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mandatory locking occurs during access (on a regular file, the set-group-ID bit
+is on and the group execution bit is off).
+.RE
+
+.sp
+.LP
+For user and group permissions, the third position is sometimes occupied by a
+character other than \fBx\fR or \fB-\fR. \fBs\fR or \fBS\fR also can occupy
+this position, referring to the state of the set-ID bit, whether it be the
+user's or the group's. The ability to assume the same ID as the user during
+execution is, for example, used during login when you begin as root but need to
+assume the identity of the user you login as.
+.sp
+.LP
+In the case of the sequence of group permissions, \fBl\fR can occupy the third
+position. \fBl\fR refers to mandatory file and record locking. This permission
+describes a file's ability to allow other files to lock its reading or writing
+permissions during access.
+.sp
+.LP
+For others permissions, the third position can be occupied by \fBt\fR or
+\fBT\fR. These refer to the state of the sticky bit and execution permissions.
+.SS "Color Output"
+.sp
+.LP
+If color output is enabled, the environment variable LS_COLORS is checked. If
+it exists, it's contents are used to control the colors used to display
+filenames. If it is not set, a default list of colors is used. The format of
+LS_COLORS is a colon separated list of attribute specifications. Each attribute
+specification is of the format
+.sp
+.in +2
+.nf
+\fIfilespec\fR=\fIattr\fR[;\fIattr\fR..]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fIfilespec\fR is either of the form \fI*.SUFFIX\fR, for example, \fB*.jar\fR
+or \fB*.Z\fR, or one of the following file types:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBno\fR\fR
+.ad
+.sp .6
+.RS 4n
+Normal file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfi\fR\fR
+.ad
+.sp .6
+.RS 4n
+Regular file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdi\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBln\fR\fR
+.ad
+.sp .6
+.RS 4n
+Symbolic link
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpi\fR\fR
+.ad
+.sp .6
+.RS 4n
+FIFO or named pipe
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBso\fR\fR
+.ad
+.sp .6
+.RS 4n
+Socket
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdo\fR\fR
+.ad
+.sp .6
+.RS 4n
+Door file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Block device
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Character device
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBex\fR\fR
+.ad
+.sp .6
+.RS 4n
+Execute bit (either \fBuser\fR, \fBgroup\fR, or \fBother\fR) set
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpo\fR\fR
+.ad
+.sp .6
+.RS 4n
+Event port
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBst\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sticky bit set
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBor\fR\fR
+.ad
+.sp .6
+.RS 4n
+Orphaned symlink
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsg\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBsetgid\fR binary
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsu\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBsetuid\fR binary
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBow\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBworld\fR writable
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtw\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sticky bit and \fBworld\fR writable
+.RE
+
+.sp
+.LP
+\fIattr\fR is a semicolon delimited list of color and display attributes which
+are combined to determine the final output color. Any combination of \fIattr\fR
+values can be specified. Possible \fIattr\fR values are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB00\fR\fR
+.ad
+.sp .6
+.RS 4n
+All attributes off (default terminal color)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB01\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display text in bold
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB04\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display text with an underscore
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB05\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display text in bold
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB07\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display text with foreground and background colors reversed
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB08\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display using concealed text.
+.RE
+
+.sp
+.LP
+One of the following values can be chosen. If multiple values are specified,
+the last specified value is used.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB30\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBblack\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB31\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBred\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB32\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBgreen\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB33\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fByellow\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB34\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBblue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB35\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBmagenta\fR (\fBpurple\fR).
+.sp
+Set foreground to \fB\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB36\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBcyan\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB37\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBwhite\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB39\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to default terminal color.
+.RE
+
+.sp
+.LP
+One of the following can be specified. If multiple values are specified, the
+last value specified is used.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB40\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBblack\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB41\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBred\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB42\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBgreen\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB43\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fByellow\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB44\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBblue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB45\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBmagenta\fR (\fBpurple\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB46\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBcyan\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB47\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to \fBwhite\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB49\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set foreground to default terminal color.
+.RE
+
+.sp
+.LP
+On some terminals, setting the bold attribute causes the foreground colors to
+be high-intensity, that is, brighter. In such cases the low-intensity yellow is
+often displayed as a brown or orange color.
+.sp
+.LP
+At least one attribute must be listed for a file specification.
+.sp
+.LP
+The appropriate color codes are chosen by selecting the most specific match,
+starting with the file suffixes and proceeding with the file types until a
+match is found. The \fBno\fR (normal file) type matches any file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.SS "/usr/bin/ls, /usr/xpg4/bin/ls, and /usr/xpg6/bin/ls"
+.sp
+.LP
+The following options are supported for all three versions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.br
+.na
+\fB\fB--all\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists all entries, including those that begin with a dot (\fB\&.\fR), which are
+normally not listed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.br
+.na
+\fB\fB--almost-all\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists all entries, including those that begin with a dot (\fB\&.\fR), with the
+exception of the working directory (\fB\&.\fR) and the parent directory
+(\fB\&..\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.br
+.na
+\fB\fB--escape\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces printing of non-printable characters to be in the octal
+\fB\e\fR\fIddd\fR notation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.br
+.na
+\fB\fB--ignore-backups\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not display any files ending with a tilde (\fB~\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses time of last modification of the i-node (file created, mode changed, and
+so forth) for sorting (\fB-t\fR) or printing (\fB-l\fR or \fB-n\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.sp .6
+.RS 4n
+Multi-column output with entries sorted down the columns. This is the default
+output format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.sp .6
+.RS 4n
+If an argument is a directory, lists only its name (not its contents). Often
+used with \fB-l\fR to get the status of a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except displays time to the second, and with one format
+for all files regardless of age: \fImmm dd hh:mm:ss yyyy\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except displays time to the nanosecond and with one
+format for all files regardless of age: \fIyyyy-mm-dd hh:mm:ss.nnnnnnnnn\fR
+(ISO 8601:2000 format).
+.sp
+In addition, this option displays the offset from UTC in ISO 8601:2000 standard
+format (+\fIhhmm\fR or -\fIhhmm\fR) or no characters if the offset is
+indeterminable. The offset reflects the appropriate standard or alternate
+offset in force at the file's displayed date and time, under the current
+timezone.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces each argument to be interpreted as a directory and list the name found
+in each slot. This option turns off \fB-l\fR, \fB-t\fR, \fB-s\fR, \fB-S\fR, and
+\fB-r\fR, and turns on \fB-a\fR. The order is the order in which entries appear
+in the directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.br
+.na
+\fB\fB--classify\fR\fR
+.ad
+.sp .6
+.RS 4n
+Append a symbol after certain types of files to indicate the file type. The
+following symbols are used:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>\fR\fR
+.ad
+.sp .6
+.RS 4n
+Door file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB|\fR\fR
+.ad
+.sp .6
+.RS 4n
+Named pipe (\fBFIFO\fR)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB@\fR\fR
+.ad
+.sp .6
+.RS 4n
+Symbolic link
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR\fR
+.ad
+.sp .6
+.RS 4n
+Socket
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.sp .6
+.RS 4n
+Executable
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except that the owner is not printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.br
+.na
+\fB\fB--human-readable\fR\fR
+.ad
+.sp .6
+.RS 4n
+All sizes are scaled to a human readable format, for example, \fB14K\fR,
+\fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by repetitively dividing
+by \fB1024\fR. The last --si or -h option determines the divisor used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.br
+.na
+\fB\fB--dereference-command-line\fR\fR
+.ad
+.sp .6
+.RS 4n
+If an argument is a symbolic link that references a directory, this option
+evaluates the file information and file type of the directory that the link
+references, rather than those of the link itself. However, the name of the link
+is displayed, rather than the referenced directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.br
+.na
+\fB\fB--inode\fR\fR
+.ad
+.sp .6
+.RS 4n
+For each file, prints the i-node number in the first column of the report.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.sp .6
+.RS 4n
+All sizes are printed in kbytes. Equivalent to --block-size=1024.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists in long format, giving mode, \fBACL\fR indication, number of links,
+owner, group, size in bytes, and time of last modification for each file (see
+above). If the file is a special file, the size field instead contains the
+major and minor device numbers. If the time of last modification is greater
+than six months ago, it is shown in the format `month date year' for the POSIX
+locale. When the \fBLC_TIME\fR locale category is not set to the POSIX locale,
+a different format of the time field can be used. Files modified within six
+months show `month date time'. If the file is a symbolic link, the filename is
+printed followed by "\fB\(->\fR" and the path name of the referenced file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.br
+.na
+\fB\fB--dereference\fR\fR
+.ad
+.sp .6
+.RS 4n
+If an argument is a symbolic link, this option evaluates the file information
+and file type of the file or directory that the link references, rather than
+those of the link itself. However, the name of the link is displayed, rather
+than the referenced file or directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.sp .6
+.RS 4n
+Streams output format. Files are listed across the page, separated by commas.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.br
+.na
+\fB\fB--numeric-uid-gid\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except that the owner's \fBUID\fR and group's \fBGID\fR
+numbers are printed, rather than the associated character strings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.br
+.na
+\fB\fB--no-group\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except that the group is not printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.sp .6
+.RS 4n
+Puts a slash (\fB/\fR) after each filename if the file is a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.br
+.na
+\fB\fB--hide-control-chars\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces printing of non-printable characters in file names as the character
+question mark (\fB?\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB--reverse\fR\fR
+.ad
+.sp .6
+.RS 4n
+Reverses the order of sort to get reverse alphabetic, oldest first, or smallest
+file size first as appropriate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.br
+.na
+\fB\fB--recursive\fR\fR
+.ad
+.sp .6
+.RS 4n
+Recursively lists subdirectories encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--size\fR\fR
+.ad
+.sp .6
+.RS 4n
+Indicate the total number of file system blocks consumed by each file
+displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sort by file size (in decreasing order) and for files with the same size by
+file name (in increasing alphabetic order) instead of just by name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sorts by time stamp (latest first) instead of by name. The default is the last
+modification time. See \fB-c\fR, \fB-u\fR and \fB-%\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses time of last access instead of last modification for sorting (with the
+\fB-t\fR option) or printing (with the \fB-l\fR option).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.sp .6
+.RS 4n
+Output is unsorted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except that verbose ACL information is displayed as well
+as the \fB-l\fR output. ACL information is displayed even if the file or
+directory doesn't have an ACL.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except that compact ACL information is displayed after
+the \fB-l\fR output.
+.sp
+The \fB-V\fR option is only applicable to file systems that support NFSv4 ACLs,
+such as the Solaris ZFS file system.
+.sp
+The format of the displayed ACL is as follows:
+.sp
+.in +2
+.nf
+\fIentry_type\fR : \fIpermissions\fR : \fIinheritance_flags\fR : \fIaccess_type\fR
+.fi
+.in -2
+.sp
+
+\fIentry_type\fR is displayed as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fBuser:\fIusername\fR\fR
+.ad
+.sp .6
+.RS 4n
+Additional user access for \fIusername\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroup:\fIgroupname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Additional group access for group \fIgroupname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBowner@\fR
+.ad
+.sp .6
+.RS 4n
+File owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBgroup@\fR
+.ad
+.sp .6
+.RS 4n
+File group owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBeveryone@\fR
+.ad
+.sp .6
+.RS 4n
+Everyone access, including file owner and file group owner. This is not
+equivalent to the POSIX other class.
+.RE
+
+The following permissions, supported by the NFSv4 ACL model, are displayed by
+using the \fB-v\fR or \fB-V\fR options:
+.sp
+.ne 2
+.mk
+.na
+\fBread_data (\fBr\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to read the data of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBlist_directory (\fBr\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to list the contents of a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_data (\fBw\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to modify a file's data. anywhere in the file's offset range.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBadd_file (\fBw\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to add a new file to a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBappend_data (\fBp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The ability to modify a file's data, but only starting at EOF.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBadd_subdirectory (\fBp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to create a subdirectory to a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread_xattr (\fBR\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Ability to read the extended attributes of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_xattr (\fBW\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Ability to create extended attributes or write to the extended attribute
+directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBexecute (\fBx\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to execute a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread_attributes (\fBa\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The ability to read basic attributes (non-ACLs) of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_attributes (\fBA\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to change the times associated with a file or directory to an
+arbitrary value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdelete (\fBd\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to delete a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdelete_child (\fBD\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to delete a file within a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread_acl (\fBc\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to read the ACL of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_acl (\fBC\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to write the ACL of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwrite_owner (\fBo\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to change the owner of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsynchronize (\fBs\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Permission to access file locally at server with synchronize reads and writes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.sp .6
+.RS 4n
+No permission granted
+.RE
+
+The following inheritance flags, supported by the NFSv4 ACL model, are
+displayed by using the \fB-v\fR or \fB-V\fR options:
+.sp
+.ne 2
+.mk
+.na
+\fBfile_inherit (\fBf\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Inherit to all newly created files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdir_inherit (\fBd\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Inherit to all newly created directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBinherit_only (\fBi\fR)\fR
+.ad
+.sp .6
+.RS 4n
+When placed on a directory, do not apply to the directory, only to newly
+created files and directories. This flag requires that either
+\fBfile_inherit\fR and or \fBdir_inherit\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBno_propagate (\fBn\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Indicates that ACL entries should be inherited to objects in a directory, but
+inheritance should stop after descending one level. This flag is dependent upon
+either \fBfile_inherit\fR and or \fBdir_inherit\fR also being specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsuccessful_access (\fBS\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Indicates if an alarm or audit record should be initiated upon successful
+accesses. Used with audit/alarm ACE types.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBfailed_access (\fBF\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Indicates if an alarm or audit record should be initiated when access fails.
+Used with audit/alarm ACE types.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBinherited (\fBI\fR)\fR
+.ad
+.sp .6
+.RS 4n
+ACE was inherited.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.sp .6
+.RS 4n
+No permission granted.
+.RE
+
+\fIaccess_type\fR is displayed as one of the following types:
+.sp
+.ne 2
+.mk
+.na
+\fBalarm\fR
+.ad
+.RS 9n
+.rt
+Permission field that specifies permissions that should trigger an alarm.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBallow\fR
+.ad
+.RS 9n
+.rt
+Permission field that specifies allow permissions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBaudit\fR
+.ad
+.RS 9n
+.rt
+Permission field that specifies permissions that should be audited.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdeny\fR
+.ad
+.RS 9n
+.rt
+Permission field that specifies deny permissions.
+.RE
+
+For example:
+.sp
+.in +2
+.nf
+$ ls -dV /sandbox/dir.1
+ drwxr-xr-x+ 2 root root 2 Jan 17 15:09 dir.1
+ user:marks:r-------------:fd-----:allow
+ owner@:--------------:-------:deny
+ owner@:rwxp---A-W-Co-:-------:allow
+ group@:-w-p----------:-------:deny
+ group@:r-x-----------:-------:allow
+ everyone@:-w-p---A-W-Co-:-------:deny
+ everyone@:r-x---a-R-c--s:-------:allow
+$
+ ||||||||||||||||:||||||+ inherited access
+ ||||||||||||||:||||||+ failed access
+ ||||||||||||||:|||||+--success access
+ ||||||||||||||:||||+-- no propagate
+ ||||||||||||||:|||+--- inherit only
+ ||||||||||||||:||+---- directory inherit
+ ||||||||||||||:|+----- file inherit
+ ||||||||||||||
+ ||||||||||||||+ sync
+ |||||||||||||+- change owner
+ ||||||||||||+-- write ACL
+ |||||||||||+--- read ACL
+ ||||||||||+---- write extended attributes
+ |||||||||+----- read extended attributes
+ ||||||||+------ write attributes
+ |||||||+------- read attributes
+ ||||||+-------- delete child
+ |||||+--------- delete
+ ||||+---------- append
+ |||+----------- execute
+ ||+------------ write data
+ |+------------- read data
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIcols\fR\fR
+.ad
+.br
+.na
+\fB\fB--width\fR \fIcols\fR\fR
+.ad
+.sp .6
+.RS 4n
+Multi-column output where the column width is forced to \fIcols\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Multi-column output with entries sorted across rather than down the page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints one entry per line of output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-@\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, except that extended attribute information overrides
+\fBACL\fR information. An \fB@\fR is displayed after the file permission bits
+for files that have extended attributes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR | \fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+The same as \fB-l\fR, and in addition displays the extended system attributes
+associated with the file when extended system attributes are fully supported by
+the underlying file system. The option \fB-/\fR supports two option arguments
+\fBc\fR (compact mode) and \fBv\fR (verbose mode).
+.sp
+.ne 2
+.mk
+.na
+\fB\fBappendonly\fR\fR
+.ad
+.sp .6
+.RS 4n
+Allows a file to be modified only at offset \fBEOF\fR. Attempts to modify a
+file at a location other than \fBEOF\fR fails with \fBEPERM\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBarchive\fR\fR
+.ad
+.sp .6
+.RS 4n
+Indicates if a file has been modified since it was last backed up. Whenever the
+modification time (\fBmtime\fR) of a file is changed the \fBarchive\fR
+attribute is set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBav_modified\fR\fR
+.ad
+.sp .6
+.RS 4n
+ZFS sets the anti-virus attribute which whenever a file's content or size
+changes or when the file is renamed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBav_quarantined\fR\fR
+.ad
+.sp .6
+.RS 4n
+Anti-virus software sets to mark a file as quarantined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrtime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Timestamp when a file is created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhidden\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks a file as hidden.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimmutable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prevents the content of a file from being modified. Also prevents all metadata
+changes, except for access time updates. When placed on a directory, prevents
+the deletion and creation of files in the directories. Attempts to modify the
+content of a file or directory marked as \fBimmutable\fR fail with \fBEPERM\fR.
+Attempts to modify any attributes (with the exception of access time and, with
+the proper privileges, the \fBimmutable\fR) of a file marked as \fBimmutable\fR
+fails with \fBEPERM\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnodump\fR\fR
+.ad
+.sp .6
+.RS 4n
+Solaris systems have no special semantics for this attribute.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnounlink\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prevents a file from being deleted. On a directory, the attribute also prevents
+any changes to the contents of the directory. That is, no files within the
+directory can be removed or renamed. The \fBerrno\fR \fBEPERM\fR is returned
+when attempting to unlink or rename files and directories that are marked as
+\fBnounlink\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreadonly\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks a file as \fBreadonly\fR. Once a file is marked as \fBreadonly\fR the
+content data of the file cannot be modified. Other metadata for the file can
+still be modified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsystem\fR\fR
+.ad
+.sp .6
+.RS 4n
+Solaris systems have no special semantics for this attribute.
+.RE
+
+.RE
+
+.sp
+.LP
+The display characters used in compact mode (\fB-/ c\fR) are as follows:
+.sp
+.in +2
+.nf
+Attribute Name Display
+archive A
+hidden H
+readonly R
+system S
+appendonly a
+nodump d
+immutable i
+av_modified m
+av_quarantined q
+nounlink u
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The display in verbose mode (/ v) uses full attribute names when it is set and
+the name prefixed by 'no' when it is not set.
+.sp
+.LP
+The attribute name \fBcrtime\fR and all other timestamps are handled by the
+option \fB-%\fR with the respective timestamp option arguments and also with
+\fBall\fR option argument. The display positions are as follows: The display in
+verbose mode (\fB-/ v\fR) uses full attribute names when it is set and the
+name prefixed by \fBno\fR when it is not set. The attribute name \fBcrtime\fR
+and all other timestamps are handled by the option \fB-%\fR with the respective
+timestamp option arguments and also with \fBall\fR option argument.
+.sp
+.LP
+The display positions are as follows:
+.sp
+.in +2
+.nf
+{||||||||||}
+ |||||||||+- u (nounlink)
+ ||||||||+-- q (av_quarantined)
+ |||||||+--- m (av_modified)
+ ||||||+---- i (immutable)
+ |||||+----- d (nodump)
+ ||||+------ a (appendonly)
+ |||+------- S (system)
+ ||+-------- R (readonly)
+ |+--------- H (hidden)
+ +---------- A (archive)
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+-% atime | crtime | ctime | mtime | all
+.fi
+.in -2
+.sp
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBatime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Equivalent to \fB-u\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrtime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the creation time of the file for sorting or printing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBctime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Equivalent to \fB-c\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmtime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the last modification time of the file contents for sorting or printing.
+.RE
+
+.sp
+.LP
+If extended system attributes are not supported or if the user does not have
+\fBread\fR permission on the file or if the \fBcrtime\fR extended attribute is
+not set, \fBcrtime\fR is treated as a synonym for \fBmtime\fR.
+.sp
+.LP
+When option argument \fB-all\fR is specified, all available timestamps are
+printed which includes \fB-atime\fR, \fB-ctime\fR, \fB-mtime\fR and on the
+extended system attribute supporting file systems, \fB-crtime\fR (create time).
+The option \fB-% all\fR does not effect which timestamp is displayed in long
+format and does not affect sorting.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--block-size\fR \fIsize\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display sizes in multiples of size. Size can be scaled by suffixing one of
+\fBYyZzEePpTtGgMmKk\fR. Additionally, a \fBB\fR can be placed at the end to
+indicate powers of 10 instead of 2. For example, . \fB10mB\fR means blocks of
+\fB10000000\fR bytes while \fB10m\fR means blocks of \fB10*2^20 -- 10485760
+--\fR bytes. This is mutually exclusive with the \fB-h\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--color\fR \fB[=\fR\fIwhen\fR\fB]\fR\fR
+.ad
+.br
+.na
+\fB\fB--colour\fR\fB[=\fR\fIwhen\fR\fB]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display filenames using color on color-capable terminals. \fIwhen\fR is an
+optional argument that determines when to display color output.
+.sp
+Possible values for \fIwhen\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBalways\fR\fR
+.ad
+.br
+.na
+\fB\fByes\fR\fR
+.ad
+.br
+.na
+\fB\fBforce\fR\fR
+.ad
+.sp .6
+.RS 4n
+Always use color.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauto\fR\fR
+.ad
+.br
+.na
+\fB\fBtty\fR\fR
+.ad
+.br
+.na
+\fB\fBif-tty\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use color if a terminal is present.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBno\fR\fR
+.ad
+.br
+.na
+\fB\fBnever\fR\fR
+.ad
+.br
+.na
+\fB\fBnone\fR\fR
+.ad
+.sp .6
+.RS 4n
+Never use color. This is the default
+.RE
+
+See \fBCOLOR OUTPUT\fR for information on how to control the output colors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--file-type\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display a suffix after a file depending on it's type, similar to the \fB-F\fR
+option, except \fB*\fR is not appended to executable files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-si\fR\fR
+.ad
+.br
+.na
+\fB\fB--\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display human scaled sizes similar to the \fB-h\fR option, except values are
+repeatedly divided by 1000 instead of 1024. The last option \fB--si\fR or
+\fB-h\fR determines the divisor used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--time-style\fR style\fR
+.ad
+.sp .6
+.RS 4n
+Display times using the specified style. This does not effect the times
+displayed for extended attributes (\fB-%\fR).
+.sp
+Possible values for \fIstyle\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfull-iso\fR\fR
+.ad
+.sp .6
+.RS 4n
+Equivalent to \fB-E\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlong-iso\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display in \fIYYYY-MM-DD HH:MM\fR for all files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBiso\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display older files using \fIYYYY-MM-DD\fR and newer files with \fIMM-DD
+HH:MM\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlocale\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use the default locale format for old and new files. This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+FORMAT\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use a custom format. Values are the same as described in \fBstrftime\fR(3C). If
+a NEWLINE appears in the string, the first line is used for older files and the
+second line is used for newer files. Otherwise, the given format is used for
+all files.
+.RE
+
+.RE
+
+.SS "/usr/bin/ls"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks directories with a trailing slash (\fB/\fR), doors with a trailing
+greater-than sign (\fB>\fR), executable files with a trailing asterisk
+(\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
+with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
+with a trailing equals sign (\fB=\fR). Follows \fBsymlinks\fR named as
+operands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--file-type\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks entries as with \fB-F\fR with the exception of executable files.
+Executable files are not marked. Follows symlinks named as operands.
+.RE
+
+.sp
+.LP
+Specifying more than one of the options in the following mutually exclusive
+pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), \fB-m\fR and
+\fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell). The
+\fB-l\fR option overrides the other option specified in each pair.
+.sp
+.LP
+Specifying more than one of the options in the following mutually exclusive
+groups is not considered an error: \fB-C\fR and \fB-1\fR (one), \fB-H\fR and
+\fB-L\fR, \fB-c\fR and \fB-u\fR, and \fB-e\fR and \fB-E\fR, and \fB-t\fR and
+\fB-S\fR. The last option specifying a specific timestamp (\fB-c\fR, \fB-u\fR,
+\fB-% atime\fR , \fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR)
+determines the timestamps used for sorting or in long format listings. The last
+option \fB-t\fR, \fB-S\fR, or \fB-U\fR determines the sorting behavior.
+.SS "/usr/xpg4/bin/ls"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks directories with a trailing slash (\fB/\fR), doors with a trailing
+greater-than sign (\fB>\fR), executable files with a trailing asterisk
+(\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
+with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
+with a trailing equals sign (\fB=\fR). Follows symlinks named as operands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--file-type\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks entries as with \fB-F\fR with the exception of executable files.
+Executable files are not marked. Follows symlinks named as operands.
+.RE
+
+.sp
+.LP
+Specifying more than one of the options in the following groups of mutually
+exclusive options is not considered an error: \fB-C\fR and \fB-l\fR (ell),
+\fB-m\fR and \fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR
+(ell), \fB-C\fR and \fB-1\fR (one), \fB-H\fR and \fB-L\fR, \fB-c\fR and
+\fB-u\fR, \fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last
+option specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR ,
+\fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps
+used for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or
+\fB-U\fR option determines the sorting behavior.
+.SS "/usr/xpg6/bin/ls"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks directories with a trailing slash (\fB/\fR), doors with a trailing
+greater-than sign (\fB>\fR), executable files with a trailing asterisk
+(\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
+with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
+with a trailing equals sign (\fB=\fR). Does not follow symlinks named as
+operands unless the \fB-H\fR or \fB-L\fR option is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--file-type\fR\fR
+.ad
+.sp .6
+.RS 4n
+Marks entries as with \fB-F\fR with the exception of executable files.
+Executable files are not marked. Does not follow symlinks named as operands
+unless the \fB-H\fR or \fB-L\fR option is specified.
+.RE
+
+.sp
+.LP
+Specifying more than one of the options in the following mutually exclusive
+pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), m and
+\fB-l\fR(ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell),
+\fB-C\fR and \fB-1\fR (one), \fB-H\fR and -\fB-L\fR, \fB-c\fR and \fB-u\fR,
+\fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last option
+specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR , \fB-%
+crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps used
+for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or
+\fB-U\fR option determines the sorting behavior.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+A path name of a file to be written. If the file specified is not found, a
+diagnostic message is output on standard error.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBls\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRViewing File Permissions
+.sp
+.LP
+The following example shows how to display detailed information about a file.
+
+.sp
+.in +2
+.nf
+% ls -l file.1
+-rw-r--r-- 1 gozer staff 206663 Mar 14 10:15 file.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The permissions string above (\fB-rw-r--r--\fR) describes that the file owner
+has read and write permissions, the owning group has read permissions, and
+others have read permissions.
+
+.sp
+.LP
+The following example shows how to display detailed information about a
+directory.
+
+.sp
+.in +2
+.nf
+% ls -ld test.dir
+drwxr-xr-x 2 gozer staff 2 Mar 14 10:17 test.dir
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The permissions string above (\fBdrwxr-xr-x\fR) describes that the directory
+owner has read, write, and search permissions, the owning group has read and
+search permissions, and others have read and search permissions.
+
+.sp
+.LP
+Another example of listing file permissions is as follows:
+
+.sp
+.in +2
+.nf
+% ls -l file.2
+-rw-rwl--- 1 gozer staff 206663 Mar 14 10:47 file.2
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The permissions string above (\fB-rw-rwl---\fR) describes that the file owner
+has read and write permissions, the owning group has read and write
+permissions, and the file can be locked during access.
+
+.LP
+\fBExample 2 \fRDisplaying ACL Information on Files and Directories
+.sp
+.LP
+The following example shows how to display verbose ACL information on a ZFS
+file.
+
+.sp
+.in +2
+.nf
+% ls -v file.1
+-rw-r--r-- 1 marks staff 206663 Mar 14 10:15 file.1
+ 0:owner@:execute:deny
+ 1:owner@:read_data/write_data/append_data/write_xattr/write_attributes
+ /write_acl/write_owner:allow
+ 2:group@:write_data/append_data/execute:deny
+ 3:group@:read_data:allow
+ 4:everyone@:write_data/append_data/write_xattr/execute/write_attributes
+ /write_acl/write_owner:deny
+ 5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize
+ :allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example shows how to display compact ACL information on a ZFS
+directory.
+
+.sp
+.in +2
+.nf
+% ls -dV test.dir
+drwxr-xr-x 2 marks staff 2 Mar 14 10:17 test.dir
+ owner@:--------------:------:deny
+ owner@:rwxp---A-W-Co-:------:allow
+ group@:-w-p----------:------:deny
+ group@:r-x-----------:------:allow
+ everyone@:-w-p---A-W-Co-:------:deny
+ everyone@:r-x---a-R-c--s:------:allow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example illustrates the \fBls\fR \fB-v\fR behavior when listing
+ACL information on a UFS file.
+
+.sp
+.in +2
+.nf
+$ ls -v file.3
+-rw-r--r-- 1 root root 2703 Mar 14 10:59 file.3
+ 0:user::rw-
+ 1:group::r-- #effective:r--
+ 2:mask:r--
+ 3:other:r--
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrinting the Names of All Files
+.sp
+.LP
+The following example prints the names of all files in the current directory,
+including those that begin with a dot (\fB\&.\fR), which normally do not print:
+
+.sp
+.in +2
+.nf
+example% \fBls -a\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRProviding File Information
+.sp
+.LP
+The following example provides file information:
+
+.sp
+.in +2
+.nf
+example% ls -aisn
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This command provides information on \fBa\fRll files, including those that
+begin with a dot (\fBa\fR), the \fBi\fR-number, the memory address of the
+i-node associated with the file\(emprinted in the left-hand column (\fBi\fR);
+the \fBs\fRize (in blocks) of the files, printed in the column to the right of
+the i-numbers (\fBs\fR); finally, the report is displayed in the \fBn\fRumeric
+version of the long list, printing the \fBUID\fR (instead of user name) and
+\fBGID\fR (instead of group name) numbers associated with the files.
+
+.sp
+.LP
+When the sizes of the files in a directory are listed, a total count of blocks,
+including indirect blocks, is printed.
+
+.LP
+\fBExample 5 \fRProviding Extended System Attributes Information
+.sp
+.in +2
+.nf
+example% ls -/ c file (extended system attribute in compact mode)
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+ {AHRSadim-u}
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this example, \fBav_quarantined\fR is not set.
+.sp
+.in +2
+.nf
+example% ls -/ v file (extended system attribute in verbose mode)
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+ {archive,hidden,readonly,system,appendonly\e
+ nodump,immutable,av_modified,\e
+ noav_quarantined,nounlink}
+
+example% ls -/ v file (no extended system attribute)
+-rw-r--r-- 1 root staff 0 May 16 14:48 file
+ {}
+
+example% ls -/ c file (extended system attribute
+ supported file system)
+
+-rw-r--r-- 1 root staff 3 Jun 4 22:04 file
+ {A------m--}
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBarchive\fR and \fBav_modified\fR attributes are set by default on an
+extended system attribute supported file.
+.sp
+.in +2
+.nf
+example% ls -/ c -%crtime file
+
+-rw-r--r-- root root 0 May 10 14:17 file
+ {AHRSadim-u}
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This example displays the timestamp as the creation time:
+.sp
+.in +2
+.nf
+example% ls -l -%all file
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+ timestamp: atime Jun 14 08:47:37 2007
+ timestamp: ctime May 10 14:20:23 2007
+ timestamp: mtime May 10 14:17:56 2007
+ timestamp: crtime May 10 14:17:56 2007
+
+example% ls -%crtime -tl file*
+
+-rw-r--r-- 1 foo staff 3 Jun 4 22:04 file1
+-rw-r--r-- 1 root root 0 May 10 14:17 file
+-rw-r--r-- 1 foo staff 0 May 9 13:49 file.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In this example the files are sorted by creation time.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBls\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR,
+\fBNLSPATH\fR, and \fBTZ\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOLUMNS\fR\fR
+.ad
+.sp .6
+.RS 4n
+Determines the user's preferred column position width for writing multiple
+text-column output. If this variable contains a string representing a decimal
+integer, the \fBls\fR utility calculates how many path name text columns to
+write (see \fB-C\fR) based on the width provided. If \fBCOLUMNS\fR is not set
+or is invalid, 80 is used. The column width chosen to write the names of files
+in any given directory is constant. File names are not be truncated to fit into
+the multiple text-column output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLS_COLORS\fR\fR
+.ad
+.sp .6
+.RS 4n
+Determines the coloring scheme used when displaying color output. If not set
+and color output is specified, a default scheme is used. If TERM is not set, no
+color output is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTERM\fR\fR
+.ad
+.sp .6
+.RS 4n
+Determine the terminal type. If this variable is unset or NULL, no color output
+is generated regardless of the value of the --color option.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All information was written successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.sp .6
+.RS 4n
+group IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-g\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.sp .6
+.RS 4n
+user IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-o\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/terminfo/?/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+terminal information database
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/ls"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee below.
+.TE
+
+.sp
+.LP
+For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
+\fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
+\fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
+\fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
+\fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
+\fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
+\fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
+\fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5).
+.SS "/usr/xpg4/bin/ls"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee below.
+.TE
+
+.sp
+.LP
+For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
+\fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
+\fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
+\fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
+\fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
+\fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
+\fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
+\fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5).
+.SS "/usr/xpg6/bin/ls"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee below.
+.TE
+
+.sp
+.LP
+For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
+\fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
+\fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
+\fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
+\fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
+\fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
+\fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
+\fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5).
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBcp\fR(1), \fBsetfacl\fR(1), \fBfgetattr\fR(3C),
+\fBstrftime\fR(3C), \fBterminfo\fR(4), \fBacl\fR(5), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBfsattr\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Unprintable characters in file names can confuse the columnar output options.
+.sp
+.LP
+The total block count is incorrect if there are hard links among the files.
+.sp
+.LP
+The sort order of \fBls\fR output is affected by the locale and can be
+overridden by the \fBLC_COLLATE\fR environment variable. For example, if
+\fBLC_COLLATE\fR equals \fBC\fR, dot files appear first, followed by names
+beginning with upper-case letters, then followed by names beginning with
+lower-case letters. But if \fBLC_COLLATE\fR equals \fBen_US.ISO8859-1\fR, then
+leading dots as well as case are ignored in determining the sort order.
diff --git a/usr/src/man/man1/m4.1 b/usr/src/man/man1/m4.1
new file mode 100644
index 0000000000..98f7e8b79f
--- /dev/null
+++ b/usr/src/man/man1/m4.1
@@ -0,0 +1,809 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH m4 1 "3 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+m4 \- macro processor
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/m4\fR [\fB-e\fR] [\fB-s\fR] [\fB-B\fR \fIint\fR] [\fB-H\fR \fIint\fR] [\fB-S\fR \fIint\fR]
+ [\fB-T\fR \fIint\fR] [\fB-D\fR\fIname\fR [\fI=val\fR]] ... [\fB-U\fR \fIname\fR] ... [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/m4\fR [\fB-e\fR] [\fB-s\fR] [\fB-B\fR \fIint\fR] [\fB-H\fR \fIint\fR] [\fB-S\fR \fIint\fR]
+ [\fB-T\fR \fIint\fR] [\fB-D\fR\fIname\fR [...\fI=val\fR]] [\fB-U\fR \fIname\fR] ... [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBm4\fR utility is a macro processor intended as a front end for C,
+assembler, and other languages. Each of the argument files is processed in
+order. If there are no files, or if a file is \fB\(mi\fR, the standard input is
+read. The processed text is written on the standard output. \fBNote:\fR
+\fBm4\fR cannot include more than nine nested files and writes a diagnostic
+message if that number is exceeded.
+.SS "Macro Syntax"
+.sp
+.LP
+Macro calls have the form:
+.sp
+.in +2
+.nf
+\fIname\fR(\fIarg1\fR,\fIarg2\fR, ..., \fIargn\fR)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The open parenthesis character, \fB(\fR, must immediately follow the name of
+the macro. If the name of a defined macro is not followed by a \fB(\fR, it is
+deemed to be a call of that macro with no arguments. Potential macro names
+consist of alphanumeric characters and underscore (\fB_\fR), where the first
+character is not a digit.
+.sp
+.LP
+Leading unquoted blanks, TABs, and \fBNEWLINE\fRs are ignored while collecting
+arguments. Left and right single quotes are used to quote strings. The value of
+a quoted string is the string stripped of the quotes.
+.SS "Macro Processing"
+.sp
+.LP
+When a macro name is recognized, its arguments are collected by searching for a
+matching right parenthesis. If fewer arguments are supplied than are in the
+macro definition, the trailing arguments are taken to be \fINULL\fR. Macro
+evaluation proceeds normally during the collection of the arguments, and any
+commas or right parentheses that happen to turn up within the value of a nested
+call are as effective as those in the original input text. After argument
+collection, the value of the macro is pushed back onto the input stream and
+rescanned.
+.SH OPTIONS
+.sp
+.LP
+The options and their effects are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fIint\fR\fR
+.ad
+.RS 9n
+.rt
+Changes the size of the push-back and argument collection buffers from the
+default of \fB4,096\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 9n
+.rt
+Operates interactively. Interrupts are ignored and the output is unbuffered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fIint\fR\fR
+.ad
+.RS 9n
+.rt
+Changes the size of the symbol table hash array from the default of \fB199\fR.
+The size should be prime.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 9n
+.rt
+Enables line sync output for the C preprocessor (\fB#\fRline .\|.\|.\|)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fIint\fR\fR
+.ad
+.RS 9n
+.rt
+Changes the size of the call stack from the default of \fB100\fRslots. Macros
+take three slots, and non-macro arguments take one.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fIint\fR\fR
+.ad
+.RS 9n
+.rt
+Changes the size of the token buffer from the default of \fB512\fRbytes.
+.RE
+
+.sp
+.LP
+To be effective, the above flags must appear before any file names and before
+any \fB-D\fR or \fB-U\fR flags:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIname\fR[\fB=\fR\fBval\fR]\fR
+.ad
+.RS 17n
+.rt
+Defines \fIname\fR to \fBval\fR or to \fINULL\fR in \fBval\fR's absence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fIname\fR\fR
+.ad
+.RS 17n
+.rt
+Undefines \fIname\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a text file to be processed. If no \fIfile\fR is given, or if it
+is \(mi, the standard input is read.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBm4\fR utility makes available the following built-in macros. These
+macros can be redefined, but once this is done the original meaning is lost.
+Their values are \fINULL\fR unless otherwise stated.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchangequote\fR\fR
+.ad
+.RS 15n
+.rt
+Change quote symbols to the first and second arguments. The symbols can be up
+to five characters long. \fBchangequote\fR without arguments restores the
+original values (that is, \fB`\|'\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchangecom\fR\fR
+.ad
+.RS 15n
+.rt
+Change left and right comment markers from the default \fB#\fR and
+\fBNEWLINE\fR. With no arguments, the comment mechanism is effectively
+disabled. With one argument, the left marker becomes the argument and the right
+marker becomes \fBNEWLINE\fR. With two arguments, both markers are affected.
+Comment markers can be up to five characters long.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdecr\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the value of its argument decremented by 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefine\fR\fR
+.ad
+.RS 15n
+.rt
+The second argument is installed as the value of the macro whose name is the
+first argument. Each occurrence of \fB$\fR\fIn\fR in the replacement text,
+where \fIn\fR is a digit, is replaced by the \fIn\fR-th argument. Argument 0 is
+the name of the macro; missing arguments are replaced by the null string;
+\fB$#\fR is replaced by the number of arguments; \fB$*\fR is replaced by a list
+of all the arguments separated by commas; \fB$@\fR is like \fB$*\fR, but each
+argument is quoted (with the current quotes).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefn\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the quoted definition of its argument(s). It is useful for renaming
+macros, especially built-ins.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdivert\fR\fR
+.ad
+.RS 15n
+.rt
+\fBm4\fR maintains 10 output streams, numbered 0-9. The final output is the
+concatenation of the streams in numerical order. Initially stream 0 is the
+current stream. The \fBdivert\fR macro changes the current output stream to its
+(digit-string) argument. Output diverted to a stream other than 0 through 9 is
+discarded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdivnum\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the value of the current output stream.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdnl\fR\fR
+.ad
+.RS 15n
+.rt
+Reads and discards characters up to and including the next \fBNEWLINE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdumpdef\fR\fR
+.ad
+.RS 15n
+.rt
+Prints current names and definitions, for the named items, or for all if no
+arguments are given.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerrprint\fR\fR
+.ad
+.RS 15n
+.rt
+Prints its argument on the diagnostic output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBifdef\fR\fR
+.ad
+.RS 15n
+.rt
+If the first argument is defined, the value is the second argument, otherwise
+the third. If there is no third argument, the value is \fINULL\fR. The word
+\fBunix\fR is predefined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBifelse\fR\fR
+.ad
+.RS 15n
+.rt
+This macro has three or more arguments. If the first argument is the same
+string as the second, then the value is the third argument. If not, and if
+there are more than four arguments, the process is repeated with arguments 4,
+5, 6 and 7. Otherwise, the value is either the fourth string, or, if it is not
+present, \fINULL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinclude\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the contents of the file named in the argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBincr\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the value of its argument incremented by 1. The value of the argument
+is calculated by interpreting an initial digit-string as a decimal number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindex\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the position in its first argument where the second argument begins
+(zero origin), or \(mi1 if the second argument does not occur.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlen\fR\fR
+.ad
+.RS 15n
+.rt
+Returns the number of characters in its argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm4exit\fR\fR
+.ad
+.RS 15n
+.rt
+This macro causes immediate exit from \fBm4\fR. Argument 1, if given, is the
+exit code; the default is \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm4wrap\fR\fR
+.ad
+.RS 15n
+.rt
+Argument 1 is pushed back at final \fBEOF\fR. Example:
+\fBm4wrap(`cleanup(\|)')\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmaketemp\fR\fR
+.ad
+.RS 15n
+.rt
+Fills in a string of "\fBX\fR" characters in its argument with the current
+process \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpopdef\fR\fR
+.ad
+.RS 15n
+.rt
+Removes current definition of its argument(s), exposing the previous one, if
+any.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpushdef\fR\fR
+.ad
+.RS 15n
+.rt
+Like \fBdefine\fR, but saves any previous definition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshift\fR\fR
+.ad
+.RS 15n
+.rt
+Returns all but its first argument. The other arguments are quoted and pushed
+back with commas in between. The quoting nullifies the effect of the extra scan
+that is subsequently be performed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsinclude\fR\fR
+.ad
+.RS 15n
+.rt
+This macro is identical to \fBinclude\fR, except that it says nothing if the
+file is inaccessible.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsubstr\fR\fR
+.ad
+.RS 15n
+.rt
+Returns a substring of its first argument. The second argument is a zero origin
+number selecting the first character; the third argument indicates the length
+of the substring. A missing third argument is taken to be large enough to
+extend to the end of the first string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsyscmd\fR\fR
+.ad
+.RS 15n
+.rt
+This macro executes the command given in the first argument. No value is
+returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsysval\fR\fR
+.ad
+.RS 15n
+.rt
+This macro is the return code from the last call to \fBsyscmd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtranslit\fR\fR
+.ad
+.RS 15n
+.rt
+Transliterates the characters in its first argument from the set given by the
+second argument to the set given by the third. No abbreviations are permitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtraceon\fR\fR
+.ad
+.RS 15n
+.rt
+This macro with no arguments, turns on tracing for all macros (including
+built-ins). Otherwise, turns on tracing for named macros.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtraceoff\fR\fR
+.ad
+.RS 15n
+.rt
+Turns off trace globally and for any macros specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBundefine\fR\fR
+.ad
+.RS 15n
+.rt
+Removes the definition of the macro named in its argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBundivert\fR\fR
+.ad
+.RS 15n
+.rt
+This macro causes immediate output of text from diversions named as arguments,
+or all diversions if no argument. Text can be undiverted into another
+diversion. Undiverting discards the diverted text.
+.RE
+
+.SS "/usr/bin/m4"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeval\fR\fR
+.ad
+.RS 8n
+.rt
+Evaluates its argument as an arithmetic expression, using 32-bit signed-integer
+arithmetic. The following operators are supported: parentheses, unary -, unary
++, !, ~, *, /, %, +, -, relationals, bitwise &, |, &&, and ||. Octal and hex
+numbers can be specified as in C. The second argument specifies the radix for
+the result; the default is 10. The third argument can be used to specify the
+minimum number of digits in the result.
+.RE
+
+.SS "/usr/xpg4/bin/m4"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeval\fR\fR
+.ad
+.RS 8n
+.rt
+Evaluates its argument as an arithmetic expression, using 32-bit
+signed-integer arithmetic. The following operators are supported: parentheses,
+unary -, unary +, !, ~, *, /, %, +, -, <<, >>, relationals, bitwise &, |, &&,
+and ||. Precedence and associativity are as in C. Octal and hex numbers can
+also be specified as in C. The second argument specifies the radix for the
+result; the default is 10. The third argument can be used to specify the
+minimum number of digits in the result.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of m4 files
+.sp
+.LP
+If the file \fBm4src\fR contains the lines:
+
+.sp
+.in +2
+.nf
+The value of `VER' is "VER".
+ ifdef(`VER', ``VER'' is defined to be VER., VER is not defined.)
+ ifelse(VER, 1, ``VER'' is `VER'.)
+ ifelse(VER, 2, ``VER'' is `VER'., ``VER'' is not 2.)
+ end
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+then the command:
+
+.sp
+.in +2
+.nf
+\fBm4 m4src\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or the command:
+
+.sp
+.in +2
+.nf
+\fBm4 -U VER m4src\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the output:
+
+.sp
+.in +2
+.nf
+The value of VER is "VER".
+ VER is not defined.
+
+ VER is not 2.
+ end
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+\fBm4 -D VER m4src\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the output:
+
+.sp
+.in +2
+.nf
+The value of VER is "".
+ VER is defined to be .
+
+ VER is not 2.
+ end
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+\fBm4 -D VER=1 m4src\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the output:
+
+.sp
+.in +2
+.nf
+The value of VER is "1".
+ VER is defined to be 1.
+ VER is 1.
+ VER is not 2.
+ end
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+\fBm4 -D VER=2 m4src\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the output:
+
+.sp
+.in +2
+.nf
+The value of VER is "2".
+ VER is defined to be 2.
+
+ VER is 2.
+ end
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBm4\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred
+.RE
+
+.sp
+.LP
+If the \fBm4exit\fR macro is used, the exit value can be specified by the input
+file.
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "\fB/usr/xpg4/bin/m4\fR"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBas\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/mac.1 b/usr/src/man/man1/mac.1
new file mode 100644
index 0000000000..50fd46ef8b
--- /dev/null
+++ b/usr/src/man/man1/mac.1
@@ -0,0 +1,257 @@
+'\" te
+.\" Copyright 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mac 1 "21 Mar 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+mac \- calculate message authentication codes of the input
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/mac\fR \fB-l\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/mac\fR [\fB-v\fR] \fB-a\fR \fIalgorithm\fR
+ [\fB-k\fR \fIkeyfile\fR | \fB-K\fR \fIkey_label\fR [\fB-T\fR \fItoken_spec\fR]] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmac\fR utility calculates the message authentication code (\fBMAC\fR) of
+the given file or files or \fBstdin\fR using the algorithm specified.
+.sp
+.LP
+If more than one file is given, each line of output is the \fBMAC\fR of a
+single file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIalgorithm\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the name of the algorithm to use during the encryption or decryption
+process. See USAGE, \fBAlgorithms\fR for details. \fBNote:\fR Algorithms for
+producing general length \fBMAC\fRs are not supported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIkeyfile\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the file containing the key value for the encryption algorithm. Each
+algorithm has specific key material requirements, as stated in the PKCS#11
+specification. If \fB-k\fR is not specified, \fBmac\fR prompts for key
+material using \fBgetpassphrase\fR(3C).
+.sp
+For information on generating a key file, see \fBpktool\fR(1), \fBdd\fR(1M) or
+the \fISystem Administration Guide: Security Services\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR \fIkey_label\fR\fR
+.ad
+.RS 17n
+.rt
+Specify the label of a symmetric token key in a PKCS#11 token.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 17n
+.rt
+Displays the list of algorithms available on the system. This list can change
+depending on the configuration of the cryptographic framework. The keysizes are
+displayed in bits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItoken_spec\fR\fR
+.ad
+.RS 17n
+.rt
+Specify a PKCS#11 token other than the default soft token object store when the
+\fB-K\fR is specified.
+.sp
+\fItoken_spec\fR has the format of:
+.sp
+.in +2
+.nf
+\fItoken_name\fR \fB[:\fR\fImanuf_id\fR \fB[:\fR\fIserial_no\fR\fB]]\fR
+.fi
+.in -2
+.sp
+
+When a token label contains trailing spaces, this option does not require them
+to be typed as a convenience to the user.
+.sp
+Colon separates token identification string. If any of the parts have a literal
+colon (\fB:\fR) character, it must be escaped by a backslash (\fB\e\fR). If a
+colon (\fB:\fR) is not found, the entire string (up to 32 characters) is taken
+as the token label. If only one colon (\fB:\fR) is found, the string is the
+token label and the manufacturer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 17n
+.rt
+Provides verbose information.
+.RE
+
+.SH USAGE
+.SS "Algorithms"
+.sp
+.LP
+The supported algorithms are displayed with the \fB-l\fR option. These
+algorithms are provided by the cryptographic framework. Each supported
+algorithm is an alias to the most commonly used and least restricted version of
+a particular algorithm type. For example, \fBmd5_hmac\fR is an alias to
+\fBCKM_MD5_HMAC\fR.
+.sp
+.LP
+These aliases are used with the \fB-a\fR option and are case-sensitive.
+.SS "Passphrase"
+.sp
+.LP
+When the \fB-k\fR option is not used during encryption and decryption tasks,
+the user is prompted for a passphrase. The passphrase is manipulated into a
+more secure key using the \fBPBKDF2\fR algorithm specified in PKCS #5.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRListing Available Algorithms
+.sp
+.LP
+The following example lists available algorithms:
+
+.sp
+.in +2
+.nf
+example$ mac -l
+Algorithm Keysize: Min Max
+-----------------------------------
+des_mac 64 64
+sha1_hmac 8 512
+md5_hmac 8 512
+sha256_hmac 8 512
+sha384_hmac 8 1024
+sha512_hmac 8 1024
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRGetting the Message Authentication Code
+.sp
+.LP
+The following example gets the message authentication code for a file:
+
+.sp
+.in +2
+.nf
+example$ mac -v -k mykey -a sha1_hmac /export/foo
+sha1_hmac (/export/foo) = 913ced311df10f1708d9848641ca8992f4718057
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRGetting the Message Authentication Code with a Token Key
+.sp
+.LP
+The following example gets the message authentication code with a generic token
+key in the soft token keystore. The generic token key can be generated with
+\fBpktool\fR(1):
+
+.sp
+.in +2
+.nf
+encrypt -v -a sha1_hmac -K my_generic_key \e
+ -T "Sun Software PKCS#11 softtoken" /export/foo
+Enter pin for Sun Software PKCS#11 softtoken:
+ sha1_hmac (/etc/foo) = c2ba5c38458c092a68940081240d22b670182968
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdigest\fR(1), \fBpktool\fR(1), \fBdd\fR(1M), \fBgetpassphrase\fR(3C),
+\fBlibpkcs11\fR(3LIB), \fBattributes\fR(5), \fBpkcs11_softtoken\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Security Services\fR
+.sp
+.LP
+RSA PKCS#11 v2.20 and RSA PKCS#5 v2.0, http://www.rsasecurity.com
diff --git a/usr/src/man/man1/mach.1 b/usr/src/man/man1/mach.1
new file mode 100644
index 0000000000..8373f1e138
--- /dev/null
+++ b/usr/src/man/man1/mach.1
@@ -0,0 +1,30 @@
+'\" te
+.\" Copyright (c) 1996 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mach 1 "18 Jan 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+mach \- display the processor type of the current host
+.SH SYNOPSIS
+.LP
+.nf
+\fBmach\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmach\fR command displays the processor-type of the current host.
+.SH SEE ALSO
+.sp
+.LP
+\fBarch\fR(1), \fBuname\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBmach\fR and \fBuname\fR \fB-p\fR return equivalent values; therefore,
+Independent Software Vendors (ISV) and others who need to ascertain processor
+type are encouraged to use \fBuname\fR with the \fB-p\fR option instead of the
+\fBmach\fR command. The \fBmach\fR command is provided for compatibility with
+previous releases, but generally its use is discouraged.
diff --git a/usr/src/man/man1/machid.1 b/usr/src/man/man1/machid.1
new file mode 100644
index 0000000000..687cc67fe3
--- /dev/null
+++ b/usr/src/man/man1/machid.1
@@ -0,0 +1,208 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1999, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH machid 1 "5 Jul 1990" "SunOS 5.11" "User Commands"
+.SH NAME
+machid, sun, iAPX286, i286, i386, i486, i860, pdp11, sparc, u3b, u3b2, u3b5,
+u3b15, vax, u370 \- get processor type truth value
+.SH SYNOPSIS
+.LP
+.nf
+\fBsun\fR
+.fi
+
+.LP
+.nf
+\fBiAPX286\fR
+.fi
+
+.LP
+.nf
+\fBi386\fR
+.fi
+
+.LP
+.nf
+\fBpdp11\fR
+.fi
+
+.LP
+.nf
+\fBsparc\fR
+.fi
+
+.LP
+.nf
+\fBu3b\fR
+.fi
+
+.LP
+.nf
+\fBu3b2\fR
+.fi
+
+.LP
+.nf
+\fBu3b5\fR
+.fi
+
+.LP
+.nf
+\fBu3b15\fR
+.fi
+
+.LP
+.nf
+\fBvax\fR
+.fi
+
+.LP
+.nf
+\fBu370\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The following commands will return a true value (exit code of 0) if you are
+using an instruction set that the command name indicates.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsun\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a Sun system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBiAPX286\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a computer using an iAPX286 processor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi386\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a computer using an iAPX386 processor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpdp11\fR\fR
+.ad
+.RS 11n
+.rt
+ True if you are on a PDP-11/45\(tm or PDP-11/70\(tm.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsparc\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a computer using a SPARC-family processor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu3b\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a 3B20 computer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu3b2\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a 3B2 computer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu3b5\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a 3B5 computer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu3b15\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a 3B15 computer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvax\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on a VAX-11/750\(tm or VAX-11/780\(tm.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu370\fR\fR
+.ad
+.RS 11n
+.rt
+True if you are on an IBM\(rg System/370\(tm computer.
+.RE
+
+.sp
+.LP
+The commands that do not apply will return a false (non-zero) value. These
+commands are often used within makefiles (see \fBmake\fR(1S)) and shell scripts
+(see \fBsh\fR(1)) to increase portability.
+.SH SEE ALSO
+.sp
+.LP
+\fBmake\fR(1S), \fBsh\fR(1), \fBtest\fR(1), \fBtrue\fR(1), \fBuname\fR(1),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBmachid\fR family of commands is obsolete. Use \fBuname\fR \fB-p\fR and
+\fBuname\fR \fB-m\fR instead.
diff --git a/usr/src/man/man1/madv.so.1.1 b/usr/src/man/man1/madv.so.1.1
new file mode 100644
index 0000000000..3df578d27e
--- /dev/null
+++ b/usr/src/man/man1/madv.so.1.1
@@ -0,0 +1,332 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH madv.so.1 1 "15 Feb 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+madv.so.1 \- madv library
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/lib/madv.so.1\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmadv.so.1\fR shared object provides a means by which the VM advice can
+be selectively configured for a launched process (or processes) and its
+descendants. To enable \fBmadv.so.1\fR, the following string needs to be
+present in the environment (see \fBld.so.1\fR(1)) along with one or more
+\fBMADV\fR environment variables:
+.sp
+.in +2
+.nf
+\fBLD_PRELOAD=$LD_PRELOAD:madv.so.1\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+If the \fBmadv.so.1\fR shared object is specified in the \fBLD_PRELOAD\fR list,
+the following environment variables are read by the \fBmadv\fR shared object to
+determine to which created process(es) to apply the specified advice.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMADV\fR=\fIadvice\fR \fR
+.ad
+.RS 27n
+.rt
+\fBMADV\fR specifies the VM advice to use for all heap, shared memory, and mmap
+regions in the process address space. This advice is applied to
+all created processes.
+.sp
+Values for \fIadvice\fR correspond to values in <sys/mman.h> used in
+\fBmadvise\fR(3C) to specify memory access patterns:
+.br
+.in +2
+normal
+.in -2
+.br
+.in +2
+random
+.in -2
+.br
+.in +2
+sequential
+.in -2
+.br
+.in +2
+access_lwp
+.in -2
+.br
+.in +2
+access_many
+.in -2
+.br
+.in +2
+access_default
+.in -2
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMADVCFGFILE\fR=\fIconfig-file\fR\fR
+.ad
+.RS 27n
+.rt
+\fIconfig-file\fR is a text file which contains one or more \fBmadv\fR
+configuration entries of the form:
+.sp
+.in +2
+.nf
+\fIexec-name\fR \fIexec-args\fR:\fIadvice-opts\fR
+.fi
+.in -2
+.sp
+
+Advice specified in \fIconfig-file\fR takes precedence over that specified by
+the \fBMADV\fR environment variable. When \fBMADVCFGFILE\fR is not set, advice
+is taken from file \fB/etc/madv.conf\fR if it exists.
+.sp
+\fIexec-name\fR specifies the name of an application or executable. The
+corresponding advice is set for newly created processes (see
+\fBgetexecname\fR(3C)) that match the first \fIexec-name\fR found in the file.
+.sp
+\fIexec-name\fR can be a full pathname, a base name, or a pattern string. See
+\fBFile Name Generation\fR in \fBsh\fR(1) for a discussion of pattern matching.
+.sp
+\fIexec-args\fR is an optionally specified pattern string to match against
+arguments. Advice is set only if \fIexec-args\fR is not specified or occurs
+within the arguments to \fIexec-name\fR.
+.sp
+\fIadvice-opts\fR is a comma-separated list specifying the advice for various
+memory region(s):
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmadv\fR=\fIadvice\fR\fR
+.ad
+.RS 21n
+.rt
+Applies to all heap, shared memory, and mmap regions in the process address
+space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBheap\fR=\fIadvice\fR\fR
+.ad
+.RS 21n
+.rt
+The heap is defined to be the brk area (see \fBbrk\fR(2)). Applies to the
+existing heap and for any additional heap memory allocated in the future.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshm\fR=\fIadvice\fR\fR
+.ad
+.br
+.na
+\fB\fBism\fR=\fIadvice\fR\fR
+.ad
+.br
+.na
+\fB\fBdism\fR=\fIadvice\fR\fR
+.ad
+.RS 21n
+.rt
+Shared memory segments (see \fBshmat\fR(2)) attached using any flags, flag
+\fBSHM_SHARE_MMU\fR, or flag \fBSHM_PAGEABLE\fR respectively. Options
+\fBism\fR and \fBdism\fR take precedence over option \fBshm\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmap\fR=\fIadvice\fR\fR
+.ad
+.br
+.na
+\fB\fBmapshared\fR=\fIadvice\fR\fR
+.ad
+.br
+.na
+\fB\fBmapprivate\fR=\fIadvice\fR\fR
+.ad
+.br
+.na
+\fB\fBmapanon\fR=\fIadvice\fR\fR
+.ad
+.RS 21n
+.rt
+Mappings established through \fBmmap\fR(2) using any flags, flag
+\fBMAP_SHARED\fR, flag \fBMAP_PRIVATE\fR, or flag \fBMAP_ANON\fR, respectively.
+Options \fBmapshared\fR, \fBmapprivate\fR, and \fBmapanon\fR take precedence
+over option \fBmap\fR. Option \fBmapanon\fR takes precedence over
+\fBmapshared\fR and \fBmapprivate\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMADVERRFILE\fR=\fIpathname\fR\fR
+.ad
+.RS 27n
+.rt
+By default, error messages are logged via \fBsyslog\fR(3C) using level
+\fBLOG_ERR\fR and facility \fBLOG_USER\fR. If \fBMADVERRFILE\fR contains a
+valid \fIpathname\fR (such as \fB/dev/stderr\fR), error messages will be logged
+there instead.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRApplying advice to all ISM segments
+.sp
+.LP
+The following configuration applies advice to all ISM segments for application
+\fB/usr/bin/foo\fR:
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:madv.so.1\fR
+example$ \fBMADVCFGFILE=madvcfg\fR
+example$ \fBexport LD_PRELOAD MADVCFGFILE\fR
+example$ \fBcat $MADVCFGFILE\fR
+ /usr/bin/foo:ism=access_lwp
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSetting advice for all applications with exception
+.sp
+.LP
+The following configuration sets advice for all applications with the exception
+of \fBls\fR.
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:madv.so.1\fR
+example$ \fBMADV=access_many\fR
+example$ \fBMADVCFGFILE=madvcfg\fR
+example$ \fBexport LD_PRELOAD MADV MADVCFGFILE\fR
+example$ \fBcat $MADVCFGFILE\fR
+ ls:
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrecedence rules (continuation from Example 2)
+.sp
+.LP
+Because \fBMADVCFGFILE\fR takes precedence over \fBMADV\fR,
+specifying '\fB*\fR' (pattern match all) for the \fIexec-name\fR of the last \fBmadv\fR
+configuration entry would be equivalent to setting \fBMADV\fR. The following is
+equivalent to example 2:
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:madv.so.1\fR
+example$ \fBMADVCFGFILE=madvcfg\fR
+example$ \fBexport LD_PRELOAD MADVCFGFILE\fR
+example$ \fBcat $MADVCFGFILE\fR
+ ls:
+ *:madv=access_many
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRApplying advice for different regions
+.sp
+.LP
+The following configuration applies one type of advice for mmap regions and
+different advice for heap and shared memory regions for a select set of
+applications with exec names that begin with \fBfoo\fR:
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:madv.so.1\fR
+example$ \fBMADVCFGFILE=madvcfg\fR
+example$ \fBexport LD_PRELOAD MADVCFGFILE\fR
+example$ \fBcat $MADVCFGFILE\fR
+ foo*:madv=access_many,heap=sequential,shm=access_lwp
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRApplying advice selectively
+.sp
+.LP
+The following configuration applies advice for the heap of applications
+beginning with \fBora\fR that have \fBora1\fR as an argument:
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:madv.so.1\fR
+example$ \fBMADVCFGFILE=madvcfg\fR
+example$ \fBexport LD_PRELOAD MADVCFGFILE\fR
+example$ \fBcat $MADVCFGFILE\fR
+ ora* ora1:heap=access_many
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/madv.conf\fR \fR
+.ad
+.RS 19n
+.rt
+Configuration file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBld.so.1\fR(1), \fBproc\fR(1), \fBsh\fR(1), \fBbrk\fR(2),
+\fBexec\fR(2), \fBfork\fR(2), \fBmmap\fR(2), \fBmemcntl\fR(2), \fBshmat\fR(2),
+\fBgetexecname\fR(3C), \fBmadvise\fR(3C), \fBsyslog\fR(3C), \fBproc\fR(4),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The advice is inherited. A child process has the same advice as its
+parent. On \fBexec()\fR (see \fBexec\fR(2)), the advice is set back to the
+default system advice unless different advice has been configured via the
+\fBmadv\fR shared object.
+.sp
+.LP
+Advice is only applied to \fBmmap\fR regions explicitly created by the user
+program. Those regions established by the run-time linker or by system
+libraries making direct system calls (for example, libthread allocations for
+thread stacks) are not affected.
diff --git a/usr/src/man/man1/mail.1 b/usr/src/man/man1/mail.1
new file mode 100644
index 0000000000..ac96b5d19c
--- /dev/null
+++ b/usr/src/man/man1/mail.1
@@ -0,0 +1,893 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mail 1 "24 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+mail, rmail \- read mail or send mail to users
+.SH SYNOPSIS
+.SS "Sending Mail"
+.LP
+.nf
+\fBmail\fR [\fB-tw\fR] [\fB-m\fR \fImessage_type\fR] \fIrecipient\fR...
+.fi
+
+.LP
+.nf
+\fBrmail\fR [\fB-tw\fR] [\fB-m\fR \fImessage_type\fR] \fIrecipient\fR...
+.fi
+
+.SS "Reading Mail"
+.LP
+.nf
+\fBmail\fR [\fB-ehpPqr\fR] [\fB-f\fR \fIfile\fR]
+.fi
+
+.SS "Debugging"
+.LP
+.nf
+\fBmail\fR [\fB-x\fR \fIdebug_level\fR] [\fIother_mail_options\fR] \fIrecipient\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+A \fIrecipient\fR is usually a domain style address
+("\fIuser\fR@\fImachine\fR") or a user name recognized by \fBlogin\fR(1). When
+\fIrecipient\fRs are named, \fBmail\fR assumes a message is being sent. It
+reads from the standard input up to an end-of-file (Control-d) or, if reading
+from a terminal device, until it reads a line consisting of just a period. When
+either of those indicators is received, \fBmail\fR adds the \fIletter\fR to the
+\fImailfile\fR for each \fIrecipient\fR.
+.sp
+.LP
+A \fIletter\fR is composed of some \fIheader lines\fR followed by a blank line
+followed by the \fImessage content\fR. The \fIheader lines\fR section of the
+letter consists of one or more UNIX postmarks:
+.sp
+.in +2
+.nf
+\fBFrom\fR \fIsender date_and_time\fR [\fBremote from\fR \fIremote_system_name\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+followed by one or more standardized message header lines of the form:
+.sp
+.in +2
+.nf
+\fIkeyword-name\fR\fB:\fR [\fIprintable text\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where \fIkeyword-name\fR is comprised of any printable, non-whitespace
+characters other than colon (`\fB:\fR'). A \fBMIME-version:\fR header line
+indicates that the message is formatted as described in RFC 2045. A
+\fBContent-Length:\fR header line, indicating the number of bytes in the
+\fImessage content\fR, is always present unless the letter consists of only
+header lines with no message content. A \fBContent-Type:\fR header line that
+describes the type of the \fImessage content\fR (such as text/plain,
+application/octet-stream, and so on) is also present, unless the letter
+consists of only header lines with no message content. Header lines may be
+continued on the following line if that line starts with white space.
+.SH OPTIONS
+.SS "Sending Mail"
+.sp
+.LP
+The following command-line arguments affect sending mail:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImessage_type\fR\fR
+.ad
+.RS 19n
+.rt
+A \fBMessage-Type:\fR line is added to the message header with the value of
+\fImessage_type\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 19n
+.rt
+A \fBTo:\fR line is added to the message header for each of the intended
+\fIrecipient\fRs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 19n
+.rt
+A letter is sent to a remote recipient without waiting for the completion of
+the remote transfer program.
+.RE
+
+.sp
+.LP
+If a letter is found to be undeliverable, it is returned to the sender with
+diagnostics that indicate the location and nature of the failure. If \fBmail\fR
+is interrupted during input, the message is saved in the file \fBdead.letter\fR
+to allow editing and resending. \fBdead.letter\fR is always appended to, thus
+preserving any previous contents. The initial attempt to append to (or create)
+\fBdead.letter\fR is in the current directory. If this fails, \fBdead.letter\fR
+is appended to (or created in) the user's login directory. If the second
+attempt also fails, no \fBdead.letter\fR processing is done.
+.sp
+.LP
+\fBrmail\fR only permits the sending of mail; \fBuucp\fR(1C) uses \fBrmail\fR
+as a security precaution. Any application programs that generate mail messages
+should be sure to invoke \fBrmail\fR rather than \fBmail\fR for message
+transport and/or delivery.
+.sp
+.LP
+If the local system has the Basic Networking Utilities installed, mail can be
+sent to a recipient on a remote system. There are numerous ways to address mail
+to recipients on remote systems depending on the transport mechanisms available
+to the local system. The two most prevalent addressing schemes are Domain-style
+and UUCP-style.
+.sp
+.ne 2
+.mk
+.na
+\fBDomain-style addressing\fR
+.ad
+.RS 27n
+.rt
+Remote recipients are specified by appending an `\fB@\fR' and domain (and
+possibly sub-domain) information to the recipient name (such as
+\fBuser@sf.att.com\fR). (The local system administrator should be consulted for
+details on which addressing conventions are available on the local system.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBUUCP-style addressing\fR
+.ad
+.RS 27n
+.rt
+Remote recipients are specified by prefixing the recipient name with the remote
+system name and an exclamation point, such as \fBsysa!user.\fR If \fBcsh\fR(1)
+is the default shell, \fBsysa\e!user\fR should be used. A series of system
+names separated by exclamation points can be used to direct a letter through an
+extended network (such as \fBsysa!sysb!sysc!user\fR or
+\fBsysa\e!sysb\e!sysc\e!user\fR).
+.RE
+
+.SS "Reading Mail"
+.sp
+.LP
+The following command-line arguments affect reading mail:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 11n
+.rt
+Test for the presence of mail. \fBmail\fR prints nothing.
+.sp
+An exit status of \fB0\fR is returned if the user has mail. Otherwise, an exit
+status of \fB1\fR is returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.RS 11n
+.rt
+Similar to \fB-e\fR, but tests only for the presence of \fBnew\fR mail.
+.sp
+An exit status of \fB0\fR is returned if the user has new mail
+to read, an exit status of \fB1\fR is returned if the user has no
+mail, or an exit status of \fB2\fR is returned if the user has mail
+which has already been read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 11n
+.rt
+A window of headers are initially displayed rather than the latest message. The
+display is followed by the \fB?\fR prompt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 11n
+.rt
+All messages are printed without prompting for disposition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 11n
+.rt
+All messages are printed with \fIall\fR header lines displayed, rather than the
+default selective header line display.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 11n
+.rt
+\fBmail\fR terminates after interrupts. Normally an interrupt causes only the
+termination of the message being printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 11n
+.rt
+Messages are printed in first-in, first-out order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+\fBmail\fR uses \fIfile\fR (such as \fBmbox\fR) instead of the default
+\fImailfile\fR.
+.RE
+
+.sp
+.LP
+\fBmail\fR, unless otherwise influenced by command-line arguments, prints a
+user's mail messages in last-in, first-out order. The default mode for printing
+messages is to display only those header lines of immediate interest. These
+include, but are not limited to, the UNIX \fBFrom\fR and \fB>From\fR postmarks,
+\fBFrom:\fR, \fBDate:\fR, \fBSubject:\fR, and \fBContent-Length:\fR header
+lines, and any recipient header lines such as \fBTo:\fR, \fBCc:\fR, \fBBcc:\fR,
+and so forth. After the header lines have been displayed, \fBmail\fR displays
+the contents (body) of the message only if it contains no unprintable
+characters. Otherwise, \fBmail\fR issues a warning statement about the message
+having binary content and \fBnot\fR display the content. This can be overridden
+by means of the \fBp\fR command.
+.sp
+.LP
+For each message, the user is prompted with a \fB?\fR and a line is read from
+the standard input. The following commands are available to determine the
+disposition of the message:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 22n
+.rt
+Print the number of the current message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 22n
+.rt
+Print previous message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB<new-line>,\fB+\fR, or \fBn\fR\fR
+.ad
+.RS 22n
+.rt
+Print the next message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIcommand\fR\fR
+.ad
+.RS 22n
+.rt
+Escape to the shell to do \fIcommand\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.RS 22n
+.rt
+Print message that arrived during the \fBmail\fR session.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR, or \fBdp\fR\fR
+.ad
+.RS 22n
+.rt
+Delete the current message and print the next message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR \fIn\fR\fR
+.ad
+.RS 22n
+.rt
+Delete message number \fIn\fR. Do not go on to next message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdq\fR\fR
+.ad
+.RS 22n
+.rt
+Delete message and quit \fBmail\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 22n
+.rt
+Display a window of headers around current message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fIn\fR\fR
+.ad
+.RS 22n
+.rt
+Display a window of headers around message number \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh a\fR\fR
+.ad
+.RS 22n
+.rt
+Display headers of all messages in the user's \fImailfile\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh d\fR\fR
+.ad
+.RS 22n
+.rt
+Display headers of messages scheduled for deletion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR [ \fIpersons\fR ]\fR
+.ad
+.RS 22n
+.rt
+Mail (and delete) the current message to the named \fIpersons\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 22n
+.rt
+Print message number \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 22n
+.rt
+Print current message again, overriding any indications of binary (that is,
+unprintable) content.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fR\fR
+.ad
+.RS 22n
+.rt
+Override default brief mode and print current message again, displaying all
+header lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR, or Control-d\fR
+.ad
+.RS 22n
+.rt
+Put undeleted mail back in the \fImailfile\fR and quit \fBmail\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR [ \fIusers\fR ]\fR
+.ad
+.RS 22n
+.rt
+Reply to the sender, and other \fIusers\fR, then delete the message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR [ \fIfiles\fR ]\fR
+.ad
+.RS 22n
+.rt
+Save message in the named \fIfiles\fR (\fBmbox\fR is default) and delete the
+message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR [ \fIn\fR ]\fR
+.ad
+.RS 22n
+.rt
+Undelete message number \fIn\fR (default is last read).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fR [ \fIfiles\fR ]\fR
+.ad
+.RS 22n
+.rt
+Save message contents, without any header lines, in the named \fIfiles\fR
+(\fBmbox\fR is default) and delete the message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 22n
+.rt
+Put all mail back in the \fImailfile\fR unchanged and exit \fBmail\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBy\fR [ \fIfiles\fR ]\fR
+.ad
+.RS 22n
+.rt
+Same as \fB-w\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 22n
+.rt
+Print a command summary.
+.RE
+
+.sp
+.LP
+When a user logs in, the presence of mail, if any, is usually indicated. Also,
+notification is made if new mail arrives while using \fBmail\fR.
+.sp
+.LP
+The permissions of \fImailfile\fR can be manipulated using \fBchmod\fR(1) in
+two ways to alter the function of \fBmail\fR. The other permissions of the file
+can be read-write (\fB0666\fR), read-only (\fB0664\fR), or neither read nor
+write (\fB0660\fR) to allow different levels of privacy. If changed to other
+than the default (mode \fB0660\fR), the file is preserved even when empty to
+perpetuate the desired permissions. (The administrator can override this file
+preservation using the \fBDEL_EMPTY_MAILFILE\fR option of \fBmailcnfg\fR.)
+.sp
+.LP
+The group \fBID\fR of the mailfile must be \fBmail\fR to allow new messages to
+be delivered, and the mailfile must be writable by group \fBmail\fR.
+.SS "Debugging"
+.sp
+.LP
+The following command-line arguments cause \fBmail\fR to provide debugging
+information:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIdebug_level\fR\fR
+.ad
+.RS 18n
+.rt
+\fBmail\fR creates a trace file containing debugging information.
+.RE
+
+.sp
+.LP
+The \fB-x\fR option causes \fBmail\fR to create a file named
+\fB/tmp/MLDBG\fR\fIprocess_id\fR that contains debugging information relating
+to how \fBmail\fR processed the current message. The absolute value of
+\fIdebug_level\fR controls the verboseness of the debug information. \fB0\fR
+implies no debugging. If \fIdebug_level\fR is greater than \fB0\fR, the debug
+file is retained \fIonly\fR if \fBmail\fR encountered some problem while
+processing the message. If \fIdebug_level\fR is less than \fB0\fR, the debug
+file is always be retained. The \fIdebug_level\fR specified via \fB-x\fR
+overrides any specification of \fBDEBUG\fR in \fB/etc/mail/mailcnfg\fR. The
+information provided by the \fB-x\fR option is esoteric and is probably only
+useful to system administrators.
+.SS "Delivery Notification"
+.sp
+.LP
+Several forms of notification are available for mail by including one of the
+following lines in the message header.
+.sp
+.LP
+\fBTransport-Options:\fR [ \fB/\fR\fIoptions\fR ]
+.sp
+.LP
+\fBDefault-Options:\fR [ \fB/\fR\fIoptions\fR ]
+.sp
+.LP
+\fB>To:\fR \fIrecipient\fR [ \fB/\fR\fIoptions\fR ]
+.sp
+.LP
+Where the "/\fIoptions\fR" can be one or more of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/delivery\fR\fR
+.ad
+.RS 15n
+.rt
+Inform the sender that the message was successfully delivered to the
+\fIrecipient\fR's mailbox.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/nodelivery\fR\fR
+.ad
+.RS 15n
+.rt
+Do not inform the sender of successful deliveries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/ignore\fR\fR
+.ad
+.RS 15n
+.rt
+Do not inform the sender of failed deliveries.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/return\fR\fR
+.ad
+.RS 15n
+.rt
+Inform the sender if mail delivery fails. Return the failed message to the
+sender.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/report\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB/return\fR except that the original message is not returned.
+.RE
+
+.sp
+.LP
+The default is \fB/nodelivery/return\fR. If contradictory options are used, the
+first is recognized and later, conflicting, terms are ignored.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported for sending mail:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIrecipient\fR\fR
+.ad
+.RS 13n
+.rt
+A domain style address ("\fIuser\fR@\fImachine\fR") or user login name
+recognized by \fBlogin\fR(1).
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmail\fR and
+\fBrmail\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
+bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmail\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.RS 6n
+.rt
+Determine the timezone used with date and time strings.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion when the user had mail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+The user had no mail or an initialization error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred after initialization.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdead.letter\fR\fR
+.ad
+.RS 20n
+.rt
+unmailable text
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 20n
+.rt
+to identify sender and locate \fIrecipient\fRs
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/mbox\fR\fR
+.ad
+.RS 20n
+.rt
+saved mail
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$MAIL\fR\fR
+.ad
+.RS 20n
+.rt
+variable containing path name of \fImailfile\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/MLDBG\fR*\fR
+.ad
+.RS 20n
+.rt
+debug trace file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/mail/*.lock\fR\fR
+.ad
+.RS 20n
+.rt
+lock for mail directory
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/mail/:saved\fR\fR
+.ad
+.RS 20n
+.rt
+directory for holding temp files to prevent loss of data in the event of a
+system crash
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/mail/\fIuser\fR\fR\fR
+.ad
+.RS 20n
+.rt
+incoming mail for \fIuser\fR; that is, the \fImailfile\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvar/tmp/ma\fR*\fR
+.ad
+.RS 20n
+.rt
+temporary file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBcsh\fR(1), \fBlogin\fR(1), \fBmailx\fR(1), \fBuucp\fR(1C),
+\fBuuencode\fR(1C), \fBvacation\fR(1), \fBwrite\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5)
+.sp
+.LP
+\fISolaris Advanced User\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+The interpretation and resulting action taken because of the header lines
+described in the Delivery Notifications section only occur if this version of
+\fBmail\fR is installed on the system where the delivery (or failure) happens.
+Earlier versions of \fBmail\fR might not support any types of delivery
+notification.
+.sp
+.LP
+Conditions sometimes result in a failure to remove a lock file.
+.sp
+.LP
+After an interrupt, the next message might not be printed. Printing can be
+forced by typing a \fBp\fR.
diff --git a/usr/src/man/man1/mailcompat.1 b/usr/src/man/man1/mailcompat.1
new file mode 100644
index 0000000000..f097ef4ca8
--- /dev/null
+++ b/usr/src/man/man1/mailcompat.1
@@ -0,0 +1,88 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mailcompat 1 "4 Aug 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+mailcompat \- provide SunOS compatibility for Solaris mailbox format
+.SH DESCRIPTION
+.sp
+.LP
+\fBmailcompat\fR is a program to provide SunOS 4.\fIx\fR compatability for the
+Solaris mailbox format. You would typically run \fBmailcompat\fR to be able to
+read mail on a workstation running SunOS 4.\fIx\fR when your mail server is
+running Solaris.
+.sp
+.LP
+Enabling \fBmailcompat\fR creates an entry in your \fB\&.forward\fR file, if
+it exists. If this file does not exist, \fBmailcompat\fR will create it.
+Disabling \fBmailcompat\fR will remove the entry from the \fB\&.forward\fR
+file, and if this was the only entry, will remove the entire file.
+.sp
+.LP
+To execute \fBmailcompat\fR, log onto the Solaris mail server and enter
+\fBmailcompat\fR on the command line. Answer the queries provided by the
+program.
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmailcompat\fR
+when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the \fBmailcompat\fR feature.
+.sp
+.LP
+The following example enables the \fBmailcompat\fR feature for the user "john".
+
+.sp
+.in +2
+.nf
+example% mailcompat
+This program can be used to store your mail in a format
+that you can read with SunOS 4.X based mail readers
+To enable the mailcompat feature a ".forward" file is created.
+Would you like to enable the mailcompat feature? Y
+Mailcompat feature ENABLED.Run mailcompat with no arguments to remove it
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example disables the \fBmailcompat\fR feature for the user
+"john".
+
+.sp
+.in +2
+.nf
+example% mailcompat
+This program can be used to store your mail in a format
+that you can read with SunOS 4.X based mail readers
+You have a .forward file in your home directory containing:
+ "|/usr/bin/mailcompat johns"
+Would you like to remove it and disable the mailcompat feature? y
+Back to normal reception of mail.
+example%
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.forward\fR\fR
+.ad
+.RS 14n
+.rt
+list of recipients for forwarding messages
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmailx\fR(1), \fBattributes\fR(5), \fBlargefile\fR(5)
diff --git a/usr/src/man/man1/mailq.1 b/usr/src/man/man1/mailq.1
new file mode 100644
index 0000000000..feaa326984
--- /dev/null
+++ b/usr/src/man/man1/mailq.1
@@ -0,0 +1,207 @@
+'\" te
+.\" Copyright (c) 2002 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mailq 1 "10 Jul 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+mailq \- print the mail queue
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/mailq\fR [\fB-Ac\fR] [\fB-q\fR \fIsubarg\fR] [\fB-v\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmailq\fR utility displays a summary of the mail messages queued for
+future delivery.
+.sp
+.LP
+The first line displayed for each mail message shows the internal identifier
+used on this host for the message, the size of the message in bytes, the date
+and time the message was accepted into the queue, and the envelope sender of
+the message. The second line of the display shows the error message that caused
+this message to be retained in the queue. This line will not be displayed if
+the message is being processed for the first time.
+.sp
+.LP
+The \fBmailq\fR utility used to be identical to \fBsendmail\fR \fB-bp\fR. Now
+it checks for the authorization attribute, \fBsolaris.mail.mailq\fR. If the
+check for the invoking user succeeds, \fBsendmail\fR \fB-bp\fR is executed with
+the remaining argument vector. Otherwise, an error message is printed. This
+authorization attribute is by default enabled for all users. It can be disabled
+by modifying the Basic Solaris User entry in \fBprof_attr\fR(4).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Ac\fR\fR
+.ad
+.RS 17n
+.rt
+Like \fBsendmail\fR(1M), this flag tells \fBmailq\fR to use \fBsubmit.cf\fR
+rather than \fBsendmail.cf\fR even if the operation mode does not
+indicate an initial mail submission. This will result in the client queue
+\fB/var/spool/clientmqueue\fR being displayed rather than the default server
+queue \fB/var/spool/mqueue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fBp\fR[\fItime\fR] \fR
+.ad
+.RS 17n
+.rt
+Similar to \fB-q\fR\fItime\fR, except that instead of periodically forking a
+child to process the queue, \fBsendmail\fR forks a single persistent child for
+each queue that alternates between processing the queue and sleeping. The sleep
+time is given as the argument. The sleep time default is \fB1\fR second. The
+process will always sleep at least 5 seconds if the queue was empty in the
+previous queue run.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fBf\fR\fR
+.ad
+.RS 17n
+.rt
+Processes saved messages in the queue once and does not \fBfork()\fR, but runs
+in the foreground.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fBG\fR \fIname\fR\fR
+.ad
+.RS 17n
+.rt
+Processes jobs in the queue group called \fIname\fR only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR[\fB!\fR]\fBI\fR \fIsubstr\fR\fR
+.ad
+.RS 17n
+.rt
+Limits processed jobs to those containing \fIsubstr\fR as a substring of the
+queue id, or not when \fB!\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR[\fB!\fR]\fBR\fR \fIsubstr\fR\fR
+.ad
+.RS 17n
+.rt
+Limits processed jobs to those containing \fIsubstr\fR as a substring of one of
+the recipients, or not when \fB!\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR[\fB!\fR]\fBS\fR \fIsubstr\fR\fR
+.ad
+.RS 17n
+.rt
+Limits processed jobs to those containing \fIsubstr\fR as a substring of the
+sender, or not when \fB!\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fR
+.ad
+.RS 17n
+.rt
+Prints verbose information. This adds the priority of the message and a single
+character indicator (\fB+\fR or blank) indicating whether a warning message
+has been sent on the first line of the message. Additionally, extra lines may
+be intermixed with the recipients that indicate the "controlling user"
+information. This shows who will own any programs that are executed on behalf
+of this message and the name of the alias this command is expanded from, if
+any.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/security/prof_attr\fR\fR
+.ad
+.RS 27n
+.rt
+local source for execution profile attributes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/mqueue\fR\fR
+.ad
+.RS 27n
+.rt
+default server queue
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/clientmqueue\fR\fR
+.ad
+.RS 27n
+.rt
+client queue
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsendmail\fR(1M), \fBprof_attr\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/mailstats.1 b/usr/src/man/man1/mailstats.1
new file mode 100644
index 0000000000..3615d2d6a6
--- /dev/null
+++ b/usr/src/man/man1/mailstats.1
@@ -0,0 +1,283 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mailstats 1 "24 Jun 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+mailstats \- print statistics collected by sendmail
+.SH SYNOPSIS
+.LP
+.nf
+\fBmailstats\fR [\fB-o\fR] [\fB-c\fR ] [\fB-C\fR \fIconfigfile\fR] [\fB-f\fR \fIstatisticsfile\fR]
+ [\fB-p\fR] [\fB-P\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmailstats\fR utility prints out the statistics collected by the
+\fBsendmail\fR(1M) program on mailer usage. These statistics are collected if
+the file indicated by the \fBStatusFile\fR configuration option of
+\fBsendmail\fR (defined in \fB/etc/mail/sendmail.cf\fR) exists. The default
+statistics file is \fB/etc/mail/statistics\fR.
+.sp
+.LP
+To enable \fBmailstats\fR, you must, as root, touch \fB/etc/mail/statistics\fR.
+See the \fBStatusFile\fR processing option in \fBsendmail\fR(1M).
+.sp
+.LP
+\fBmailstats\fR first prints the time that the statistics file was created and
+the last time it was modified. Then, the statistics for each mailer are
+displayed on a single line, each with the following whitespace-separated
+fields:
+.sp
+.ne 2
+.mk
+.na
+\fBM\fR
+.ad
+.RS 14n
+.rt
+The mailer number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBmsgsfr\fR
+.ad
+.RS 14n
+.rt
+Number of messages from the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBbytes_from\fR
+.ad
+.RS 14n
+.rt
+Kbytes from the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBmsgsto\fR
+.ad
+.RS 14n
+.rt
+Number of messages to the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBbytes_to\fR
+.ad
+.RS 14n
+.rt
+Kbytes to the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBmsgsrej\fR
+.ad
+.RS 14n
+.rt
+Number of messages rejected by the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBmsgsdis\fR
+.ad
+.RS 14n
+.rt
+Number of messages discarded by the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBmsgsqur\fR
+.ad
+.RS 14n
+.rt
+Number of messages quarantined by the mailer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBMailer\fR
+.ad
+.RS 14n
+.rt
+The name of the mailer.
+.RE
+
+.sp
+.LP
+The display of statistics described above is followed by a separation line
+containing only equal sign (\fB=\fR) characters. After the separation line, a
+line preceded with a "\fBT\fR" and totaling the values for all of the mailers
+is displayed. This is followed by another line preceded with a "\fBC\fR" that
+lists the number of TCP connections.
+.sp
+.LP
+To reinitialize the statistics file once a night, add an entry to root's
+\fBcrontab\fR(1):
+.sp
+.in +2
+.nf
+mailstats -p > /dev/null
+.fi
+.in -2
+.sp
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 21n
+.rt
+Try to use \fBsubmit.cf\fR instead of the default \fBsendmail\fR configuration
+file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIconfigfile\fR\fR
+.ad
+.RS 21n
+.rt
+Specify a \fBsendmail\fR configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIstatisticsfile\fR\fR
+.ad
+.RS 21n
+.rt
+Specify a \fBsendmail\fR statistics file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 21n
+.rt
+Do not display the name of the mailer in the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 21n
+.rt
+Output information in program-readable mode and clear statistics.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 21n
+.rt
+Output information in program-readable mode without clearing statistics.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmailstats\fR
+when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/null\fR\fR
+.ad
+.RS 25n
+.rt
+Zero-lined file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/statistics\fR\fR
+.ad
+.RS 25n
+.rt
+Default \fBsendmail\fR statistics file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/sendmail.cf\fR\fR
+.ad
+.RS 25n
+.rt
+Default \fBsendmail\fR configuration file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Output StabilityUnstable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcrontab\fR(1), \fBcron\fR(1M), \fBsendmail\fR(1M), \fBattributes\fR(5),
+\fBlargefile\fR(5)
diff --git a/usr/src/man/man1/mailx.1 b/usr/src/man/man1/mailx.1
new file mode 100644
index 0000000000..1d04d670f8
--- /dev/null
+++ b/usr/src/man/man1/mailx.1
@@ -0,0 +1,3206 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mailx 1 "19 Sep 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+mailx \- interactive message processing system
+.SH SYNOPSIS
+.LP
+.nf
+\fBmailx\fR [\fB-BdeHiInNURvV~\fR] [\fB-f\fR [\fIfile\fR | \fI+folder\fR]] [\fB-T\fR \fIfile\fR]
+ [\fB-u\fR \fIuser\fR]
+.fi
+
+.LP
+.nf
+\fBmailx\fR [\fB-BdFintUv~\fR] [\fB-b\fR \fIbcc\fR] [\fB-c\fR \fIcc\fR] [\fB-h\fR \fInumber\fR]
+ [\fB-r\fR \fIaddress\fR] [\fB-s\fR \fIsubject\fR] \fIrecipient\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/ucb/mail\fR ...
+.fi
+
+.LP
+.nf
+\fB/usr/ucb/Mail\fR ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The mail utilities listed above provide a comfortable, flexible environment for
+sending and receiving mail messages electronically.
+.sp
+.LP
+When reading mail, the mail utilities provide commands to facilitate saving,
+deleting, and responding to messages. When sending mail, the mail utilities
+allow editing, reviewing and other modification of the message as it is
+entered.
+.sp
+.LP
+Incoming mail is stored in a standard file for each user, called the
+\fBmailbox\fR for that user. When the mail utilities are called to read
+messages, the \fBmailbox\fR is the default place to find them. As messages are
+read, they are marked to be moved to a secondary file for storage, unless
+specific action is taken, so that the messages need not be seen again.This
+secondary file is called the \fBmbox\fR and is normally located in the user's
+\fBHOME\fR directory (see \fBMBOX\fR in ENVIRONMENT VARIABLES for a description
+of this file). Messages can be saved in other secondary files named by the
+user. Messages remain in a secondary file until forcibly removed.
+.sp
+.LP
+The user can access a secondary file by using the \fB-f\fR option. Messages in
+the secondary file can then be read or otherwise processed using the same
+\fBCommands\fR as in the primary \fBmailbox\fR. This gives rise within these
+pages to the notion of a current \fBmailbox\fR.
+.SH OPTIONS
+.sp
+.LP
+On the command line options start with a dash (\(mi). Any other arguments are
+taken to be destinations (recipients). If no recipients are specified,
+\fBmailx\fR attempts to read messages from the \fBmailbox\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 17n
+.rt
+Do not buffer standard input or standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbcc\fR\fR
+.ad
+.RS 17n
+.rt
+Set the blind carbon copy list to \fIbcc\fR. \fIbcc\fR should be enclosed in
+quotes if it contains more than one name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcc\fR\fR
+.ad
+.RS 17n
+.rt
+Set the carbon copy list to \fIcc\fR. \fIcc\fR should be enclosed in quotes if
+it contains more than one name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 17n
+.rt
+Turn on debugging output. (Neither particularly interesting nor recommended.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 17n
+.rt
+Test for the presence of mail. \fBmailx\fR prints nothing and exits with a
+successful return code if there is mail to read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 17n
+.rt
+Record the message in a file named after the first recipient. Overrides the
+\fBrecord\fR variable, if set (see \fBInternal Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-f\fR\fB [\fR\fIfile\fR\fB]\fR\fR
+.ad
+.RS 17n
+.rt
+Read messages from \fIfile\fR instead of \fBmailbox\fR. If no \fIfile\fR is
+specified, the \fBmbox\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-f\fR\fB [ \fR\fB+\fR\fIfolder\fR\fB]\fR\fR
+.ad
+.RS 17n
+.rt
+Use the file \fIfolder\fR in the folder directory (same as the \fBfold\fRer
+command). The name of this directory is listed in the \fBfolder\fR variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 17n
+.rt
+Print header summary only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fInumber\fR\fR
+.ad
+.RS 17n
+.rt
+The number of network "hops" made so far. This is provided for network software
+to avoid infinite delivery loops. This option and its argument are passed to
+the delivery program.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.RS 17n
+.rt
+Include the newsgroup and article-id header lines when printing mail messages.
+This option requires the \fB-f\fR option to be specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 17n
+.rt
+Ignore interrupts. See also \fBignore\fR in \fBInternal Variables\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR\fR
+.ad
+.RS 17n
+.rt
+Do not print initial header summary.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 17n
+.rt
+Do not initialize from the system default \fBmailx.rc\fR or \fBMail.rc\fR file.
+See USAGE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIaddress\fR\fR
+.ad
+.RS 17n
+.rt
+Use \fIaddress\fR as the return address when invoking the delivery program. All
+tilde commands are disabled. This option and its argument is passed to the
+delivery program.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsubject\fR\fR
+.ad
+.RS 17n
+.rt
+Set the Subject header field to \fIsubject\fR. \fIsubject\fR should be enclosed
+in quotes if it contains embedded white space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fIfile\fR\fR
+.ad
+.RS 17n
+.rt
+Message-id and article-id header lines are recorded in \fIfile\fR after the
+message is read. This option also sets the \fB-I\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 17n
+.rt
+Scan the input for \fBTo:\fR, \fBCc:\fR, and \fBBcc:\fR fields. Any recipients
+on the command line will be ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.RS 17n
+.rt
+Convert \fBUUCP-style\fR addresses to internet standards. Overrides the
+\fBconv\fR environment variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIuser\fR\fR
+.ad
+.RS 17n
+.rt
+Read \fIuser\fR's \fBmailbox\fR. This is only effective if \fIuser\fR's
+\fBmailbox\fR is not read protected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 17n
+.rt
+Print the \fBmailx\fR version number and exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 17n
+.rt
+Pass the \fB-v\fR flag to \fBsendmail\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-~\fR\fR
+.ad
+.RS 17n
+.rt
+Interpret tilde escapes in the input even if not reading from a tty.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIrecipient\fR\fR
+.ad
+.RS 13n
+.rt
+Addressee of message.
+.RE
+
+.SH USAGE
+.SS "Starting Mail"
+.sp
+.LP
+At startup time, \fBmailx\fR executes the system startup file
+\fB/etc/mail/mailx.rc\fR. If invoked as \fBmail\fR or \fBMail\fR, the system
+startup file \fB/etc/mail/Mail.rc\fR is used instead.
+.sp
+.LP
+The system startup file sets up initial display options and alias lists and
+assigns values to some internal variables. These variables are flags and valued
+parameters which are set and cleared using the \fBse\fRt and \fBuns\fRet
+commands. See \fBInternal Variables\fR.
+.sp
+.LP
+With the following exceptions, regular commands are legal inside startup files:
+\fB!\fR, \fBC\fRopy, \fBe\fRdit, \fBfo\fRllowup, \fBF\fRollowup, \fBho\fRld,
+\fBm\fRail, \fBpre\fRserve, \fBr\fReply, \fBR\fReply, \fBsh\fRell, and
+\fBv\fRisual. An error in the startup file causes the remaining lines in the
+file to be ignored.
+.sp
+.LP
+After executing the system startup file, the mail utilities execute the
+optional personal startup file \fB$HOME/.mailrc\fR, wherein the user can
+override the values of the internal variables as set by the system startup
+file.
+.sp
+.LP
+If the \fB-n\fR option is specified, however, the mail utilities do not execute
+the system startup file.
+.sp
+.LP
+Many system administrators include the commands
+.sp
+.in +2
+.nf
+set appenddeadletter
+unset replyall
+unset pipeignore
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+in the system startup files (to be compatible with past Solaris behavior), but
+this does not meet standards requirements for \fBmailx\fR. To get standard
+behavior for \fBmailx\fR, users should use the \fB-n\fR option or include the
+following commands in a personal startup file:
+.sp
+.in +2
+.nf
+unset appenddeadletter
+set replyall
+set pipeignore
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When reading mail, the mail utilities are in \fIcommand mode\fR. A header
+summary of the first several messages is displayed, followed by a prompt
+indicating the mail utilities can accept regular commands (see \fBCommands\fR
+below). When sending mail, the mail utilities are in \fIinput mode\fR. If no
+subject is specified on the command line, and the \fBasksub\fR variable is set,
+a prompt for the subject is printed.
+.sp
+.LP
+As the message is typed, the mail utilities read the message and store it in a
+temporary file. Commands may be entered by beginning a line with the tilde (~)
+escape character followed by a single command letter and optional arguments.
+See \fBTilde Escapes\fR for a summary of these commands.
+.SS "Reading Mail"
+.sp
+.LP
+Each message is assigned a sequential number, and there is at any time the
+notion of a current message, marked by a right angle bracket (>) in the header
+summary. Many commands take an optional list of messages (\fImessage-list\fR)
+to operate on. In most cases, the current message is set to the
+highest-numbered message in the list after the command is finished executing.
+.sp
+.LP
+The default for \fImessage-list\fR is the current message. A \fImessage-list\fR
+is a list of message identifiers separated by spaces, which may include:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fR
+.ad
+.RS 11n
+.rt
+Message number \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.\fR\fR
+.ad
+.RS 11n
+.rt
+The current message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\fR\fR
+.ad
+.RS 11n
+.rt
+The first undeleted message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fR
+.ad
+.RS 11n
+.rt
+The last message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 11n
+.rt
+All messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 11n
+.rt
+The next undeleted message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 11n
+.rt
+The previous undeleted message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fB\(mi\fR\fIm\fR\fR
+.ad
+.RS 11n
+.rt
+An inclusive range of message numbers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuser\fR\fR
+.ad
+.RS 11n
+.rt
+All messages from \fIuser\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fI/string\fR\fR
+.ad
+.RS 11n
+.rt
+All messages with \fIstring\fR in the Subject line (case ignored).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:\fR\fIc\fR\fR
+.ad
+.RS 11n
+.rt
+All messages of type \fIc\fR, where \fIc\fR is one of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.RS 5n
+.rt
+deleted messages
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBn\fR\fR
+.ad
+.RS 5n
+.rt
+new messages
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 5n
+.rt
+old messages
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 5n
+.rt
+read messages
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR\fR
+.ad
+.RS 5n
+.rt
+unread messages
+.RE
+
+Notice that the context of the command determines whether this type of message
+specification makes sense.
+.RE
+
+.sp
+.LP
+Other arguments are usually arbitrary strings whose usage depends on the
+command involved. Filenames, where expected, are expanded using the normal
+shell conventions (see \fBsh\fR(1)). Special characters are recognized by
+certain commands and are documented with the commands below.
+.SS "Sending Mail"
+.sp
+.LP
+Recipients listed on the command line may be of three types: login names, shell
+commands, or alias groups. Login names may be any network address, including
+mixed network addressing. If mail is found to be undeliverable, an attempt is
+made to return it to the sender's \fBmailbox\fR. If the recipient name begins
+with a pipe symbol ( | ), the rest of the name is taken to be a shell command
+to pipe the message through. This provides an automatic interface with any
+program that reads the standard input, such as \fBlp\fR(1) for recording
+outgoing mail on paper. Alias groups are set by the \fBa\fRlias command (see
+\fBCommands\fR below) or in a system startup file (for example,
+\fB$HOME/.mailrc\fR). Aliases are lists of recipients of any type.
+.SS "Forwarding Mail"
+.sp
+.LP
+To forward a specific message, include it in a message to the desired
+recipients with the \fB~f\fR or \fB~m\fR tilde escapes. See \fBTilde\fR
+\fBEscapes\fR below. To forward mail automatically, add a comma-separated list
+of addresses for additional recipients to the \fB\&.forward\fR file in your
+home directory. This is different from the format of the \fBalias\fR command,
+which takes a space-separated list instead. \fBNote:\fR Forwarding addresses
+must be valid, or the messages will "bounce." You cannot, for instance, reroute
+your mail to a new host by forwarding it to your new address if it is not yet
+listed in the \fBNIS\fR aliases domain.
+.SS "Commands"
+.sp
+.LP
+Regular commands are of the form
+.sp
+.in +2
+.nf
+[ \fIcommand\fR ] [ \fImessage-list\fR ] [ \fIarguments\fR ]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In \fIinput mode\fR, commands are recognized by the escape character,
+\fBtilde(~)\fR, and lines not treated as commands are taken as input for the
+message. If no command is specified in \fIcommand mode\fR, \fBn\fRext is
+assumed. The following is a complete list of \fBmailx\fR commands:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIshell-command\fR\fR
+.ad
+.sp .6
+.RS 4n
+Escape to the shell. See \fBSHELL\fR in ENVIRONMENT VARIABLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR \fIcomment\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fINULL\fR command (comment). Useful in \fBmailrc\fR files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the current message number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints a summary of commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fRlias \fIalias name\fR .\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBg\fRroup \fIalias name\fR .\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Declare an alias for the given names. The names are substituted when
+\fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file. With no
+arguments, the command displays the list of defined aliases.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBalt\fRernates \fIname .\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Declare a list of alternate names for your login. When responding to a message,
+these names are removed from the list of recipients for the response. With no
+arguments, print the current list of alternate names. See also \fBallnet\fR in
+\fBInternal Variables\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR [\fIdirectory\fR]\fR
+.ad
+.br
+.na
+\fB\fBch\fRdir [\fIdirectory\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Change directory. If \fIdirectory\fR is not specified, \fB$HOME\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fRopy [\fIfile\fR]\fR
+.ad
+.br
+.na
+\fB\fBc\fRopy [\fImessage-list\fR] \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Copy messages to the file without marking the messages as saved. Otherwise
+equivalent to the \fBs\fRave command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBC\fRopy [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Save the specified messages in a file whose name is derived from the author of
+the message to be saved, without marking the messages as saved. Otherwise
+equivalent to the \fBS\fRave command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fRelete [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Delete messages from the \fBmailbox\fR. If \fBautoprint\fR is set, the next
+message after the last one deleted is printed (see \fBInternal Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdi\fRscard [\fIheader-field\fR.\|.\|.\|]\fR
+.ad
+.br
+.na
+\fB\fBig\fRnore [\fIheader-field\fR.\|.\|.\|]\fR
+.ad
+.sp .6
+.RS 4n
+Suppress printing of the specified header fields when displaying messages on
+the screen. Examples of header fields to ignore are \fBStatus\fR and
+\fBReceived\fR. The fields are included when the message is saved, unless the
+\fBalwaysignore\fR variable is set. The \fBMo\fRre, \fBPa\fRge, \fBP\fRrint,
+and \fBT\fRype commands override this command. If no header is specified, the
+current list of header fields being ignored is printed. See also the
+\fBundi\fRscard and \fBunig\fRnore commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdp\fR [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBdt \fR[\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Delete the specified messages from the \fBmailbox\fR and print the next message
+after the last one deleted. Roughly equivalent to a \fBd\fRelete command
+followed by a \fBp\fRrint command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBec\fRho \fIstring \fR.\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Echo the given strings (like \fBecho\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fRdit [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Edit the given messages. Each message is placed in a temporary file and the
+program named by the \fBEDITOR\fR variable is invoked to edit it (see
+ENVIRONMENT VARIABLES). Default editor is \fBed\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBex\fRit\fR
+.ad
+.br
+.na
+\fB\fBx\fRit\fR
+.ad
+.sp .6
+.RS 4n
+Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
+saved in the \fBmbox\fR (see also \fBq\fRuit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfie\fRld [\fImessage-list\fR] header-file\fR
+.ad
+.sp .6
+.RS 4n
+Display the value of the header field in the specified message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfi\fRle [\fIfile\fR]\fR
+.ad
+.br
+.na
+\fB\fBfold\fRer [\fIfile\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Quit from the current file of messages and read in the specified file. Several
+special characters are recognized when used as file names:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fR
+.ad
+.RS 9n
+.rt
+the current \fBmailbox\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIuser\fR\fR
+.ad
+.RS 9n
+.rt
+the \fBmailbox\fR for \fIuser\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 9n
+.rt
+the previous mail file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB&\fR\fR
+.ad
+.RS 9n
+.rt
+the current \fBmbox\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIfile\fR\fR
+.ad
+.RS 9n
+.rt
+The named file in the \fIfolder\fR directory (listed in the \fBfolder\fR
+variable).
+.RE
+
+With no arguments, print the name of the current mail file, and the number of
+messages and characters it contains.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfolders\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the names of the files in the directory set by the \fBfolder\fR variable
+(see \fBInternal Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFo\fRllowup [\fImessage\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Respond to a message, recording the response in a file whose name is derived
+from the author of the message. Overrides the \fBrecord\fR variable, if set. If
+the \fBreplyall\fR variable is set, the actions of \fBFo\fRllowup and
+\fBfo\fRllowup are reversed. See also the \fBf\fRollowup, \fBS\fRave, and
+\fBC\fRopy commands and \fBoutfolder\fR in \fBInternal Variables\fR, and the
+\fBStarting Mail\fR section in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fRollowup [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Respond to the first message in the \fImessage-list\fR, sending the message to
+the author of each message in the \fImessage-list\fR. The subject line is taken
+from the first message and the response is recorded in a file whose name is
+derived from the author of the first message. If the \fBreplyall\fR variable is
+set, the actions of \fBfo\fRllowup and \fBFo\fRllowup are reversed. See also
+the \fBFo\fRllowup, \fBS\fRave, and \fBC\fRopy commands and \fBoutfolder\fR in
+\fBInternal Variables\fR, and the \fBStarting Mail\fR section in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fRrom [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the header summary for the specified messages. If no messages are
+specified, print the header summary for the current message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fRroup \fIalias name \fR.\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBa\fRlias \fIalias name \fR.\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Declare an alias for the given names. The names are substituted when
+\fBalias\fR is used as a recipient. Useful in the \fBmailrc\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fReaders [\fImessage\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the page of headers which includes the message specified. The
+\fBscreen\fR variable sets the number of headers per page (see \fBInternal
+Variables\fR). See also the \fBz\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhel\fRp\fR
+.ad
+.sp .6
+.RS 4n
+Print a summary of commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBho\fRld [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBpre\fRserve [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Hold the specified messages in the \fBmailbox\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fRf \fBs\fR | \fBr\fR | \fBt\fR\fR
+.ad
+.br
+.na
+\fB\fImail-commands\fR\fR
+.ad
+.br
+.na
+\fB\fR
+.ad
+.br
+.na
+\fB\fBel\fRse\fR
+.ad
+.br
+.na
+\fB\fImail-commands\fR\fR
+.ad
+.br
+.na
+\fB\fR
+.ad
+.br
+.na
+\fB\fBen\fRdif\fR
+.ad
+.sp .6
+.RS 4n
+Conditional execution, where \fIs\fR executes following \fImail-commands\fR, up
+to an \fBel\fRse or \fBen\fRdif, if the program is in \fIsend\fR mode, \fIr\fR
+causes the \fImail-commands\fR to be executed only in \fIreceive\fR mode, and
+\fBt\fR causes the \fImail-commands\fR to be executed only if \fBmailx\fR is
+being run from a terminal. Useful in the \fBmailrc\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinc\fR\fR
+.ad
+.sp .6
+.RS 4n
+Incorporate messages that arrive while you are reading the system mailbox. The
+new messages are added to the message list in the current \fBmail\fR session.
+This command does not commit changes made during the session, and prior
+messages are not renumbered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBig\fRnore [\fIheader-field \fR.\|.\|.\|]\fR
+.ad
+.br
+.na
+\fB\fBdi\fRscard [\fIheader-field \fR.\|.\|.\|]\fR
+.ad
+.sp .6
+.RS 4n
+Suppress printing of the specified header fields when displaying messages on
+the screen. Examples of header fields to ignore are \fBStatus\fR and \fBCc\fR.
+All fields are included when the message is saved. The \fBMo\fRre, \fBPa\fRge,
+\fBP\fRrint and \fBT\fRype commands override this command. If no header is
+specified, the current list of header fields being ignored is printed. See also
+the \fBundi\fRscard and \fBunig\fRnore commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fRist\fR
+.ad
+.sp .6
+.RS 4n
+Print all commands available. No explanation is given.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlo\fRad\fR
+.ad
+.sp .6
+.RS 4n
+[\fImessage\fR] \fBfile\fR The specified message is replaced by the message in
+the named file. \fBfile\fR should contain a single mail message including mail
+headers (as saved by the \fBs\fRave command).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fRail \fIrecipient \fR.\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Mail a message to the specified recipients.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM\fRail \fIrecipient\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mail a message to the specified recipients, and record it in a file whose name
+is derived from the author of the message. Overrides the \fBrecord\fR variable,
+if set. See also the \fBSave\fR and \fBCopy\fR commands and \fBoutfolder\fR in
+\fBInternal Variables\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmb\fRox [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Arrange for the given messages to end up in the standard \fBmbox\fR save file
+when \fBmailx\fR terminates normally. See \fBMBOX\fR in ENVIRONMENT VARIABLES
+for a description of this file. See also the \fBex\fRit and \fBq\fRuit
+commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmo\fRre [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBpa\fRge [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the specified messages. If \fBcrt\fR is set, the messages longer than the
+number of lines specified by the \fBcrt\fR variable are paged through the
+command specified by the \fBPAGER\fR variable. The default command is
+\fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
+\fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBp\fRrint and
+\fBt\fRype commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMo\fRre [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBPa\fRge [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the specified messages on the screen, including all header fields.
+Overrides suppression of fields by the \fBig\fRnore command. Same as the
+\fBP\fRrint and \fBT\fRype commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBne\fRw [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBN\fRew [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBunr\fRead [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBU\fRnread\fR
+.ad
+.sp .6
+.RS 4n
+[\fImessage-list\fR] Take a message list and mark each message as \fInot\fR
+having been read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBn\fRext [\fImessage\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Go to the next message matching \fImessage\fR. If message is not supplied, this
+command finds the next message that was not deleted or saved. A
+\fImessage-list\fR may be specified, but in this case the first valid message
+in the list is the only one used. This is useful for jumping to the next
+message from a specific user, since the name would be taken as a command in the
+absence of a real command. See the discussion of \fImessage-list\fR above for a
+description of possible message specifications.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpi\fRpe [\fImessage-list\fR] [\fIshell-command\fR]\fR
+.ad
+.br
+.na
+\fB\fB|\fR [\fImessage-list\fR] [\fIshell-command\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Pipe the message through the given \fIshell-command\fR. The message is treated
+as if it were read. If no arguments are given, the current message is piped
+through the command specified by the value of the \fBcmd\fR variable. If the
+\fBpage\fR variable is set, a form feed character is inserted after each
+message (see \fBInternal Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpre\fRserve [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBho\fRld [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Preserve the specified messages in the \fBmailbox\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fRrint [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBt\fRype [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the specified messages. If \fBcrt\fR is set, the messages longer than the
+number of lines specified by the \fBcrt\fR variable are paged through the
+command specified by the \fBPAGER\fR variable. The default command is
+\fBpg\fR(1) or if the \fBbsdcompat\fR variable is set, the default is
+\fBmore\fR(1). See ENVIRONMENT VARIABLES. Same as the \fBmo\fRre and \fBpa\fRge
+commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fRrint [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBT\fRype [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the specified messages on the screen, including all header fields.
+Overrides suppression of fields by the \fBig\fRnore command. Same as the
+\fBMo\fRre and \fBPa\fRge commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpu\fRt [\fIfile\fR]\fR
+.ad
+.br
+.na
+\fB\fBpu\fRt [\fImessage-list\fR] \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Save the specified message in the given file. Use the same conventions as the
+\fBp\fRrint command for which header fields are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPu\fRt [\fIfile\fR]\fR
+.ad
+.br
+.na
+\fB\fBPu\fRt [\fImessage-list\fR] \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Save the specified message in the given file. Overrides suppression of fields
+by the \fBig\fRnore command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fRuit\fR
+.ad
+.sp .6
+.RS 4n
+Exit from \fBmailx\fR, storing messages that were read in \fBmbox\fR and unread
+messages in the \fBmailbox\fR. Messages that have been explicitly saved in a
+file are deleted unless the \fBkeepsave\fR variable is set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fReply [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBr\fRespond [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBreplys\fRender [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Send a response to the author of each message in the \fImessage-list\fR. The
+subject line is taken from the first message. If \fBrecord\fR is set to a
+file, a copy of the reply is added to that file. If the \fBreplyall\fR variable
+is set, the actions of \fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond
+are reversed. The \fBreplys\fRender command is not affected by the
+\fBreplyall\fR variable, but sends each reply only to the sender of each
+message. See the \fBStarting Mail\fR section in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBR\fReply [\fImessage\fR]\fR
+.ad
+.br
+.na
+\fB\fBR\fRespond [\fImessage\fR]\fR
+.ad
+.br
+.na
+\fB\fBreplya\fRll [\fImessage\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Reply to the specified message, including all other recipients of that message.
+If the variable \fBrecord\fR is set to a file, a copy of the reply added to
+that file. If the \fBreplyall\fR variable is set, the actions of
+\fBR\fReply/\fBR\fRespond and \fBr\fReply/\fBr\fRespond are reversed. The
+\fBreplya\fRll command is not affected by the \fBreplyall\fR variable, but
+always sends the reply to all recipients of the message. See the \fBStarting
+Mail\fR section in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBret\fRain\fR
+.ad
+.sp .6
+.RS 4n
+Add the list of header fields named to the \fIretained list\fR. Only the header
+fields in the retain list are shown on your terminal when you print a message.
+All other header fields are suppressed. The set of retained fields specified
+by the \fBret\fRain command overrides any list of ignored fields specified by
+the \fBig\fRnore command. The \fBT\fRype and \fBP\fRrint commands can be used
+to print a message in its entirety. If \fBret\fRain is executed with no
+arguments, it lists the current set of retained fields.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fRave [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Save the specified messages in a file whose name is derived from the author of
+the first message. The name of the file is taken to be the author's name with
+all network addressing stripped off. See also the \fBC\fRopy, \fBfo\fRllowup,
+and \fBF\fRollowup commands and \fBoutfolder\fR in \fBInternal Variables\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fRave [\fIfile\fR]\fR
+.ad
+.br
+.na
+\fB\fBs\fRave [\fImessage-list\fR] \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Save the specified messages in the given file. The file is created if it does
+not exist. The file defaults to \fBmbox\fR. The message is deleted from the
+\fBmailbox\fR when \fBmailx\fR terminates unless \fBkeepsave\fR is set (see
+also \fBInternal Variables\fR and the \fBex\fRit and \fBq\fRuit commands).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBse\fRt\fR
+.ad
+.br
+.na
+\fB\fBse\fRt \fIvariable\fR\fR
+.ad
+.br
+.na
+\fB\fBse\fRt \fIvariable\fR\fB=\fR\fIstring\fR\fR
+.ad
+.br
+.na
+\fB\fBse\fRt \fIvariable\fR\fB=\fR\fInumber\fR\fR
+.ad
+.sp .6
+.RS 4n
+Define a \fIvariable\fR. To assign a \fIvalue\fR to \fIvariable\fR, separate
+the variable name from the value by an `\fB=\fR' (there must be no space before
+or after the `\fB=\fR'). A variable may be given a null, string, or numeric
+\fIvalue\fR. To embed SPACE characters within a \fIvalue\fR, enclose it in
+quotes.
+.sp
+With no arguments, \fBse\fRt displays all defined variables and any values they
+might have. See \fBInternal Variables\fR for a description of all predefined
+\fBmail\fR variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsh\fRell\fR
+.ad
+.sp .6
+.RS 4n
+Invoke an interactive shell. See also \fBSHELL\fR in ENVIRONMENT VARIABLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsi\fRze [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the size in characters of the specified messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBso\fRurce \fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read commands from the given file and return to command mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBto\fRp [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the top few lines of the specified messages. If the \fBtoplines\fR
+variable is set, it is taken as the number of lines to print (see \fBInternal
+Variables\fR). The default is 5.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtou\fRch [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Touch the specified messages. If any message in \fImessage-list\fR is not
+specifically saved in a file, it is placed in the \fBmbox\fR, or the file
+specified in the \fBMBOX\fR environment variable, upon normal termination. See
+\fBex\fRit and \fBq\fRuit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT\fRype [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBP\fRrint [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the specified messages on the screen, including all header fields.
+Overrides suppression of fields by the \fBig\fRnore command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fRype [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBp\fRrint [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the specified messages. If \fBcrt\fR is set, the messages longer than the
+number of lines specified by the \fBcrt\fR variable are paged through the
+command specified by the \fBPAGER\fR variable. The default command is
+\fBpg\fR(1). See ENVIRONMENT VARIABLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuna\fRlias [\fBalias\fR] .\|.\|.\fR
+.ad
+.br
+.na
+\fB\fBung\fRroup [\fBalias\fR] .\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Remove the definitions of the specified aliases.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fRndelete [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Restore the specified deleted messages. Will only restore messages deleted in
+the current mail session. If \fBautoprint\fR is set, the last message of those
+restored is printed (see \fBInternal Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBundi\fRscard [\fIheader-field\fR\|.\|.\|.]\fR
+.ad
+.br
+.na
+\fB\fBunig\fRnore [\fIheader-field\fR\|.\|.\|.]\fR
+.ad
+.sp .6
+.RS 4n
+Remove the specified header fields from the list being ignored. If no header
+fields are specified, all header fields are removed from the list being
+ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunret\fRain [\fIheader-field\fR\|.\|.\|.]\fR
+.ad
+.sp .6
+.RS 4n
+Remove the specified header fields from the list being retained. If no header
+fields are specified, all header fields are removed from the list being
+retained.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunr\fRead [\fImessage-list\fR]\fR
+.ad
+.br
+.na
+\fB\fBU\fRnread [\fImessage-list\fR] Same as the \fBne\fRw command.\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuns\fRet \fIvariable\fR\|.\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+Erase the specified variables. If the variable was imported from the
+environment (that is, an environment variable or exported shell variable), it
+cannot be unset from within \fBmailx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBve\fRrsion\fR
+.ad
+.sp .6
+.RS 4n
+Print the current version and release date of the \fBmailx\fR utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fRisual [\fImessage-list\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Edit the given messages with a screen editor. Each messages is placed in a
+temporary file and the program named by the \fBVISUAL\fR variable is invoked to
+edit it (see ENVIRONMENT VARIABLES). Notice that the default visual editor is
+\fBvi\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fRrite [\fImessage-list\fR] \fBfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Write the given messages on the specified file, minus the header and trailing
+blank line. Otherwise equivalent to the \fBs\fRave command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fRit\fR
+.ad
+.br
+.na
+\fB\fBex\fRit\fR
+.ad
+.sp .6
+.RS 4n
+Exit from \fBmailx\fR, without changing the \fBmailbox\fR. No messages are
+saved in the \fBmbox\fR (see also \fBq\fRuit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBz\fR[\fB+\fR\||\|\fB\(mi\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Scroll the header display forward or backward one screen\(mifull. The number of
+headers displayed is set by the \fBscreen\fR variable (see \fBInternal
+Variables\fR).
+.RE
+
+.SS "Tilde Escapes"
+.sp
+.LP
+The following tilde escape commands can be used when composing mail to send.
+These may be entered only from \fIinput mode\fR, by beginning a line with the
+tilde escape character (~). See \fBescape\fR in \fBInternal Variables\fR for
+changing this special character. The escape character can be entered as text by
+typing it twice.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~\|!\fR\fIshell-command\fR\fR
+.ad
+.RS 23n
+.rt
+Escape to the shell. If present, run \fIshell-command\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~.\fR\fR
+.ad
+.RS 23n
+.rt
+Simulate end of file (terminate message input).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~\|:\fR\fImail-command\fR\fR
+.ad
+.br
+.na
+\fB\fB~_\|\fR\fImail-command\fR\fR
+.ad
+.RS 23n
+.rt
+Perform the command-level request. Valid only when sending a message while
+reading mail.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~?\fR\fR
+.ad
+.RS 23n
+.rt
+Print a summary of tilde escapes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~A\fR\fR
+.ad
+.RS 23n
+.rt
+Insert the autograph string \fBSign\fR into the message (see \fBInternal
+Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~a\fR\fR
+.ad
+.RS 23n
+.rt
+Insert the autograph string \fBsign\fR into the message (see \fBInternal
+Variables\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~b\fR\fI name \|.\|.\|.\fR\fR
+.ad
+.RS 23n
+.rt
+Add the \fIname\fRs to the blind carbon copy (\fBBcc\fR) list. This is like the
+carbon copy (\fBCc\fR) list, except that the names in the \fBBcc\fR list are
+not shown in the header of the mail message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~c\fR\fI name \|.\|.\|.\fR\fR
+.ad
+.RS 23n
+.rt
+Add the \fIname\fRs to the carbon copy (\fBCc\fR) list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~d\fR\fR
+.ad
+.RS 23n
+.rt
+Read in the \fBdead-letter\fR file. See \fBDEAD\fR in ENVIRONMENT VARIABLES for
+a description of this file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~e\fR\fR
+.ad
+.RS 23n
+.rt
+Invoke the editor on the partial message. See also \fBEDITOR\fR in ENVIRONMENT
+VARIABLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~f\fR [\fImessage-list\fR]\fR
+.ad
+.RS 23n
+.rt
+Forward the specified message, or the current message being read. Valid only
+when sending a message while reading mail. The messages are inserted into the
+message without alteration (as opposed to the \fB~m\fR escape).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~F\fR [\fImessage-list\fR]\fR
+.ad
+.RS 23n
+.rt
+Forward the specified message, or the current message being read, including all
+header fields. Overrides the suppression of fields by the \fBig\fRnore command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~h\fR\fR
+.ad
+.RS 23n
+.rt
+Prompt for \fBSubject\fR line and \fBTo\fR, \fBCc\fR, and \fBBcc\fR lists. If
+the field is displayed with an initial value, it may be edited as if you had
+just typed it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~i\fR \fIvariable\fR\fR
+.ad
+.RS 23n
+.rt
+Insert the value of the named variable into the text of the message. For
+example, \fB~A\fR is equivalent to `\fB~i Sign\fR.' Environment variables set
+and exported in the shell are also accessible by \fB~i\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~m\fR [\fImessage-list\fR]\fR
+.ad
+.RS 23n
+.rt
+Insert the listed messages, or the current message being read into the letter.
+Valid only when sending a message while reading mail. The text of the message
+is shifted to the right, and the string contained in the \fBindentprefix\fR
+variable is inserted as the leftmost characters of each line. If
+\fBindentprefix\fR is not set, a TAB character is inserted into each line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~M\fR [\fImessage-list\fR]\fR
+.ad
+.RS 23n
+.rt
+Insert the listed messages, or the current message being read, including the
+header fields, into the letter. Valid only when sending a message while reading
+mail. The text of the message is shifted to the right, and the string contained
+in the \fBindentprefix\fR variable is inserted as the leftmost characters of
+each line. If \fBindentprefix\fR is not set, a TAB character is inserted into
+each line. Overrides the suppression of fields by the \fBig\fRnore command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~p\fR\fR
+.ad
+.RS 23n
+.rt
+Print the message being entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~q\fR\fR
+.ad
+.RS 23n
+.rt
+Quit from input mode by simulating an interrupt. If the body of the message is
+not null, the partial message is saved in \fBdead-letter\fR. See \fBDEAD\fR in
+ENVIRONMENT VARIABLES for a description of this file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~R\fR\fR
+.ad
+.RS 23n
+.rt
+Mark message for return receipt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~r\fR \fIfile\fR\fR
+.ad
+.br
+.na
+\fB\fB~<\fR \fIfile\fR\fR
+.ad
+.br
+.na
+\fB\fB~< ! \fR\fIshell-command\fR\fR
+.ad
+.RS 23n
+.rt
+Read in the specified file. If the argument begins with an exclamation point
+(!), the rest of the string is taken as an arbitrary shell command and is
+executed, with the standard output inserted into the message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~s\fR \fIstring \|.\|.\|.\fR\fR
+.ad
+.RS 23n
+.rt
+Set the subject line to \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~t\fR \fIname \|.\|.\|.\fR\fR
+.ad
+.RS 23n
+.rt
+Add the given \fIname\fRs to the To list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~v\fR\fR
+.ad
+.RS 23n
+.rt
+Invoke a preferred screen editor on the partial message. The default visual
+editor is \fBvi\fR(1). See also \fBVISUAL\fR in ENVIRONMENT VARIABLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~w\fR \fIfile\fR\fR
+.ad
+.RS 23n
+.rt
+Write the message into the given file, without the header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~x\fR\fR
+.ad
+.RS 23n
+.rt
+Exit as with \fB~q\fR except the message is not saved in \fBdead-letter\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~|\fR \fIshell-command\fR\fR
+.ad
+.RS 23n
+.rt
+Pipe the body of the message through the given \fIshell-command\fR. If the
+\fIshell-command\fR returns a successful exit status, the output of the command
+replaces the message.
+.RE
+
+.SS "Internal Variables"
+.sp
+.LP
+The following variables are internal variables. They may be imported from the
+execution environment or set using the \fBse\fRt command at any time. The
+\fBuns\fRet command may be used to erase variables.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBallnet\fR\fR
+.ad
+.RS 26n
+.rt
+All network names whose last component (login name) match are treated as
+identical. This causes the \fImessage-list\fR message specifications to behave
+similarly. Disabled by default. See also the \fBalt\fRernates command and the
+\fBmetoo\fR and \fBfuzzymatch\fR variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBalwaysignore\fR\fR
+.ad
+.RS 26n
+.rt
+Ignore header fields with \fBig\fRnore everywhere, not just during \fBp\fRrint
+or \fBt\fRype. Affects the \fBs\fRave, \fBS\fRave, \fBc\fRopy, \fBC\fRopy,
+\fBto\fRp, \fBpi\fRpe, and \fBw\fRrite commands, and the \fB~m\fR and \fB~f\fR
+tilde escapes. Enabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBappend\fR\fR
+.ad
+.RS 26n
+.rt
+Upon termination, append messages to the end of the \fBmbox\fR file instead of
+prepending them. Although disabled by default, \fBappend\fR is set in the
+system startup file (which can be suppressed with the \fB-n\fR command line
+option).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBappenddeadletter\fR\fR
+.ad
+.RS 26n
+.rt
+Append to the deadletter file rather than overwrite it. Although disabled by
+default, \fBappenddeadletter\fR is frequently set in the system startup file.
+See \fBStarting Mail\fR in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBaskbcc\fR\fR
+.ad
+.RS 26n
+.rt
+Prompt for the \fBBcc\fR list after the \fBSubject\fR is entered if it is not
+specified on the command line with the \fB-b\fR option. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBaskcc\fR\fR
+.ad
+.RS 26n
+.rt
+Prompt for the \fBCc\fR list after the \fBSubject\fR is entered if it is not
+specified on the command line with the \fB-c\fR option. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBasksub\fR\fR
+.ad
+.RS 26n
+.rt
+Prompt for subject if it is not specified on the command line with the \fB-s\fR
+option. Enabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBautoinc\fR\fR
+.ad
+.RS 26n
+.rt
+Automatically incorporate new messages into the current session as they arrive.
+This has an affect similar to issuing the \fBinc\fR command every time the
+command prompt is displayed. Disabled by default, but \fBautoinc\fR is set in
+the default system startup file for \fBmailx\fR; it is not set for
+\fB/usr/ucb/mail\fR or \fB/usr/ucb/Mail\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBautoprint\fR\fR
+.ad
+.RS 26n
+.rt
+Enable automatic printing of messages after \fBd\fRelete and \fBu\fRndelete
+commands. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbang\fR\fR
+.ad
+.RS 26n
+.rt
+Enable the special-casing of exclamation points (!) in shell escape command
+lines as in \fBvi\fR(1). Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbsdcompat\fR\fR
+.ad
+.RS 26n
+.rt
+Set automatically if \fBmailx\fR is invoked as \fBmail\fR or \fBMail\fR. Causes
+\fBmailx\fR to use \fB/etc/mail/Mail.rc\fR as the system startup file. Changes
+the default pager to \fBmore\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcmd=\fR\fIshell-command\fR\fR
+.ad
+.RS 26n
+.rt
+Set the default command for the \fBpi\fRpe command. No default value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBconv=\fR\fIconversion\fR\fR
+.ad
+.RS 26n
+.rt
+Convert \fBuucp\fR addresses to the specified address style, which can be
+either:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinternet\fR\fR
+.ad
+.RS 12n
+.rt
+This requires a mail delivery program conforming to the \fBRFC822\fR standard
+for electronic mail addressing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoptimize\fR\fR
+.ad
+.RS 12n
+.rt
+Remove loops in \fBuucp\fR(1C) address paths (typically generated by the
+\fBr\fReply command). No rerouting is performed; \fBmail\fR has no knowledge
+of \fBUUCP\fR routes or connections.
+.RE
+
+Conversion is disabled by default. See also \fBsendmail\fR(1M) and the \fB-U\fR
+command-line option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrt\fR[\fB=\fR\fInumber\fR]\fR
+.ad
+.RS 26n
+.rt
+Pipe messages having more than \fInumber\fR lines through the command specified
+by the value of the \fBPAGER\fR variable ( \fBpg\fR(1) or \fBmore\fR(1) by
+default). If \fInumber\fR is not specified, the current window size is used.
+Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdebug\fR\fR
+.ad
+.RS 26n
+.rt
+Enable verbose diagnostics for debugging. Messages are not delivered. Disabled
+by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdot\fR\fR
+.ad
+.RS 26n
+.rt
+Take a period on a line by itself, or \fBEOF\fR during input from a terminal as
+end-of-file. Disabled by default, but \fBdot\fR is set in the system startup
+file (which can be suppressed with the \fB-n\fR command line option).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfcc\fR\fR
+.ad
+.RS 26n
+.rt
+By default, \fBmailx\fR will treat any address containing a slash ("/")
+character as a local "send to file" address. By unsetting this option, this
+behavior is disabled. Enabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBflipr\fR\fR
+.ad
+.RS 26n
+.rt
+Reverse the effect of the \fBfo\fRllowup/\fBFo\fRllowup and
+\fBr\fReply/\fBR\fReply command pairs. If both \fBflipr\fR and \fBreplyall\fR
+are set, the effect is as if neither was set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfrom\fR\fR
+.ad
+.RS 26n
+.rt
+Extract the author listed in the header summary from the \fBFrom:\fR header
+instead of the UNIX \fBFrom\fR line. Enabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfuzzymatch\fR\fR
+.ad
+.RS 26n
+.rt
+The \fBfrom\fR command searches for messages from the indicated sender. By
+default, the full sender address must be specified. By setting this option,
+only a sub-string of the sender address need be specified. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBescape=\fR\fIc\fR\fR
+.ad
+.RS 26n
+.rt
+Substitute \fIc\fR for the ~ escape character. Takes effect with next message
+sent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfolder=\fR\fIdirectory\fR\fR
+.ad
+.RS 26n
+.rt
+The directory for saving standard mail files. User-specified file names
+beginning with a plus (+) are expanded by preceding the file name with this
+directory name to obtain the real file name. If \fIdirectory\fR does not start
+with a slash (/), \fB$HOME\fR is prepended to it. There is no default for the
+\fBfolder\fR variable. See also \fBoutfolder\fR below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBheader\fR\fR
+.ad
+.RS 26n
+.rt
+Enable printing of the header summary when entering \fBmailx\fR. Enabled by
+default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhold\fR\fR
+.ad
+.RS 26n
+.rt
+Preserve all messages that are read in the \fBmailbox\fR instead of putting
+them in the standard \fBmbox\fR save file. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignore\fR\fR
+.ad
+.RS 26n
+.rt
+Ignore interrupts while entering messages. Handy for noisy dial-up lines.
+Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignoreeof\fR\fR
+.ad
+.RS 26n
+.rt
+Ignore end-of-file during message input. Input must be terminated by a period
+(.) on a line by itself or by the \fB~.\fR command. See also \fBdot\fR above.
+Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindentprefix=\fR\fIstring\fR\fR
+.ad
+.RS 26n
+.rt
+When \fBindentprefix\fR is set, \fIstring\fR is used to mark indented lines
+from messages included with \fB~m\fR. The default is a TAB character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeep\fR\fR
+.ad
+.RS 26n
+.rt
+When the \fBmailbox\fR is empty, truncate it to zero length instead of removing
+it. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBiprompt=\fR\fIstring\fR\fR
+.ad
+.RS 26n
+.rt
+The specified prompt string is displayed before each line on input is requested
+when sending a message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeepsave\fR\fR
+.ad
+.RS 26n
+.rt
+Keep messages that have been saved in other files in the \fBmailbox\fR instead
+of deleting them. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmakeremote\fR\fR
+.ad
+.RS 26n
+.rt
+When replying to all recipients of a message, if an address does not include a
+machine name, it is assumed to be relative to the sender of the message.
+Normally not needed when dealing with hosts that support RFC822.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmetoo\fR\fR
+.ad
+.RS 26n
+.rt
+If your login appears as a recipient, do not delete it from the list. Disabled
+by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmustbang\fR\fR
+.ad
+.RS 26n
+.rt
+Force all mail addresses to be in bang format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBonehop\fR\fR
+.ad
+.RS 26n
+.rt
+When responding to a message that was originally sent to several recipients,
+the other recipient addresses are normally forced to be relative to the
+originating author's machine for the response. This flag disables alteration of
+the recipients' addresses, improving efficiency in a network where all machines
+can send directly to all other machines (that is, one hop away). Disabled by
+default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutfolder\fR\fR
+.ad
+.RS 26n
+.rt
+Locate the files used to record outgoing messages in the directory specified by
+the \fBfolder\fR variable unless the path name is absolute. Disabled by
+default. See \fBfolder\fR above and the \fBS\fRave, \fBC\fRopy, \fBfo\fRllowup,
+and \fBF\fRollowup commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpage\fR\fR
+.ad
+.RS 26n
+.rt
+Used with the \fBpi\fRpe command to insert a form feed after each message sent
+through the pipe. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpipeignore\fR\fR
+.ad
+.RS 26n
+.rt
+Omit ignored header when outputting to the \fBpipe\fR command. Although
+disabled by default, \fBpipeignore\fR is frequently set in the system startup
+file. See \fBStarting Mail\fR in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpostmark\fR\fR
+.ad
+.RS 26n
+.rt
+Your "real name" to be included in the From line of messages you send. By
+default this is derived from the comment field in your \fBpasswd\fR(4) file
+entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprompt=\fR\fIstring\fR\fR
+.ad
+.RS 26n
+.rt
+Set the \fIcommand mode\fR prompt to \fIstring\fR. Default is "\fB? \fR",
+unless the \fBbsdcompat\fR variable is set, then the default is "\fB&\fR".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquiet\fR\fR
+.ad
+.RS 26n
+.rt
+Refrain from printing the opening message and version when entering
+\fBmailx\fR. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrecord=\fR\fIfile\fR\fR
+.ad
+.RS 26n
+.rt
+Record all outgoing mail in \fIfile\fR. Disabled by default. See also
+\fBoutfolder\fR above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreplyall\fR\fR
+.ad
+.RS 26n
+.rt
+Reverse the effect of the \fBr\fReply and \fBR\fReply and \fBfo\fRllowup and
+\fBFo\fRllowup commands. Although set by default, \fBreplayall\fR is
+frequently unset in the system startup file. See \fBflipr\fR and \fBStarting
+Mail\fR in USAGE above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreturnaddr=\fR\fIstring\fR\fR
+.ad
+.RS 26n
+.rt
+The default sender address is that of the current user. This variable can be
+used to set the sender address to any arbitrary value. Set with caution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsave\fR\fR
+.ad
+.RS 26n
+.rt
+Enable saving of messages in \fBdead-letter\fR on interrupt or delivery error.
+See \fBDEAD\fR for a description of this file. Enabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBscreen=\fR\fInumber\fR\fR
+.ad
+.RS 26n
+.rt
+Sets the number of lines in a screen-full of headers for the \fBh\fReaders
+command. \fInumber\fR must be a positive number.
+.sp
+The default is set according to baud rate or window size. With a baud rate less
+than \fB1200\fR, \fInumber\fR defaults to \fB5\fR, if baud rate is exactly
+\fB1200\fR, it defaults to \fB10\fR. If you are in a window, \fInumber\fR
+defaults to the default window size minus 4. Otherwise, the default is
+\fB20\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsendmail=\fR\fIshell-command\fR\fR
+.ad
+.RS 26n
+.rt
+Alternate command for delivering messages. \fBNote:\fR In addition to the
+expected list of recipients, \fBmail\fR also passes the \fB-i\fR and \fB-m\fR,
+flags to the command. Since these flags are not appropriate to other commands,
+you may have to use a shell script that strips them from the arguments list
+before invoking the desired command. Default is \fB/usr/bin/rmail\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsendwait\fR\fR
+.ad
+.RS 26n
+.rt
+Wait for background mailer to finish before returning. Disabled by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshowname\fR\fR
+.ad
+.RS 26n
+.rt
+Causes the message header display to show the sender's real name (if known)
+rather than their mail address. Disabled by default, but \fBshowname\fR is set
+in the \fB/etc/mail/mailx.rc\fR system startup file for \fBmailx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshowto\fR\fR
+.ad
+.RS 26n
+.rt
+When displaying the header summary and the message is from you, print the
+recipient's name instead of the author's name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsign=\fR\fIstring\fR\fR
+.ad
+.RS 26n
+.rt
+The variable inserted into the text of a message when the \fB~a\fR (autograph)
+command is given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
+.sp
+`
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSign=\fR\fIstring\fR\fR
+.ad
+.RS 26n
+.rt
+The variable inserted into the text of a message when the \fB~A\fR command is
+given. No default (see also \fB~i\fR in \fBTilde Escapes\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtoplines=\fR\fInumber\fR\fR
+.ad
+.RS 26n
+.rt
+The number of lines of header to print with the \fBto\fRp command. Default is
+\fB5\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.RS 26n
+.rt
+Invoke \fBsendmail\fR(1M) with the \fB-v\fR flag.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtranslate\fR\fR
+.ad
+.RS 26n
+.rt
+The name of a program to translate mail addresses. The program receives mail
+addresses as arguments. The program produces, on the standard output, lines
+containing the following data, in this order:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the postmark for the sender (see the postmark variable)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+translated mail addresses, one per line, corresponding to the program's
+arguments. Each translated address will replace the corresponding address in
+the mail message being sent.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a line containing only "y" or "n". if the line contains "y" the user will be
+asked to confirm that the message should be sent.
+.RE
+The translate program will be invoked for each mail message to be sent. If the
+program exits with a non-zero exit status, or fails to produce enough output,
+the message is not sent.
+.RE
+
+.SS "Large File Behavior"
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmailx\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmailx\fR: \fBHOME\fR, \fBLANG\fR,
+\fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR, \fBNLSPATH\fR, and
+\fBTERM\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDEAD\fR\fR
+.ad
+.RS 14n
+.rt
+The name of the file in which to save partial letters in case of untimely
+interrupt. Default is \fB$HOME/dead.letter\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEDITOR\fR\fR
+.ad
+.RS 14n
+.rt
+The command to run when the \fBe\fRdit or \fB~e\fR command is used. Default is
+\fBed\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLISTER\fR\fR
+.ad
+.RS 14n
+.rt
+The command (and options) to use when listing the contents of the \fBfolder\fR
+directory. The default is \fBls\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAIL\fR\fR
+.ad
+.RS 14n
+.rt
+The name of the initial mailbox file to read (in lieu of the standard system
+mailbox). The default is \fB/var/mail/\fIusername\fR .\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAILRC\fR\fR
+.ad
+.RS 14n
+.rt
+The name of the startup file. Default is \fB$HOME/.mailrc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAILX_HEAD\fR\fR
+.ad
+.RS 14n
+.rt
+The specified string is included at the beginning of the body of each message
+that is sent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAILX_TAIL\fR\fR
+.ad
+.RS 14n
+.rt
+The specified string is included at the end of the body of each message that is
+sent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMBOX\fR\fR
+.ad
+.RS 14n
+.rt
+The name of the file to save messages which have been read. The \fBex\fRit
+command overrides this function, as does saving the message explicitly in
+another file. Default is \fB$HOME/mbox\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPAGER\fR\fR
+.ad
+.RS 14n
+.rt
+The command to use as a filter for paginating output. This can also be used to
+specify the options to be used. Default is \fBpg\fR(1), or if the
+\fBbsdcompat\fR variable is set, the default is \fBmore\fR(1). See \fBInternal
+Variables\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 14n
+.rt
+The name of a preferred command interpreter. Default is \fBsh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBVISUAL\fR\fR
+.ad
+.RS 14n
+.rt
+The name of a preferred screen editor. Default is \fBvi\fR(1).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+When the \fB-e\fR option is specified, the following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Mail was found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+Mail was not found or an error occurred.
+.RE
+
+.sp
+.LP
+Otherwise, the following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion. Notice that this status implies that all messages were
+\fBsent\fR, but it gives no assurances that any of them were actually
+\fBdelivered\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.mailrc\fR\fR
+.ad
+.sp .6
+.RS 4n
+ personal startup file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/mbox\fR\fR
+.ad
+.sp .6
+.RS 4n
+secondary storage file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.Maillock\fR\fR
+.ad
+.sp .6
+.RS 4n
+lock file to prevent multiple writers of system mailbox
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/mailx.rc\fR\fR
+.ad
+.sp .6
+.RS 4n
+optional system startup file for \fBmailx\fR only
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/Mail.rc\fR\fR
+.ad
+.sp .6
+.RS 4n
+BSD compatibility system-wide startup file for \fB/usr/ucb/mail\fR and
+\fB/usr/ucb/Mail\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/R[emqsx]*\fR\fR
+.ad
+.sp .6
+.RS 4n
+temporary files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/mailx/mailx.help*\fR\fR
+.ad
+.sp .6
+.RS 4n
+help message files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/mail/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+post office directory
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbiff\fR(1B), \fBecho\fR(1), \fBed\fR(1), \fBex\fR(1), \fBfmt\fR(1),
+\fBlp\fR(1), \fBls\fR(1), \fBmail\fR(1), \fBmail\fR(1B), \fBmailcompat\fR(1),
+\fBmore\fR(1), \fBpg\fR(1), \fBsh\fR(1), \fBuucp\fR(1C), \fBvacation\fR(1),
+\fBvi\fR(1), \fBnewaliases\fR(1M), \fBsendmail\fR(1M), \fBaliases\fR(4),
+\fBpasswd\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Where \fIshell-command\fR is shown as valid, arguments are not always allowed.
+Experimentation is recommended.
+.sp
+.LP
+Internal variables imported from the execution environment cannot be
+\fBuns\fRet.
+.sp
+.LP
+The full internet addressing is not fully supported by \fBmailx\fR. The new
+standards need some time to settle down.
+.sp
+.LP
+Replies do not always generate correct return addresses. Try resending the
+errant reply with \fBonehop\fR set.
+.sp
+.LP
+\fBmailx\fR does not lock your record file. So, if you use a record file and
+send two or more messages simultaneously, lines from the messages may be
+interleaved in the record file.
+.sp
+.LP
+The format for the \fBalias\fR command is a space-separated list of recipients,
+while the format for an alias in either the \fB\&.forward\fR or
+\fB/etc/aliases\fR is a comma-separated list.
+.sp
+.LP
+To read mail on a workstation running Solaris 1.\fIx\fR when your mail server
+is running Solaris 2.\fIx\fR, first execute the \fBmailcompat\fR(1) program.
diff --git a/usr/src/man/man1/makekey.1 b/usr/src/man/man1/makekey.1
new file mode 100644
index 0000000000..8b790dfb43
--- /dev/null
+++ b/usr/src/man/man1/makekey.1
@@ -0,0 +1,53 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH makekey 1 "3 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+makekey \- generate encryption key
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/lib/makekey\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBmakekey\fR improves the usefulness of encryption schemes that depend on a
+key by increasing the amount of time required to search the key space. It
+attempts to read 8 bytes for its \fIkey\fR (the first eight input bytes), then
+it attempts to read 2 bytes for its \fIsalt\fR (the last two input bytes). The
+output depends on the input in a way intended to be difficult to compute (that
+is, to require a substantial fraction of a second).
+.sp
+.LP
+The first eight input bytes (the \fIinput key\fR) can be arbitrary \fBASCII\fR
+characters. The last two (the \fIsalt\fR) are best chosen from the set of
+digits, \fB\&.\fR, \fB/\fR, upper- and lower-case letters. The salt characters
+are repeated as the first two characters of the output. The remaining 11 output
+characters are chosen from the same set as the \fIsalt\fR and constitute the
+\fIoutput key\fR.
+.sp
+.LP
+The transformation performed is essentially the following: the \fIsalt\fR is
+used to select one of 4,096 cryptographic machines all based on the National
+Bureau of Standards \fBDES\fR algorithm, but broken in 4,096 different ways.
+Using the \fIinput\fR \fIkey\fR as key, a constant string is fed into the
+machine and recirculated a number of times. The 64 bits that come out are
+distributed into the 66 \fIoutput\fR \fIkey\fR bits in the result.
+.sp
+.LP
+\fBmakekey\fR is intended for programs that perform encryption. Usually, its
+input and output will be pipes.
+.SH SEE ALSO
+.sp
+.LP
+\fBed\fR(1), \fBvi\fR(1), \fBpasswd\fR(4)
+.SH NOTES
+.sp
+.LP
+\fBmakekey\fR can produce different results depending upon whether the input is
+typed at the terminal or redirected from a file.
diff --git a/usr/src/man/man1/man.1 b/usr/src/man/man1/man.1
new file mode 100644
index 0000000000..8b63971549
--- /dev/null
+++ b/usr/src/man/man1/man.1
@@ -0,0 +1,720 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright (c) 1980 Regents of the University of California. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.TH man 1 "8 May 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+man \- find and display reference manual pages
+.SH SYNOPSIS
+.LP
+.nf
+\fBman\fR [\fB-\fR] [\fB-adFlrt\fR] [\fB-M\fR \fIpath\fR] [\fB-T\fR \fImacro-package\fR] [\fB-s\fR \fIsection\fR] \fIname\fR...
+.fi
+
+.LP
+.nf
+\fBman\fR [\fB-M\fR \fIpath\fR] \fB-k\fR \fIkeyword\fR...
+.fi
+
+.LP
+.nf
+\fBman\fR [\fB-M\fR \fIpath\fR] \fB-f\fR \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBman\fR command displays information from the reference manuals. It
+displays complete manual pages that you select by \fIname\fR, or one-line
+summaries selected either by \fIkeyword\fR (\fB-k\fR), or by the name of an
+associated file (\fB-f\fR). If no manual page is located, \fBman\fR prints an
+error message.
+.SS "Source Format"
+.sp
+.LP
+Reference Manual pages are marked up with either \fBnroff\fR (see
+\fBnroff\fR(1)) or \fBSGML\fR (Standard Generalized Markup Language) tags (see
+\fBsgml\fR(5)). The \fBman\fR command recognizes the type of markup and
+processes the file accordingly. The various source files are kept in separate
+directories depending on the type of markup.
+.SS "Location of Manual Pages"
+.sp
+.LP
+The online Reference Manual page directories are conventionally located in
+\fB/usr/share/man\fR. The nroff sources are located in the
+\fB/usr/share/man/man\fR* directories. The \fBSGML\fR sources are located in
+the \fB/usr/share/man/sman\fR* directories. Each directory corresponds to a
+section of the manual. Since these directories are optionally installed, they
+might not reside on your host. You might have to mount \fB/usr/share/man\fR
+from a host on which they do reside.
+.sp
+.LP
+If there are preformatted, up-to-date versions in the corresponding \fBcat\fR*
+or \fBfmt\fR* directories, \fBman\fR simply displays or prints those versions.
+If the preformatted version of interest is out of date or missing, \fBman\fR
+reformats it prior to display and stores the preformatted version if \fBcat\fR*
+or \fBfmt\fR* is writable. The \fBwindex\fR database is not updated. See
+\fBcatman\fR(1M). If directories for the preformatted versions are not
+provided, \fBman\fR reformats a page whenever it is requested. \fBman\fR uses a
+temporary file to store the formatted text during display.
+.sp
+.LP
+If the standard output is not a terminal, or if the `\fB-\fR' flag is given,
+\fBman\fR pipes its output through \fBcat\fR(1). Otherwise, \fBman\fR pipes its
+output through \fBmore\fR(1) to handle paging and underlining on the screen.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 20n
+.rt
+Shows all manual pages matching \fIname\fR within the \fBMANPATH\fR search
+path. Manual pages are displayed in the order found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 20n
+.rt
+Debugs. Displays what a section-specifier evaluates to, method used for
+searching, and paths searched by \fBman\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile ...\fR\fR
+.ad
+.RS 20n
+.rt
+\fBman\fR attempts to locate manual pages related to any of the given
+\fIfile\fRs. It strips the leading path name components from each \fIfile\fR,
+and then prints one-line summaries containing the resulting basename or names.
+This option also uses the \fBwindex\fR database.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 20n
+.rt
+Forces \fBman\fR to search all directories specified by \fBMANPATH\fR or the
+\fBman.cf\fR file, rather than using the \fBwindex\fR lookup database. This
+option is useful if the database is not up to date and it has been made the
+default behavior of the \fBman\fR command. The option therefore does not have
+to be invoked and is documented here for reference only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIkeyword ...\fR\fR
+.ad
+.RS 20n
+.rt
+Prints out one-line summaries from the \fBwindex\fR database (table of
+contents) that contain any of the given \fIkeyword\fRs. The \fBwindex\fR
+database is created using \fBcatman\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 20n
+.rt
+Lists all manual pages found matching \fIname\fR within the search path.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fIpath\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies an alternate search path for manual pages. \fIpath\fR is a
+colon-separated list of directories that contain manual page directory
+subtrees. For example, if \fIpath\fR is \fB/usr/share/man:/usr/local/man\fR,
+\fBman\fR searches for \fIname\fR in the standard location, and then
+\fB/usr/local/man\fR. When used with the \fB-k\fR or \fB-f\fR options, the
+\fB-M\fR option must appear first. Each directory in the \fIpath\fR is assumed
+to contain subdirectories of the form \fBman\fR* or \fBsman\fR* , one for each
+section. This option overrides the \fBMANPATH\fR environment variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 20n
+.rt
+Reformats the manual page, but does not display it. This replaces the \fBman\fR
+\fB-\fR \fB-t\fR \fIname\fR combination.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsection ...\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies sections of the manual for \fBman\fR to search. The directories
+searched for \fIname\fR are limited to those specified by \fIsection\fR.
+\fIsection\fR can be a numerical digit, perhaps followed by one or more letters
+to match the desired section of the manual, for example, "\fB3libucb\fR". Also,
+\fIsection\fR can be a word, for example, \fBlocal\fR, \fBnew\fR, \fBold\fR,
+\fBpublic\fR. \fIsection\fR can also be a letter. To specify multiple sections,
+separate each section with a comma. This option overrides the \fBMANPATH\fR
+environment variable and the \fBman.cf\fR file. See \fBSearch\fR \fBPath\fR
+below for an explanation of how \fBman\fR conducts its search.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 20n
+.rt
+\fBman\fR arranges for the specified manual pages to be \fBtroff\fRed to a
+suitable raster output device (see \fBtroff\fR(1)). If both the \fB-\fR and
+\fB-t\fR flags are given, \fBman\fR updates the \fBtroff\fRed versions of each
+named \fIname\fR (if necessary), but does not display them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fImacro-package\fR\fR
+.ad
+.RS 20n
+.rt
+Formats manual pages using \fImacro-package\fR rather than the standard
+\fB-man\fR macros defined in \fB/usr/share/lib/tmac/an\fR. See \fBSearch
+Path\fR under USAGE for a complete explanation of the default search path
+order.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 8n
+.rt
+The name of a standard utility or a keyword.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The usage of \fBman\fR is described below:
+.SS "Manual Page Sections"
+.sp
+.LP
+Entries in the reference manuals are organized into \fIsection\fRs. A section
+name consists of a major section name, typically a single digit, optionally
+followed by a subsection name, typically one or more letters. An unadorned
+major section name, for example, "\fB9\fR", does not act as an abbreviation for
+the subsections of that name, such as "\fB9e\fR", "\fB9f\fR", or "\fB9s\fR".
+That is, each subsection must be searched separately by \fBman\fR \fB-s\fR.
+Each section contains descriptions apropos to a particular reference category,
+with subsections refining these distinctions. See the \fBintro\fR manual pages
+for an explanation of the classification used in this release.
+.SS "Search Path"
+.sp
+.LP
+Before searching for a given \fIname\fR, \fBman\fR constructs a list of
+candidate directories and sections. \fBman\fR searches for \fIname\fR in the
+directories specified by the \fBMANPATH\fR environment variable.
+.sp
+.LP
+In the absence of \fBMANPATH\fR, \fBman\fR constructs its search path based
+upon the \fBPATH\fR environment variable, primarily by substituting \fBman\fR
+for the last component of the \fBPATH\fR element. Special provisions are added
+to account for unique characteristics of directories such as \fB/sbin\fR,
+\fB/usr/ucb\fR, \fB/usr/xpg4/bin\fR, and others. If the file argument contains
+a \fB/\fR character, the \fIdirname\fR portion of the argument is used in place
+of \fBPATH\fR elements to construct the search path.
+.sp
+.LP
+Within the manual page directories, \fBman\fR confines its search to the
+sections specified in the following order:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIsection\fRs specified on the command line with the \fB-s\fR option
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIsection\fRs embedded in the \fBMANPATH\fR environment variable
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIsection\fRs specified in the \fBman.cf\fR file for each directory specified
+in the \fBMANPATH\fR environment variable
+.RE
+.sp
+.LP
+If none of the above exist, \fBman\fR searches each directory in the manual
+page path, and displays the first matching manual page found.
+.sp
+.LP
+The \fBman.cf\fR file has the following format:
+.sp
+.in +2
+.nf
+MANSECTS=\fIsection\fR[,\fIsection\fR]...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Lines beginning with `\fB#\fR' and blank lines are considered comments, and are
+ignored. Each directory specified in \fBMANPATH\fR can contain a manual page
+configuration file, specifying the default search order for that directory.
+.SH FORMATTING MANUAL PAGES
+.sp
+.LP
+Manual pages are marked up in \fBnroff\fR(1) or \fBsgml\fR(5). Nroff manual
+pages are processed by \fBnroff\fR(1) or \fBtroff\fR(1) with the \fB-man\fR
+macro package. Please refer to \fBman\fR(5) for information on macro usage.
+\fBSGML\fR\(emtagged manual pages are processed by an \fBSGML\fR parser and
+passed to the formatter.
+.SS "Preprocessing Nroff Manual Pages"
+.sp
+.LP
+When formatting an nroff manual page, \fBman\fR examines the first line to
+determine whether it requires special processing. If the first line is a string
+of the form:
+.sp
+.in +2
+.nf
+\&'\e" \fIX\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where \fIX\fR is separated from the `\fB"\fR' by a single SPACE and consists of
+any combination of characters in the following list, \fBman\fR pipes its input
+to \fBtroff\fR(1) or \fBnroff\fR(1) through the corresponding preprocessors.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.RS 5n
+.rt
+\fBeqn\fR(1), or \fBneqn\fR for \fBnroff\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 5n
+.rt
+\fBrefer\fR(1)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 5n
+.rt
+\fBtbl\fR(1)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fR\fR
+.ad
+.RS 5n
+.rt
+\fBvgrind\fR(1)
+.RE
+
+.sp
+.LP
+If \fBeqn\fR or \fBneqn\fR is invoked, it automatically reads the file
+\fB/usr/pub/eqnchar\fR (see \fBeqnchar\fR(5)). If \fBnroff\fR(1) is invoked,
+\fBcol\fR(1) is automatically used.
+.SS "Referring to Other nroff Manual Pages"
+.sp
+.LP
+If the first line of the nroff manual page is a reference to another manual
+page entry fitting the pattern:
+.sp
+.in +2
+.nf
+\&.so man*/\fIsourcefile\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBman\fR processes the indicated file in place of the current one. The
+reference must be expressed as a path name relative to the root of the manual
+page directory subtree.
+.sp
+.LP
+When the second or any subsequent line starts with \fB\&.so\fR, \fBman\fR
+ignores it; \fBtroff\fR(1) or \fBnroff\fR(1) processes the request in the usual
+manner.
+.SS "Processing SGML Manual Pages"
+.sp
+.LP
+Manual pages are identified as being marked up in SGML by the presence of the
+string \fB<!DOCTYPE\fR\&. If the file also contains the string
+\fBSHADOW_PAGE\fR, the file refers to another manual page for the content. The
+reference is made with a file entity reference to the manual page that contains
+the text. This is similar to the \fB\&.so\fR mechanism used in the nroff
+formatted man pages.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBman\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMANPATH\fR\fR
+.ad
+.RS 11n
+.rt
+A colon-separated list of directories; each directory can be followed by a
+comma-separated list of sections. If set, its value overrides
+\fB/usr/share/man\fR as the default directory search path, and the \fBman.cf\fR
+file as the default section search path. The \fB-M\fR and \fB-s\fR flags, in
+turn, override these values.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPAGER\fR\fR
+.ad
+.RS 11n
+.rt
+A program to use for interactively delivering \fBman\fR's output to the screen.
+If not set, `\fBmore\fR \fB-s\fR' is used. See \fBmore\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTCAT\fR\fR
+.ad
+.RS 11n
+.rt
+The name of the program to use to display \fBtroff\fRed manual pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTROFF\fR\fR
+.ad
+.RS 11n
+.rt
+The name of the formatter to use when the \fB-t\fR flag is given. If not set,
+\fBtroff\fR(1) is used.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating a PostScript Version of a man page
+.sp
+.LP
+The following example creates the \fBpipe\fR(2) man page in postscript for csh,
+tcsh, ksh and sh users:
+
+.sp
+.in +2
+.nf
+ % env TCAT=/usr/lib/lp/postscript/dpost man -t -s 2 pipe > pipe.ps
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This is an alternative to using \fBman\fR \fB-t\fR, which sends the man page to
+the default printer, if the user wants a postscript file version of the man
+page.
+
+.LP
+\fBExample 2 \fRCreating a Text Version of a man page
+.sp
+.LP
+The following example creates the \fBpipe\fR(2) man page in ascii text:
+
+.sp
+.in +2
+.nf
+man pipe.2 | col -x -b > pipe.text
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This is an alternative to using \fBman\fR \fB-t\fR, which sends the man page to
+the default printer, if the user wants a text file version of the man page.
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man\fR\fR
+.ad
+.sp .6
+.RS 4n
+Root of the standard manual page directory subtree
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/man?/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+Unformatted nroff manual entries
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/sman?/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+Unformatted \fBSGML\fR manual entries
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/cat?/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBnroff\fRed manual entries
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/fmt?/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBtroff\fRed manual entries
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/windex\fR\fR
+.ad
+.sp .6
+.RS 4n
+Table of contents and keyword database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/an\fR\fR
+.ad
+.sp .6
+.RS 4n
+Standard \fB-man\fR macro package
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/sgml/locale/C/dtd/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBSGML\fR document type definition files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/sgml/locale/C/solbook/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBSGML\fR style sheet and entity definitions directories
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/pub/eqnchar\fR\fR
+.ad
+.sp .6
+.RS 4n
+Standard definitions for \fBeqn\fR and \fBneqn\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBman.cf\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default search order by section
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled, see \fBNOTES\fR.
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBapropos\fR(1), \fBcat\fR(1), \fBcol\fR(1), \fBdpost\fR(1), \fBeqn\fR(1),
+\fBmore\fR(1), \fBnroff\fR(1), \fBrefer\fR(1), \fBtbl\fR(1), \fBtroff\fR(1),
+\fBvgrind\fR(1), \fBwhatis\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBeqnchar\fR(5), \fBman\fR(5), \fBsgml\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fB-f\fR and \fB-k\fR options use the \fBwindex\fR database, which is
+created by \fBcatman\fR(1M).
+.sp
+.LP
+The \fBman\fR command is CSI-capable. However, some utilities invoked by the
+\fBman\fR command, namely, \fBtroff\fR, \fBeqn\fR, \fBneqn\fR, \fBrefer\fR,
+\fBtbl\fR, and \fBvgrind\fR, are not verified to be CSI-capable. Because of
+this, the man command with the \fB-t\fR option can not handle non-EUC data.
+Also, using the \fBman\fR command to display man pages that require special
+processing through \fBeqn\fR, \fBneqn\fR, \fBrefer\fR, \fBtbl\fR, or
+\fBvgrind\fR can not be CSI-capable.
+.SH BUGS
+.sp
+.LP
+The manual is supposed to be reproducible either on a phototypesetter or on an
+\fBASCII\fR terminal. However, on a terminal some information (indicated by
+font changes, for instance) is lost.
+.sp
+.LP
+Some dumb terminals cannot process the vertical motions produced by the \fBe\fR
+(see \fBeqn\fR(1)) preprocessing flag. To prevent garbled output on these
+terminals, when you use \fBe\fR, also use \fBt\fR, to invoke \fBcol\fR(1)
+implicitly. This workaround has the disadvantage of eliminating superscripts
+and subscripts, even on those terminals that can display them. Control-q clears
+a terminal that gets confused by \fBeqn\fR(1) output.
diff --git a/usr/src/man/man1/mconnect.1 b/usr/src/man/man1/mconnect.1
new file mode 100644
index 0000000000..2e0741e9fd
--- /dev/null
+++ b/usr/src/man/man1/mconnect.1
@@ -0,0 +1,90 @@
+'\" te
+.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mconnect 1 "28 Jan 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+mconnect \- connect to SMTP mail server socket
+.SH SYNOPSIS
+.LP
+.nf
+\fBmconnect\fR [\fB-p\fR \fIport\fR] [\fB-r\fR] [\fIhostname\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmconnect\fR utility opens a connection to the mail server on a given
+host, so that it can be tested independently of all other mail software. If no
+host is given, the connection is made to the local host. Servers expect to
+speak the Simple Mail Transfer Protocol (\fBSMTP\fR) on this connection. Exit
+by typing the \fBquit\fR command. Typing \fBEOF\fR sends an end of file to the
+server. An interrupt closes the connection immediately and exits.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fIport\fR\fR
+.ad
+.RS 10n
+.rt
+Specify the port number instead of the default \fBSMTP\fR port (number 25) as
+the next argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 10n
+.rt
+\fBRaw\fR mode: disable the default line buffering and input handling. This
+produces an effect similar to \fBtelnet\fR(1) to port number 25.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhostname\fR\fR
+.ad
+.RS 12n
+.rt
+The name of a given host.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBmconnect\fR command is IPv6-enabled. See \fBip6\fR(7P).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/sendmail.hf\fR\fR
+.ad
+.RS 25n
+.rt
+Help file for \fBSMTP\fR commands
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtelnet\fR(1), \fBsendmail\fR(1M), \fBattributes\fR(5), \fBip6\fR(7P)
+.sp
+.LP
+Postel, Jonathan B., \fIRFC 821, Simple Mail Transfer Protocol\fR, Information
+Sciences Institute, University of Southern California, August 1982.
diff --git a/usr/src/man/man1/mcs.1 b/usr/src/man/man1/mcs.1
new file mode 100644
index 0000000000..7aba774098
--- /dev/null
+++ b/usr/src/man/man1/mcs.1
@@ -0,0 +1,238 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mcs 1 "5 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+mcs \- manipulate the comment section of an object file
+.SH SYNOPSIS
+.LP
+.nf
+\fBmcs\fR [\fB-cdpVz\fR] [\fB-a\fR \fIstring\fR] [\fB-n\fR \fIname\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmcs\fR command is used to manipulate a section, by default the
+\fB\&.comment\fR section, in an \fBELF\fR object file. It is used to add to,
+delete, print, and compress the contents of a section in an \fBELF\fR object
+file, and print only the contents of a section in a \fBCOFF\fR object file.
+\fBmcs\fR cannot add, delete, or compress the contents of a section that is
+contained within a segment.
+.sp
+.LP
+If the input file is an archive (see \fBar.h\fR(3HEAD)), the archive is treated
+as a set of individual files. For example, if the \fB-a\fR option is specified,
+the string is appended to the comment section of each \fBELF\fR object file in
+the archive; if the archive member is not an \fBELF\fR object file, then it is
+left unchanged.
+.sp
+.LP
+\fBmcs\fR must be given one or more of the options described below. It applies,
+in order, each of the specified options to each file.
+.sp
+.LP
+For operations other than delete, if the object does not already contain a
+section with the specified name, \fBmcs\fR will create a new empty section with
+that name before performing the specified operation.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIstring\fR\fR
+.ad
+.RS 13n
+.rt
+Appends \fIstring\fR to the comment section of the \fBELF\fR object files. If
+\fIstring\fR contains embedded blanks, it must be enclosed in quotation marks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 13n
+.rt
+Compresses the contents of the comment section of the \fBELF\fR object files.
+All duplicate entries are removed. The ordering of the remaining entries is not
+disturbed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 13n
+.rt
+Deletes the contents of the specified section from the \fBELF\fR object files.
+The section header for the comment section is also removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIname\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the name of the section to access if other than \fB\&.comment\fR. By
+default, \fBmcs\fR deals with the section named \fB\&.comment\fR. This option
+can be used to specify another section. \fBmcs\fR can take multiple \fB-n\fR
+options to allow for specification of multiple sections.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 13n
+.rt
+Prints the contents of the comment section on the standard output. Each section
+printed is tagged by the name of the file from which it was extracted, using
+the format \fIfile\fR\fB[\fR\fImember_name\fR\fB]:\fR for archive files and
+\fIfile\fR\fB:\fR for other files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 13n
+.rt
+Prints on standard error the version number of \fBmcs\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.RS 13n
+.rt
+Replaces any \fBSHT_PROGBITS\fR sections with zeros while retaining the
+original attributes of the sections.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting a file's comment section
+.sp
+.LP
+The following entry
+
+.sp
+.in +2
+.nf
+example% \fBmcs -p elf.file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints the comment section of the file \fBelf.file\fR.
+
+.LP
+\fBExample 2 \fRAppending a string to a comment section
+.sp
+.LP
+The following entry
+
+.sp
+.in +2
+.nf
+example% \fBmcs -a xyz elf.file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+appends string \fBxyz\fR to \fBelf.file\fR's comment section.
+
+.LP
+\fBExample 3 \fRStripping a specified non-allocable section
+.sp
+.LP
+Although used primarily with comment sections, \fBmcs\fR can operate on any
+non-allocable section. In contrast to the \fBstrip\fR command, which removes a
+predefined selection of non-allocable sections, \fBmcs\fR can be used to delete
+a specific section. The following entry
+
+.sp
+.in +2
+.nf
+example% \fBmcs -d -n .annotate elf.file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+removes the section named \fB\&.annotate\fR from the file \fBelf.file\fR.
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/mcs*\fR\fR
+.ad
+.RS 13n
+.rt
+temporary files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBas\fR(1), \fBld\fR(1), \fBstrip\fR(1), \fBar.h\fR(3HEAD),
+\fBelf\fR(3ELF), \fBtmpnam\fR(3C), \fBa.out\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+When \fBmcs\fR deletes a section using the \fB-d\fR option, it tries to bind
+together sections of type \fBSHT_REL\fR and target sections pointed to by the
+\fBsh_info\fR section header field. If one is to be deleted, \fBmcs\fR attempts
+to delete the other of the pair.
+.sp
+.LP
+By using the \fB-z\fR option, it is possible to make an object file by removing
+the contents of \fBSHT_PROGBITS\fR sections while retaining the object file's
+original structure as an \fBELF\fR file. The need for use of the \fB-z\fR
+option is limited. However, the option can be used to deliver an object file
+when the contents of \fBSHT_PROGBITS\fR sections are not relevant.
diff --git a/usr/src/man/man1/mdb.1 b/usr/src/man/man1/mdb.1
new file mode 100644
index 0000000000..380c868add
--- /dev/null
+++ b/usr/src/man/man1/mdb.1
@@ -0,0 +1,5107 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mdb 1 "30 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+mdb \- modular debugger
+.SH SYNOPSIS
+.LP
+.nf
+\fBmdb\fR [\fB-fkmuwyAFKMSUW\fR] [\(+-o \fIoption\fR] [\fB-p\fR \fIpid\fR] [\fB-s\fR \fIdistance\fR]
+ [\fB-I\fR \fIpath\fR] [\fB-L\fR \fIpath\fR] [\fB-P\fR \fIprompt\fR] [\fB-R\fR \fIroot\fR]
+ [\fB-V\fR \fIdis-version\fR] [object [core] | core | suffix]
+.fi
+
+.SH DESCRIPTION
+.SS "Introduction"
+.sp
+.LP
+The \fBmdb\fR utility is an extensible utility for low-level debugging and
+editing of the live operating system, operating system crash dumps, user
+processes, user process core dumps, and object files. For a more detailed
+description of \fBmdb\fR features, refer to the manual, \fISolaris Modular
+Debugger Guide\fR.
+.sp
+.LP
+Debugging is the process of analyzing the execution and state of a software
+program in order to remove defects. Traditional debugging tools provide
+facilities for execution control so that programmers can re-execute programs in
+a controlled environment and display the current state of program data or
+evaluate expressions in the source language used to develop the program.
+.sp
+.LP
+Unfortunately, these techniques are often inappropriate for debugging complex
+software systems such as an operating system, where bugs might not be
+reproducible and program state is massive and distributed, for programs that
+are highly optimized, have had their debug information removed, or are
+themselves low-level debugging tools, or for customer situations where the
+developer can only access post-mortem information.
+.sp
+.LP
+\fBmdb\fR provides a completely customizable environment for debugging these
+programs and scenarios, including a dynamic module facility that programmers
+can use to implement their own debugging commands to perform program-specific
+analysis. Each \fBmdb\fR module can be used to examine the program in several
+different contexts, including live and post-mortem.
+.SS "Definitions"
+.sp
+.LP
+The \fItarget\fR is the program being inspected by the debugger. \fBmdb\fR
+currently provides support for the following types of targets: user processes,
+user process core files, the live operating system (via \fB/dev/kmem\fR and
+\fB/dev/ksyms\fR), operating system crash dumps, user process images recorded
+inside an operating system crash dump, \fBELF\fR object files, and raw binary
+files. Each target exports a standard set of properties, including one or more
+address spaces, one or more symbol tables, a set of load objects, and a set of
+threads that can be examined using the debugger commands described below.
+.sp
+.LP
+A debugger command, or \fIdcmd\fR (pronounced dee-command) in \fBmdb\fR
+terminology, is a routine in the debugger that can access any of the properties
+of the current target. \fBmdb\fR parses commands from standard input, and then
+executes the corresponding dcmds. Each dcmd can also accept a list of string or
+numerical arguments, as shown in the syntax description below. \fBmdb\fR
+contains a set of built-in dcmds, described below, that are always available.
+You can also extend the capabilities of \fBmdb\fR itself by writing your own
+dcmds, as described in the \fISolaris Modular Debugger Guide\fR.
+.sp
+.LP
+A \fIwalker\fR is a set of routines that describe how to walk, or iterate,
+through the elements of a particular program data structure. A walker
+encapsulates the data structure's implementation from dcmds and from \fBmdb\fR
+itself. You can use walkers interactively, or use them as a primitive to build
+other dcmds or walkers. As with dcmds, you can extend \fBmdb\fR by implementing
+your own walkers as part of a debugger module.
+.sp
+.LP
+A debugger module, or \fIdmod\fR (pronounced dee-mod), is a dynamically loaded
+library containing a set of dcmds and walkers. During initialization, \fBmdb\fR
+attempts to load dmods corresponding to the load objects present in the target.
+You can subsequently load or unload dmods at any time while running \fBmdb\fR.
+\fBmdb\fR ships with a set of standard dmods for debugging the Solaris kernel.
+The \fISolaris Modular Debugger Guide\fR contains more information on
+developing your own debugger modules.
+.sp
+.LP
+A \fImacro file\fR is a text file containing a set of commands to execute.
+Macro files are typically used to automate the process of displaying a simple
+data structure. \fBmdb\fR provides complete backward compatibility for the
+execution of macro files written for \fBadb\fR(1), and the Solaris installation
+includes a set of macro files for debugging the Solaris kernel that can be used
+with either tool.
+.SS "Syntax"
+.sp
+.LP
+The debugger processes commands from standard input. If standard input is a
+terminal, \fBmdb\fR provides terminal editing capabilities. \fBmdb\fR can also
+process commands from macro files and from dcmd pipelines, described below. The
+language syntax is designed around the concept of computing the value of an
+expression (typically a memory address in the target), and then applying a dcmd
+to that address. The current address location is referred to as \fIdot\fR, and
+its value is referenced using ``.''.
+.sp
+.LP
+A \fImetacharacter\fR is one of the following characters:
+.sp
+.in +2
+.nf
+[ ] | ! / \e ? = > $ : ;
+ \fINEWLINE\fR \fISPACE\fR \fITAB\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+A \fIblank\fR is a \fITAB\fR or a \fISPACE\fR. A \fIword\fR is a sequence of
+characters separated by one or more non-quoted metacharacters. Some of the
+metacharacters only function as delimiters in certain contexts, as described
+below. An \fIidentifier\fR is a sequence of letters, digits, underscores,
+periods, or backquotes beginning with a letter, underscore, or period.
+Identifiers are used as the names of symbols, variables, dcmds, and walkers.
+Commands are delimited by a \fINEWLINE\fR or semicolon ( \fB;\fR ).
+.sp
+.LP
+A dcmd is denoted by one of the following words or metacharacters:
+.sp
+.in +2
+.nf
+/ \e ? = > $character :character ::identifier
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+dcmds named by metacharacters or prefixed by a single \fB$\fR or \fB:\fR are
+provided as built-in operators, and implement complete compatibility with the
+command set of the legacy \fBadb\fR(1) utility. Once a dcmd has been parsed,
+the \fB/\fR, \fB\e\fR, \fB?\fR, \fB=\fR, \fB>\fR, \fB$\fR, and \fB:\fR
+characters are no longer recognized as metacharacters until the termination of
+the argument list.
+.sp
+.LP
+A \fIsimple-command\fR is a dcmd followed by a sequence of zero or more
+blank-separated words. The words are passed as arguments to the invoked dcmd,
+except as specified under \fBQuoting and Arithmetic Expansion\fR below. Each
+dcmd returns an exit status that indicates it was either successful, failed, or
+was invoked with invalid arguments.
+.sp
+.LP
+A \fIpipeline\fR is a sequence of one or more simple commands separated by
+\fB|\fR. Unlike the shell, dcmds in \fBmdb\fR pipelines are not executed as
+separate processes. After the pipeline has been parsed, each dcmd is invoked in
+order from left to right. Each dcmd's output is processed and stored as
+described under \fBdcmd Pipelines\fR below. Once the left-hand dcmd is
+complete, its processed output is used as input for the next dcmd in the
+pipeline. If any dcmd does not return a successful exit status, the pipeline is
+aborted.
+.sp
+.LP
+An \fIexpression\fR is a sequence of words that is evaluated to compute a
+64-bit unsigned integer value. The words are evaluated using the rules
+described under \fBArithmetic Expansion\fR below.
+.SS "Commands"
+.sp
+.LP
+A \fIcommand\fR is one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpipeline\fR [\fB!\fR \fIword\fR .\|.\|.] [ \fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A simple-command or pipeline can be optionally suffixed with the \fB!\fR
+character, indicating that the debugger should open a \fBpipe\fR(2) and send
+the standard output of the last dcmd in the \fBmdb\fR pipeline to an external
+process created by executing \fB$SHELL\fR \fB-c\fR followed by the string
+formed by concatenating the words after the \fB!\fR character. For more
+details, refer to \fBShell Escapes\fR below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression\fR \fI pipeline\fR [\fB!\fR \fIword\fR .\|.\|.] [ \fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A simple-command or pipeline can be prefixed with an expression. Before
+execution of the pipeline, the value of dot (the variable denoted by
+``\fB\&.\fR'') is set to the value of the expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression\fR\fB ,\fR \fIexpression\fR \fIpipeline \fR [\fB!\fR
+\fIword\fR .\|.\|.] [ \fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A simple-command or pipeline can be prefixed with two expressions. The first is
+evaluated to determine the new value of dot, and the second is evaluated to
+determine a repeat count for the first dcmd in the pipeline. This dcmd is
+executed \fIcount\fR times before the next dcmd in the pipeline is executed.
+The repeat count only applies to the first dcmd in the pipeline.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB,\fR \fIexpression\fR \fIpipeline\fR [\fB!\fR \fIword\fR .\|.\|.] [
+\fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+If the initial expression is omitted, dot is not modified but the first dcmd in
+the pipeline is repeated according to the value of the expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression\fR [\fB!\fR \fIword\fR .\|.\|.] [ \fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A command can consist only of an arithmetic expression. The expression is
+evaluated and the dot variable is set to its value, and then the previous dcmd
+and arguments are executed using the new value of dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression\fR\fB,\fR \fIexpression\fR [\fB!\fR \fI word\fR .\|.\|.] [
+\fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+A command can consist only of a dot expression and repeat count expression.
+After dot is set to the value of the first expression, the previous dcmd and
+arguments are repeatedly executed the number of times specified by the value of
+the second expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB,\fR \fIexpression \fR [\fB!\fR \fIword\fR .\|.\|.] [ \fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+If the initial expression is omitted, dot is not modified but the previous dcmd
+and arguments are repeatedly executed the number of times specified by the
+value of the count expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR \fIword\fR .\|.\|. [ \fB;\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+If the command begins with the \fB!\fR character, no dcmds are executed and the
+debugger simply executes \fB$SHELL\fR \fB-c\fR followed by the string formed by
+concatenating the words after the \fB!\fR character.
+.RE
+
+.SS "Comments"
+.sp
+.LP
+A word beginning with \fB//\fR causes that word and all the subsequent
+characters up to a \fINEWLINE\fR to be ignored.
+.SS "Arithmetic Expansion"
+.sp
+.LP
+Arithmetic expansion is performed when an \fBmdb\fR command is preceded by an
+optional expression representing a start address, or a start address and a
+repeat count. Arithmetic expansion can also be performed to compute a numerical
+argument for a dcmd. An arithmetic expression can appear in an argument list
+enclosed in square brackets preceded by a dollar sign (\fB$[ expression ]\fR),
+and is replaced by the value of the expression.
+.sp
+.LP
+Expressions can contain any of the following special words:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinteger\fR\fR
+.ad
+.RS 22n
+.rt
+The specified integer value. Integer values can be prefixed with \fB0i\fR or
+\fB0I\fR to indicate binary values, \fB0o\fR or \fB0O\fR to indicate octal
+values, \fB0t\fR or \fB0T\fR to indicate decimal values, and \fB0x\fR or
+\fB0X\fR to indicate hexadecimal values (the default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB0[tT][0-9]+.[0-9]+\fR
+.ad
+.RS 22n
+.rt
+The specified decimal floating point value, converted to its \fBIEEE\fR
+double-precision floating point representation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\&'\fIcccccccc\fR'\fR
+.ad
+.RS 22n
+.rt
+The integer value computed by converting each character to a byte equal to its
+\fBASCII\fR value. Up to eight characters can be specified in a character
+constant. Characters are packed into the integer in reverse order
+(right-to-left) beginning at the least significant byte.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB<\fIidentifier\fR\fR
+.ad
+.RS 22n
+.rt
+The value of the variable named by \fIidentifier\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIidentifier\fR\fR
+.ad
+.RS 22n
+.rt
+The value of the symbol named by \fIidentifier\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB(\fIexpression\fR)\fR
+.ad
+.RS 22n
+.rt
+The value of \fIexpression\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\&.\fR
+.ad
+.RS 22n
+.rt
+The value of dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB&\fR
+.ad
+.RS 22n
+.rt
+The most recent value of dot used to execute a dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB+\fR
+.ad
+.RS 22n
+.rt
+The value of dot incremented by the current increment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^\fR
+.ad
+.RS 22n
+.rt
+The value of dot decremented by the current increment.
+.RE
+
+.sp
+.LP
+The increment is a global variable that stores the total bytes read by the last
+formatting dcmd. For more information on the increment, refer to the discussion
+of \fBFormatting dcmds\fR below.
+.sp
+.LP
+Unary operators are right associative and have higher precedence than binary
+operators. The unary operators are:
+.sp
+.ne 2
+.mk
+.na
+\fB#\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+Logical negation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB~\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+Bitwise complement.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB-\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+Integer negation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+The value of a pointer-sized quantity at the object file location corresponding
+to virtual address \fIexpression\fR in the target's virtual address space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%/[csil]/\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+The value of a char, short, int, or long-sized quantity at the object file
+location corresponding to virtual address \fIexpression\fR in the target's
+virtual address space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%/[1248]/\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+The value of a one, two, four, or eight-byte quantity at the object file
+location corresponding to virtual address \fIexpression\fR in the target's
+virtual address space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB*\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+The value of a pointer-sized quantity at virtual address \fIexpression\fR in
+the target's virtual address space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB*/[csil]/\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+The value of a char, short, int, or long-sized quantity at virtual address
+\fIexpression\fR in the target's virtual address space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB*/[1248]/\fIexpression\fR\fR
+.ad
+.RS 23n
+.rt
+The value of a one, two, four, or eight-byte quantity at virtual address
+\fIexpression\fR in the target's virtual address space.
+.RE
+
+.sp
+.LP
+Binary operators are left associative and have lower precedence than unary
+operators. The binary operators, in order of precedence from highest to lowest,
+are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 6n
+.rt
+Integer multiplication.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fR
+.ad
+.RS 6n
+.rt
+Integer division.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR\fR
+.ad
+.RS 6n
+.rt
+Left-hand side rounded up to next multiple of right-hand side.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 6n
+.rt
+Integer addition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 6n
+.rt
+Integer subtraction.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB<<\fR\fR
+.ad
+.RS 6n
+.rt
+Bitwise shift left.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>>\fR\fR
+.ad
+.RS 6n
+.rt
+Bitwise shift right.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB==\fR\fR
+.ad
+.RS 6n
+.rt
+Logical equality.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!=\fR\fR
+.ad
+.RS 6n
+.rt
+Logical inequality.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB&\fR\fR
+.ad
+.RS 6n
+.rt
+Bitwise AND.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR^\fR
+.ad
+.RS 6n
+.rt
+Bitwise exclusive OR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB|\fR\fR
+.ad
+.RS 6n
+.rt
+Bitwise inclusive OR.
+.RE
+
+.SS "Quoting"
+.sp
+.LP
+Each metacharacter described above (see \fBSyntax\fR) terminates a word unless
+quoted. Characters can be quoted (forcing \fBmdb\fR to interpret each character
+as itself without any special significance) by enclosing them in a pair of
+single (\fB\&' '\fR) or double (\fB" "\fR) quote marks. A single quote cannot
+appear within single quotes. Inside double quotes, \fBmdb\fR recognizes the C
+programming language character escape sequences.
+.SS "Shell Escapes"
+.sp
+.LP
+The \fB!\fR character can be used to create a pipeline between an \fBmdb\fR
+command and the user's shell. If the $\fBSHELL\fR environment variable is set,
+\fBmdb\fR forks and execs this program for shell escapes; otherwise
+\fB/bin/sh\fR is used. The shell is invoked with the \fB-c\fR option followed
+by a string formed by concatenating the words after the \fB!\fR character. The
+\fB!\fR character takes precedence over all other metacharacters, except
+semicolon (\fB;\fR) and \fINEWLINE\fR. Once a shell escape is detected, the
+remaining characters up to the next semicolon or \fINEWLINE\fR are passed as is
+to the shell. The output of shell commands can not be piped to \fBmdb\fR dcmds.
+Commands executed by a shell escape have their output sent directly to the
+terminal, not to \fBmdb\fR.
+.SS "Variables"
+.sp
+.LP
+A \fIvariable\fR is a variable name, a corresponding integer value, and a set
+of attributes. A variable name is a sequence of letters, digits, underscores,
+or periods. A variable can be assigned a value using the \fB>\fR dcmd or
+\fB::typeset\fR dcmd, and its attributes can be manipulated using the
+\fB::typeset\fR dcmd. Each variable's value is represented as a 64-bit unsigned
+integer. A variable can have one or more of the following attributes: read-only
+(cannot be modified by the user), persistent (cannot be unset by the user), and
+tagged (user-defined indicator).
+.sp
+.LP
+The following variables are defined as persistent:
+.sp
+.ne 2
+.mk
+.na
+\fB0\fR
+.ad
+.RS 10n
+.rt
+The most recent value printed using the \fB/\fR, \fB\e\fR, \fB?\fR, or \fB=\fR
+dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB9\fR
+.ad
+.RS 10n
+.rt
+The most recent count used with the \fB$<\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBb\fR
+.ad
+.RS 10n
+.rt
+The virtual address of the base of the data section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBd\fR
+.ad
+.RS 10n
+.rt
+The size of the data section in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBe\fR
+.ad
+.RS 10n
+.rt
+The virtual address of the entry point.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBm\fR
+.ad
+.RS 10n
+.rt
+The initial bytes (magic number) of the target's primary object file, or zero
+if no object file has been read yet.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBt\fR
+.ad
+.RS 10n
+.rt
+The size of the text section in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBhits\fR
+.ad
+.RS 10n
+.rt
+The count of the number of times the matched software event specifier has been
+matched. See \fBEvent Callbacks\fR, below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBthread\fR
+.ad
+.RS 10n
+.rt
+The thread identifier of the current representative thread. The value of the
+identifier depends on the threading model used by the current target. See
+\fBThread Support\fR, below.
+.RE
+
+.sp
+.LP
+In addition, the \fBmdb\fR kernel and process targets export the current values
+of the representative thread's register set as named variables. The names of
+these variables depend on the target's platform and instruction set
+architecture.
+.SS "Symbol Name Resolution"
+.sp
+.LP
+As explained in the \fBSyntax\fR description above, a symbol identifier present
+in an expression context evaluates to the value of this symbol. The value
+typically denotes the virtual address of the storage associated with the symbol
+in the target's virtual address space. A target can support multiple symbol
+tables including, but not limited to, a primary executable symbol table, a
+primary dynamic symbol table, a run-time link-editor symbol table, and standard
+and dynamic symbol tables for each of a number of load objects (such as shared
+libraries in a user process, or kernel modules in the Solaris kernel). The
+target typically searches the primary executable's symbol tables first, and
+then one or more of the other symbol tables. Notice that \fBELF\fR symbol
+tables only contain entries for external, global, and static symbols; automatic
+symbols do not appear in the symbol tables processed by \fBmdb\fR.
+.sp
+.LP
+Additionally, \fBmdb\fR provides a private user-defined symbol table that is
+searched prior to any of the target symbol tables. The private symbol table is
+initially empty, and can be manipulated using the \fB::nmadd\fR and
+\fB::nmdel\fR dcmds. The \fB::nm\fR \fB-P\fR option can be used to display the
+contents of the private symbol table. The private symbol table allows the user
+to create symbol definitions for program functions or data that were either
+missing from the original program or stripped out. These definitions are then
+used whenever \fBmdb\fR converts a symbolic name to an address, or an address
+to the nearest symbol.
+.sp
+.LP
+As targets contain multiple symbol tables, and each symbol table can include
+symbols from multiple object files, different symbols with the same name can
+exist. \fBmdb\fR uses the backquote (\fB`\fR) character as a symbol name
+scoping operator to allow the programmer to obtain the value of the desired
+symbol in this situation. The programmer can specify the scope used to resolve
+a symbol name as either: \fIobject\fR\fB`\fR\fIname\fR, or
+\fIfile\fR\fB`\fR\fIname\fR, or \fIobject\fR\fB`\fR\fIfile\fR\fB`\fR\fIname\fR.
+The object identifier refers to the name of a load object. The file identifier
+refers to the basename of a source file that has a symbol of type
+\fBSTT_FILE\fR in the specified object's symbol table. The object identifier's
+interpretation depends on the target type.
+.sp
+.LP
+The \fBmdb\fR kernel target expects \fIobject\fR to specify the basename of a
+loaded kernel module. For example, the symbol name
+.sp
+.in +2
+.nf
+specfs`_init
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+evaluates to the value of the \fB_init\fR symbol in the \fBspecfs\fR kernel
+module.
+.sp
+.LP
+The \fBmdb\fR process target expects \fIobject\fR to specify the name of the
+executable or of a loaded shared library. It can take any of the following
+forms:
+.RS +4
+.TP
+1.
+An exact match (that is, a full pathname): \fB/usr/lib/libc.so.1\fR
+.RE
+.RS +4
+.TP
+2.
+An exact basename match: \fBlibc.so.1\fR
+.RE
+.RS +4
+.TP
+3.
+An initial basename match up to a ``\fB\&.\fR'' suffix: \fBlibc.so\fR or
+\fBlibc\fR
+.RE
+.RS +4
+.TP
+4.
+The literal string \fBa.out\fR is accepted as an alias for the executable.
+.RE
+.sp
+.LP
+The process target also accepts any of the four forms described above preceded
+by an optional link-map id (lmid). The lmid prefix is specified by an initial
+"\fBLM\fR" followed by the link-map id in hexadecimal followed by an additional
+backquote. For example, the symbol name
+.sp
+.in +2
+.nf
+LM0`libc.so.1`_init
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+evaluates to the value of the \fB_init\fR symbol in the \fBlibc.so.1\fR library
+that is loaded on link-map 0 (\fBLM_ID_BASE\fR). The link-map specifier can be
+necessary to resolve symbol naming conflicts in the event that the same library
+is loaded on more than one link map. For more information on link maps, refer
+to the \fILinker and Libraries Guide\fR and \fBdlopen\fR(3C). Link-map
+identifiers are displayed when symbols are printed according to the setting of
+the \fBshowlmid\fR option, as described under OPTIONS.
+.sp
+.LP
+In the case of a naming conflict between symbols and hexadecimal integer
+values, \fBmdb\fR attempts to evaluate an ambiguous token as a symbol first,
+before evaluating it as an integer value. For example, the token \fBf\fR can
+either refer to the decimal integer value \fB15\fR specified in hexadecimal
+(the default base), or to a global variable named \fBf\fR in the target's
+symbol table. If a symbol with an ambiguous name is present, the integer value
+can be specified by using an explicit \fB0x\fR or \fB0X\fR prefix.
+.SS "dcmd and Walker Name Resolution"
+.sp
+.LP
+As described earlier, each \fBmdb\fR dmod provides a set of dcmds and walkers.
+dcmds and walkers are tracked in two distinct, global namespaces. \fBmdb\fR
+also keeps track of a dcmd and walker namespace associated with each dmod.
+Identically named dcmds or walkers within a given dmod are not allowed: a dmod
+with this type of naming conflict fails to load. Name conflicts between dcmds
+or walkers from different dmods are allowed in the global namespace. In the
+case of a conflict, the first dcmd or walker with that particular name to be
+loaded is given precedence in the global namespace. Alternate definitions are
+kept in a list in load order. The backquote character (\fB`\fR) can be used in
+a dcmd or walker name as a scoping operator to select an alternate definition.
+For example, if dmods \fBm1\fR and \fBm2\fR each provide a dcmd \fBd\fR, and
+\fBm1\fR is loaded prior to \fBm2\fR, then:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::d\fR\fR
+.ad
+.RS 10n
+.rt
+Executes \fBm1\fR's definition of \fBd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::m1`d\fR\fR
+.ad
+.RS 10n
+.rt
+Executes \fBm1\fR's definition of \fBd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::m2`d\fR\fR
+.ad
+.RS 10n
+.rt
+Executes \fBm2'\fRs definition of \fBd\fR.
+.RE
+
+.sp
+.LP
+If module \fBm1\fR were now unloaded, the next dcmd on the global definition
+list (\fBm2`d\fR) would be promoted to global visibility. The current
+definition of a dcmd or walker can be determined using the \fB::which\fR dcmd,
+described below. The global definition list can be displayed using the
+\fB::which\fR \fB-v\fR option.
+.SS "dcmd Pipelines"
+.sp
+.LP
+dcmds can be composed into a pipeline using the \fB|\fR operator. The purpose
+of a pipeline is to pass a list of values, typically virtual addresses, from
+one dcmd or walker to another. Pipeline stages might be used to map a pointer
+from one type of data structure to a pointer to a corresponding data structure,
+to sort a list of addresses, or to select the addresses of structures with
+certain properties.
+.sp
+.LP
+\fBmdb\fR executes each dcmd in the pipeline in order from left to right. The
+leftmost dcmd is executed using the current value of dot, or using the value
+specified by an explicit expression at the start of the command. When a \fB|\fR
+operator is encountered, \fBmdb\fR creates a pipe (a shared buffer) between the
+output of the dcmd to its left and the \fBmdb\fR parser, and an empty list of
+values. As the dcmd executes, its standard output is placed in the pipe and
+then consumed and evaluated by the parser, as if \fBmdb\fR were reading this
+data from standard input. Each line must consist of an arithmetic expression
+terminated by a \fINEWLINE\fR or semicolon (\fB;\fR). The value of the
+expression is appended to the list of values associated with the pipe. If a
+syntax error is detected, the pipeline is aborted.
+.sp
+.LP
+When the dcmd to the left of a \fB|\fR operator completes, the list of values
+associated with the pipe is then used to invoke the dcmd to the right of the
+\fB|\fR operator. For each value in the list, dot is set to this value and the
+right-hand dcmd is executed. Only the rightmost dcmd in the pipeline has its
+output printed to standard output. If any dcmd in the pipeline produces output
+to standard error, these messages are printed directly to standard error and
+are not processed as part of the pipeline.
+.SS "Signal Handling"
+.sp
+.LP
+The debugger ignores the \fBPIPE\fR and \fBQUIT\fR signals. The \fBINT\fR
+signal aborts the command that is currently executing. The debugger intercepts
+and provides special handling for the \fBILL\fR, \fBTRAP\fR, \fBEMT\fR,
+\fBFPE\fR, \fBBUS\fR, and \fBSEGV\fR signals. If any of these signals are
+generated asynchronously (that is, delivered from another process using
+\fBkill\fR(2)), \fBmdb\fR restores the signal to its default disposition and
+dump core. However, if any of these signals are generated synchronously by the
+debugger process itself and a dcmd from an externally loaded dmod is currently
+executing, and standard input is a terminal, \fBmdb\fR provides a menu of
+choices allowing the user to force a core dump, quit without producing a core
+dump, stop for attach by a debugger, or attempt to resume. The resume option
+aborts all active commands and unload the dmod whose dcmd was active at the
+time the fault occurred. It can then be subsequently re-loaded by the user. The
+resume option provides limited protection against buggy dcmds. Refer to
+WARNINGS, \fBUse of the Error Recovery Mechanism\fR, below for information
+about the risks associated with the resume option.
+.SS "Command Re-entry"
+.sp
+.LP
+The text of the last \fBHISTSIZE \fR (default 128) commands entered from a
+terminal device are saved in memory. The in-line editing facility, described
+next, provides key mappings for searching and fetching elements from the
+history list.
+.SS "In-line Editing"
+.sp
+.LP
+If standard input is a terminal device, \fBmdb\fR provides some simple
+emacs-style facilities for editing the command line. The \fBsearch\fR,
+\fBprevious\fR, and \fBnext\fR commands in edit mode provide access to the
+history list. Only strings, not patterns, are matched when searching. In the
+table below, the notation for control characters is caret (\fB^\fR) followed by
+a character shown in upper case. The notation for escape sequences is \fBM-\fR
+followed by a character. For example, \fBM-f\fR (pronounced meta-eff) is
+entered by depressing ESC followed by '\fBf\fR', or by depressing Meta followed
+by '\fBf\fR' on keyboards that support a \fBMeta\fR key. A command line is
+committed and executed using \fIRETURN\fR or \fINEWLINE\fR. The edit commands
+are:
+.sp
+.ne 2
+.mk
+.na
+\fB^F\fR
+.ad
+.RS 14n
+.rt
+Move cursor forward (right) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBM-f\fR
+.ad
+.RS 14n
+.rt
+Move cursor forward one word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^B\fR
+.ad
+.RS 14n
+.rt
+Move cursor backward (left) one character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBM-b\fR
+.ad
+.RS 14n
+.rt
+Move cursor backward one word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^A\fR
+.ad
+.RS 14n
+.rt
+Move cursor to start of line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^E\fR
+.ad
+.RS 14n
+.rt
+Move cursor to end of line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^D\fR
+.ad
+.RS 14n
+.rt
+Delete current character, if the current line is not empty. If the current line
+is empty, \fB^D\fR denotes \fBEOF\fR and the debugger exits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBM-^H\fR
+.ad
+.RS 14n
+.rt
+(Meta-backspace) Delete previous word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^K\fR
+.ad
+.RS 14n
+.rt
+Delete from the cursor to the end of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^L\fR
+.ad
+.RS 14n
+.rt
+Clear the screen and reprint the current line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^T\fR
+.ad
+.RS 14n
+.rt
+Transpose current character with next character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^N\fR
+.ad
+.RS 14n
+.rt
+Fetch the next command from the history. Each time \fB^N\fR is entered, the
+next command forward in time is retrieved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^P\fR
+.ad
+.RS 14n
+.rt
+Fetch the previous command from the history. Each time \fB^P\fR is entered, the
+next command backward in time is retrieved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB^R[\fIstring\fR]\fR
+.ad
+.RS 14n
+.rt
+Search backward in the history for a previous command line containing
+\fIstring\fR. The string should be terminated by a \fIRETURN\fR or
+\fINEWLINE\fR. If \fIstring\fR is omitted, the previous history element
+containing the most recent string is retrieved.
+.RE
+
+.sp
+.LP
+The editing mode also interprets the following user-defined sequences as
+editing commands. User defined sequences can be read or modified using the
+\fBstty\fR(1) command.
+.sp
+.ne 2
+.mk
+.na
+\fBerase\fR
+.ad
+.RS 11n
+.rt
+User defined erase character (usually \fB^H\fR or \fB^?\fR). Delete previous
+character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBintr\fR
+.ad
+.RS 11n
+.rt
+User defined interrupt character (usually \fB^C\fR). Abort the current command
+and print a new prompt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBkill\fR
+.ad
+.RS 11n
+.rt
+User defined kill character (usually \fB^U\fR). Kill the entire current command
+line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBquit\fR
+.ad
+.RS 11n
+.rt
+User defined quit character (usually \fB^\e\fR). Quit the debugger.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsuspend\fR
+.ad
+.RS 11n
+.rt
+User defined suspend character (usually \fB^Z\fR). Suspend the debugger.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBwerase\fR
+.ad
+.RS 11n
+.rt
+User defined word erase character (usually \fB^W\fR). Erase the preceding word.
+.RE
+
+.sp
+.LP
+On keyboards that support an extended keypad with arrow keys, \fBmdb\fR
+interprets these keystrokes as editing commands:
+.sp
+.ne 2
+.mk
+.na
+\fBup-arrow\fR
+.ad
+.RS 15n
+.rt
+Fetch the previous command from the history (same as \fB^P\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdown-arrow\fR
+.ad
+.RS 15n
+.rt
+Fetch the next command from the history (same as \fB^N\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBleft-arrow\fR
+.ad
+.RS 15n
+.rt
+Move cursor backward one character (same as \fB^B\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBright-arrow\fR
+.ad
+.RS 15n
+.rt
+Move cursor forward one character (same as \fB^F\fR).
+.RE
+
+.SS "Output Pager"
+.sp
+.LP
+\fBmdb\fR provides a built-in output pager. The output pager is enabled if the
+debugger's standard output is a terminal device. Each time a command is
+executed, \fBmdb\fR pauses after one screenful of output is produced and
+displays a pager prompt:
+.sp
+.in +2
+.nf
+ >> More [<space>, <cr>, q, n, c, a] ?
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following key sequences are recognized by the pager:
+.sp
+.ne 2
+.mk
+.na
+\fB\fISPACE\fR\fR
+.ad
+.RS 25n
+.rt
+Display the next screenful of output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBa, A\fR
+.ad
+.RS 25n
+.rt
+Abort the current top-level command and return to the prompt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBc, C\fR
+.ad
+.RS 25n
+.rt
+Continue displaying output without pausing at each screenful until the current
+top-level command is complete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBn, N, \fINEWLINE\fR, \fIRETURN\fR\fR
+.ad
+.RS 25n
+.rt
+Display the next line of output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBq, Q, ^C, ^\e\fR
+.ad
+.RS 25n
+.rt
+Quit (abort) the current dcmd only.
+.RE
+
+.SS "Formatting dcmds"
+.sp
+.LP
+The \fB/\fR, \fB\e\fR, \fB?\fR, and \fB=\fR metacharacters are used to denote
+the special output formatting dcmds. Each of these dcmds accepts an argument
+list consisting of one or more format characters, repeat counts, or quoted
+strings. A format character is one of the \fBASCII\fR characters shown in the
+table below. Format characters are used to read and format data from the
+target. A repeat count is a positive integer preceding the format character
+that is always interpreted in base 10 (decimal). A repeat count can also be
+specified as an expression enclosed in square brackets preceded by a dollar
+sign (\fB$[ ]\fR). A string argument must be enclosed in double-quotes (\fB"
+"\fR). No blanks are necessary between format arguments.
+.sp
+.LP
+The formatting dcmds are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/\fR\fR
+.ad
+.RS 6n
+.rt
+Display data from the target's virtual address space starting at the virtual
+address specified by dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\fR\fR
+.ad
+.RS 6n
+.rt
+Display data from the target's physical address space starting at the physical
+address specified by dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 6n
+.rt
+Display data from the target's primary object file starting at the object file
+location corresponding to the virtual address specified by dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR\fR
+.ad
+.RS 6n
+.rt
+Display the value of dot itself in each of the specified data formats. The
+\fB=\fR dcmd is therefore useful for converting between bases and performing
+arithmetic.
+.RE
+
+.sp
+.LP
+In addition to dot, \fBmdb\fR keeps track of another global value called the
+\fIincrement\fR. The increment represents the distance between dot and the
+address following all the data read by the last formatting dcmd. For example,
+if a formatting dcmd is executed with dot equal to address A, and displays a
+4-byte integer, then after this dcmd completes, dot is still A, but the
+increment is set to \fB4\fR. The \fB+\fR character (described under
+\fBArithmetic Expansion\fR above) would now evaluate to the value \fBA + 4\fR,
+and could be used to reset dot to the address of the next data object for a
+subsequent dcmd.
+.sp
+.LP
+Most format characters increase the value of the increment by the number of
+bytes corresponding to the size of the data format, shown in the table. The
+table of format characters can be displayed from within \fBmdb\fR using the
+\fB::formats\fR dcmd. The format characters are:
+.sp
+
+.sp
+.TS
+tab();
+lw(.69i) lw(4.81i)
+lw(.69i) lw(4.81i)
+.
+\fB+\fRT{
+increment dot by the count (variable size)
+T}
+\fB-\fRT{
+decrement dot by the count (variable size)
+T}
+Bhexadecimal int (1 byte)
+CT{
+character using C character notation (1 byte)
+T}
+Ddecimal signed int (4 bytes)
+Edecimal unsigned long long (8 bytes)
+Fdouble (8 bytes)
+Goctal unsigned long long (8 bytes)
+Hswap bytes and shorts (4 bytes)
+IT{
+address and disassembled instruction (variable size)
+T}
+Jhexadecimal long long (8 bytes)
+Khexadecimal uintptr_t (4 or 8 bytes)
+Nnewline
+Ooctal unsigned int (4 bytes)
+Psymbol (4 or 8 bytes)
+Qoctal signed int (4 bytes)
+Rbinary int (8 bytes)
+ST{
+string using C string notation (variable size)
+T}
+Thorizontal tab
+Udecimal unsigned int (4 bytes)
+Vdecimal unsigned int (1 byte)
+Wdefault radix unsigned int (4 bytes)
+Xhexadecimal int (4 bytes)
+Ydecoded time32_t (4 bytes)
+Zhexadecimal long long (8 bytes)
+^T{
+decrement dot by increment * count (variable size)
+T}
+adot as symbol+offset
+boctal unsigned int (1 byte)
+ccharacter (1 byte)
+ddecimal signed short (2 bytes)
+edecimal signed long long (8 bytes)
+ffloat (4 bytes)
+goctal signed long long (8 bytes)
+hswap bytes (2 bytes)
+idisassembled instruction (variable size)
+nnewline
+ooctal unsigned short (2 bytes)
+psymbol (4 or 8 bytes)
+qoctal signed short (2 bytes)
+rwhitespace
+sraw string (variable size)
+thorizontal tab
+udecimal unsigned short (2 bytes)
+vdecimal signed int (1 byte)
+wdefault radix unsigned short (2 bytes)
+xhexadecimal short (2 bytes)
+ydecoded time64_t (8 bytes)
+.TE
+
+.sp
+.LP
+The \fB/\fR, \fB\e\fR, and \fB?\fR formatting dcmds can also be used to write
+to the target's virtual address space, physical address space, or object file
+by specifying one of the following modifiers as the first format character, and
+then specifying a list of words that are either immediate values or expressions
+enclosed in square brackets preceded by a dollar sign (\fB$[ ]\fR).
+.sp
+.LP
+The write modifiers are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fR\fR
+.ad
+.RS 5n
+.rt
+Write the lowest byte of the value of each expression to the target beginning
+at the location specified by dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fR\fR
+.ad
+.RS 5n
+.rt
+Write the lowest two bytes of the value of each expression to the target
+beginning at the location specified by dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBW\fR\fR
+.ad
+.RS 5n
+.rt
+Write the lowest 4 bytes of the value of each expression to the target
+beginning at the location specified by dot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBZ\fR\fR
+.ad
+.RS 5n
+.rt
+Write the complete 8 bytes of the value of each expression to the target
+beginning at the location specified by dot.
+.RE
+
+.sp
+.LP
+The \fB/\fR, \fB\e\fR, and \fB?\fR formatting dcmds can also be used to search
+for a particular integer value in the target's virtual address space, physical
+address space, and object file, respectively, by specifying one of the
+following modifiers as the first format character, and then specifying a value
+and optional mask. The value and mask are each specified as either immediate
+values or expressions enclosed in square brackets preceded by a dollar sign. If
+only a value is specified, \fBmdb\fR reads integers of the appropriate size and
+stops at the address containing the matching value. If a value \fBV\fR and mask
+\fBM\fR are specified, \fBmdb\fR reads integers of the appropriate size and
+stops at the address containing a value \fBX\fR where \fB(X & M) == V\fR. At
+the completion of the dcmd, dot is updated to the address containing the match.
+If no match is found, dot is left at the last address that was read.
+.sp
+.LP
+The search modifiers are:
+.sp
+
+.sp
+.TS
+tab();
+lw(.69i) lw(4.81i)
+lw(.69i) lw(4.81i)
+.
+lSearch for the specified 2-byte value.
+LSearch for the specified 4-byte value.
+MSearch for the specified 8-byte value.
+.TE
+
+.sp
+.LP
+Notice that for both user and kernel targets, an address space is typically
+composed of a set of discontiguous segments. It is not legal to read from an
+address that does not have a corresponding segment. If a search reaches a
+segment boundary without finding a match, it aborts when the read past the end
+of the segment boundary fails.
+.SS "Execution Control"
+.sp
+.LP
+\fBmdb\fR provides facilities for controlling and tracing the execution of a
+live running program. Currently, only the user process target provides support
+for execution control. \fBmdb\fR provides a simple model of execution control:
+a target process can be started from within the debugger using \fB::run\fR, or
+\fBmdb\fR can attach to an existing process using \fB:A\fR, \fB::attach\fR, or
+the \fB-p\fR command-line option, as described below. A list of traced software
+events can be specified by the user. Each time a traced event occurs in the
+target process, all threads in the target stop, the thread that triggered the
+event is chosen as the representative thread, and control returns to the
+debugger. Once the target program is set running, control can be asynchronously
+returned to the debugger by typing the user-defined interrupt character
+(typically \fB^C\fR).
+.sp
+.LP
+A \fBsoftware event\fR is a state transition in the target program that is
+observed by the debugger. For example, the debugger can observe the transition
+of a program counter register to a value of interest (a breakpoint) or the
+delivery of a particular signal.
+.sp
+.LP
+A \fBsoftware event specifier\fR is a description of a class of software events
+that is used by the debugger to instrument the target program in order to
+observe these events. The \fB::events\fR dcmd is used to list the software
+event specifiers. A set of standard properties is associated with each event
+specifier, as described under \fB::events\fR, below.
+.sp
+.LP
+The debugger can observe a variety of different software events, including
+breakpoints, watchpoints, signals, machine faults, and system calls. New
+specifiers can be created using \fB::bp\fR, \fB::fltbp\fR, \fB::sigbp\fR,
+\fB::sysbp\fR, or \fB::wp\fR. Each specifier has an associated callback (an
+\fBmdb\fR command string to execute as if it had been typed at the command
+prompt) and a set of properties, as described below. Any number of specifiers
+for the same event can be created, each with different callbacks and
+properties. The current list of traced events and the properties of the
+corresponding event specifiers can be displayed using the \fB::events\fR dcmd.
+The event specifier properties are defined as part of the description of the
+\fB::events\fR and \fB::evset\fR dcmds, below.
+.sp
+.LP
+The execution control built-in dcmds, described below, are always available,
+but issues an error message indicating they are not supported if applied to a
+target that does not support execution control. For more information about the
+interaction of exec, attach, release, and job control with debugger execution
+control, refer to NOTES, below.
+.SS "Event Callbacks"
+.sp
+.LP
+The \fB::evset\fR dcmd and event tracing dcmds allow you to associate an event
+callback (using the \fB-c\fR option) with each event specifier. The event
+callbacks are strings that represent \fBmdb\fR commands to execute when the
+corresponding event occurs in the target. These commands are executed as if
+they had been typed at the command prompt. Before executing each callback, the
+dot variable is set to the value of the representative thread's program counter
+and the "\fBhits\fR" variable is set to the number of times this specifier has
+been matched, including the current match.
+.sp
+.LP
+If the event callbacks themselves contain one or more commands to continue the
+target (for example, \fB::cont\fR or \fB::step\fR), these commands do not
+immediately continue the target and wait for it to stop again. Instead, inside
+of an event callback, the continue dcmds note that a continue operation is now
+pending, and then return immediately. Therefore, if multiple dcmds are included
+in an event callback, the step or continue dcmd should be the last command
+specified. Following the execution of \fBall\fR event callbacks, the target
+immediately resumes execution if \fBall\fR matching event callbacks requested a
+continue. If conflicting continue operations are requested, the operation with
+the highest precedence determines what type of continue occurs. The order of
+precedence from highest to lowest is: step, step-over (next), step-out,
+continue.
+.SS "Thread Support"
+.sp
+.LP
+\fBmdb\fR provides facilities to examine the stacks and registers of each
+thread associated with the target. The persistent "\fBthread\fR" variable
+contains the current representative thread identifier. The format of the thread
+identifier depends on the target. The \fB::regs\fR and \fB::fpregs\fR dcmds can
+be used to examine the register set of the representative thread, or of another
+thread if its register set is currently available. In addition, the register
+set of the representative thread is exported as a set of named variables. The
+user can modify the value of one or more registers by applying the \fB>\fR dcmd
+to the corresponding named variable.
+.sp
+.LP
+The \fBmdb\fR kernel target exports the virtual address of the corresponding
+internal thread structure as the identifier for a given thread. The \fISolaris
+Modular Debugger Guide\fR provides more information on debugging support for
+threads in the Solaris kernel. The \fBmdb\fR process target provides proper
+support for examination of multi-threaded user processes that use the native
+\fBlwp_*\fR interfaces, \fB/usr/lib/libthread.so\fR or
+\fB/usr/lib/lwp/libthread.so\fR. When debugging a live user process, \fBmdb\fR
+detects if a single threaded process \fBdlopen\fRs or closes \fBlibthread\fR
+and automatically adjusts its view of the threading model on-the-fly. The
+process target thread identifiers corresponds to either the \fBlwpid_t\fR,
+\fBthread_t\fR, or \fBpthread_t\fR of the representative, depending on the
+threading model used by the application.
+.sp
+.LP
+If \fBmdb\fR is debugging a user process target and the target makes use of
+compiler-supported thread-local storage, \fBmdb\fR automatically evaluates
+symbol names referring to thread-local storage to the address of the storage
+corresponding to the current representative thread. The \fB::tls\fR built-in
+dcmd can be used to display the value of the symbol for threads other than the
+representative thread.
+.SS "Built-in dcmds"
+.sp
+.LP
+\fBmdb\fR provides a set of built-in dcmds that are always defined. Some of
+these dcmds are only applicable to certain targets: if a dcmd is not applicable
+to the current target, it fails and prints a message indicating "command is not
+supported by current target". In many cases, \fBmdb\fR provides a mnemonic
+equivalent (\fB::identifier\fR) for the legacy \fBadb\fR(1) dcmd names. For
+example, \fB::quit\fR is provided as the equivalent of \fB$q\fR. Programmers
+who are experienced with \fBadb\fR(1) or who appreciate brevity or arcana can
+prefer the \fB$\fR or \fB:\fR forms of the built-ins. Programmers who are new
+to \fBmdb\fR might prefer the more verbose \fB::\fR form. The built-ins are
+shown in alphabetical order. If a \fB$\fR or \fB:\fR form has a
+\fB::identifier\fR equivalent, it is shown underneath the \fB::identifier\fR
+form. The built-in dcmds are:
+.sp
+.ne 2
+.mk
+.na
+\fB> \fIvariable-name\fR\fR
+.ad
+.br
+.na
+\fB\fB>\fR/\fImodifier\fR/\fIvariable-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Assign the value of dot to the specified named variable. Some variables are
+read-only and can not be modified. If the \fB>\fR is followed by a modifier
+character surrounded by \fB/ /\fR, then the value is modified as part of the
+assignment. The modifier characters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.RS 5n
+.rt
+unsigned char quantity (1-byte)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 5n
+.rt
+unsigned short quantity (2-byte)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 5n
+.rt
+unsigned int quantity (4-byte)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 5n
+.rt
+unsigned long quantity (4-byte in 32-bit, 8-byte in 64-bit)
+.RE
+
+Notice that these operators do not perform a cast. Instead, they fetch the
+specified number of low-order bytes (on little-endian architectures) or
+high-order bytes (big-endian architectures). Modifiers are provided for
+backwards compatibility; the \fBmdb\fR */\fImodifier\fR/ and %/\fImodifier\fR/
+syntax should be used instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$<\fR \fImacro-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read and execute commands from the specified macro file. The filename can be
+given as an absolute or relative path. If the filename is a simple name (that
+is, if it does not contain a '\fB/\fR'), \fBmdb\fR searches for it in the macro
+file include path. If another macro file is currently being processed, this
+file is closed and replaced with the new file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$<<\fR \fImacro-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read and execute commands from the specified macro file (as with \fB$<\fR), but
+do not close the current open macro file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the process-\fBID\fR and current signal of the target if it is a user
+process or core file, and then print the general register set of the
+representative thread.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB$C\fR [ \fIcount\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Print a C stack backtrace, including stack frame pointer information. If the
+dcmd is preceded by an explicit \fIaddress\fR, a backtrace beginning at this
+virtual memory address is displayed. Otherwise the stack of the representative
+thread is displayed. If an optional count value is given as an argument, no
+more than \fIcount\fR arguments are displayed for each stack frame in the
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIbase\fR ] \fB$d\fR\fR
+.ad
+.sp .6
+.RS 4n
+Get or set the default output radix. If the dcmd is preceded by an explicit
+expression, the default output radix is set to the given \fIbase\fR; otherwise
+the current radix is printed in base 10 (decimal). The default radix is base 16
+(hexadecimal).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$e\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print a list of all known external (global) symbols of type object or function,
+the value of the symbol, and the first 4 (32-bit \fBmdb\fR) or 8 (64-bit
+\fBmdb\fR) bytes stored at this location in the target's virtual address space.
+The \fB::nm\fR dcmd provides more flexible options for displaying symbol
+tables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$P\fR \fIprompt-string\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the prompt to the specified \fIprompt-string\fR. The default prompt
+is '\fB>\fR '. The prompt can also be set using \fB::set\fR \fB-P\fR or the
+\fB-P\fR command-line option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdistance\fR \fB$s\fR\fR
+.ad
+.sp .6
+.RS 4n
+Get or set the symbol matching \fIdistance\fR for address-to-symbol-name
+conversions. The symbol matching distance modes are discussed along with the
+\fB-s\fR command-line option under OPTIONS. The symbol matching distance can
+also be modified using the \fB::set\fR \fB-s\fR option. If no distance is
+specified, the current setting is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print a list of the named variables that have non-zero values. The \fB::vars\fR
+dcmd provides other options for listing variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIwidth\fR \fB$w\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the output page \fIwidth\fR to the specified value. Typically, this command
+is not necessary as \fBmdb\fR queries the terminal for its width and handles
+resize events.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$W\fR\fR
+.ad
+.sp .6
+.RS 4n
+Re-open the target for writing, as if \fBmdb\fR had been executed with the
+\fB-w\fR option on the command line. Write mode can also be enabled with the
+\fB::set\fR \fB-w\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIpid\fR ] \fB::attach \fR [ \fIcore\fR | \fIpid\fR ]\fR
+.ad
+.br
+.na
+\fB[ \fIpid\fR ] \fB:A\fR [ \fI core\fR | \fIpid\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+If the user process target is active, attach to and debug the specified
+process-\fBID\fR or \fIcore\fR file. The core file pathname should be specified
+as a string argument. The process-\fBID\fR can be specified as the string
+argument, or as the value of the expression preceding the dcmd. Recall that the
+default base is hexadecimal, so decimal \fBPID\fRs obtained using
+\fBpgrep\fR(1) or \fBps\fR(1) should be preceded with "\fB0t\fR" when specified
+as expressions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIaddress\fR] \fB::bp\fR [\fB-/\fR\fB-dDesT\fR] [\fB-c\fR \fIcmd\fR]
+[\fB-n\fR \fIcount\fR] \fIsym\fR ...\fR
+.ad
+.br
+.na
+\fB\fIaddress\fR \fB:b\fR [\fIcmd\fR ...]\fR
+.ad
+.sp .6
+.RS 4n
+Set a breakpoint at the specified locations. The \fB::bp\fR dcmd sets a
+breakpoint at each address or symbol specified, including an optional address
+specified by an explicit expression preceding the dcmd, and each string or
+immediate value following the dcmd. The arguments can either be symbol names or
+immediate values denoting a particular virtual address of interest. If a symbol
+name is specified, it can refer to a symbol that cannot yet be evaluated in the
+target process. That is, it can consist of an object name and function name in
+a load object that has not yet been opened. In this case, the breakpoint is
+deferred and is not active in the target until an object matching the given
+name is loaded. The breakpoint is automatically enabled when the load object is
+opened. Breakpoints on symbols defined in a shared library should always be set
+using a symbol name and not using an address expression, as the address can
+refer to the corresponding Procedure Linkage Table (\fBPLT\fR) entry instead of
+the actual symbol definition. Breakpoints set on \fBPLT\fR entries can be
+overwritten by the run-time link-editor when the \fBPLT\fR entry is
+subsequently resolved to the actual symbol definition. The \fB-d\fR, \fB-D\fR,
+\fB-e\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR, \fB-c\fR, and \fB-n\fR options have the
+same meaning as they do for the \fB::evset\fR dcmd, as described below. If the
+\fB:b\fR form of the dcmd is used, a breakpoint is only set at the virtual
+address specified by the expression preceding the dcmd. The arguments following
+the \fB:b\fR dcmd are concatenated together to form the callback string. If
+this string contains meta-characters, it must be quoted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::cat\fR \fIfilename\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+Concatenate and display files. Each filename can be specified as a relative or
+absolute pathname. The file contents are printed to standard output, but are
+not passed to the output pager. This dcmd is intended to be used with the
+\fB|\fR operator; the programmer can initiate a pipeline using a list of
+addresses stored in an external file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::cont\fR [ \fISIG\fR ]\fR
+.ad
+.br
+.na
+\fB\fB:c\fR [ \fISIG\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Suspend the debugger, continue the target program, and wait for it to terminate
+or stop following a software event of interest. If the target is already
+running because the debugger was attached to a running program with the
+\fB-o\fR \fBnostop\fR option enabled, this dcmd simply waits for the target to
+terminate or stop after an event of interest. If an optional signal name or
+number (see \fBsignal.h\fR(3HEAD)) is specified as an argument, the signal is
+immediately delivered to the target as part of resuming its execution. If the
+\fBSIGINT\fR signal is traced, control can be asynchronously returned to the
+debugger by typing the user-defined interrupt character (usually \fB^C\fR).
+This \fBSIGINT\fR signal is automatically cleared and is not observed by the
+target the next time it is continued. If no target program is currently
+running, \fB::cont\fR starts a new program running as if by \fB::run\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddress\fR \fB::context\fR\fR
+.ad
+.br
+.na
+\fB\fIaddress\fR \fB$p\fR\fR
+.ad
+.sp .6
+.RS 4n
+Context switch to the specified process. A context switch operation is only
+valid when using the kernel target. The process context is specified using the
+\fIaddress\fR of its proc structure in the kernel's virtual address space. The
+special context address "\fB0\fR" is used to denote the context of the kernel
+itself. \fBmdb\fR can only perform a context switch when examining a crash dump
+if the dump contains the physical memory pages of the specified user process
+(as opposed to just kernel pages). The kernel crash dump facility can be
+configured to dump all pages or the pages of the current user process using
+\fBdumpadm\fR(1M). The \fB::status\fR dcmd can be used to display the contents
+of the current crash dump.
+.sp
+When the user requests a context switch from the kernel target, \fBmdb\fR
+constructs a new target representing the specified user process. Once the
+switch occurs, the new target interposes its dcmds at the global level: thus
+the \fB/\fR dcmd now formats and displays data from the virtual address space
+of the user process, the \fB::mappings\fR dcmd displays the mappings in the
+address space of the user process, and so on. The kernel target can be restored
+by executing \fB0::context\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::dcmds\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the available dcmds and print a brief description for each one.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::delete\fR [ \fIid\fR | \fBall\fR ]\fR
+.ad
+.br
+.na
+\fB[ \fIaddress\fR ] \fB:d\fR [ \fIid\fR | \fBall\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Delete the event specifiers with the given id number. The id number argument is
+interpreted in decimal by default. If an optional address is specified
+preceding the dcmd, all event specifiers that are associated with the given
+virtual address are deleted (for example, all breakpoints or watchpoints
+affecting that address). If the special argument "\fBall\fR" is given, all
+event specifiers are deleted, except those that are marked sticky (\fBT\fR
+flag). The \fB::events\fR dcmd displays the current list of event specifiers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::dis\fR [ \fB-fw\fR ] [ \fB-n\fR \fIcount\fR ] [
+\fIaddress\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Disassemble starting at or around the \fIaddress\fR specified by the final
+argument, or the current value of dot. If the address matches the start of a
+known function, the entire function is disassembled. Otherwise, a "window" of
+instructions before and after the specified address is printed in order to
+provide context. By default, instructions are read from the target's virtual
+address space. If the \fB-f\fR option is present, instructions are read from
+the target's object file instead. The \fB-f\fR option is enabled by default if
+the debugger is not currently attached to a live process, core file, or crash
+dump. The \fB-w\fR option can be used to force "window"-mode, even if the
+address is the start of a known function. The size of the window defaults to
+ten instructions; the number of instructions can be specified explicitly using
+the \fB-n\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::disasms\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the available disassembler modes. When a target is initialized, \fBmdb\fR
+attempts to select the appropriate disassembler mode. The user can change the
+mode to any of the modes listed using the \fB::dismode\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::dismode\fR [ \fImode\fR ]\fR
+.ad
+.br
+.na
+\fB\fB$V\fR [ \fImode\fR ] \fR
+.ad
+.sp .6
+.RS 4n
+Get or set the disassembler mode. If no argument is specified, print the
+current disassembler mode. If a \fImode\fR argument is specified, switch the
+disassembler to the specified mode. The list of available disassemblers can be
+displayed using the \fB::disasms\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::dmods\fR [ \fB-l\fR ] [ \fImodule-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+List the loaded debugger modules. If the \fB-l\fR option is specified, the list
+of the dcmds and walkers associated with each dmod is printed below its name.
+The output can be restricted to a particular dmod by specifying its name as an
+additional argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::dump\fR [ \fB-eqrstu\fR ] [ \fB-f\fR|\fB-p\fR ]\fR
+.ad
+.br
+.na
+\fB#sp;#sp;[ \fB-g\fR \fIbytes\fR ] [ \fB-w\fR \fIparagraphs\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Print a hexadecimal and ASCII memory dump of the 16-byte aligned region of
+memory containing the address specified by dot. If a repeat count is specified
+for \fB::dump\fR, this is interpreted as a number of bytes to dump rather than
+a number of iterations. The \fB::dump\fR dcmd also recognizes the following
+options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 17n
+.rt
+Adjusts for endian-ness. The \fB-e\fR option assumes 4-byte words. The \fB-g\fR
+option can be used to change the default word size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 17n
+.rt
+Reads data from the object file location corresponding to the given virtual
+address instead of from the target's virtual address space. The \fB-f\fR option
+is enabled by default if the debugger is not currently attached to a live
+process, core file, or crash dump.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIbytes\fR\fR
+.ad
+.RS 17n
+.rt
+Displays bytes in groups of \fIbytes\fR. The default group size is 4 bytes. The
+group size must be a power of two that divides the line width.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 17n
+.rt
+Interprets \fIaddress\fR as a physical address location in the target's address
+space instead of a virtual address.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 17n
+.rt
+Does not print an ASCII decoding of the data.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 17n
+.rt
+Numbers lines relative to the start address instead of with the explicit
+address of each line. This option implies the \fB-u\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 17n
+.rt
+Elides repeated lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 17n
+.rt
+Only reads from and displays the contents of the specified addresses, instead
+of reading and printing entire lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 17n
+.rt
+Unaligns output instead of aligning the output at a paragraph boundary.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIparagraphs\fR\fR
+.ad
+.RS 17n
+.rt
+Displays paragraphs at 16-byte paragraphs per line. The default number of
+\fIparagraphs\fR is one. The maximum value accepted for \fB-w\fR is \fB16\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::echo\fR [ \fIstring\fR | \fIvalue\fR ...]\fR
+.ad
+.sp .6
+.RS 4n
+Print the arguments separated by blanks and terminated by a \fINEWLINE\fR to
+standard output. Expressions enclosed in \fB$[ ]\fR is evaluated to a value
+and printed in the default base.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::eval\fR \fIcommand\fR\fR
+.ad
+.sp .6
+.RS 4n
+Evaluate and execute the specified string as a command. If the command contains
+metacharacters or whitespace, it should be enclosed in double or single quotes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::events\fR [ \fB-av\fR ]\fR
+.ad
+.br
+.na
+\fB\fB$b\fR [ \fB-av\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Display the list of software event specifiers. Each event specifier is assigned
+a unique \fBID\fR number that can be used to delete or modify it at a later
+time. The debugger can also have its own internal events enabled for tracing.
+These events are only be displayed if the \fB-a\fR option is present. If the
+\fB-v\fR option is present, a more verbose display, including the reason for
+any specifier inactivity, are shown. Here is some sample output:
+.sp
+.in +2
+.nf
+> ::events
+ ID S TA HT LM Description Action
+----- - -- -- -- -------------------------------- ------
+[ 1 ] - T 1 0 stop on SIGINT -
+[ 2 ] - T 0 0 stop on SIGQUIT -
+[ 3 ] - T 0 0 stop on SIGILL -
+ ...
+[ 11] - T 0 0 stop on SIGXCPU -
+[ 12] - T 0 0 stop on SIGXFSZ -
+[ 13] - 2 0 stop at libc`printf ::echo printf
+>
+.fi
+.in -2
+.sp
+
+The following table explains the meaning of each column. A summary of this
+information is available using \fB::help\fR \fBevents\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBID\fR\fR
+.ad
+.RS 15n
+.rt
+The event specifier identifier. The identifier is shown in square brackets \fB[
+]\fR if the specifier is enabled, in parentheses \fB( )\fR if the specifier is
+disabled, or in angle brackets \fB< >\fR if the target program is currently
+stopped on an event that matches the given specifier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.RS 15n
+.rt
+The event specifier state. The state is one of the following symbols:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is idle. When no target program is running, all specifiers
+are idle. When the target program is running, a specifier can be idle if it
+cannot be evaluated (for example, a deferred breakpoint in a shared object that
+is not yet loaded).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is active. When the target is continued, events of this
+type is detected by the debugger.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is armed. This state means that the target is currently
+running with instrumentation for this type of event. This state is only visible
+if the debugger is attached to a running program with the \fB-o\fR \fBnostop\fR
+option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier was not armed due to an operating system error. The
+\fB::events\fR \fB-v\fR option can be used to display more information about
+the reason the instrumentation failed.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTA\fR\fR
+.ad
+.RS 15n
+.rt
+The Temporary, Sticky, and Automatic event specifier properties. One or more of
+the following symbols can be shown:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is temporary, and is deleted the next time the target
+stops, regardless of whether it is matched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is sticky, and is not be deleted by \fB::delete\fR
+\fBall\fR or \fB:z\fR. The specifier can be deleted by explicitly specifying
+its id number to \fB::delete\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is automatically disabled when the hit count is equal to
+the hit limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.RS 5n
+.rt
+The event specifier is automatically deleted when the hit count is equal to the
+hit limit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 5n
+.rt
+The target automatically stops when the hit count is equal to the hit limit.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHT\fR\fR
+.ad
+.RS 15n
+.rt
+The current hit count. This column displays the number of times the
+corresponding software event has occurred in the target since the creation of
+this event specifier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLM\fR\fR
+.ad
+.RS 15n
+.rt
+The current hit limit. This column displays the limit on the hit count at which
+the auto-disable, auto-delete, or auto-stop behavior takes effect. These
+behaviors can be configured using the \fB::evset\fR dcmd, described below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDescription\fR\fR
+.ad
+.RS 15n
+.rt
+A description of the type of software event that is matched by the given
+specifier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBAction\fR\fR
+.ad
+.RS 15n
+.rt
+The callback string to execute when the corresponding software event occurs.
+This callback is executed as if it had been typed at the command prompt.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIid\fR] \fB::evset\fR [\fB-/\fR\fB-dDestT\fR] [\fB-c\fR \fIcmd\fR]
+[\fB-n\fR \fIcount\fR] \fIid\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+Modify the properties of one or more software event specifiers. The properties
+are set for each specifier identified by the optional expression preceding the
+dcmd and an optional list of arguments following the dcmd. The argument list is
+interpreted as a list of decimal integers, unless an explicit radix is
+specified. The \fB::evset\fR dcmd recognizes the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Disables the event specifier when the hit count reaches the hit limit. If the
+\fB-d\fR form of the option is given, this behavior is disabled. Once an event
+specifier is disabled, the debugger removes any corresponding instrumentation
+and ignores the corresponding software events until the specifier is
+subsequently re-enabled. If the \fB-n\fR option is not present, the specifier
+is disabled immediately.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 6n
+.rt
+Deletes the event specifier when the hit count reaches the hit limit. If the
+\fB-D\fR form of the option is given, this behavior is disabled. The \fB-D\fR
+option takes precedence over the \fB-d\fR option. The hit limit can be
+configured using the \fB-n\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Enables the event specifier. If the \fB-e\fR form of the option is given, the
+specifier is disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Stops the target program when the hit count reaches the hit limit. If the
+\fB-s\fR form of the option is given, this behavior is disabled. The \fB-s\fR
+behavior tells the debugger to act as if the \fB::cont\fR were issued following
+each execution of the specifier's callback, except for the \fIN\fRth execution,
+where \fIN\fR is the current value of the specifier's hit limit. The \fB-s\fR
+option takes precedence over both the \fB-D\fR option and the \fB-d\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Marks the event specifier as temporary. Temporary specifiers are automatically
+deleted the next time the target stops, regardless of whether it stopped as the
+result of a software event corresponding to the given specifier. If the
+\fB-t\fR form of the option is given, the temporary marker is removed. The
+\fB-t\fR option takes precedence over the \fB-T\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 6n
+.rt
+Marks the event specifier as sticky. Sticky specifiers are not deleted by
+\fB::delete\fR \fBall\fR or \fB:z.\fR They can be deleted by specifying the
+corresponding specifier \fBID\fR as an explicit argument to \fB::delete\fR. If
+the \fB-T\fR form of the option is given, the sticky property is removed. The
+default set of event specifiers are all initially marked sticky.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Executes the specified \fIcmd\fR string each time the corresponding software
+event occurs in the target program. The current callback string can be
+displayed using \fB::events\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the current value of the hit limit to \fIcount\fR. If no hit limit is
+currently set and the \fB-n\fR option does not accompany \fB-s\fR or D, the hit
+limit is set to one.
+.RE
+
+A summary of this information is available using \fB::help\fR \fBevset\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::files\fR\fR
+.ad
+.br
+.na
+\fB\fB$f\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print a list of the known source files (symbols of type \fISTT_FILE\fR present
+in the various target symbol tables).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIflt\fR] \fB::fltbp\fR [\fB-/\fR\fB-dDestT\fR] [\fB-c\fR \fIcmd\fR]
+[\fB-n\fR \fIcount\fR] \fIflt\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+Trace the specified machine faults. The faults are identified using an optional
+fault number preceding the dcmd, or a list of fault names or numbers (see
+\fB<sys/fault.h>\fR) following the dcmd. The \fB-d\fR, \fB-D\fR, \fB-e\fR,
+\fB-s\fR, \fB-t\fR, \fB-T\fR, \fB-c\fR, and \fB-n\fR options have the same
+meaning as they do for the \fB::evset\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fB\fIthread\fR\fR ] \fB::fpregs\fR\fR
+.ad
+.br
+.na
+\fB[ \fB\fIthread\fR\fR ] \fB$x\fR, \fB$X\fR, \fB$y\fR, \fB$Y\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the floating-point register set of the representative thread. If a thread
+is specified, the floating point registers of that thread are displayed. The
+thread expression should be one of the thread identifiers described under
+\fBThread Support\fR, above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::formats\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the available output format characters for use with the \fB/\fR, \fB\e\fR,
+\fB?\fR, and \fB=\fR formatting dcmds. The formats and their use is described
+under \fBFormatting dcmds\fR, above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::grep\fR \fIcommand\fR\fR
+.ad
+.sp .6
+.RS 4n
+Evaluate the specified command string, and then print the old value of dot if
+the new value of dot is non-zero. If the \fIcommand\fR contains whitespace or
+metacharacters, it must be quoted. The \fB::grep\fR dcmd can be used in
+pipelines to filter a list of addresses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::help\fR [ \fIdcmd-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+With no arguments, the \fB::help\fR dcmd prints a brief overview of the help
+facilities available in \fBmdb\fR. If a \fIdcmd-name\fR is specified, \fBmdb\fR
+prints a usage summary for that dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsignal\fR \fB:i\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the target is a live user process, ignore the specified signal and allow it
+to be delivered transparently to the target. All event specifiers that are
+tracing delivery of the specified signal is deleted from the list of traced
+events. By default, the set of ignored signals is initialized to the complement
+of the set of signals that cause a process to dump core by default (see
+\fBsignal.h\fR(3HEAD)), except for \fBSIGINT\fR, which is traced by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$i\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display the list of signals that are ignored by the debugger and that is
+handled directly by the target. More information on traced signals can be
+obtained using the \fB::events\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::kill\fR\fR
+.ad
+.br
+.na
+\fB\fB:k\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forcibly terminate the target if it is a live user process. The target is also
+forcibly terminated when the debugger exits if it was created by the debugger
+using \fB::run\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the \fBLWPID\fR of the representative thread, if the target is a user
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$L\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the \fBLWPID\fRs of each \fBLWP\fR in the target, if the target is a user
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::list\fR \fItype\fR \fImember\fR [ \fIvariable-name\fR
+]\fR
+.ad
+.sp .6
+.RS 4n
+Walk through the elements of a linked list data structure and print the address
+of each element in the list. The address of the first element in the list can
+be specified using an optional address. Otherwise, the list is assumed to start
+at the current value of dot. The type parameter must name a C struct or union
+type and is used to describe the type of the list elements so that \fBmdb\fR
+can read in objects of the appropriate size. The member parameter is used to
+name the \fImember\fR of \fItype\fR that contains a pointer to the next list
+element. The \fB::list\fR dcmd continues iterating until a \fBNULL\fR pointer
+is encountered, the first element is reached again (a circular list), or an
+error occurs while reading an element. If the optional \fIvariable-name\fR is
+specified, the specified variable is assigned the value returned at each step
+of the walk when \fBmdb\fR invokes the next stage of a pipeline. The
+\fB::list\fR dcmd can only be used with objects that contain symbolic debugging
+information designed for use with mdb. Refer to NOTES, \fBSymbolic Debugging
+Information\fR, below for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::load\fR [ \fB-s\fR ] \fImodule-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Load the specified dmod. The module name can be given as an absolute or
+relative path. If \fImodule-name\fR is a simple name (that is, does not contain
+a '\fB/\fR'), \fBmdb\fR searches for it in the module library path. Modules
+with conflicting names can not be loaded; the existing module must be unloaded
+first. If the \fB-s\fR option is present, \fBmdb\fR remains silent and not
+issue any error messages if the module is not found or could not be loaded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::log\fR [ \fB-d\fR | [ \fB-e\fR ] \fIfilename\fR ]\fR
+.ad
+.br
+.na
+\fB\fB$>\fR [ \fIfilename\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Enable or disable the output log. \fBmdb\fR provides an interactive logging
+facility where both the input commands and standard output can be logged to a
+file while still interacting with the user. The \fB-e\fR option enables logging
+to the specified file, or re-enables logging to the previous log file if no
+filename is given. The \fB-d\fR option disables logging. If the \fB$>\fR dcmd
+is used, logging is enabled if a filename argument is specified; otherwise,
+logging is disabled. If the specified log file already exists, \fBmdb\fR
+appends any new log output to the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::map\fR \fIcommand\fR\fR
+.ad
+.sp .6
+.RS 4n
+Map the value of dot to a corresponding value using the \fIcommand\fR specified
+as a string argument, and then print the new value of dot. If the command
+contains whitespace or metacharacters, it must be quoted. The \fB::map\fR dcmd
+can be used in pipelines to transform the list of addresses into a new list of
+addresses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::mappings\fR [ \fIname\fR ]\fR
+.ad
+.br
+.na
+\fB[ \fI address\fR ] \fB$m\fR [ \fIname\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Print a list of each mapping in the target's virtual address space, including
+the address, size, and description of each mapping. If the dcmd is preceded by
+an \fIaddress\fR, \fBmdb\fR only shows the mapping that contains the given
+address. If a string \fIname\fR argument is given, \fBmdb\fR only shows the
+mapping matching that description.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::next\fR [ \fISIG\fR ]\fR
+.ad
+.br
+.na
+\fB\fB:e\fR [ \fISIG\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Step the target program one instruction, but step over subroutine calls. If an
+optional signal name or number (see \fBsignal.h\fR(3HEAD)) is specified as an
+argument, the signal is immediately delivered to the target as part of resuming
+its execution. If no target program is currently running, \fB::next\fR starts a
+new program running as if by \fB::run\fR and stop at the first instruction.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::nm\fR [ \fB-DPdghnopuvx\fR ] [ \fB-t\fR \fItypes\fR
+]\fR
+.ad
+.br
+.na
+\fB#sp;#sp;[ \fB-f\fR \fIformat\fR ] [ \fIobject\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Print the symbol tables associated with the current target. If an optional
+address preceding the dcmd is specified, only the symbol table entry for the
+symbol corresponding to \fIaddress\fR is displayed. If an \fIobject\fR is
+specified, only the symbol table for this load object is displayed. The
+\fB::nm\fR dcmd also recognizes the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 27n
+.rt
+Prints \fB\&.dynsym\fR (dynamic symbol table) instead of \fB\&.symtab\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 27n
+.rt
+Prints the private symbol table instead of \fB\&.symtab\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 27n
+.rt
+Prints value and size fields in decimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 27n
+.rt
+Prints only global symbols.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 27n
+.rt
+Suppresses the header line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 27n
+.rt
+Sorts symbols by name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 27n
+.rt
+Prints value and size fields in octal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 27n
+.rt
+Prints symbols as a series of \fB::nmadd\fR commands. This option can be used
+with \fB-P\fR to produce a macro file that can be subsequently read into the
+debugger with \fB$<\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 27n
+.rt
+Prints only undefined symbols.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 27n
+.rt
+Sorts symbols by value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 27n
+.rt
+Prints value and size fields in hexadecimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItype\fR[,\fItype\fR ... ]\fR
+.ad
+.RS 27n
+.rt
+Prints only symbols of the specified type(s). The valid \fItype\fR argument
+strings are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoty\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_NOTYPE\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBobjt\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_OBJECT\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfunc\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_FUNC\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsect\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_SECTION\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfile\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_FILE\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcomm\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_COMMON\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtls\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_TLS\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBregi\fR\fR
+.ad
+.RS 8n
+.rt
+\fISTT_SPARC_REGISTER\fR
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIformat\fR[,\fIformat\fR ... ]\fR
+.ad
+.RS 27n
+.rt
+Prints only the specified symbol information. The valid \fIformat\fR argument
+strings are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBndx\fR\fR
+.ad
+.RS 9n
+.rt
+symbol table index
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBval\fR\fR
+.ad
+.RS 9n
+.rt
+symbol value
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsize\fR\fR
+.ad
+.RS 9n
+.rt
+size in bytes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype\fR\fR
+.ad
+.RS 9n
+.rt
+symbol type
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbind\fR\fR
+.ad
+.RS 9n
+.rt
+binding
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoth\fR\fR
+.ad
+.RS 9n
+.rt
+other
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshndx\fR\fR
+.ad
+.RS 9n
+.rt
+section index
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBname\fR\fR
+.ad
+.RS 9n
+.rt
+symbol name
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBctype\fR\fR
+.ad
+.RS 9n
+.rt
+C type for symbol (if known)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBobj\fR\fR
+.ad
+.RS 9n
+.rt
+object which defines symbol
+.RE
+
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIvalue\fR \fB::nmadd\fR [ \fB-fo\fR ] [ \fB-e\fR \fIend\fR ] [ \fB-s\fR
+\fIsize\fR ] \fIname \fR\fR
+.ad
+.sp .6
+.RS 4n
+Add the specified symbol \fIname\fR to the private symbol table. \fBmdb\fR
+provides a private, configurable symbol table that can be used to interpose on
+the target's symbol table, as described under \fBSymbol Name Resolution\fR
+above. The \fB::nmadd\fR dcmd also recognizes the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the size of the symbol to \fIend\fR - \fIvalue\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the type of the symbol to \fBSTT_FUNC\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the type of the symbol to \fBSTT_OBJECT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the size of the symbol to \fIsize\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::nmdel\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Delete the specified symbol \fIname\fR from the private symbol table.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::objects\fR [ \fB-v\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Print a map of the target's virtual address space, showing only those mappings
+that correspond to the primary mapping (usually the text section) of each of
+the known load objects. The \fB-v\fR option displays the version of each load
+object. Version information is not available for all load objects. Load objects
+without version information is listed as having a version of "\fBUnknown\fR" in
+the output for the \fB-v\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::offsetof\fR \fItype member\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the offset of the specified \fImember\fR of the specified \fItype\fR. The
+\fItype\fR should be the name of a C structure. The offset is printed in bytes,
+unless the member is a bit-field, in which case the offset can be printed in
+bits. The output is always suffixed with the appropriate units for clarity. The
+type name can use the backquote (\fB`\fR) scoping operator described under
+\fBSymbol Name Resolution\fR, above. The \fB::offsetof\fR dcmd can only be used
+with objects that contain symbolic debugging information designed for use with
+\fBmdb\fR. Refer to NOTES, \fBSymbolic Debugging Information\fR, below for more
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddress\fR \fB::print\fR [ \fB-aCdiLptx\fR ] [ \fB-c\fR \fIlim\fR ]\fR
+.ad
+.br
+.na
+\fB#sp;#sp;[ \fB-l\fR \fIlim\fR ] [ \fItype\fR [ \fImember\fR ... ] ]\fR
+.ad
+.sp .6
+.RS 4n
+Print the data structure at the specified virtual \fIaddress\fR using the given
+\fItype\fR information. The \fItype\fR parameter can name a C struct, union,
+enum, fundamental integer type, or a pointer to any of these types. If the type
+name contains whitespace (for example, "\fBstruct foo\fR"), it must be enclosed
+in single or double quotes. The type name can use the backquote (\fB`\fR)
+scoping operator described under \fBSymbol Name Resolution\fR, above. If the
+type is a structured type, the \fB::print\fR dcmd recursively prints each
+member of the struct or union. If the \fItype\fR argument is not present and a
+static or global \fISTT_OBJECT\fR symbol matches the address, \fB::print\fR
+infers the appropriate type automatically. If the \fItype\fR argument is
+specified, it can be followed by an optional list of \fImember\fR expressions,
+in which case only those members and submembers of the specified \fItype\fR are
+displayed. If \fItype\fR contains other structured types, each member string
+can refer to a sub-structure element by forming a list of member names
+separated by period ('\fB\&.\fR') delimiters. The \fB::print\fR dcmd can only
+be used with objects that contain symbolic debugging information designed for
+use with \fBmdb\fR. Refer to NOTES, \fBSymbolic Debugging Information\fR, below
+for more information. After displaying the data structure, \fB::print\fR
+increments dot by the size of \fItype\fR in bytes.
+.sp
+If the \fB-a\fR option is present, the address of each member is displayed. If
+the \fB-p\fR option is present, \fB::print\fR interprets \fIaddress\fR as a
+physical memory address instead of a virtual memory address. If the \fB-t\fR
+option is present, the type of each member is displayed. If the \fB-d\fR or
+\fB-x\fR options are present, all integers are displayed in decimal (\fB-d\fR)
+or hexadecimal (\fB-x\fR). By default, a heuristic is used to determine if the
+value should be displayed in decimal or hexadecimal. The number of characters
+in a character array that is read and displayed as a string can be limited with
+the \fB-c\fR option. If the \fB-C\fR option is present, no limit is enforced.
+The number of elements in a standard array that is read and displayed can be
+limited with the \fB-l\fR option. If the \fB-L\fR option is present, no limit
+is enforced and all array elements are shown. The default values for \fB-c\fR
+and \fB-l\fR can be modified using \fB::set\fR or the \fB-o\fR command-line
+option as described under OPTIONS.
+.sp
+If the \fB-i\fR option is specified, the address value is interpreted as an
+immediate value to be printed. You must give a type with which to interpret the
+value. If the type is smaller than 64 bits, the immediate value is interpreted
+as if it were the size of the type. The \fB-i\fR option cannot be used in
+conjunction with the \fB-p\fR option. If the \fB-a\fR option is given, the
+addresses shown are byte offsets starting at zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::quit\fR\fR
+.ad
+.br
+.na
+\fB\fB$q\fR\fR
+.ad
+.sp .6
+.RS 4n
+Quit the debugger.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIthread\fR ] \fB::regs\fR\fR
+.ad
+.br
+.na
+\fB[ \fIthread\fR ] \fB$r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the general purpose register set of the representative thread. If a
+thread is specified, the general purpose register set of that thread is
+displayed. The thread expression should be one of the thread identifiers
+described under \fBThread Support\fR, above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::release\fR [ \fB-a\fR ]\fR
+.ad
+.br
+.na
+\fB\fB:R\fR [ \fB-a\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Release the previously attached process or core file. If the \fB-a\fR option is
+present, the process is released and left stopped and abandoned. It can
+subsequently be continued by \fBprun\fR(1) (see \fBproc\fR(1)) or it can be
+resumed by applying \fBmdb\fR or another debugger. By default, a released
+process is forcibly terminated if it was created by \fBmdb\fR using
+\fB::run\fR, or it is released and set running if it was attached to by
+\fBmdb\fR using the \fB-p\fR option or using the \fB::attach\fR or \fB:A\fR
+dcmds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::run\fR [ \fIargs\fR . . . ]\fR
+.ad
+.br
+.na
+\fB\fB:r\fR [ \fIargs\fR . . . ]\fR
+.ad
+.sp .6
+.RS 4n
+Start a new target program running with the specified arguments and attach to
+it. The arguments are not interpreted by the shell. If the debugger is already
+examining a live running program, it first detaches from this program as if by
+\fB::release\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::set\fR [ \fB-wF\fR ] [ \fB-/\fR\fB-o\fR \fIoption\fR ] [ \fB-s\fR
+\fIdistance\fR ] [ \fB-I\fR \fIpath\fR ]\fR
+.ad
+.br
+.na
+\fB#sp;#sp;[ \fB-L\fR \fIpath\fR ] [ \fB-P\fR \fIprompt\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Get or set miscellaneous debugger properties. If no options are specified, the
+current set of debugger properties is displayed. The \fB::set\fR dcmd
+recognizes the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Forcibly takes over the next user process that \fB::attach\fR is applied to, as
+if \fBmdb\fR had been executed with the \fB-F\fR option on the command line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the default path for locating macro files. The path argument can contain
+any of the special tokens described for the \fB-I\fR command-line option under
+OPTIONS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the default path for locating debugger modules. The path argument can
+contain any of the special tokens described for the \fB-I\fR command-line
+option under OPTIONS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Enables the specified debugger option. If the \fB-o\fR form is used, the option
+is disabled. The option strings are described along with the \fB-o\fR
+command-line option under OPTIONS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the command prompt to the specified prompt string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Sets the symbol matching distance to the specified distance. Refer to the
+description of the \fB-s\fR command-line option under OPTIONS for more
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 6n
+.rt
+Re-opens the target for writing, as if \fBmdb\fR had been executed with the
+\fB-w\fR option on the command line.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::showrev\fR [ \fB-pv\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Display revision information for the hardware and software. With no options
+specified, general system information is displayed. The \fB-v\fR option
+displays version information for all load objects, whereas the \fB-p\fR option
+displays the version information only for the load objects that have been
+installed on the system as part of a patch. Version information is not
+available for all load objects. Load objects without version information is
+omitted from the output for the \fB-p\fR option and is listed as having a
+version of "\fBUnknown\fR" in the output for the \fB-v\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIsignal\fR] \fB::sigbp\fR [\fB-/\fR\fB-dDestT\fR] [\fB-c\fR \fIcmd\fR]
+[\fB-n\fR \fIcount\fR] \fISIG\fR ...\fR
+.ad
+.br
+.na
+\fB[\fIsignal\fR] \fB:t\fR [\fB-/\fR\fB-dDestT\fR] [\fB-c\fR \fIcmd\fR]
+[\fB-n\fR \fIcount\fR] \fISIG\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+Trace delivery of the specified signals. The signals are identified using an
+optional signal number preceding the dcmd, or a list of signal names or numbers
+(see \fBsignal.h\fR(3HEAD)) following the dcmd. The \fB-d\fR, \fB-D\fR,
+\fB-e\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR, \fB-c\fR, and \fB-n\fR options have the
+same meaning as they do for the \fB::evset\fR dcmd. Initially, the set of
+signals that cause the process to dump core by default (see
+\fBsignal.h\fR(3HEAD)) and \fBSIGINT\fR are traced.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::sizeof\fR \fItype\fR \fR
+.ad
+.sp .6
+.RS 4n
+Print the size of the specified \fItype\fR in bytes. The \fItype\fR parameter
+can name a C struct, union, enum, fundamental integer type, or a pointer to any
+of these types. The type name can use the backquote (\fB`\fR) scoping operator
+described under \fBSymbol Name Resolution\fR, above. The \fB::sizeof\fR dcmd
+can only be used with objects that contain symbolic debugging information
+designed for use with \fBmdb\fR. Refer to NOTES, \fBSymbolic Debugging
+Information\fR, below for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::stack \fR [ \fIcount\fR ]\fR
+.ad
+.br
+.na
+\fB[ \fI address\fR ] \fB$c\fR [ \fIcount\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Print a C stack backtrace. If the dcmd is preceded by an explicit
+\fIaddress\fR, a backtrace beginning at this virtual memory address is
+displayed. Otherwise the stack of the representative thread is displayed. If an
+optional count value is given as an argument, no more than \fIcount\fR
+arguments are displayed for each stack frame in the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::status\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print a summary of information related to the current target.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::step\fR [ \fBover\fR | \fBout\fR ] [ \fISIG\fR ]\fR
+.ad
+.br
+.na
+\fB\fB:s\fR [ \fISIG\fR ]\fR
+.ad
+.br
+.na
+\fB\fB:u\fR [ \fISIG\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Step the target program one instruction. If an optional signal name or number
+(see \fBsignal.h\fR(3HEAD)) is specified as an argument, the signal is
+immediately delivered to the target as part of resuming its execution. If the
+optional "\fBover\fR" argument is specified, \fB::step\fR steps over subroutine
+calls. The \fB::step\fR \fBover\fR argument is the same as the \fB::next\fR
+dcmd. If the optional "\fBout\fR" argument is specified, the target program
+continues until the representative thread returns from the current function. If
+no target program is currently running, \fB::step\fR \fBout\fR starts a new
+program running as if by \fB::run\fR and stop at the first instruction. The
+\fB:s\fR dcmd is the same as \fB::step\fR. The \fB:u\fR dcmd is the same as
+\fB::step\fR \fBout\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIsyscall\fR ] \fB::sysbp\fR [ \fB-/\fR\fB-dDestT\fR ] [ \fB-io\fR ] [
+\fB-c\fR \fIcmd\fR ]\fR
+.ad
+.br
+.na
+\fB#sp;#sp;[ \fB-n\fR \fIcount\fR ] \fIsyscall\fR...\fR
+.ad
+.sp .6
+.RS 4n
+Trace entry to or exit from the specified system calls. The system calls are
+identified using an optional system call number preceding the dcmd, or a list
+of system call names or numbers (see \fB<sys/syscall.h>\fR) following the dcmd.
+If the \fB-i\fR option is specified (the default), the event specifiers trigger
+on entry into the kernel for each system call. If the \fB-o\fR option is
+specified, the event specifiers trigger on exit out from the kernel. The
+\fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR, \fB-c\fR, and
+\fB-n\fR options have the same meaning as they do for the \fB::evset\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIthread\fR \fB::tls\fR \fIsymbol\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the address of the storage for the specified thread-local storage
+(\fBTLS\fR) symbol in the context of the specified thread. The thread
+expression should be one of the thread identifiers described under \fBThread
+Support\fR, above. The symbol name can use any of the scoping operators
+described under \fBSymbol Name Resolution\fR, above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::typeset\fR [ \fB-/\fR\fB-t\fR] \fIvariable-name\fR . . .\fR
+.ad
+.sp .6
+.RS 4n
+Set attributes for named variables. If one or more variable names are
+specified, they are defined and set to the value of dot. If the \fB-t\fR option
+is present, the user-defined tag associated with each variable is set. If the
+\fB-t\fR option is present, the tag is cleared. If no variable names are
+specified, the list of variables and their values is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::unload\fR \fImodule-name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Unload the specified dmod. The list of active dmods can be printed using the
+\fB::dmods\fR dcmd. Built-in modules can not be unloaded. Modules that are busy
+(that is, provide dcmds that are currently executing) can not be unloaded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::unset\fR \fIvariable-name\fR . . .\fR
+.ad
+.sp .6
+.RS 4n
+Unset (remove) the specified variable(s) from the list of defined variables.
+Some variables exported by \fBmdb\fR are marked as persistent, and can not be
+unset by the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::vars\fR [ \fB-npt\fR] \fR
+.ad
+.sp .6
+.RS 4n
+Print a listing of named variables. If the \fB-n\fR option is present, the
+output is restricted to variables that currently have non-zero values. If the
+\fB-p\fR option is present, the variables are printed in a form suitable for
+re-processing by the debugger using the \fB$<\fR dcmd. This option can be used
+to record the variables to a macro file and then restore these values later. If
+the \fB-t\fR option is present, only the tagged variables are printed.
+Variables can be tagged using the \fB-t\fR option of the \fB::typeset\fR dcmd.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::version\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the debugger version number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddress\fR \fB::vtop\fR [\fB-a\fR \fIas\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Print the physical address mapping for the specified virtual address, if
+possible. The \fB::vtop\fR dcmd is only available when examining a kernel
+target, or when examining a user process inside a kernel crash dump (after a
+\fB::context\fR dcmd has been issued).
+.sp
+When examining a kernel target from the kernel context, the \fB-a\fR option can
+be used to specify the address (\fIas\fR) of an alternate address space
+structure that should be used for the virtual to physical translation. By
+default, the kernel's address space is used for translation. This option is
+available for active address spaces even when the dump content only contains
+kernel pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[ \fIaddress\fR ] \fB::walk\fR \fIwalker-name\fR [ \fIvariable-name\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Walk through the elements of a data structure using the specified walker. The
+available walkers can be listed using the \fB::walkers\fR dcmd. Some walkers
+operate on a global data structure and do not require a starting address. For
+example, walk the list of proc structures in the kernel. Other walkers operate
+on a specific data structure whose address must be specified explicitly. For
+example, given a pointer to an address space, walk the list of segments. When
+used interactively, the \fB::walk\fR dcmd prints the address of each element of
+the data structure in the default base. The dcmd can also be used to provide a
+list of addresses for a pipeline. The walker name can use the backquote
+(\fB`\fR) scoping operator described under \fBdcmd and Walker Name
+Resolution\fR, above. If the optional \fIvariable-name\fR is specified, the
+specified variable is assigned the value returned at each step of the walk when
+\fBmdb\fR invokes the next stage of the pipeline.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::walkers\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the available walkers and print a brief description for each one.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::whence\fR [ \fB-v\fR ] \fIname\fR . . .\fR
+.ad
+.br
+.na
+\fB\fB::which\fR [ \fB-v\fR ] \fIname\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+Print the dmod that exports the specified dcmds and walkers. These dcmds can be
+used to determine which dmod is currently providing the global definition of
+the given dcmd or walker. Refer to the section on \fBdcmd and Walker Name
+Resolution\fR above for more information on global name resolution. The
+\fB-v\fR option causes the dcmd to print the alternate definitions of each dcmd
+and walker in order of precedence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddr\fR [ ,\fIlen\fR ]\fB::wp\fR [ \fB-/\fR\fB-dDestT\fR ] [ \fB-rwx\fR
+] [ \fB-c\fR \fIcmd\fR ]\fR
+.ad
+.br
+.na
+\fB#sp;#sp; [ \fB-n\fR \fIcount\fR ]\fR
+.ad
+.br
+.na
+\fB\fIaddr\fR [ ,\fIlen\fR ] \fB:a\fR [ \fIcmd\fR . . . ]\fR
+.ad
+.br
+.na
+\fB\fIaddr\fR [ ,\fIlen\fR ] \fB:p\fR [ \fIcmd\fR . \&. . ]\fR
+.ad
+.br
+.na
+\fB\fIaddr\fR [ ,\fIlen\fR ] \fB:w\fR [ \fIcmd\fR . . . ]\fR
+.ad
+.sp .6
+.RS 4n
+Set a watchpoint at the specified address. The length in bytes of the watched
+region can be set by specifying an optional repeat count preceding the dcmd. If
+no length is explicitly set, the default is one byte. The \fB::wp\fR dcmd
+allows the watchpoint to be configured to trigger on any combination of read
+(\fB-r\fR option), write (\fB-w\fR option), or execute (\fB-x\fR option)
+access. The \fB-d\fR, \fB-D\fR, \fB-e\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR,
+\fB-c\fR, and \fB-n\fR options have the same meaning as they do for the
+\fB::evset\fR dcmd. The \fB:a\fR dcmd sets a read access watchpoint at the
+specified address. The \fB:p\fR dcmd sets an execute access watchpoint at the
+specified address. The \fB:w\fR dcmd sets a write access watchpoint at the
+specified address. The arguments following the \fB:a\fR, \fB:p\fR, and \fB:w\fR
+dcmds are concatenated together to form the callback string. If this string
+contains meta-characters, it must be quoted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB::xdata\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the external data buffers exported by the current target. External data
+buffers represent information associated with the target that can not be
+accessed through standard target facilities (that is, an address space, symbol
+table, or register set). These buffers can be consumed by dcmds; for more
+information, refer to the \fISolaris Modular Debugger Guide\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:z\fR\fR
+.ad
+.sp .6
+.RS 4n
+Delete all event specifiers from the list of traced software events. Event
+specifiers can also be deleted using \fB::delete\fR.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 15n
+.rt
+Disables automatic loading of \fBmdb\fR modules. By default, \fBmdb\fR attempts
+to load debugger modules corresponding to the active shared libraries in a user
+process or core file, or to the loaded kernel modules in the live operating
+system or an operating system crash dump.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Forces raw file debugging mode. By default, \fBmdb\fR attempts to infer whether
+the object and core file operands refer to a user executable and core dump or
+to a pair of operating system crash dump files. If the file type cannot be
+inferred, the debugger defaults to examining the files as plain binary data.
+The \fB-f\fR option forces \fBmdb\fR to interpret the arguments as a set of raw
+files to examine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 15n
+.rt
+Forcibly takes over the specified user process, if necessary. By default,
+\fBmdb\fR refuses to attach to a user process that is already under the control
+of another debugging tool, such as \fBtruss\fR(1). With the \fB-F\fR option,
+\fBmdb\fR attaches to these processes anyway. This can produce unexpected
+interactions between \fBmdb\fR and the other tools attempting to control the
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIpath\fR\fR
+.ad
+.RS 15n
+.rt
+Sets default path for locating macro files. Macro files are read using the
+\fB$<\fR or \fB$<<\fR dcmds. The path is a sequence of directory names
+delimited by colon (\fB:\fR) characters. The \fB-I\fR \fBinclude\fR path and
+\fB-L\fR \fBlibrary\fR path (see below) can also contain any of the following
+tokens:
+.sp
+.ne 2
+.mk
+.na
+\fB%i\fR
+.ad
+.RS 6n
+.rt
+Expands to the current instruction set architecture (\fBISA\fR) name
+('sparc', 'sparcv9', or 'i386').
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%o\fR
+.ad
+.RS 6n
+.rt
+Expands to the old value of the path being modified. This is useful for
+appending or prepending directories to an existing path.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%p\fR
+.ad
+.RS 6n
+.rt
+Expands to the current platform string (either \fBuname\fR \fB-i\fR or the
+platform string stored in the process core file or crash dump).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%r\fR
+.ad
+.RS 6n
+.rt
+Expands to the pathname of the root directory. An alternate root directory can
+be specified using the \fB-R\fR option. If no \fB-R\fR option is present, the
+root directory is derived dynamically from the path to the \fBmdb\fR executable
+itself. For example, if \fB/bin/mdb\fR is executed, the root directory is
+\fB/\fR. If \fB/net/hostname/bin/mdb\fR were executed, the root directory would
+be derived as \fB/net/hostname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%t\fR
+.ad
+.RS 6n
+.rt
+Expands to the name of the current target. This is either be the literal
+string '\fBproc\fR' (a user process or user process core file), '\fBkvm\fR' (a kernel
+crash dump or the live operating system), or '\fBraw\fR' (a raw file).
+.RE
+
+The default include path for 32-bit \fBmdb\fR is:
+.sp
+.in +2
+.nf
+%r/usr/platform/%p/lib/adb:%r/usr/lib/adb
+.fi
+.in -2
+.sp
+
+The default include path for 64-bit \fBmdb\fR is:
+.sp
+.in +2
+.nf
+%r/usr/platform/%p/lib/adb/%i:%r/usr/lib/adb/%i
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 15n
+.rt
+Forces kernel debugging mode. By default, \fBmdb\fR attempts to infer whether
+the object and core file operands refer to a user executable and core dump, or
+to a pair of operating system crash dump files. The \fB-k\fR option forces
+\fBmdb\fR to assume these files are operating system crash dump files. If no
+object or core operand is specified, but the \fB-k\fR option is specified,
+\fBmdb\fR defaults to an object file of \fB/dev/ksyms\fR and a core file of
+\fB/dev/kmem\fR. Read access to \fB/dev/kmem\fR is restricted to group sys.
+Write access requires ALL privileges.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR\fR
+.ad
+.RS 15n
+.rt
+Load \fBkmdb\fR, stop the live running operating system kernel, and proceed to
+the \fBkmdb\fR debugger prompt. This option should only be used on the system
+console, as the subsequent \fBkmdb\fR prompt appears on the system console.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fIpath\fR\fR
+.ad
+.RS 15n
+.rt
+Sets default path for locating debugger modules. Modules are loaded
+automatically on startup or using the \fB::load\fR dcmd. The path is a sequence
+of directory names delimited by colon (\fB:\fR) characters. The \fB-L\fR
+library path can also contain any of the tokens shown for \fB-I\fR above.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 15n
+.rt
+Disables demand-loading of kernel module symbols. By default, \fBmdb\fR
+processes the list of loaded kernel modules and performs demand loading of
+per-module symbol tables. If the \fB-m\fR option is specified, \fBmdb\fR does
+not attempt to process the kernel module list or provide per-module symbol
+tables. As a result, \fBmdb\fR modules corresponding to active kernel modules
+are not loaded on startup.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.RS 15n
+.rt
+Preloads all kernel module symbols. By default, \fBmdb\fR performs
+demand-loading for kernel module symbols: the complete symbol table for a
+module is read when an address is that module's text or data section is
+referenced. With the \fB-M\fR option, \fBmdb\fR loads the complete symbol table
+of all kernel modules during startup.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR\fR
+.ad
+.RS 15n
+.rt
+Enables the specified debugger option. If the \fB-o\fR form of the option is
+used, the specified \fIoption\fR is disabled. Unless noted below, each option
+is off by default. \fBmdb\fR recognizes the following \fIoption\fR arguments:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBadb\fR\fR
+.ad
+.RS 25n
+.rt
+Enables stricter \fBadb\fR(1) compatibility. The prompt is set to the empty
+string and many \fBmdb\fR features, such as the output pager, is disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBarray_mem_limit=\fR\fIlimit\fR\fR
+.ad
+.RS 25n
+.rt
+Sets the default limit on the number of array members that \fB::print\fR
+displays. If \fIlimit\fR is the special token \fBnone\fR, all array members are
+displayed by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBarray_str_limit=\fR\fIlimit\fR\fR
+.ad
+.RS 25n
+.rt
+Sets the default limit on the number of characters that \fB::print\fR attempts
+to display as an ASCII string when printing a char array. If \fIlimit\fR is the
+special token \fBnone\fR, the entire char array is displayed as a string by
+default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfollow_exec_mode=\fR\fImode\fR\fR
+.ad
+.RS 25n
+.rt
+Sets the debugger behavior for following an \fBexec\fR(2) system call. The
+\fImode\fR should be one of the following named constants:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBask\fR\fR
+.ad
+.RS 10n
+.rt
+If stdout is a terminal device, the debugger stops after the \fBexec\fR(2)
+system call has returned and then prompts the user to decide whether to follow
+the exec or stop. If stdout is not a terminal device, the \fBask\fR mode
+defaults to \fBstop\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfollow\fR\fR
+.ad
+.RS 10n
+.rt
+The debugger follows the exec by automatically continuing the target process
+and resetting all of its mappings and symbol tables based on the new
+executable. The \fBfollow\fR behavior is discussed in more detail under NOTES,
+\fBInteraction with Exec\fR, below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR\fR
+.ad
+.RS 10n
+.rt
+The debugger stops following return from the exec system call. The \fBstop\fR
+behavior is discussed in more detail under NOTES, \fBInteraction with Exec\fR,
+below.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfollow_fork_mode=\fR\fImode\fR\fR
+.ad
+.RS 25n
+.rt
+Sets the debugger behavior for following a \fBfork\fR(2), \fBfork1\fR(2), or
+\fBvfork\fR(2) system call. The \fImode\fR should be one of the following named
+constants:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBask\fR\fR
+.ad
+.RS 10n
+.rt
+If stdout is a terminal device, the debugger stops after the \fBfork\fR(2)
+system call has returned and then prompts the user to decide whether to follow
+the parent or child. If stdout is not a terminal device, the \fBask\fR mode
+defaults to \fBparent\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparent\fR\fR
+.ad
+.RS 10n
+.rt
+The debugger follows the parent process, and detaches from the child process
+and sets it running.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchild\fR\fR
+.ad
+.RS 10n
+.rt
+The debugger follows the child process, and detaches from the parent process
+and sets it running.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignoreeof\fR\fR
+.ad
+.RS 25n
+.rt
+The debugger does not exit when an \fBEOF\fR sequence (\fB^D\fR) is entered at
+the terminal. The \fB::quit\fR dcmd must be used to quit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnostop\fR\fR
+.ad
+.RS 25n
+.rt
+Does not stop a user process when attaching to it when the \fB-p\fR option is
+specified or when the \fB::attach\fR or \fB:A\fR dcmds are applied. The
+\fBnostop\fR behavior is described in more detail under NOTES, \fBProcess
+Attach and Release\fR, below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpager\fR\fR
+.ad
+.RS 25n
+.rt
+Enables the output pager (default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrepeatlast\fR\fR
+.ad
+.RS 25n
+.rt
+If a \fINEWLINE\fR is entered as the complete command at the terminal,
+\fBmdb\fR repeats the previous command with the current value of dot. This
+option is implied by \fB-o\fR \fBadb\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshowlmid\fR\fR
+.ad
+.RS 25n
+.rt
+\fBmdb\fR provides support for symbol naming and identification in user
+applications that make use of link maps other than \fILM_ID_BASE\fR and
+\fILM_ID_LDSO\fR, as described in \fBSymbol Name Resolution\fR, above. Symbols
+on link maps other than \fILM_ID_BASE\fR or \fILM_ID_LDSO\fR is shown as
+\fBLMlmid`library`symbol\fR, where \fBlmid\fR is the link-map \fBID\fR in the
+default output radix (16). The user can optionally configure \fBmdb\fR to show
+the link-map \fBID\fR scope of all symbols and objects, including those
+associated with \fILM_ID_BASE\fR and \fILM_ID_LDSO\fR, by enabling the
+\fBshowlmid\fR option. Built-in dcmds that deal with object file names displays
+link-map \fBID\fRs according to the value of \fBshowlmid\fR above, including
+\fB::nm\fR, \fB::mappings\fR, \fB$m\fR, and \fB::objects\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpid\fR\fR
+.ad
+.RS 15n
+.rt
+Attaches to and stops the specified process-id. \fBmdb\fR uses the
+\fB/proc/\fIpid\fR/object/a.out\fR file as the executable file pathname.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIprompt\fR\fR
+.ad
+.RS 15n
+.rt
+Sets the command prompt. The default prompt is '\fB>\fR '.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIroot\fR\fR
+.ad
+.RS 15n
+.rt
+Sets root directory for pathname expansion. By default, the root directory is
+derived from the pathname of the \fBmdb\fR executable itself. The root
+directory is substituted in place of the \fB%r\fR token during pathname
+expansion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIdistance\fR\fR
+.ad
+.RS 15n
+.rt
+Sets the symbol matching distance for address-to-symbol-name conversions to the
+specified \fIdistance\fR. By default, \fBmdb\fR sets the distance to zero,
+which enables a smart-matching mode. Each \fBELF\fR symbol table entry includes
+a value V and size S, representing the size of the function or data object in
+bytes. In smart mode, \fBmdb\fR matches an address A with the given symbol if A
+is in the range [ V, V + S ). If any non-zero distance is specified, the same
+algorithm is used, but S in the expression above is always the specified
+absolute distance and the symbol size is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 15n
+.rt
+Suppresses processing of the user's \fB~/.mdbrc\fR file. By default, \fBmdb\fR
+reads and processes the macro file \fB\&.mdbrc\fR if one is present in the
+user's home directory, as defined by $\fBHOME\fR. If the \fB-S\fR option is
+present, this file is not read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 15n
+.rt
+Forces user debugging mode. By default, \fBmdb\fR attempts to infer whether the
+object and core file operands refer to a user executable and core dump, or to a
+pair of operating system crash dump files. The \fB-u\fR option forces \fBmdb\fR
+to assume these files are not operating system crash dump files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.RS 15n
+.rt
+Unload \fBkmdb\fR if it is loaded. You should unload \fBkmdb\fR when it is not
+in use to release the memory used by the kernel debugger back to the free
+memory available to the operating system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR \fIversion\fR\fR
+.ad
+.RS 15n
+.rt
+Sets disassembler version. By default, \fBmdb\fR attempts to infer the
+appropriate disassembler version for the debug target. The disassembler can be
+set explicitly using the \fB-V\fR option. The \fB::disasms\fR dcmd lists the
+available disassembler versions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 15n
+.rt
+Opens the specified object and core files for writing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-W\fR\fR
+.ad
+.RS 15n
+.rt
+Permit access to memory addresses that are mapped to I/O devices. By default,
+\fBmdb\fR does not allow such access because many devices do not provide
+hardware protection against invalid software manipulations. Use this option
+only when debugging device drivers and with caution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 15n
+.rt
+Sends explicit terminal initialization sequences for tty mode. Some terminals,
+such as \fBcmdtool\fR(1), require explicit initialization sequences to switch
+into a tty mode. Without this initialization sequence, terminal features such
+as standout mode can not be available to \fBmdb\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIobject\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies an \fBELF\fR format object file to examine. \fBmdb\fR provides the
+ability to examine and edit \fBELF\fR format executables (\fBET_EXEC\fR),
+\fBELF\fR dynamic library files (\fBET_DYN\fR), \fBELF\fR relocatable object
+files (\fBET_REL\fR), and operating system unix.X symbol table files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcore\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies an \fBELF\fR process core file (\fBET_CORE\fR), or an operating
+system crash dump vmcore.X file. If an \fBELF\fR core file operand is provided
+without a corresponding object file, \fBmdb\fR attempts to infer the name of
+the executable file that produced the core using several different algorithms.
+If no executable is found, \fBmdb\fR still executes, but some symbol
+information can be unavailable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsuffix\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies the numerical suffix representing a pair of operating system crash
+dump files. For example, if the suffix is '\fB3\fR', \fBmdb\fR infers that it
+should examine the files '\fBunix.3\fR' and '\fBvmcore.3\fR'. The string of
+digits are not interpreted as a suffix if an actual file of the same name is
+present in the current directory.
+.RE
+
+.SH USAGE
+.sp
+.LP
+\fBmdb\fR processes all input files (including scripts, object files, core
+files, and raw data files) in a large file aware fashion. See
+\fBlargefile\fR(5) for more information about the processing of large files,
+which are files greater than or equal to 2 Gbytes (2^31 bytes).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Debugger completed execution successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+A fatal error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTSIZE\fR\fR
+.ad
+.RS 12n
+.rt
+This variable is used to determine the maximum length of the command history
+list. If this variable is not present, the default length is \fB128\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.RS 12n
+.rt
+This variable is used to determine the pathname of the user's home directory,
+where a \fB\&.mdbrc\fR file can reside. If this variable is not present, no
+\fB\&.mdbrc\fR processing occurs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 12n
+.rt
+This variable is used to determine the pathname of the shell used to process
+shell escapes requested using the \fB!\fR meta-character. If this variable is
+not present, \fB/bin/sh\fR is used.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.mdbrc\fR\fR
+.ad
+.sp .6
+.RS 4n
+User \fBmdb\fR initialization file. The \fB\&.mdbrc\fR file, if present, is
+processed after the debug target has been initialized, but before module
+auto-loading is performed or any commands have been read from standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/kmem\fR\fR
+.ad
+.sp .6
+.RS 4n
+Kernel virtual memory image device. This device special file is used as the
+core file when examining the live operating system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/ksyms\fR\fR
+.ad
+.sp .6
+.RS 4n
+Kernel symbol table device. This device special file is used as the object file
+when examining the live operating system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/\fIpid\fR/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+Process information files that are read when examining and controlling user
+processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/adb\fR\fR
+.ad
+.br
+.na
+\fB\fB/usr/platform/\fIplatform-name\fR/lib/adb\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default directories for macro files that are read with the \fB$<\fR and
+\fB$<<\fR dcmds. \fIplatform-name\fR is the name of the platform, derived
+either from information in a core file or crash dump, or from the current
+machine as if by \fBuname\fR \fB-i\fR (see \fBuname\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/mdb\fR\fR
+.ad
+.br
+.na
+\fB\fB/usr/platform/\fIplatform-name\fR/lib/mdb\fR\fR
+.ad
+.sp .6
+.RS 4n
+Default directories for debugger modules that are loaded using the \fB::load\fR
+dcmd. \fIplatform-name\fR is the name of the platform, derived either from
+information in a core file or crash dump, or from the current machine as if by
+\fBuname\fR \fB-i\fR (see \fBuname\fR(1)).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBadb\fR(1), \fBcmdtool\fR(1), \fBgcore\fR(1), \fBproc\fR(1), \fBpgrep\fR(1),
+\fBps\fR(1), \fBstty\fR(1), \fBtruss\fR(1), \fBuname\fR(1), \fBcoreadm\fR(1M),
+\fBdumpadm\fR(1M), \fBlargefile\fR(5), \fBsavecore\fR(1M), \fBexec\fR(2),
+\fBfork\fR(2), \fB_lwp_self\fR(2), \fBpipe\fR(2), \fBvfork\fR(2),
+\fBdlopen\fR(3C), \fBelf\fR(3ELF), \fBlibc_db\fR(3LIB), \fBlibkvm\fR(3LIB),
+\fBlibthread\fR(3LIB), \fBsignal\fR(3C), \fBsignal.h\fR(3HEAD),
+\fBthr_self\fR(3C), \fBcore\fR(4), \fBproc\fR(4), \fBattributes\fR(5),
+\fBlargefile\fR(5), \fBthreads\fR(5), \fBksyms\fR(7D), \fBmem\fR(7D)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.sp
+.LP
+\fISolaris Modular Debugger Guide\fR
+.SH WARNINGS
+.SS "Use of the Error Recovery Mechanism"
+.sp
+.LP
+The debugger and its dmods execute in the same address space, and thus it is
+quite possible that a buggy dmod can cause \fBmdb\fR to dump core or otherwise
+misbehave. The \fBmdb\fR resume capability, described above under \fBSignal
+Handling\fR, provides a limited recovery mechanism for these situations.
+However, it is not possible for \fBmdb\fR to know definitively whether the dmod
+in question has corrupted only its own state, or the debugger's global state.
+Therefore a resume operation cannot be guaranteed to be safe, or to prevent a
+subsequent crash of the debugger. The safest course of action following a
+resume is to save any important debug information, and then quit and restart
+the debugger.
+.SS "Use of the Debugger to Modify the Live Operating System"
+.sp
+.LP
+The use of the debugger to modify (that is, write to) the address space of live
+running operating system is extremely dangerous, and can result in a system
+panic in the event the user damages a kernel data structure.
+.SH NOTES
+.SS "Limitations on Examining Process Core Files"
+.sp
+.LP
+\fBmdb\fR does not provide support for examining process core files that were
+generated by a release of Solaris preceding Solaris 2.6. When debugging core
+files generated by a release of Solaris 9 or an earlier release, symbol
+information might not be available. Since the text section and read-only data
+is not present in those core files, the symbol information might not match the
+data present in the process at the time it dumped core. In releases later than
+Solaris 9, text sections and read-only data are included in core files by
+default. Users can configure their processes to exclude that information from
+core files using \fBcoreadm\fR(1M). Thus, the information presented by
+\fBmdb\fR for those core files can not match the data that was present at the
+time the process dumped core. Core files from Solaris x86 systems can not be
+examined on Solaris SPARC systems, and vice-versa.
+.SS "Limitations on Examining Crash Dump Files"
+.sp
+.LP
+Crash dumps from Solaris 7 and earlier releases can only be examined with the
+aid of the libkvm from the corresponding operating system release. If a crash
+dump from one operating system release is examined using the dmods from a
+different operating system release, changes in the kernel implementation can
+prevent some dcmds or walkers from working properly. \fBmdb\fR issues a warning
+message if it detects this condition. Crash dumps from Solaris x86 systems can
+not be examined on Solaris SPARC systems, and vice-versa.
+.SS "Relationship Between 32-bit and 64-bit Debugger"
+.sp
+.LP
+\fBmdb\fR provides support for debugging both 32-bit and 64-bit programs. Once
+it has examined the target and determined its data model, \fBmdb\fR
+automatically re-executes the \fBmdb\fR binary that has the same data model as
+the target, if necessary. This approach simplifies the task of writing debugger
+modules, because the modules that are loaded use the same data model as the
+primary target. Only the 64-bit debugger can be used to debug 64-bit target
+programs. The 64-bit debugger can only be used on a system that is running the
+64-bit operating environment.
+.sp
+.LP
+The debugger can also need to re-execute itself when debugging a 32-bit process
+that execs a 64-bit process, or vice-versa. The handling of this situation is
+discussed in more detail under \fBInteraction with Exec\fR, below.
+.SS "Interaction with Exec"
+.sp
+.LP
+When a controlled process performs a successful \fBexec\fR(2), the behavior of
+the debugger is controlled by the \fB::set\fR \fB-o\fR \fBfollow_exec_mode\fR
+option, as described above. If the debugger and victim process have the same
+data model, then the "\fBstop\fR" and "\fBfollow\fR" modes determine whether
+\fBmdb\fR automatically continues the target or returns to the debugger prompt
+following the exec. If the debugger and victim process have a different data
+model, then the "\fBfollow\fR" behavior causes \fBmdb\fR to automatically
+re-exec the \fBmdb\fR binary with the appropriate data model and to re-attach
+to the process, still stopped on return from the exec. Not all debugger state
+is preserved across this re-exec.
+.sp
+.LP
+If a 32-bit victim process execs a 64-bit program, then "\fBstop\fR" returns to
+the command prompt, but the debugger is no longer able to examine the process
+because it is now using the 64-bit data model. To resume debugging, execute the
+\fB::release\fR \fB-a\fR dcmd, quit \fBmdb\fR, and then execute \fBmdb\fR
+\fB-p\fR \fIpid\fR to re-attach the 64-bit debugger to the process.
+.sp
+.LP
+If a 64-bit victim process execs a 32-bit program, then "\fBstop\fR" returns to
+the command prompt, but the debugger only provides limited capabilities for
+examining the new process. All built-in dcmds work as advertised, but loadable
+dcmds do not since they do not perform data model conversion of structures. The
+user should release and re-attach the debugger to the process as described
+above in order to restore full debugging capabilities.
+.SS "Interaction with Job Control"
+.sp
+.LP
+If the debugger is attached to a process that is stopped by job control (that
+is, it stopped in response to \fBSIGTSTP\fR, \fBSIGTTIN\fR, or \fBSIGTTOU\fR),
+the process can not be able to be set running again when it is continued by a
+continue dcmd. If the victim process is a member of the same session (that is,
+it shares the same controlling terminal as \fBmdb\fR), \fBmdb\fR attempts to
+bring the associated process group to the foreground and to continue the
+process with \fBSIGCONT\fR to resume it from job control stop. When \fBmdb\fR
+is detached from such a process, it restores the process group to the
+background before exiting. If the victim process is not a member of the same
+session, \fBmdb\fR cannot safely bring the process group to the foreground, so
+it continues the process with respect to the debugger, but the process remains
+stopped by job control. \fBmdb\fR prints a warning in this case, and the user
+must issue an "\fBfg\fR" command from the appropriate shell in order to resume
+the process.
+.SS "Process Attach and Release"
+.sp
+.LP
+When \fBmdb\fR attaches to a running process, the process is stopped and
+remains stopped until one of the continue dcmds is applied, or the debugger
+quits. If the \fB-o\fR \fBnostop\fR option is enabled prior to attaching the
+debugger to a process with \fB-p\fR, or prior to issuing an \fB::attach\fR or
+\fB:A\fR command, \fBmdb\fR attaches to the process but does not stop it. While
+the process is still running, it can be inspected as usual (albeit with
+inconsistent results) and breakpoints or other tracing flags might be enabled.
+If the \fB:c\fR or \fB::cont\fR dcmds are executed while the process is
+running, the debugger waits for the process to stop. If no traced software
+events occur, the user can send an interrupt (\fB^C\fR) after \fB:c\fR or
+\fB::cont\fR to force the process to stop and return control to the debugger.
+.sp
+.LP
+\fBmdb\fR releases the current running process (if any) when the \fB:R\fR,
+\fB::release\fR, \fB:r\fR, \fB::run\fR, \fB$q\fR, or \fB::quit\fR dcmds are
+executed, or when the debugger terminates as the result of an \fBEOF\fR or
+signal. If the process was originally created by the debugger using \fB:r\fR or
+\fB::run\fR, it is forcibly terminated as if by \fBSIGKILL\fR when it is
+released. If the process was already running prior to attaching \fBmdb\fR to
+it, it is set running again when it is released. A process can be released and
+left stopped and abandoned using the \fB::release\fR \fB-a\fR option.
+.SS "Symbolic Debugging Information"
+.sp
+.LP
+The \fB::list\fR, \fB::offsetof\fR, \fB::print\fR, and \fB::sizeof\fR dcmds
+require that one or more load objects contain compressed symbolic debugging
+information suitable for use with \fBmdb\fR. This information is currently only
+available for certain Solaris kernel modules.
+.SS "Developer Information"
+.sp
+.LP
+The \fISolaris Modular Debugger Guide\fR provides a more detailed description
+of \fBmdb\fR features, as well as information for debugger module developers.
+.sp
+.LP
+The header file \fB<sys/mdb_modapi.h>\fR contains prototypes for the functions
+in the MDB Module \fBAPI\fR, and the SUNWmdbdm package provides source code for
+an example module in the directory \fB/usr/demo/mdb\fR.
diff --git a/usr/src/man/man1/mesg.1 b/usr/src/man/man1/mesg.1
new file mode 100644
index 0000000000..19aa331791
--- /dev/null
+++ b/usr/src/man/man1/mesg.1
@@ -0,0 +1,143 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mesg 1 "31 Oct 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+mesg \- permit or deny messages
+.SH SYNOPSIS
+.LP
+.nf
+\fBmesg\fR [\fB-n\fR | \fB-y\fR | n | y]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmesg\fR utility will control whether other users are allowed to send
+messages via \fBwrite\fR(1), \fBtalk\fR(1), or other utilities to a terminal
+device. The terminal device affected is determined by searching for the first
+terminal in the sequence of devices associated with standard input, standard
+output, and standard error, respectively. With no arguments, \fBmesg\fR reports
+the current state without changing it. Processes with appropriate privileges
+may be able to send messages to the terminal independent of the current state.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR|\fBn\fR \fR
+.ad
+.RS 9n
+.rt
+Denies permission to other users to send message to the terminal. See
+\fBwrite\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR|\fBy\fR \fR
+.ad
+.RS 9n
+.rt
+Grants permission to other users to send messages to the terminal.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmesg\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+if messages are receivable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+if messages are not receivable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR \fR
+.ad
+.RS 6n
+.rt
+on error.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/tty*\fR \fR
+.ad
+.RS 15n
+.rt
+terminal devices
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/pts/*\fR \fR
+.ad
+.RS 15n
+.rt
+terminal devices
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtalk\fR(1), \fBwrite\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/mkdir.1 b/usr/src/man/man1/mkdir.1
new file mode 100644
index 0000000000..660f6061d7
--- /dev/null
+++ b/usr/src/man/man1/mkdir.1
@@ -0,0 +1,264 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mkdir 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+mkdir \- make directories
+.SH SYNOPSIS
+.SS "/usr/bin/mkdir"
+.LP
+.nf
+\fB/usr/bin/mkdir\fR [\fB-m\fR \fImode\fR] [\fB-p\fR] \fIdir\fR...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBmkdir\fR [\fB-p\fR] [\fB-m\fR \fImode\fR] \fIdir\fR...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/mkdir"
+.sp
+.LP
+The \fBmkdir\fR command creates the named directories in mode \fB777\fR
+(possibly altered by the file mode creation mask \fBumask\fR(1)).
+.sp
+.LP
+Standard entries in a directory (for instance, the files "\fB\&.\fR", for the
+directory itself, and "\fB\&.\|.\fR", for its parent) are made automatically.
+\fBmkdir\fR cannot create these entries by name. Creation of a directory
+requires write permission in the parent directory.
+.sp
+.LP
+The owner-ID and group-ID of the new directories are set to the process's
+effective user-ID and group-ID, respectively. \fBmkdir\fR calls the
+\fBmkdir\fR(2) system call.
+.SS "setgid and mkdir"
+.sp
+.LP
+To change the \fBsetgid\fR bit on a newly created directory, you must use
+\fBchmod\fR \fBg+s\fR or \fBchmod\fR \fBg-s\fR after executing \fBmkdir\fR.
+.sp
+.LP
+The \fBsetgid\fR bit setting is inherited from the parent directory.
+.SS "ksh93"
+.sp
+.LP
+The \fBmkdir\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBmkdir\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/mkdir\fR or
+\fB/usr/bin/mkdir\fR executable. \fBmkdir\fR creates one or more directories.
+By default, the mode of created directories is \fBa=rwx\fR minus the bits set
+in \fBumask\fR(1).
+.SH OPTIONS
+.SS "/usr/bin/mkdir"
+.sp
+.LP
+The following options are supported by \fB/usr/bin/mkdir\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImode\fR\fR
+.ad
+.RS 11n
+.rt
+This option allows users to specify the mode to be used for new directories.
+Choices for modes can be found in \fBchmod\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 11n
+.rt
+With this option, \fBmkdir\fR creates \fIdir\fR by creating all the
+non-existing parent directories first. The mode given to intermediate
+directories is the difference between \fB777\fR and the bits set in the file
+mode creation mask. The difference, however, must be at least \fB300\fR (write
+and execute permission for the user).
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by the \fBmkdir\fR built-in in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImode\fR\fR
+.ad
+.br
+.na
+\fB\fB--mode=\fR\fImode\fR\fR
+.ad
+.RS 15n
+.rt
+Set the mode of created directories to \fImode\fR. \fImode\fR is symbolic or
+octal mode as in \fBchmod\fR(1). Relative modes assume an initial mode of
+\fBa=rwx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.br
+.na
+\fB\fB--parents\fR\fR
+.ad
+.RS 15n
+.rt
+Create any missing intermediate pathname components. For each dir operand that
+does not name an existing directory, effects equivalent to those caused by the
+following command shall occur:
+.sp
+.in +2
+.nf
+mkdir -p -m $(umask -S),u+wx \e
+ $(dirname dir) && mkdir [-m mode] dir
+.fi
+.in -2
+.sp
+
+Where the \fB-m\fR mode option represents that option supplied to the original
+invocation of \fBmkdir\fR, if any. Each \fBdir\fR operand that names an
+existing directory is ignored without error.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdir\fR\fR
+.ad
+.RS 7n
+.rt
+A path name of a directory to be created.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmkdir\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBmkdir\fR
+.sp
+.LP
+The following example:
+
+.sp
+.in +2
+.nf
+example% \fBmkdir -p ltr/jd/jan\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+creates the subdirectory structure \fBltr/jd/jan\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmkdir\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All the specified directories were created successfully or the \fB-p\fR option
+was specified and all the specified directories now exist.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/mkdir"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBksh93\fR(1), \fBrm\fR(1), \fBsh\fR(1), \fBumask\fR(1),
+\fBIntro\fR(2), \fBmkdir\fR(2), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/mkmsgs.1 b/usr/src/man/man1/mkmsgs.1
new file mode 100644
index 0000000000..29eb64ecba
--- /dev/null
+++ b/usr/src/man/man1/mkmsgs.1
@@ -0,0 +1,159 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1994, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mkmsgs 1 "26 Jul 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+mkmsgs \- create message files for use by gettxt
+.SH SYNOPSIS
+.LP
+.nf
+\fBmkmsgs\fR [\fB-o\fR] [\fB-i\fR \fIlocale\fR] \fIinputstrings\fR \fImsgfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmkmsgs\fR utility is used to create a file of text strings that can be
+accessed using the text retrieval tools (see \fBgettxt\fR(1), \fBsrchtxt\fR(1),
+\fBexstr\fR(1), and \fBgettxt\fR(3C)). It will take as input a file of text
+strings for a particular geographic locale (see \fBsetlocale\fR(3C)) and create
+a file of text strings in a format that can be retrieved by both
+\fBgettxt\fR(1) and \fBgettxt\fR(3C). By using the \fB-i\fR option, you can
+install the created file under the
+\fB/usr/lib/\fIlocale\fR/\fR\fIlocale\fR/\fBLC_MESSAGES\fR directory
+(\fBlocale\fR corresponds to the language in which the text strings are
+written).
+.sp
+.LP
+\fIinputstrings\fR is the name of the file that contains the original text
+strings. \fImsgfile\fR is the name of the output file where \fBmkmsgs\fR writes
+the strings in a format that is readable by \fBgettxt\fR(1) and
+\fBgettxt\fR(3C). The name of \fImsgfile\fR can be up to 14 characters in
+length, but may not contain either \e\fB0\fR (null) or the \fBASCII\fR code for
+\fB/\fR (slash) or \fB:\fR (colon).
+.sp
+.LP
+The input file contains a set of text strings for the particular geographic
+locale. Text strings are separated by a newline character. Nongraphic
+characters must be represented as alphabetic escape sequences. Messages are
+transformed and copied sequentially from \fIinputstrings\fR to \fImsgfile\fR.
+To generate an empty message in \fImsgfile\fR, leave an empty line at the
+correct place in \fIinputstrings\fR.
+.sp
+.LP
+Strings can be changed simply by editing the file \fIinputstrings\fR. New
+strings must be added only at the end of the file; then a new \fImsgfile\fR
+file must be created and installed in the correct place. If this procedure is
+not followed, the retrieval function will retrieve the wrong string and
+software compatibility will be broken.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fR
+.ad
+.RS 14n
+.rt
+Overwrite \fImsgfile\fR, if it exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fI locale\fR \fR
+.ad
+.RS 14n
+.rt
+Install \fImsgfile\fR in the
+\fB/usr/lib/\fIlocale\fR/\fR\fIlocale\fR/\fBLC_MESSAGES\fR directory. Only
+someone who is super user or a member of group \fBbin\fR can create or
+overwrite files in this directory. Directories under
+\fB/usr/lib/\fIlocale\fR\fR will be created if they do not exist.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fBmkmsgs\fR command.
+.sp
+.LP
+The following example shows an input message source file \fBC.str\fR:
+
+.sp
+.in +2
+.nf
+File %s:\et cannot be opened\en
+%s: Bad directory\en
+ .
+ .
+ .
+write error\en
+ .
+ .
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing Input Strings From \fBC.str\fR to Create Text Strings in
+a File
+.sp
+.LP
+The following command uses the input strings from \fBC.str\fR to create text
+strings in the appropriate format in the file \fB\fR\fBUX\fR in the current
+directory:
+
+.sp
+.in +2
+.nf
+example% mkmsgs C.str UX
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing Input Strings From \fBFR.str\fR to Create Text Strings in
+a File
+.sp
+.LP
+The following command uses the input strings from \fBFR.str\fR to create text
+strings in the appropriate format in the file \fBUX\fR in the directory
+/usr/lib/locale/fr/\fBLC_MESSAGES\fR:
+
+.sp
+.in +2
+.nf
+example% mkmsgs -i fr FR.str UX
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+These text strings would be accessed if you had set the environment variable
+\fBLC_MESSAGES\fR=fr and then invoked one of the text retrieval tools listed at
+the beginning of the \fBDESCRIPTION\fR section.
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fR\fBlocale\fR\fB/\fR\fBLC_MESSAGES\fR\fB/* \fR\fR
+.ad
+.sp .6
+.RS 4n
+message files created by \fBmkmsgs\fR
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBexstr\fR(1), \fBgettxt\fR(1), \fBsrchtxt\fR(1), \fBgettxt\fR(3C),
+\fBsetlocale\fR(3C), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/mktemp.1 b/usr/src/man/man1/mktemp.1
new file mode 100644
index 0000000000..5890a5e23f
--- /dev/null
+++ b/usr/src/man/man1/mktemp.1
@@ -0,0 +1,304 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mktemp 1 "10 Jan 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+mktemp \- make temporary filename
+.SH SYNOPSIS
+.LP
+.nf
+\fBmktemp\fR [\fB-dtqu\fR] [\fB-p\fR \fIdirectory\fR] [\fItemplate\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmktemp\fR utility makes a temporary filename. To do this, \fBmktemp\fR
+takes the specified filename template and overwrites a portion of it to create
+a unique filename. See \fBOPERANDS\fR.
+.sp
+.LP
+The template is passed to \fBmkdtemp\fR(3C) for directories or
+\fBmkstemp\fR(3C) for ordinary files.
+.sp
+.LP
+If \fBmktemp\fR can successfully generate a unique filename, the file (or
+directory) is created with file permissions such that it is only readable and
+writable by its owner (unless the \fB-u\fR flag is given) and the filename is
+printed to standard output.
+.sp
+.LP
+\fBmktemp\fR allows shell scripts to safely use temporary files. Traditionally,
+many shell scripts take the name of the program with the \fBPID\fR as a suffix
+and used that as a temporary filename. This kind of naming scheme is
+predictable and the race condition it creates is easy for an attacker to win. A
+safer, though still inferior approach is to make a temporary directory using
+the same naming scheme. While this guarantees that a temporary file is not
+subverted, it still allows a simple denial of service attack. Use \fBmktemp\fR
+instead.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 16n
+.rt
+Make a directory instead of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIdirectory\fR\fR
+.ad
+.RS 16n
+.rt
+Use the specified directory as a prefix when generating the temporary filename.
+The directory is overridden by the user's TMPDIR environment variable if it is
+set. This option implies the \fB-t\fR flag.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 16n
+.rt
+Fail silently if an error occurs. This is useful if a script does not want
+error output to go to standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 16n
+.rt
+Generate a path rooted in a temporary directory. This directory is chosen as
+follows: If the user's TMPDIR environment variable is set, the directory
+contained therein is used. Otherwise, if the \fB-p\fR flag was given the
+specified directory is used. If none of the above apply, \fB/tmp\fR is used. In
+this mode, the template (if specified) should be a directory component (as
+opposed to a full path) and thus should not contain any forward slashes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 16n
+.rt
+Operate in unsafe mode. The temp file is unlinked before \fBmktemp\fR exits.
+This is slightly better than \fBmktemp\fR(3C), but still introduces a race
+condition. Use of this option is discouraged.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fItemplate\fR\fR
+.ad
+.RS 12n
+.rt
+\fItemplate\fR can be any filename with one or more \fBX\fRs appended to it,
+for example \fB/tmp/tfile.XXXXXX\fR.
+.sp
+If \fItemplate\fR is not specified, a default of \fBtmp.XXXXXX\fR is used and
+the \fB-t\fR flag is implied.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBmktemp\fR
+.sp
+.LP
+The following example illustrates a simple use of \fBmktemp\fR in a \fBsh\fR(1)
+script. In this example, the script quits if it cannot get a safe temporary
+file.
+
+.sp
+.in +2
+.nf
+TMPFILE=`mktemp /tmp/example.XXXXXX`
+if [ -z "$TMPFILE" ]; then exit 1; fi
+echo "program output" >> $TMPFILE
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing \fBmktemp\fR to Support \fBTMPDIR\fR
+.sp
+.LP
+The following example uses \fBmktemp\fR to support for a user's \fBTMPDIR\fR
+environment variable:
+
+.sp
+.in +2
+.nf
+TMPFILE=`mktemp -t example.XXXXXX`
+if [ -z "$TMPFILE" ]; then exit 1; fi
+echo "program output" >> $TMPFILE
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing \fBmktemp\fR Without Specifying the Name of the Temporary
+File
+.sp
+.LP
+The following example uses \fBmktemp\fR without specifying the name of the
+temporary file. In this case the \fB-t\fR flag is implied.
+
+.sp
+.in +2
+.nf
+TMPFILE=`mktemp`
+if [ -z "$TMPFILE" ]; then exit 1; fi
+echo "program output" >> $TMPFILE
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRUsing \fBmktemp\fR with a Default Temporary Directory Other
+than \fB/tmp\fR
+.sp
+.LP
+The following example creates the temporary file in \fB/extra/tmp\fR unless the
+user's \fBTMPDIR\fR environment variable specifies otherwise:
+
+.sp
+.in +2
+.nf
+TMPFILE=`mktemp -p /extra/tmp example.XXXXX`
+if [ -z "$TMPFILE" ]; then exit 1; fi
+echo "program output" >> $TMPFILE
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRUsing \fBmktemp\fR to Remove a File
+.sp
+.LP
+The following example attempts to create two temporary files. If creation of
+the second temporary file fails, \fBmktemp\fR removes the first file before
+exiting:
+
+.sp
+.in +2
+.nf
+TMP1=`mktemp -t example.1.XXXXXX`
+if [ -z "$TMP1" ]; then exit 1; fi
+TMP2=`mktemp -t example.2.XXXXXX`
+if [ -z "$TMP2" ]; then
+ rm -f $TMP1
+ exit 1
+fi
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRUsing \fBmktemp\fR
+.sp
+.LP
+The following example does not exit if \fBmktemp\fR is unable to create the
+file. That part of the script has been protected.
+
+.sp
+.in +2
+.nf
+TMPFILE=`mktemp -q -t example.XXXXXX`
+if [ ! -z "$TMPFILE" ]
+then
+ # Safe to use $TMPFILE in this block
+ echo data > $TMPFILE
+ ...
+ rm -f $TMPFILE
+fi
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmktemp\fR with the \fB-t\fR option:
+\fBTMPDIR.\fR
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsh\fR(1), \fBmkdtemp\fR(3C), \fBmkstemp\fR(3C), \fBattributes\fR(5),
+\fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBmktemp\fR utility appeared in OpenBSD 2.1. The Solaris implementation
+uses only as many `Xs' as are significant for \fBmktemp\fR(3C) and
+\fBmkstemp\fR(3C).
diff --git a/usr/src/man/man1/moe.1 b/usr/src/man/man1/moe.1
new file mode 100644
index 0000000000..82f27a9d2a
--- /dev/null
+++ b/usr/src/man/man1/moe.1
@@ -0,0 +1,218 @@
+'\" te
+.\" Copyright (c) 2005 by Sun Microsystems, Inc. All rights reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH moe 1 "2 Feb 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+moe \- manifest the optimal expansion of a pathname
+.SH SYNOPSIS
+.LP
+.nf
+\fBmoe\fR [\fB-c\fR] [\fB-32\fR | \fB-64\fR] [\fB-s\fR | \fB-v\fR] \fIpath\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmoe\fR utility manifests the optimal expansion of a pathname containing
+reserved runtime linker tokens. These tokens can be used to define
+dependencies, filtees and runpaths within dynamic objects. The expansion of
+these tokens at runtime, provides a flexible mechanism for selecting objects
+and search paths that perform best on this machine. See \fBld.so.1\fR(1).
+.sp
+.LP
+For example, the token \fB$HWCAP\fR can be employed to represent filters and
+dependencies. The runtime interpretation of this token can result in a family
+of objects that are analyzed to determine their applicability for loading with
+a process. The objects are sorted based on the hardware capabilities that each
+object requires to execute. \fBmoe\fR returns the name of the object optimally
+suited for execution on the current platform.
+.sp
+.LP
+\fBmoe\fR analyzes a pathname by passing the supplied \fIpath\fR to
+\fBdlmopen\fR(3C), together with the \fBRTLD_FIRST\fR flag. Reserved token
+expansion is therefore carried out by \fBld.so.1\fR as the expansion would
+occur in an executing process. Although multiple objects can be analyzed as a
+result of the \fBdlmopen()\fR call, the \fBRTLD_FIRST\fR flag insures only the
+optimal object is processed.
+.sp
+.LP
+By default, \fBmoe\fR analyzes the specified \fIpath\fR twice. The first
+analysis looks for 32-bit objects. The second analysis, if applicable, looks
+for 64-bit objects. Typically, 32-bit objects and 64-bit objects are isolated
+to different directories. These directories are frequently named to reflect the
+class of object the directory contains. The multiple passes of \fBmoe\fR catch
+any instances where 32-bit objects and 64-bit objects occupy the same
+directory. Multiple passes also provide flexibility when the pathname that is
+specified does not convey to the user the class of object the directory might
+contain.
+.sp
+.LP
+For a complete description of the reserved token expansion carried out by the
+runtime linker, refer to the \fILinker and Libraries Guide\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-32\fR\fR
+.ad
+.RS 7n
+.rt
+Only analyze 32-bit objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-64\fR\fR
+.ad
+.RS 7n
+.rt
+Only analyze 64-bit objects.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 7n
+.rt
+Prefix each pathname with the class of the object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 7n
+.rt
+Silent. No optimal name, or error diagnostics are displayed. Only an error
+return is made available. This option is only meaningful with the \fB-32\fR and
+\fB-64\fR options. The \fB-s\fR option can not be used with the \fB-v\fR
+option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 7n
+.rt
+Verbose. If no optimal expansion name can be determined, an error diagnostic is
+written to standard error. The \fB-v\fR option can not be used with the
+\fB-s\fR option.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath\fR\fR
+.ad
+.RS 8n
+.rt
+The pathname to be expanded.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The following example uses \fBmoe\fR to display the optimal expansion of
+objects in the directory \fB/usr/lib/libc\fR. This directory contains a family
+of Intel objects that are built to use various hardware capabilities.
+.sp
+.in +2
+.nf
+% \fBmoe '/usr/lib/libc/$HWCAP'\fR
+/usr/lib/libc/libc_hwcap.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fB-c\fR option can be used to clarify the class of the optimal object.
+.sp
+.in +2
+.nf
+% \fBmoe -c '/usr/lib/libc/$HWCAP'\fR
+32-bit: /usr/lib/libc/libc_hwcap.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example uses \fBmoe\fR to display the optimal expansion of
+objects under the \fB/opt/ISV/cpu\fR directory hierarchy. These directories
+contain a family of SPARC objects that are built for various platforms.
+.sp
+.in +2
+.nf
+% \fBmoe -c -64 '/opt/ISV/$ISALIST/isa.so.1'\fR
+64-bit: /opt/ISV/sparcv9/isa.so.1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fB-v\fR can be used to diagnose the instance where an optimal name is not
+returned. An attempt to inspect the previous pathname as a 32-bit object, would
+result in the following diagnostic being produced.
+.sp
+.in +2
+.nf
+% \fBmoe -c -v -32 '/opt/ISV/$ISALIST/isa.so.1'\fR
+32-bit: /opt/ISV/sparcv9/isa.so.1: wrong ELF class: ELFCLASS64
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+When the \fB-32\fR or \fB-64\fR options are in effect, a successful optimal
+expansion returns \fB0\fR, otherwise non-zero. Without the \fB-32\fR or
+\fB-64\fR options in effect, the return value is always \fB0\fR.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBld.so.1\fR(1), \fBoptisa\fR(1), \fBisalist\fR(1), \fBdlmopen\fR(3C),
+\fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/more.1 b/usr/src/man/man1/more.1
new file mode 100644
index 0000000000..34ab151bde
--- /dev/null
+++ b/usr/src/man/man1/more.1
@@ -0,0 +1,1019 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH more 1 "4 Nov 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+more, page \- browse or page through a text file
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/more\fR [\fB-cdflrsuw\fR] [\fB-lines\fR] [+ \fIlinenumber\fR]
+ [+/ \fIpattern\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/page\fR [\fB-cdflrsuw\fR] [\fB-lines\fR] [+ \fIlinenumber\fR]
+ [+/ \fIpattern\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/more\fR [\fB-cdeisu\fR] [\fB-n\fR \fInumber\fR] [\fB-p\fR \fIcommand\fR]
+ [\fB-t\fR \fItagstring\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/more\fR [\fB-cdeisu\fR] [\fB-n\fR \fInumber\fR] [+ \fIcommand\fR]
+ [\fB-t\fR \fItagstring\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmore\fR utility is a filter that displays the contents of a text file on
+the terminal, one screenful at a time. It normally pauses after each
+screenful. \fB/usr/bin/more\fR then prints \fB--More--\fR and
+\fB/usr/xpg4/bin/more\fR then prints \fIfile\fR at the bottom of the screen. If
+\fBmore\fR is reading from a file rather than a pipe, the percentage of
+characters displayed so far is also shown.
+.sp
+.LP
+The \fBmore\fR utility scrolls up to display one more line in response to a
+\fBRETURN\fR character. \fBmore\fR displays another screenful in response to a
+\fBSPACE\fR character. Other commands are listed below.
+.sp
+.LP
+The \fBpage\fR utility clears the screen before displaying the next screenful
+of text. \fBpage\fR only provides a one-line overlap between screens.
+.sp
+.LP
+The \fBmore\fR utility sets the terminal to \fBNOECHO\fR mode, so that the
+output can be continuous. Commands that you type do not normally show up on
+your terminal, except for the \fB/\fR and \fB!\fR commands.
+.sp
+.LP
+The \fB/usr/bin/more\fR utility exits after displaying the last specified file.
+\fB/usr/xpg4/bin/more\fR prompts for a command at the last line of the last
+specified file.
+.sp
+.LP
+If the standard output is not a terminal, \fBmore\fR acts just like
+\fBcat\fR(1), except that a header is printed before each file in a series.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/more\fR and
+\fB/usr/xpg4/bin/more\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 7n
+.rt
+Clears before displaying. Redraws the screen instead of scrolling for faster
+displays. This option is ignored if the terminal does not have the ability to
+clear to the end of a line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fR
+.ad
+.RS 7n
+.rt
+Displays error messages rather than ringing the terminal bell if an
+unrecognized command is used. This is helpful for inexperienced users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 7n
+.rt
+Squeeze. Replaces multiple blank lines with a single blank line. This is
+helpful when viewing \fBnroff\fR(1) output on the screen.
+.RE
+
+.SS "/usr/bin/more"
+.sp
+.LP
+The following options are supported for \fB/usr/bin/more\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 15n
+.rt
+Does not fold long lines. This is useful when lines contain nonprinting
+characters or escape sequences, such as those generated when \fBnroff\fR(1)
+output is piped through \fBul\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fR
+.ad
+.RS 15n
+.rt
+Does not treat \fBFORMFEED\fR characters (Control-l) as page breaks. If
+\fB-l\fR is not used, \fBmore\fR pauses to accept commands after any line
+containing a \fB^L\fR character (Control-l). Also, if a file begins with a
+\fBFORMFEED\fR, the screen is cleared before the file is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fR
+.ad
+.RS 15n
+.rt
+Normally, \fBmore\fR ignores control characters that it does not interpret in
+some way. The \fB-r\fR option causes these to be displayed as \fB^\fR\fIC\fR
+where \fIC\fR stands for any such control character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fR
+.ad
+.RS 15n
+.rt
+Suppresses generation of underlining escape sequences. Normally, \fBmore\fR
+handles underlining, such as that produced by \fBnroff\fR(1), in a manner
+appropriate to the terminal. If the terminal can perform underlining or has a
+stand-out mode, \fBmore\fR supplies appropriate escape sequences as called for
+in the text file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fR
+.ad
+.RS 15n
+.rt
+Normally, \fBmore\fR exits when it comes to the end of its input. With
+\fB-w\fR, however, \fBmore\fR prompts and waits for any key to be struck before
+exiting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIlines\fR\fR
+.ad
+.RS 15n
+.rt
+Displays the indicated number of \fIlines\fR in each screenful, rather than the
+default (the number of lines in the terminal screen less two).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIlinenumber\fR\fR
+.ad
+.RS 15n
+.rt
+Start up at \fIlinenumber\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+/\fR\fIpattern\fR\fR
+.ad
+.RS 15n
+.rt
+Start up two lines above the line containing the regular expression
+\fIpattern\fR. \fBNote:\fR Unlike editors, this construct should \fInot\fR end
+with a `\fB/\fR.' If it does, then the trailing slash is taken as a character
+in the search pattern.
+.RE
+
+.SS "/usr/xpg4/bin/more"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/more\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fR
+.ad
+.RS 17n
+.rt
+Exits immediately after writing the last line of the last file in the argument
+list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fR
+.ad
+.RS 17n
+.rt
+Performs pattern matching in searches without regard to case.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR \fR
+.ad
+.RS 17n
+.rt
+Specifies the number of lines per screenful. The \fInumber\fR argument is a
+positive decimal integer. The \fB-n\fR option overrides any values obtained
+from the environment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIcommand\fR \fR
+.ad
+.br
+.na
+\fB\fB+\fR\fIcommand\fR \fR
+.ad
+.RS 17n
+.rt
+For each file examined, initially executes the \fBmore\fR command in the
+\fIcommand\fR argument. If the command is a positioning command, such as a line
+number or a regular expression search, set the current position to represent
+the final results of the command, without writing any intermediate lines of the
+file. For example, the two commands:
+.sp
+.in +2
+.nf
+\fBmore -p 1000j file
+more -p 1000G file\fR
+.fi
+.in -2
+.sp
+
+are equivalent and start the display with the current position at line 1000,
+bypassing the lines that \fBj\fR would write and scroll off the screen if it
+had been issued during the file examination. If the positioning command is
+unsuccessful, the first line in the file will be the current position.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItagstring\fR \fR
+.ad
+.RS 17n
+.rt
+Writes the screenful of the file containing the tag named by the
+\fItagstring\fR argument. See the \fBctags\fR(1) utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 17n
+.rt
+Treats a backspace character as a printable control character, displayed as a
+^H (Control-h), suppressing backspacing and the special handling that produces
+underlined or standout-mode text on some terminal types. Also, does not ignore
+a carriage-return character at the end of a line.
+.RE
+
+.sp
+.LP
+If both the \fB-t\fR\fI tagstring\fR and \fB-p\fR\fI command\fR (or the
+obsolescent \fI+command\fR) options are given, the \fB-t\fR\fI tagstring\fR is
+processed first.
+.SH USAGE
+.SS "Environment"
+.sp
+.LP
+\fBmore\fR uses the terminal's \fBterminfo\fR(4) entry to determine its display
+characteristics.
+.sp
+.LP
+\fBmore\fR looks in the environment variable \fBMORE\fR for any preset options.
+For instance, to page through files using the \fB-c\fR mode by default, set the
+value of this variable to \fB-c\fR. (Normally, the command sequence to set up
+this environment variable is placed in the \fB\&.login\fR or \fB\&.profile\fR
+file).
+.SS "Commands"
+.sp
+.LP
+The commands take effect immediately. It is not necessary to type a carriage
+return unless the command requires a \fIfile\fR, \fIcommand\fR,
+\fItagstring\fR, or \fIpattern\fR. Up to the time when the command character
+itself is given, the user may type the line kill character to cancel the
+numerical argument being formed. In addition, the user may type the erase
+character to redisplay the `\fB--More--(\fR\fIxx\fR%)' or \fIfile\fR message.
+.sp
+.LP
+In the following commands, \fIi\fR is a numerical argument (\fB1\fR by
+default).
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fRSPACE \fR
+.ad
+.RS 13n
+.rt
+Display another screenful, or \fIi\fR more lines if \fIi\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fRRETURN \fR
+.ad
+.RS 13n
+.rt
+Display another line, or \fIi\fR more lines, if specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBb\fR\fR
+.ad
+.br
+.na
+\fB\fIi\fR\fB^B\fR\fR
+.ad
+.RS 13n
+.rt
+(Control-b) Skip back \fIi\fR screenfuls and then print a screenful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBd\fR\fR
+.ad
+.br
+.na
+\fB\fIi\fR\fB^D\fR\fR
+.ad
+.RS 13n
+.rt
+(Control-d) Scroll forward one half screenful or \fIi\fR more lines. If \fIi\fR
+is specified, the count becomes the default for subsequent \fBd\fR and \fBu\fR
+commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBf\fR\fR
+.ad
+.RS 13n
+.rt
+Skip \fIi\fR screens full and then print a screenful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 13n
+.rt
+Help. Give a description of all the \fBmore\fR commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^L\fR \fR
+.ad
+.RS 13n
+.rt
+(Control-l) Refresh.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBn\fR\fR
+.ad
+.RS 13n
+.rt
+Search for the \fIi\|\fRth occurrence of the last \fIpattern\fR entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR \fR
+.ad
+.br
+.na
+\fB\fBQ\fR \fR
+.ad
+.RS 13n
+.rt
+Exit from \fBmore\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBs\fR\fR
+.ad
+.RS 13n
+.rt
+Skip \fIi\fR lines and then print a screenful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fR\fR
+.ad
+.RS 13n
+.rt
+Drop into the \fBvi\fR editor at the current line of the current file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBz\fR\fR
+.ad
+.RS 13n
+.rt
+Same as SPACE, except that \fIi\fR, if present, becomes the new default number
+of lines per screenful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB=\fR \fR
+.ad
+.RS 13n
+.rt
+Display the current line number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB/\fR\fIpattern\fR\fR
+.ad
+.RS 13n
+.rt
+Search forward for the \fIi\|\fRth occurrence of the regular expression
+\fIpattern\fR. Display the screenful starting two lines before the line that
+contains the \fIi\|\fRth match for the regular expression \fIpattern\fR, or the
+end of a pipe, whichever comes first. If \fBmore\fR is displaying a file and
+there is no match, its position in the file remains unchanged. Regular
+expressions can be edited using erase and kill characters. Erasing back past
+the first column cancels the search command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fIcommand\fR\fR
+.ad
+.RS 13n
+.rt
+Invoke a shell to execute \fIcommand\|\fR. The characters \fB%\fR and \fB!\fR,
+when used within \fIcommand\fR are replaced with the current filename and the
+previous shell command, respectively. If there is no current filename, \fB%\fR
+is not expanded. Prepend a backslash to these characters to escape expansion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:f\fR\fR
+.ad
+.RS 13n
+.rt
+Display the current filename and line number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB:n\fR\fR
+.ad
+.RS 13n
+.rt
+Skip to the \fIi\|\fRth next filename given in the command line, or to the last
+filename in the list if \fIi\fR is out of range.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB:p\fR\fR
+.ad
+.RS 13n
+.rt
+Skip to the \fIi\|\fRth previous filename given in the command line, or to the
+first filename if \fIi\fR is out of range. If given while \fBmore\fR is
+positioned within a file, go to the beginning of the file. If \fBmore\fR is
+reading from a pipe, \fBmore\fR simply rings the terminal bell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:q\fR\fR
+.ad
+.br
+.na
+\fB\fB:Q\fR\fR
+.ad
+.RS 13n
+.rt
+Exit from \fBmore\fR (same as \fBq\fR or \fBQ\fR).
+.RE
+
+.SS "/usr/bin/more"
+.sp
+.LP
+The following commands are available only in \fB/usr/bin/more\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&'\fR\fR
+.ad
+.RS 9n
+.rt
+Single quote. Go to the point from which the last search started. If no search
+has been performed in the current file, go to the beginning of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.\fR\fR
+.ad
+.RS 9n
+.rt
+Dot. Repeat the previous command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^\|\e\fR\fR
+.ad
+.RS 9n
+.rt
+Halt a partial display of text. \fBmore\fR stops sending output, and displays
+the usual \fB--More--\fR prompt. Some output is lost as a result.
+.RE
+
+.SS "/usr/xpg4/bin/more"
+.sp
+.LP
+The following commands are available only in \fB/usr/xpg4/bin/more\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB^F\fR\fR
+.ad
+.RS 17n
+.rt
+(Control-f) Skip \fIi\fR screens full and print a screenful. (Same as
+\fIi\fR\fBf\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB^G\fR\fR
+.ad
+.RS 17n
+.rt
+(Control-g) Display the current line number (same as \fB=\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBg\fR\fR
+.ad
+.RS 17n
+.rt
+Go to line number \fIi\fR with the default of the first line in the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBG\fR\fR
+.ad
+.RS 17n
+.rt
+Go to line number \fIi\fR with the default of the Last line in the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBj\fR\fR
+.ad
+.RS 17n
+.rt
+Display another line, or \fIi\fR more lines, if specified. (Same as
+\fIi\fRRETURN.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBk\fR\fR
+.ad
+.RS 17n
+.rt
+Scroll backwards one or \fIi\fR lines, if specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR\fIletter\fR \fR
+.ad
+.RS 17n
+.rt
+Mark the current position with the name \fIletter\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBN\fR \fR
+.ad
+.RS 17n
+.rt
+Reverse direction of search.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR \fR
+.ad
+.RS 17n
+.rt
+Refresh the screen.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBR\fR \fR
+.ad
+.RS 17n
+.rt
+Refresh the screen, discarding any buffered input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBu\fR\fR
+.ad
+.br
+.na
+\fB\fIi\fR\fB^U\fR\fR
+.ad
+.RS 17n
+.rt
+(Control-u) Scroll backwards one half a screen of \fIi\fR lines, if specified.
+If \fIi\fR is specified, the count becomes the new default for subsequent
+\fBd\fR and \fBu\fR commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBZZ\fR \fR
+.ad
+.RS 17n
+.rt
+Exit from \fBmore\fR (same as \fBq\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:e\fR \fIfile\fR \fR
+.ad
+.RS 17n
+.rt
+Examine (display) a new file. If no \fIfile\fR is specified, the current file
+is redisplayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:t\fR \fItagstring\fR \fR
+.ad
+.RS 17n
+.rt
+Go to the tag named by the \fItagstring\fR argument and scroll/rewrite the
+screen with the tagged line in the current position. See the \fBctags\fR
+utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&'\fR\fIletter\fR \fR
+.ad
+.RS 17n
+.rt
+Return to the position that was previously marked with the name \fIletter\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&''\fR \fR
+.ad
+.RS 17n
+.rt
+Return to the position from which the last move of more than a screenful was
+made. Defaults to the beginning of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB?\fR[\fI!\fR]\fIpattern\fR\fR
+.ad
+.RS 17n
+.rt
+Search backward in the file for the \fIi\fRth line containing the
+\fIpattern\fR. The \fI!\fR specifies to search backward for the \fIi\fRth line
+that does not contain the \fIpattern\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB/\fR\fB!\fR\fIpattern\fR\fR
+.ad
+.RS 17n
+.rt
+Search forward in the file for the \fIi\fRth line that does not contain the
+pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR[\fIcommand\fR]\fR
+.ad
+.RS 17n
+.rt
+Invoke a shell or the specified command.
+.RE
+
+.SS "Large File Behavior"
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmore\fR and
+\fBpage\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
+bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmore\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR (\fB/usr/xpg4/bin/more\fR only), \fBLC_CTYPE\fR,
+\fBLC_MESSAGES\fR, \fBNLSPATH\fR, and \fBTERM\fR.
+.SS "/usr/xpg4/bin/more"
+.sp
+.LP
+The following environment variables also affect the execution of
+\fB/usr/xpg4/bin/more\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOLUMNS\fR \fR
+.ad
+.RS 12n
+.rt
+Overrides the system selected horizontal screen size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEDITOR\fR \fR
+.ad
+.RS 12n
+.rt
+Used by the \fBv\fR command to select an editor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLINES\fR \fR
+.ad
+.RS 12n
+.rt
+Overrides the system selected vertical screen size. The \fB-n\fR option has
+precedence over \fBLINES\fR in determining the number of lines in a screen.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMORE\fR \fR
+.ad
+.RS 12n
+.rt
+A string specifying options as described in the OPTIONS section, above. As in a
+command line, The options must be separated by blank characters and each option
+specification must start with a \(mi. Any command line options are processed
+after those specified in \fBMORE\fR as though the command line were: \fBmore
+$MORE\fR \fIoptions operands\fR
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/more.help\fR\fR
+.ad
+.RS 22n
+.rt
+help file for \fB/usr/bin/more\fR and \fB/usr/bin/page\fR only.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/more /usr/bin/page"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot enabled
+.TE
+
+.SS "/usr/xpg4/bin/more"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBcsh\fR(1), \fBctags\fR(1), \fBman\fR(1), \fBnroff\fR(1),
+\fBscript\fR(1), \fBsh\fR(1), \fBul\fR(1), \fBterminfo\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SS "/usr/bin/more /usr/bin/page"
+.sp
+.LP
+\fBregcomp\fR(3C)
+.SS "/usr/xpg4/bin/more"
+.sp
+.LP
+\fBregex\fR(5)
+.SH NOTES
+.SS "/usr/bin/more"
+.sp
+.LP
+Skipping backwards is too slow on large files.
+.SS "/usr/xpg4/bin/more"
+.sp
+.LP
+This utility will not behave correctly if the terminal is not set up properly.
diff --git a/usr/src/man/man1/mpss.so.1.1 b/usr/src/man/man1/mpss.so.1.1
new file mode 100644
index 0000000000..f6e399a081
--- /dev/null
+++ b/usr/src/man/man1/mpss.so.1.1
@@ -0,0 +1,265 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mpss.so.1 1 "20 Feb 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+mpss.so.1 \- shared object for setting preferred page size
+.SH SYNOPSIS
+.LP
+.nf
+\fBmpss.so.1\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmpss.so.1\fR shared object provides a means by which the preferred stack
+and/or heap page size can be selectively configured for launched processes and
+their descendants. To enable \fBmpss.so.1\fR, the following string needs to be
+present in the environment (see \fBld.so.1\fR(1)) along with one or more
+\fBMPSS\fR (Multiple Page Size Support) environment variables:
+.sp
+.in +2
+.nf
+\fBLD_PRELOAD=$LD_PRELOAD:mpss.so.1\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+Once preloaded, the \fBmpss.so.1\fR shared object reads the following
+environment variables to determine any preferred page size requirements and any
+processes these may be specific to.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMPSSHEAP\fR=\fIsize\fR \fR
+.ad
+.br
+.na
+\fB\fBMPSSSTACK\fR=\fIsize\fR\fR
+.ad
+.RS 27n
+.rt
+\fBMPSSHEAP\fR and \fBMPSSSTACK\fR specify the preferred page sizes for the
+heap and stack, respectively. The specified page size(s) are applied to all
+created processes.
+.sp
+\fIsize\fR must be a supported page size (see \fBpagesize\fR(1)) or \fB0\fR, in
+which case the system will select an appropriate page size (see
+\fBmemcntl\fR(2)).
+.sp
+\fIsize\fR can be qualified with \fBK\fR, \fBM\fR, \fBG\fR, or \fBT\fR to
+specify Kilobytes, Megabytes, Gigabytes, or Terabytes respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMPSSCFGFILE\fR=\fIconfig-file\fR\fR
+.ad
+.RS 27n
+.rt
+\fIconfig-file\fR is a text file which contains one or more \fBmpss\fR
+configuration entries of the form:
+.sp
+.in +2
+.nf
+\fIexec-name\fR \fIexec-args\fR:\fIheap-size\fR:\fIstack-size\fR
+.fi
+.in -2
+.sp
+
+\fIexec-name\fR specifies the name of an application or executable. The
+corresponding preferred page size(s) are set for newly created processes (see
+\fBgetexecname\fR(3C)) that match the first \fIexec-name\fR found in the file.
+.sp
+\fIexec-name\fR can be a full pathname, a base name or a pattern string. See
+\fBFile Name Generation\fR in \fBsh\fR(1) for a discussion of pattern matching.
+.sp
+\fIexec-args\fR is an optionally specified pattern string to match against
+arguments. Preferred page size(s) are set only if \fIexec-args\fR is not
+specified or occurs within the arguments to \fIexec-name\fR.
+.sp
+If \fIheap-size\fR and/or \fIstack-size\fR are not specified, the corresponding
+preferred page size(s) will not be set.
+.sp
+\fBMPSSCFGFILE\fR takes precedence over \fBMPSSHEAP\fR and \fBMPSSSTACK\fR.
+When \fBMPSSCFGFILE\fR is not set, preferred page size settings are taken from
+file \fB/etc/mpss.conf\fR if it exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMPSSERRFILE\fR=\fIpathname\fR\fR
+.ad
+.RS 27n
+.rt
+By default, error messages are logged via \fBsyslog\fR(3C) using level
+\fBLOG_ERR\fR and facility \fBLOG_USER\fR. If \fBMPSSERRFILE\fR contains a
+valid \fIpathname\fR (such as \fB/dev/stderr\fR), error messages will be logged
+there instead.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRConfiguring preferred page sizes using MPSSCFGFILE
+.sp
+.LP
+The following Bourne shell commands (see \fBsh\fR(1)) configure the preferred
+page sizes to a select set of applications with exec names that begin with
+\fBfoo\fR, using the \fBMPSSCFGFILE\fR environment variable. The \fBMPSS\fR
+configuration file, \fBmpsscfg\fR, is assumed to have been previously created
+via a text editor like \fBvi\fR(1). The \fBcat\fR(1) command is only dumping
+out the contents.
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:mpss.so.1\fR
+example$ \fBMPSSCFGFILE=mpsscfg\fR
+example$ \fBexport LD_PRELOAD MPSSCFGFILE\fR
+example$ \fBcat $MPSSCFGFILE\fR
+foo*:512K:64K
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Once the application has been started, \fBpmap\fR (see \fBproc\fR(1)) can be
+used to view the actual page sizes configured:
+
+.sp
+.in +2
+.nf
+example$ \fBfoobar &\fR
+example$ \fBpmap -s `pgrep foobar`\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the desired page size is not configured (shown in the \fBpmap\fR output), it
+may be due to errors in the \fBMPSS\fR configuration file or environment
+variables. Check the error log (by default: \fB/var/adm/messages\fR) for
+errors.
+
+.sp
+.LP
+If no errors can be found, resource or alignment constraints may be
+responsible. See the NOTES section.
+
+.LP
+\fBExample 2 \fRConfiguring preferred page sizes using MPSSHEAP and MPSSSTACK
+.sp
+.LP
+The following Bourne shell commands configure \fB512K\fR heap and \fB64K\fR
+stack preferred page sizes for all applications using the \fBMPSSHEAP\fR and
+\fBMPSSSTACK\fR environment variables.
+
+.sp
+.in +2
+.nf
+example$ \fBLD_PRELOAD=$LD_PRELOAD:mpss.so.1\fR
+example$ \fBMPSSHEAP=512K\fR
+example$ \fBMPSSSTACK=64K\fR
+example$ \fBexport LD_PRELOAD MPSSHEAP MPSSSTACK\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrecedence rules (continuation from Example 2)
+.sp
+.LP
+The preferred page size configuration in \fBMPSSCFGFILE\fR overrides
+\fBMPSSHEAP\fR and \fBMPSSTACK\fR. Appending the following commands to those in
+\fBExample 2\fR would mean that all applications will be configured with
+\fB512K\fR heap and \fB64K\fR stack preferred page sizes with the exception of
+those applications, the \fBls\fR command, and all applications beginning with
+\fBora\fR that have \fBora1\fR as an argument, in the configuration file.
+
+.sp
+.in +2
+.nf
+example$ \fBMPSSCFGFILE=mpsscfg2\fR
+example$ \fBexport MPSSCFGFILE\fR
+example$ \fBcat $MPSSCFGFILE\fR
+ls::
+ora* ora1:4m:4m
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/ld/map.bssalign\fR \fR
+.ad
+.RS 29n
+.rt
+A template link-editor \fBmapfile\fR for aligning bss (see NOTES).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mpss.conf\fR\fR
+.ad
+.RS 29n
+.rt
+Configuration file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBld\fR(1), \fBld.so.1\fR(1), \fBpagesize\fR(1), \fBppgsz\fR(1),
+\fBproc\fR(1), \fBsh\fR(1), \fBvi\fR(1), \fBexec\fR(2), \fBfork\fR(2),
+\fBmemcntl\fR(2), \fBgetexecname\fR(3C), \fBgetpagesize\fR(3C),
+\fBsyslog\fR(3C), \fBproc\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The heap and stack preferred page sizes are inherited. A child process has the
+same preferred page sizes as its parent. On \fBexec\fR(2), the preferred page
+sizes are set back to the default system page size unless a preferred page size
+has been configured via the \fBmpss\fR shared object.
+.sp
+.LP
+\fBppgsz\fR(1), a proc tool, can also be used to set the preferred stack and/or
+heap page sizes. It cannot selectively configure the page size for descendents
+based on name matches.
+.sp
+.LP
+See also NOTES under \fBppgsz\fR(1).
diff --git a/usr/src/man/man1/msgcc.1 b/usr/src/man/man1/msgcc.1
new file mode 100644
index 0000000000..bb48eba81c
--- /dev/null
+++ b/usr/src/man/man1/msgcc.1
@@ -0,0 +1,249 @@
+'\" te
+.\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH msgcc 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+msgcc \- C language message catalog compiler
+.SH SYNOPSIS
+.LP
+.nf
+\fBmsgcc\fR [\fB-M-\fR\fIoption\fR] [\fBcc-options\fR\fIoption\fR] \fIfile...\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBmsgcc\fR is a C language message catalog compiler. It accepts \fBcc\fR style
+options and arguments.
+.sp
+.LP
+A \fBmsgcpp\fR(1) \fB\&.mso\fR file is generated for each input \fB\&.c\fR
+file. If the \fB-c\fR option is not specified then a \fBgencat\fR(1)
+format .\fBmsg\fR file is generated from the input \fB\&.mso\fR and \fB\&.msg\fR
+files. If \fB-c\fR is not specified then a \fB\&.msg\fR suffix is appended to
+the \fB-o\fR file if it doesn't already have a suffix. The default output is
+\fBa.out.msg\fR if \fB-c\fR and \fB-o\fR are not specified.
+.sp
+.LP
+If \fB-M-new\fR is not specified then messages are merged with those in the
+pre-existing \fB-o\fR file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcc-options\fR\fR
+.ad
+.RS 14n
+.rt
+Specify \fBcc\fR style options and arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M-\fR\fIoption\fR\fR
+.ad
+.RS 14n
+.rt
+Set a \fBmsgcc\fR option.
+.sp
+Specify option as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmkmsgs\fR\fR
+.ad
+.RS 18n
+.rt
+The \fB-o\fR file is assumed to be in \fBmkmsgs\fR(1) format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew\fR\fR
+.ad
+.RS 18n
+.rt
+Create a new \fB-o\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpreserve\fR\fR
+.ad
+.RS 18n
+.rt
+Messages in the \fB-o\fR file that are not in new \fB\&.msg\fR file arguments
+are preserved. The default is to either reuse the message numbers with new
+message text that is similar to the old or to delete the message text, leaving
+an unused message number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBset=\fR\fInumber\fR\fR
+.ad
+.RS 18n
+.rt
+Set the message set number to \fInumber\fR. The default is \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsimilar=\fR\fInumber\fR\fR
+.ad
+.RS 18n
+.rt
+The message text similarity message threshold. The similarity measure between
+old and new message text is:
+.sp
+.in +2
+.nf
+100*(2*gzip(\fIold\fR+\fInew\fR)\e
+ /(gzip(\fIold\fR)+gzip(\fInew\fR))-1)
+.fi
+.in -2
+.sp
+
+where \fBgzip(\fR\fIx\fR\fB)\fR is the size of text \fIx\fR when compressed by
+\fBgzip\fR. The default threshold is \fB$__similar__$.A\fR threshold of \fB0\fR
+turns off message replacement, but unused old messages are still deleted. Use
+\fB-M-preserve\fR to preserve all old messages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.RS 18n
+.rt
+Trace similar message replacements on the standard error.
+.RE
+
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+Specifies the name of the file on which \fBmsgcc\fR operates.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBmsgcc\fR
+.sp
+.LP
+The following example uses \fBmsgcc\fR to extract localizable strings from the
+file \fBhello.c\fR, marked using \fBERROR_dictionary()\fR, writes them to the
+file \fBhello.mso\fR, and creates a \fBgencat\fR format \fBxxx.msg\fR file:
+
+.sp
+.in +2
+.nf
+example% cat hello.c
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * dummy macro to avoid including
+ * libast headers
+ */
+#define ERROR_dictionary(x) x
+
+int main(int ac, char *av[])
+{
+ puts( ERROR_dictionary("hello world") );
+ return( EXIT_SUCCESS );
+}
+
+example% msgcc -o xxx -D__STDC__ -D__i386 hello.c
+
+example% cat hello.mso
+str "hello world"
+
+example% cat xxx.msg
+$ xxx message catalog
+$translation msgcc 2007-09-25
+$set 1
+$quote "
+1 "hello world"
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+Glenn Fowler, \fBgsf@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityVolatile
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcpp\fR(1), \fBgencat\fR(1), \fBmkmsgs\fR(1), \fBmsggen\fR(1),
+\fBmsgcpp\fR(1), \fBmsgcvt\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/msgcpp.1 b/usr/src/man/man1/msgcpp.1
new file mode 100644
index 0000000000..f6716d780d
--- /dev/null
+++ b/usr/src/man/man1/msgcpp.1
@@ -0,0 +1,931 @@
+'\" te
+.\" Copyright (c) 1986-2006 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH msgcpp 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+msgcpp \- C language message catalog preprocessor
+.SH SYNOPSIS
+.LP
+.nf
+\fBmsgcpp\fR [\fB-ACEHMPVX\fR] [\fB-D\fR \fIname\fR[\fB=\fR\fIvalue\fR]] [\fB-I\fR \fIdirectory\fR] [\fB-U\fR \fIname\fR]
+ [\fB-T\fR[\fIlength\fR]] [\fB-Y\fR \fIdirectory\fR] [\fIinput\fR [\fIoutput\fR] ]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBmsgcpp\fR is a C language message catalog preprocessor. It accepts
+\fBcpp\fR(1) style options and arguments. \fBmsgcpp\fR preprocesses an input C
+source file and emits keyed lines to the output, usually for further processing
+by\fBmsgcc\fR(1). \fBmsgcc\fR output is in the \fBgencat\fR(1) syntax.
+Candidate message text is determined by arguments to the last \fB<error.h>\fR
+and \fB<option.h>\fR functions. The \fBmsgcpp\fR keyed output lines are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcmd\fR \fIcommand\fR\fR
+.ad
+.RS 19n
+.rt
+\fIcommand\fR is a candidate for \fB--??keys\fR option string generation. This
+is triggered by \fBb_command(int argc\fR, in the input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdef\fR \fIname string\fR\fR
+.ad
+.RS 19n
+.rt
+\fIname\fR is a candidate variable with \fIstring\fR value string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstr\fR \fIstring\fR\fR
+.ad
+.RS 19n
+.rt
+\fIstring\fR should be entered into the catalog.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvar\fR \fIname\fR\fR
+.ad
+.RS 19n
+.rt
+If \fBdef\fR \fIname\fR occurs then its string value should be entered into the
+catalog.
+.RE
+
+.sp
+.LP
+The input source file is preprocessed with the \fBpp:allpossible\fR option on.
+This enables non-C semantics. All source should first be compiled error-free
+with a real compiler before running \fBmsgcpp\fR. The following changes are
+enabled for the top level files. Included file behavior is not affected.
+.RS +4
+.TP
+1.
+All \fB#if\fR, \fB#ifdef\fR and \fB#ifndef\fR branches are enabled.
+.RE
+.RS +4
+.TP
+2.
+The first definition for a macro is retained, even when subsequent
+\fB#define\fR statements would normally redefine the macro. \fB#undef\fR must
+be used to redefine a macro.
+.RE
+.RS +4
+.TP
+3.
+Macro calls with an improper number of arguments are silently ignored.
+.RE
+.RS +4
+.TP
+4.
+\fB#include\fR on non-existent headers are silently ignored.
+.RE
+.RS +4
+.TP
+5.
+Invalid C source characters are silently ignored.
+.RE
+.sp
+.LP
+\fBmsgcat.h\fR is included if it exists. This file may contain macro
+definitions for functions that translate string arguments. If \fBfoo\fR is a
+function that translates its string arguments then include the line \fB#define
+foo _TRANSLATE_\fR in \fBmsgcat.h\fR, or specify the option
+\fB-Dfoo=_TRANSLATE_\fR. If \fBbar\fR is a function that translates string
+arguments if the first argument is \fBstderr\fR, then use either \fB#define bar
+_STDIO_\fR or \fB-Dbar=_STDIO_\fR.
+.sp
+.LP
+The macro \fB_BLD_msgcat\fR is defined to be \fB1\fR. As an alternative to
+\fBmsgcat.h\fR, \fB_TRANSLATE_\fR definitions could be placed inside \fB#ifdef
+_BLD_msgcat ... #endif\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.br
+.na
+\fB\fB--assert=\fR\fIassertion\fR\fR
+.ad
+.RS 25n
+.rt
+Enter the assertion using \fB#assert\fR for system V compatibility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.br
+.na
+\fB\fB--comments\fR\fR
+.ad
+.RS 25n
+.rt
+Pass comments to the output.
+.sp
+Comments are omitted by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.br
+.na
+\fB\fB--define=\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR\fR
+.ad
+.RS 25n
+.rt
+Define the macro \fIname\fR to have \fIvalue\fR. This is the only portable way
+to pass options through \fBcc\fR to \fBcpp\fR(1).
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB=\fR\fIvalue\fR is omitted, \fIvalue\fR is assumed to be \fB1\fR .
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIname\fR begins with \fB:\fR, then it is interpreted as a \fBlibpp\fR
+\fB#pragma pp\fR: statement.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIname\fR begins with \fB%\fR, it is interpreted as a \fBlibpp\fR \fB#\fR
+directive statement.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If name begins with a \fB-\fR or a \fB+\fR, it is interpreted as a \fBlibpp\fR
+option.
+.sp
+\fB-\fR turns the option on, \fB+\fR turns it off.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Most options have a \fB#pragma\fR counterpart that is listed with the option
+definition.
+.RE
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-C\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:compatibility\fR\fR
+.ad
+.sp .6
+.RS 4n
+Preprocess for K&R C compatibility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-D\fR\fIlevel\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:debug level\fR \fIlevel\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the debug trace level.
+.sp
+Specify \fIlevel\fR as a number greater than or equal to \fB0\fR. Higher levels
+produce more output. Levels higher than \fB3\fR can only be enabled in the
+\fB-g\fR compiled versions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-F\fR\fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the main input file name to \fIname\fR. This only affects the error
+messages and the line sync output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-H\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:hosted\fR\fR
+.ad
+.sp .6
+.RS 4n
+All directories are hosted. Compatibility warning messages from the hosted
+directory headers are suppressed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-I\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:cdir\fR\fR
+.ad
+.sp .6
+.RS 4n
+All directories contain C headers. This option is only used only with
+\fB-D-+\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-K\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:keyargs\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable the non-standard \fIname\fR\fB=\fR\fIvalue\fR macro argument mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-L\fR\fB[\fR\fIid\fR\fB]\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:lineid [\fR\fIid\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Set the line sync directive id to \fIid\fR. If \fIid\fR is not specified, set
+to null.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-M\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:nomultiple\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable multiple include detection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-P\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:passthrough\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable the non-standard passthrough mode. This can be useful for processing
+non-C input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-Q\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:dump\fR\fR
+.ad
+.sp .6
+.RS 4n
+Dump macro definitions to the output so that the output may be passed through
+\fBcpp\fR again. This is used for generating precompiled headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-R\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:transition\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable the transition preprocessing mode. This is used for compilers that
+cannot make up their semantics between K&R and ISO C.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-S\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:strict\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable strict preprocessing semantics and warnings. This works with any mode
+(compatibility, transition, or the default ISO).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-T\fR\fItest\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:test\fR \fItest\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable implementation specific test code according to \fItest\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-W\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:warn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable pedantic warnings in non-hosted files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-X\fR\fB[cc]\fR\fR
+.ad
+.br
+.na
+\fB\fB\fR\fR
+.ad
+.sp .6
+.RS 4n
+Preprocess for the \fBcc\fR compiler, which must be an executable path or an
+executable on \fB$PATH\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-Z\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:pool\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable pool mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-d\fR\fR
+.ad
+.sp .6
+.RS 4n
+List canonicalized \fB#define\fR statements for non-predefined macros in the
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-m\fR\fR
+.ad
+.sp .6
+.RS 4n
+List canonicalized \fB#define\fR statements for all macros. All other output is
+disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D-+\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:plusplus\fR\fR
+.ad
+.sp .6
+.RS 4n
+Preprocess for the C++ dialect.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.br
+.na
+\fB\fB--preprocess\fR\fR
+.ad
+.RS 25n
+.rt
+Ignored; for compatibility with very old compilers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.br
+.na
+\fB\fB--include-reference\fR\fR
+.ad
+.RS 25n
+.rt
+Emit \fB#include\fR file paths on the standard error, one per line, indented to
+show nesting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.br
+.na
+\fB\fB--include[=\fR\fIdirectory\fR\fB]\fR\fR
+.ad
+.RS 25n
+.rt
+Append directory to the list of directories searched for \fB#include\fR files.
+.sp
+If directory is \fB-\fR:
+.RS +4
+.TP
+1.
+\fB-I\fR directories before \fB-I-\fR are searched only for \fB"..."\fR
+include files
+.RE
+.RS +4
+.TP
+2.
+\fB-I\fR directories after \fB-I-\fR are searched for \fB"..."\fR and
+\fB<"...">\fR include files
+.RE
+.RS +4
+.TP
+3.
+the directory \fB\&.\fR is searched only if it is explicitly specified by an
+\fB-I\fR option
+.RE
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-C\fR\fIdirectory\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:cdir directory\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mark \fIdirectory\fR as a C header directory. This option is used with
+\fBpp:plusplus\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-D[\fR\fIfile\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Read the default \fBprobe\fR definitions from \fIfile\fR, or ignore the default
+definitions if \fIfile\fR is omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-H\fR\fIdirectory\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:hostdir\fR \fIdirectory\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mark directory as a hosted directory. Headers from hosted directories have
+compatibility warnings disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-I\fR\fIheader\fR\fR
+.ad
+.br
+.na
+\fB\fBpp:ignore\fR \fIheader\fR\fR
+.ad
+.sp .6
+.RS 4n
+Add \fIheader\fR to the list of ignored headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-M\fR\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fIfile\fR contains a sequence of header \fB[= "map" ]\fR lines, where header
+is either \fB<name>\fR or \fB"name"\fR, and \fB"map"\fR is an explicit binding
+for header. header is ignored \fBif = "map"\fR is omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-R\fR\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Include \fIfile\fR but do not emit text or line syncs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-S\fR\fIdirectory\fR\fR
+.ad
+.sp .6
+.RS 4n
+Add \fIdirectory\fR to the default standard include directory list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I-T\fR\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Include \fIfile\fR and emit text to the output file. The option value can be
+omitted.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.br
+.na
+\fB\fB--dependencies\fR\fR
+.ad
+.RS 25n
+.rt
+Generate \fBmake\fR(1S) dependencies. This option is not needed with
+\fBnmake\fR.
+.sp
+The \fB-M\fR option can be followed by optional flags to change the dependency
+output styles.
+.sp
+The following optional flags are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.RS 5n
+.rt
+Generate dependencies in a separate \fB\&.d\fR file. Preprocessed output is
+still written to output, or the standard output if output is omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBG\fR\fR
+.ad
+.RS 5n
+.rt
+Also generate missing dependencies.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBM\fR\fR
+.ad
+.RS 5n
+.rt
+Only generate local header dependencies. Hosted headers are omitted. Hosted
+headers are determined by the \fB-I-H\fR option and the -\fB-pp:hosted\fR and
+\fBpp:hostdir pragmas\fR. No special distinction is made between the \fB""\fR
+and \fB<>\fR include styles.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.br
+.na
+\fB\fB--sync\fR\fR
+.ad
+.RS 25n
+.rt
+Emit line syncs.
+.sp
+Line sync is turned on by default. \fB-P\fR means \fB--nosync\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fB[\fR\fIlength\fR\fB]\fR\fR
+.ad
+.RS 25n
+.rt
+If not \fBgcc\fR, truncate identifiers to \fIlength\fR characters for
+compatibility with old AT&T compilers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.br
+.na
+\fB\fB--undefine=\fR\fIname\fR\fR
+.ad
+.RS 25n
+.rt
+Remove the definition for the macro \fIname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.br
+.na
+\fB\fB--version\fR\fR
+.ad
+.RS 25n
+.rt
+Emit the \fBlibpp\fR version.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.br
+.na
+\fB\fB--argmode\fR\fR
+.ad
+.RS 25n
+.rt
+Enable \fIname\fR\fB=\fR\fIvalue\fR macro arguments for \fBeasel\fR
+compatibility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR\fR
+.ad
+.br
+.na
+\fB\fB--standard=\fR\fIdirectory\fR\fR
+.ad
+.RS 25n
+.rt
+Add \fIdirectory\fR to the list searched for \fB#include <...>\fR files.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies C source file to preprocess.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoutput\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies output file.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBmsgcpp\fR to Extract Localizable Strings
+.sp
+.LP
+The following example uses \fBmsgcpp\fR to extract localizable strings from the
+file \fBhello.c\fR, marked using the \fBERROR_dictionary()\fR, and writes them
+to the file \fBhello.mso\fR:
+
+.sp
+.in +2
+.nf
+example% cat hello.c
+
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * dummy macro to avoid including
+ * libast headers
+ */
+#define ERROR_dictionary(x) x
+
+int main(int ac, char *av[])
+{
+ puts( ERROR_dictionary("hello world") );
+ puts( ERROR_dictionary("hello all") );
+ return( EXIT_SUCCESS );
+ }
+
+example% msgcpp -D__STDC__ -D__i386 hello.c hello.mso
+
+example% cat hello.mso
+str "hello world"
+str "hello all"
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+Glenn Fowler, \fBgsf@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityVolatile
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcpp\fR(1), \fBgencat\fR(1), \fBmsgcc\fR(1), \fBmsgcvt\fR(1),
+\fBmsggen\fR(1), \fBmake\fR(1S), \fBattributes\fR(5)
+.sp
+.LP
+Kernighan, Brian W. and Ritchie, Dennis M., \fIThe C Programming Language\fR,
+Prentice Hall, 1988.
diff --git a/usr/src/man/man1/msgcvt.1 b/usr/src/man/man1/msgcvt.1
new file mode 100644
index 0000000000..f0506340e7
--- /dev/null
+++ b/usr/src/man/man1/msgcvt.1
@@ -0,0 +1,138 @@
+'\" te
+.\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH msgcvt 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+msgcvt \- convert message file to and from HTML
+.SH SYNOPSIS
+.LP
+.nf
+\fBmsgcvt\fR [\fB-hmr\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBmsgcvt\fR reads a \fBgencat\fR(1) format file on the standard input and
+converts it to \fBHTML\fR on the standard output. The input file must contain
+the control statement \fB$quote "\fR and use the \fB"\fR character to quote
+message text. The output is in a form suitable for automatic translation by web
+sites such as http://babelfish.altavista.com\&.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.br
+.na
+\fB\fB--html\fR\fR
+.ad
+.RS 10n
+.rt
+Generate \fBHTML\fR from \fBgencat\fR(1) input.
+.sp
+This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.br
+.na
+\fB\fB--msg\fR\fR
+.ad
+.RS 10n
+.rt
+Generate a \fBgencat\fR(1) message file from (presumably translated)
+\fBHTML\fR. Wide characters are UTF-8 encoded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB--raw\fR\fR
+.ad
+.RS 10n
+.rt
+The message file is raw message text, one message per line, with no quoting or
+line numbering.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One or more specified jobs does not exist.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGenerating a \fBgencat\fR Message Catalog File
+.sp
+.LP
+The following example generates a \fBgencat\fR(1) message catalog file from an
+HTML file:
+
+.sp
+.in +2
+.nf
+example% cat example.html | msgcvt -m > examplecat
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+Glenn Fowler, \fBgsf@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityVolatile
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgencat\fR(1), \fBmsgcc\fR(1), \fBmsggen\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/msgfmt.1 b/usr/src/man/man1/msgfmt.1
new file mode 100644
index 0000000000..2001233c1d
--- /dev/null
+++ b/usr/src/man/man1/msgfmt.1
@@ -0,0 +1,519 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH msgfmt 1 "17 Sep 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+msgfmt \- create a message object from a message file
+.SH SYNOPSIS
+.LP
+.nf
+\fBmsgfmt\fR [\fB-D\fR \fIdir\fR | \fB-\(midirectory\fR=\fIdir\fR]
+ [\fB-f\fR | \fB-\(miuse-fuzzy\fR] [\fB-g\fR]
+ [\fB-o\fR \fIoutput-file\fR | \fB-\(mioutput-file\fR=\fIoutput-file\fR]
+ [\fB-s\fR] [\fB-\(mistrict\fR] [\fB-v\fR] [\fB-\(miverbose\fR] \fIfilename\fR.po...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmsgfmt\fR utility creates message object files from portable object
+files (\fIfilename\fR\fB\&.po\fR), without changing the portable object files.
+.sp
+.LP
+The \fB\&.po\fR file contains messages displayed to users by system commands or
+by application programs. \fB\&.po\fR files can be edited. The messages in these
+files can be rewritten in any language supported by the system.
+.sp
+.LP
+The \fBxgettext\fR(1) command can be used to create \fB\&.po\fR files from
+script or programs.
+.sp
+.LP
+\fBmsgfmt\fR interprets data as characters according to the current setting of
+the \fBLC_CTYPE\fR locale category or according to the codeset specified in the
+\fB\&.po\fR file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIdir\fR\fR
+.ad
+.br
+.na
+\fB\fB-\(midirectory=\fR\fIdir\fR\fR
+.ad
+.RS 27n
+.rt
+Adds \fIdir\fR to the list for input files search.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.br
+.na
+\fB\fB-\(miuse-fuzzy\fR\fR
+.ad
+.RS 27n
+.rt
+Uses fuzzy entries in output. If this option is not specified, fuzzy entries
+are not included into the output. These options are ignored if Solaris message
+catalogs are processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 27n
+.rt
+Directs the utility to generate the GNU-compatible message catalog file. This
+option cannot be specified with the \fB-s\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutput-file\fR\fR
+.ad
+.br
+.na
+\fB\fB-\(mioutput=\fR\fIoutput-file\fR\fR
+.ad
+.RS 27n
+.rt
+Specifies the output file name as \fIoutput-file\fR. All domain directives and
+duplicate msgids in the .\fBpo\fR file are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 27n
+.rt
+Directs the utility to generate the Solaris message catalog file. This option
+cannot be specified with the \fB-g\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\(mistrict\fR\fR
+.ad
+.RS 27n
+.rt
+Directs the utility to append the suffix \fB\&.mo\fR to the generating message
+object file name if it doesn't have this suffix. This option is ignored if
+Solaris message catalogs are processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.br
+.na
+\fB\fB-\(miverbose\fR\fR
+.ad
+.RS 27n
+.rt
+Verbose. Lists duplicate message identifiers if Solaris message catalog files
+are processed. Message strings are not redefined.
+.sp
+If GNU-compatible message files are processed, this option detects and
+diagnoses input file anomalies which might represent translation errors. The
+msgid and msgstr strings are studied and compared. It is considered abnormal if
+one string starts or ends with a newline while the other does not. Also, if the
+string represents a format string used in a printf-like function, both strings
+should have the same number of % format specifiers, with matching types. If the
+flag \fBc-format\fR appears in the special comment '\fB#\fR' for this entry, a
+check is performed.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The format of portable object files (\fB\&.po\fR files) is defined as follows.
+Each \fB\&.po\fR file contains one or more lines, with each line containing
+either a comment or a statement. Comments start the line with a pound sign
+(\fB#\fR) and end with the newline character. All comments (except special
+comments described later) and empty lines are ignored. The format of a
+statement is:
+.sp
+.in +2
+.nf
+\fIdirective\fR \fIvalue\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Each \fIdirective\fR starts at the beginning of the line and is separated from
+\fIvalue\fR by white space (such as one or more space or tab characters).
+\fIvalue\fR consists of one or more quoted strings separated by white space.
+Use any of the following types of directives for the Solaris message file:
+.sp
+.in +2
+.nf
+domain \fIdomainname\fR
+msgid \fImessage_identifier\fR
+msgstr \fImessage_string\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+For a GNU-compatible message file, use any of the following types of
+directives:
+.sp
+.in +2
+.nf
+domain \fIdomainname\fR
+msgid \fImessage_identifier\fR
+msgid_plural \fIuntranslated_string_plural\fR
+msgstr \fImessage_string\fR
+msgstr[\fIn\fR] \fImessage_string\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The behavior of the \fBdomain\fR directive is affected by the options used. See
+OPTIONS for the behavior when the \fB-o\fR or \fB-\(mioutput-file\fR options
+are specified. If the \fB-o\fR or \fB-\(mioutput-file\fR options are not
+specified, the behavior of the \fBdomain\fR directive is as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+All msgids from the beginning of each \fB\&.po\fR file to the first
+\fBdomain\fR directive are put into a default message object file. The default
+message object file is named \fBmessages.mo\fR, if the Solaris message catalog
+file format is used to generate the message object file or if the
+\fB-\(mistrict\fR option is specified. Otherwise, the default message object
+file is named \fBmessages\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When \fBmsgfmt\fR encounters a \fBdomain\fR \fIdomainname\fR directive in the
+\fB\&.po\fR file, all following msgids until the next \fBdomain\fR directive
+are put into the message object file, named \fBdomainname.mo\fR, if the Solaris
+message catalog file format is used to generate the message object file or if
+the \fB-\(mistrict\fR option is specified. Otherwise, the msgids are put into
+the message object file named \fBdomainname\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Duplicate msgids are defined in the scope of each domain. That is, a msgid is
+considered a duplicate only if the identical msgid exists in the same domain.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+All duplicate msgids are ignored.
+.RE
+.sp
+.LP
+The \fBmsgid\fR directive specifies the value of a message identifier
+associated with the directive that follows it. The \fBmsgid_plural\fR directive
+specifies the plural form message specified to the plural message handling
+functions \fBngettext()\fR, \fBdngettext()\fR, or \fBdcngettext()\fR. The
+\fImessage_identifier\fR string identifies a target string to be used at
+retrieval time. Each statement containing a \fBmsgid\fR directive must be
+followed by a statement containing a \fBmsgstr\fR directive or
+\fBmsgstr\fR[\fIn\fR] directives.
+.sp
+.LP
+The \fBmsgstr\fR directive specifies the target string associated with the
+\fImessage_identifier\fR string declared in the immediately preceding
+\fBmsgid\fR directive.
+.sp
+.LP
+The directive \fBmsgstr\fR[\fIn\fR] (where \fIn\fR = 0, 1, 2, ...) specifies
+the target string to be used with plural form handling functions
+\fBngettext()\fR, \fBdngettext()\fR, and \fBdcngetttext()\fR.
+.sp
+.LP
+Message strings can contain the escape sequences \fB\n\fR for newline, \fB\t\fR
+for tab, \fB\v\fR for vertical tab, \fB\b\fR for backspace, \fB\r\fR for
+carriage return, \fB\f\fR for formfeed, \fB\\\fR for backslash, \fB\"\fR for
+double quote, \fB\a\fR for alarm, \fB\ddd\fR for octal bit pattern, and
+\fB\xDD\fR for hexadecimal bit pattern.
+.sp
+.LP
+Comments for a GNU-compatible message file should be in one of the following
+formats (the \fBmsgfmt\fR utility will ignore these comments when processing
+Solaris message files):
+.sp
+.in +2
+.nf
+# \fItranslator-comments\fR
+#. \fIautomatic-comments\fR
+#: \fIreference\fR..
+#, \fIflag\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The '\fB#:\fR' comments indicate the location of the msgid string in the source
+files in \fIfilename\fR:\fIline\fR format. The '\fB#\fR', '\fB#.\fR',
+and '\fB#:\fR' comments are informative only and are silently ignored by the
+\fBmsgfmt\fR utility. The '\fB#,\fR' comments require one or more flags
+separated by the comma character. The following \fIflag\fRs can be specified:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfuzzy\fR\fR
+.ad
+.RS 15n
+.rt
+This flag can be inserted by the translator. It shows that the \fBmsgstr\fR
+string might not be a correct translation (anymore). Only the translator can
+judge if the translation requires further modification or is acceptable as is.
+Once satisfied with the translation, the translator removes this \fBfuzzy\fR
+flag. If this flag is specified, the \fBmsgfmt\fR utility will not generate the
+entry for the immediately following msgid in the output message catalog.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc-format\fR\fR
+.ad
+.br
+.na
+\fB\fBno-c-format\fR\fR
+.ad
+.RS 15n
+.rt
+The \fBc-format\fR flag indicates that the \fBmsgid\fR string is used as a
+format string by printf-like functions. In case the \fBc-format\fR flag is
+given for a string, the \fBmsgfmt\fR utility does some more tests to check the
+validity of the translation.
+.RE
+
+.sp
+.LP
+In the GNU-compatible message file, the \fBmsgid\fR entry with empty string
+("") is called the header entry and treated specially. If the message string
+for the header entry contains \fBnplurals\fR=\fIvalue\fR, the value indicates
+the number of plural forms. For example, if \fBnplurals\fR=4, there are four
+plural forms. If \fBnplurals\fR is defined, the same line should contain
+\fBplural=\fR\fIexpression\fR, separated by a semicolon character. The
+\fIexpression\fR is a C language expression to determine which version of
+\fBmsgstr\fR[\fIn\fR] is to be used based on the value of \fIn\fR, the last
+argument of \fBngettext()\fR, \fBdngettext()\fR, or \fBdcngettext()\fR. For
+example,
+.sp
+.in +2
+.nf
+nplurals=2; plural= n == 1 ? 0 : 1
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+indicates that there are two plural forms in the language. msgstr[0] is used if
+n == 1, otherwise msgstr[1] is used. For another example:
+.sp
+.in +2
+.nf
+nplurals=3; plural= n == 1 ? 0 : n == 2 ? 1 : 2
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+indicates that there are three plural forms in the language. msgstr[0] is used
+if n == 1, msgstr[1] is used if n == 2, otherwise msgstr[2] is used.
+.sp
+.LP
+If the header entry contains a \fBcharset\fR=\fIcodeset\fR string, the
+\fIcodeset\fR is used to indicate the codeset to be used to encode the message
+strings. If the output string's codeset is different from the message string's
+codeset, codeset conversion from the message string's codeset to the output
+string's codeset will be performed upon the call of \fBgettext()\fR,
+\fBdgettext()\fR, \fBdcgettext()\fR, \fBngettext()\fR, \fBdngettext()\fR, and
+\fBdcngettext()\fR for the GNU-compatible message catalogs. The output string's
+codeset is determined by the current locale's codeset (the return value of
+\fBnl_langinfo(CODESET\fR)) by default, and can be changed by the call of
+\fBbind_textdomain_codeset()\fR.
+.SS "Message catalog file format"
+.sp
+.LP
+The \fBmsgfmt\fR utility can generate the message object both in Solaris
+message catalog file format and in GNU-compatible message catalog file format.
+If the \fB-s\fR option is specified and the input file is a Solaris \fB\&.po\fR
+file, the \fBmsgfmt\fR utility generates the message object in Solaris message
+catalog file format. If the \fB-g\fR option is specified and the input file is
+a GNU \fB\&.po\fR file, the \fBmsgfmt\fR utility generates the message object
+in GNU-compatible message catalog file format. If neither the \fB-s\fR nor
+\fB-g\fR option is specified, the \fBmsgfmt\fR utility determines the message
+catalog file format as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the \fB\&.po\fR file contains a valid GNU header entry (having an empty
+string for \fBmsgid\fR), the \fBmsgfmt\fR utility uses the GNU-compatible
+message catalog file format.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, the \fBmsgfmt\fR utility uses the Solaris message catalog file
+format.
+.RE
+.sp
+.LP
+If the \fBmsgfmt\fR utility determined that the Solaris message catalog file
+format is used, as above, but found the \fB\&.po\fR file contains directives
+that are specific to the GNU-compatible message catalog file format, such as
+\fBmsgid_plural\fR and \fBmsgstr\fR[\fIn\fR], the \fBmsgfmt\fR utility handles
+those directives as invalid specifications.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating message objects from message files
+.sp
+.LP
+In this example, \fBmodule1.po\fR and \fBmodule2.po\fR are portable message
+objects files.
+
+.sp
+.in +2
+.nf
+example% \fBcat module1.po\fR
+# default domain "messages.mo"
+msgid "msg 1"
+msgstr "msg 1 translation"
+#
+domain "help_domain"
+msgid "help 2"
+msgstr "help 2 translation"
+#
+domain "error_domain"
+msgid "error 3"
+msgstr "error 3 translation"
+example% \fBcat module2.po\fR
+# default domain "messages.mo"
+msgid "mesg 4"
+msgstr "mesg 4 translation"
+#
+domain "error_domain"
+msgid "error 5"
+msgstr "error 5 translation"
+#
+domain "window_domain"
+msgid "window 6"
+msgstr "window 6 translation"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command will produce the output files \fBmessages.mo\fR,
+\fBhelp_domain.mo\fR, and \fBerror_domain.mo\fR in Solaris message catalog file
+format:
+
+.sp
+.in +2
+.nf
+example% \fBmsgfmt module1.po\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command will produce the output files \fBmessages.mo\fR,
+\fBhelp_domain.mo\fR, \fBerror_domain.mo\fR, and \fBwindow_domain.mo\fR in
+Solaris message catalog file format:
+
+.sp
+.in +2
+.nf
+example% \fBmsgfmt module1.po module2.po\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command will produce the output file \fBhello.mo\fR in Solaris
+message catalog file format:
+
+.sp
+.in +2
+.nf
+example% \fBmsgfmt -o hello.mo module1.po module2.po\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environmental variables
+that affect the execution of \fBmsgfmt\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+and \fBNLSPATH\fR.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBxgettext\fR(1), \fBgettext\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5),
+\fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+Installing message catalogs under the C locale is pointless, since they are
+ignored for the sake of efficiency.
diff --git a/usr/src/man/man1/msggen.1 b/usr/src/man/man1/msggen.1
new file mode 100644
index 0000000000..740584e9fe
--- /dev/null
+++ b/usr/src/man/man1/msggen.1
@@ -0,0 +1,407 @@
+'\" te
+.\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH msggen 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+msggen \- generate a machine independent formatted message catalog
+.SH SYNOPSIS
+.LP
+.nf
+\fBmsggen\fR [\fB-fls\fR] \fIcatfile\fR [\fImsgfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBmsggen\fR merges the message text source file \fImsgfile\fR into a machine
+independent formatted message catalog \fIcatfile\fR. The file \fIcatfile\fR is
+created if it does not already exist. If \fIcatfile\fR does exist, its messages
+are included in the new \fIcatfile\fR. If set and message numbers collide, the
+new message text defined in \fImsgfile\fR replaces the old message text
+currently contained in \fIcatfile\fR.
+.sp
+.LP
+Non-ASCII characters must be UTF-8 encoded. \fBiconv\fR(1) can be used to
+convert to/from UTF-8.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.br
+.na
+\fB\fB--format\fR\fR
+.ad
+.RS 12n
+.rt
+List the \fBprintf\fR(3C) format signature for each message in \fIcatfile\fR. A
+format signature is one line containing one character for each format
+specification:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.RS 5n
+.rt
+char
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.RS 5n
+.rt
+double
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.RS 5n
+.rt
+long double
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fR\fR
+.ad
+.RS 5n
+.rt
+float
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 5n
+.rt
+short
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.RS 5n
+.rt
+int
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBj\fR\fR
+.ad
+.RS 5n
+.rt
+long long
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 5n
+.rt
+long
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 5n
+.rt
+void*
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 5n
+.rt
+string
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 5n
+.rt
+ptrdiff_t
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBz\fR\fR
+.ad
+.RS 5n
+.rt
+size_t
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 5n
+.rt
+unknown
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--list\fR\fR
+.ad
+.RS 12n
+.rt
+List \fIcatfile\fR in UTF-8 msgfile form.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--set\fR\fR
+.ad
+.RS 12n
+.rt
+Convert the \fIcatfile\fR to a message set number and print the number on the
+standard output.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcatfile\fR\fR
+.ad
+.RS 11n
+.rt
+Machine independent formatted message catalog file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgfile\fR\fR
+.ad
+.RS 11n
+.rt
+Message text source file.
+.RE
+
+.SH USAGE
+.sp
+.LP
+Message text source files are in \fBgencat\fR(1) format, defined as follows.
+The fields of a message text source line are separated by a single blank
+character. Any other blank characters are considered to be part of the
+subsequent field. The \fBNL_*\fR constants are defined in one or both of
+\fB<limits.h>\fR and \fB<nl_types.h>\fR\&.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR \fIcomment\fR\fR
+.ad
+.sp .6
+.RS 4n
+A line beginning with a \fB$\fR followed by a blank character is treated as a
+comment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$delset\fR \fIn comment\fR\fR
+.ad
+.sp .6
+.RS 4n
+This line deletes message set \fIn\fR from an existing message catalog. \fIn\fR
+denotes the set number \fB[1, NL_SETMAX]\fR. Any text following the set number
+is treated as a comment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$quote\fR \fIc\fR\fR
+.ad
+.sp .6
+.RS 4n
+This line specifies an optional quote character \fIc\fR, which can be used to
+surround message-text so that trailing spaces or empty messages are visible in
+a message source line. By default, or if an empty \fB$quote\fR directive is
+supplied, no quoting of message-text is recognized.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$set\fR \fIn comment\fR\fR
+.ad
+.sp .6
+.RS 4n
+This line specifies the set identifier of the following messages until the next
+\fB$set\fR or end-of-file (\fBEOF\fR) appears. \fIn\fR denotes the set
+identifier, which is defined as a number in the range \fB[1, NL_SETMAX]\fR. Set
+numbers need not be contiguous. Any text following the set identifier is
+treated as a comment. If no \fB$set\fR directive is specified in a message text
+source file, all messages are located in message set 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$translation\fR \fIidentification YYYY-MM-DD\fR\fB[,...]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Append translation information to the message catalog header. Only the newest
+date for a given identification is retained in the catalog. Multiple
+translation lines are combined into a single, comma-separated list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR \fImessage-text\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBm\fR denotes the message identifier, which is defined as a number in the
+range \fB[1, NL_MSGMAX]\fR. The message-text is stored in the message catalogue
+with the set identifier specified by the last \fB$set\fR directive, and with
+message identifier \fBm\fR. If the message-text is empty, and a blank character
+field separator is present, an empty string is stored in the message catalogue.
+If a message source line has a message number, but neither a field separator
+nor message-text, the existing message with that number (if any) is deleted
+from the catalogue. Message identifiers need not be contiguous. There are no
+\fImessage-text\fR length restrictions.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One or more specified jobs does not exist.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBmsggen\fR
+.sp
+.LP
+The following example generates a message catalog \fBxxx\fR from the message
+file \fBxxx.msg\fR:
+
+.sp
+.in +2
+.nf
+example% msggen xxx xxx.msg
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+Glenn Fowler, \fBgsf@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityVolatile
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgencat\fR(1), \fBiconv\fR(1), \fBmsgcc\fR(1), \fBprintf\fR(3C),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/msgget.1 b/usr/src/man/man1/msgget.1
new file mode 100644
index 0000000000..ba631d535d
--- /dev/null
+++ b/usr/src/man/man1/msgget.1
@@ -0,0 +1,145 @@
+'\" te
+.\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
+.TH msgget 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+msgget \- get a message from a message catalog
+.SH SYNOPSIS
+.LP
+.nf
+\fBmsgget\fR \fIlocale\fR [\fIcommand\fR\fB:\fR]\fIcatalog\fR [\fIset\fR.]\fInumber\fR [\fItext\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBmsgget\fR gets the message corresponding to the parameters. See
+\fBOPERANDS\fR.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcatalog\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the message catalog name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies command-specific message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlocale\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the locale. If \fIlocale\fR is \fB-\fR then the current locale is
+used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[\fR\fIset\fR\fB].\fR\fInumber\fR\fR
+.ad
+.RS 16n
+.rt
+Identifies the message by message number and an optional message set. If
+specified as \fB-\fR , the message set and number are determined by looking up
+text in the corresponding C locale message catalog.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItext\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the text of the message to be output upon error.
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGetting a Message in the Current Locale
+.sp
+.LP
+The following example gets \fBmsg 1\fR in the current locale from message
+catalog \fBhello\fR:
+
+.sp
+.in +2
+.nf
+example% msgget - hello 1
+hello world
+.fi
+.in -2
+.sp
+
+.SH AUTHORS
+.sp
+.LP
+Glenn Fowler, \fBgsf@research.att.com\fR
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityVolatile
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBiconv\fR(1), \fBmsgcc\fR(1), \fBmsggen\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/mt.1 b/usr/src/man/man1/mt.1
new file mode 100644
index 0000000000..3164b22500
--- /dev/null
+++ b/usr/src/man/man1/mt.1
@@ -0,0 +1,454 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mt 1 "21 Jun 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+mt \- magnetic tape control
+.SH SYNOPSIS
+.LP
+.nf
+\fBmt\fR [\fB-f\fR \fItapename\fR] \fIcommand\fR... [\fIcount\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBmt\fR utility sends commands to a magnetic tape drive. If \fB-f\fR
+\fItapename\fR is not specified, the environment variable \fBTAPE\fR is used.
+If \fBTAPE\fR does not exist, \fBmt\fR uses the device \fB/dev/rmt/0n\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fItapename\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies the raw tape device.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcount\fR\fR
+.ad
+.RS 11n
+.rt
+The number of times that the requested operation is to be performed. By
+default, \fBmt\fR performs \fIcommand\fR once. Multiple operations of
+\fIcommand\fR can be performed by specifying \fIcount\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 11n
+.rt
+The following available commands that can be sent to a magnetic tape drive are
+supported. Only as many characters as are required to uniquely identify a
+\fIcommand\fR need be specified.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBasf\fR\fR
+.ad
+.RS 10n
+.rt
+Specifies absolute space to \fIcount\fR file number. This is equivalent to a
+\fBrewind\fR followed by a \fBfsf\fR \fIcount\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbsf\fR\fR
+.ad
+.RS 10n
+.rt
+Back spaces over \fIcount\fR EOF marks. The tape is positioned on the
+beginning-of-tape side of the EOF mark.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbsr\fR\fR
+.ad
+.RS 10n
+.rt
+Back spaces \fIcount\fR records.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbssf\fR\fR
+.ad
+.RS 10n
+.rt
+Back spaces over the requested number of sequential file marks. Sequential file
+marks are where the file marks are one right after the other with no other
+blocks of any kind between the file marks. The number argument specifies how
+many sequential file marks to which to space. For example, \fBbssf 4\fR
+searches backwards to the first place where there are 4 sequential file marks
+and positions to the BOP side of the 4th file mark.
+.sp
+This command is not supported by all drives.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeof\fR\fR
+.ad
+.br
+.na
+\fB\fBweof\fR\fR
+.ad
+.RS 10n
+.rt
+Writes \fIcount\fR EOF marks at the current position on the tape.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfsf\fR\fR
+.ad
+.RS 10n
+.rt
+Forward spaces over \fIcount\fR EOF marks. The tape is positioned on the first
+block of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfsr\fR\fR
+.ad
+.RS 10n
+.rt
+Forward spaces \fIcount\fR records.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfssf\fR\fR
+.ad
+.RS 10n
+.rt
+Forward spaces the over requested number of sequential file marks. Sequential
+file marks are where the file marks are one right after the other with no other
+blocks of any kind between the file marks. The number argument specifies how
+many sequential file marks to which to space. For example, \fBfssf 4\fR
+searches forwards to the first place where there are 4 sequential file marks
+and positions after the 4th file mark.
+.sp
+This command is not supported by all drives.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBload\fR\fR
+.ad
+.RS 10n
+.rt
+Requests drive load and thread current media. Not supported by all drives.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlock\fR\fR
+.ad
+.RS 10n
+.rt
+Prevents media removal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnbsf\fR\fR
+.ad
+.RS 10n
+.rt
+Back spaces \fIcount\fR files. The tape is positioned on the first block of the
+file. This is equivalent to \fIcount+1\fR \fBbsf\fRs ollowed by one \fBfsf\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBseek\fR\fR
+.ad
+.RS 10n
+.rt
+Positions to requested logical tape position.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtell\fR\fR
+.ad
+.RS 10n
+.rt
+Gets and prints current logical tape position.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunlock\fR\fR
+.ad
+.RS 10n
+.rt
+Allows media removal.
+.RE
+
+If \fIcount\fR is specified with any of the following commands, the \fIcount\fR
+is ignored and the command is performed only once.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBconfig\fR\fR
+.ad
+.RS 16n
+.rt
+Reads the drives current configuration from the driver and displays it in
+\fBst.conf\fR format. See \fBst\fR(7D) for definition of fields and there
+meanings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeom\fR\fR
+.ad
+.RS 16n
+.rt
+Spaces to the end of recorded media on the tape. This is useful for appending
+files onto previously written tapes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerase\fR\fR
+.ad
+.RS 16n
+.rt
+Erases the entire tape.
+.sp
+Some tape drives have option settings where only portions of the tape can be
+erased. Be sure to select the correct setting to erase the whole tape. Erasing
+a tape can take a long time depending on the device and/or tape. Refer to the
+device specific manual for time details.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBforcereserve\fR\fR
+.ad
+.RS 16n
+.rt
+Attempts to break a SCSI II reserve issued by another initiator. When this
+command completes, the drive is not reserved for the current initiator, but is
+available for use. This command can be only be executed by those with
+super-user privileges.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoffline\fR\fR
+.ad
+.br
+.na
+\fB\fBrewoffl\fR\fR
+.ad
+.RS 16n
+.rt
+Rewinds the tape and, if appropriate, takes the drive unit off-line by
+unloading the tape.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrelease\fR\fR
+.ad
+.RS 16n
+.rt
+Re-establishes the default behavior of releasing at close.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreserve\fR\fR
+.ad
+.RS 16n
+.rt
+Allows the tape drive to remain reserved after closing the device. The drive
+must then be explicitly released.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBretension\fR\fR
+.ad
+.RS 16n
+.rt
+Rewinds the cartridge tape completely, then winds it forward to the end of the
+reel and back to beginning-of-tape to smooth out tape tension.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrewind\fR\fR
+.ad
+.RS 16n
+.rt
+Rewinds the tape.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.RS 16n
+.rt
+Prints status information about the tape unit.
+.sp
+Status information can include the sense key reported by the drive, the
+residual and retries for the last operation, the current tape position reported
+in file number, and the number of blocks from the beginning of that file. It
+might also report that WORM media is loaded in that drive.
+.RE
+
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+All operations were successful.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Command was unrecognized or \fBmt\fR was unable to open the specified tape
+drive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+An operation failed.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/*\fR\fR
+.ad
+.RS 14n
+.rt
+magnetic tape interface
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+\fBATTRIBUTE TYPE\fR\fBATTRIBUTE VALUE\fR
+_
+\fBAvailability\fR\fBSUNWcsu\fR
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtar\fR(1), \fBtcopy\fR(1), \fBar.h\fR(3HEAD), \fBattributes\fR(5),
+\fBmtio\fR(7I), \fBst\fR(7D)
+.SH BUGS
+.sp
+.LP
+Not all devices support all options. Some options are hardware-dependent. Refer
+to the corresponding device manual page.
+.sp
+.LP
+\fBmt\fR is architecture sensitive. Heterogeneous operation (that is, SPARC to
+x86 or the reverse) is not supported.
diff --git a/usr/src/man/man1/mv.1 b/usr/src/man/man1/mv.1
new file mode 100644
index 0000000000..9c5c2874f3
--- /dev/null
+++ b/usr/src/man/man1/mv.1
@@ -0,0 +1,286 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH mv 1 "17 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+mv \- move files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/mv\fR [\fB-fi\fR] \fIsource\fR \fItarget_file\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/mv\fR [\fB-fi\fR] \fIsource\fR... \fItarget_dir\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/mv\fR [\fB-fi\fR] \fIsource\fR \fItarget_file\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/mv\fR [\fB-fi\fR] \fIsource\fR... \fItarget_dir\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+In the first synopsis form, the \fBmv\fR utility moves the file named by the
+\fIsource\fR operand to the destination specified by the \fItarget_file\fR.
+\fIsource\fR and \fItarget_file\fR can not have the same name. If
+\fItarget_file\fR does not exist, \fBmv\fR creates a file named
+\fItarget_file\fR. If \fItarget_file\fR exists, its contents are overwritten.
+This first synopsis form is assumed when the final operand does not name an
+existing directory.
+.sp
+.LP
+In the second synopsis form, \fBmv\fR moves each file named by a \fIsource\fR
+operand to a destination file in the existing directory named by the
+\fItarget_dir\fR operand. The destination path for each \fIsource\fR is the
+concatenation of the target directory, a single slash character (\fB/\fR), and
+the last path name component of the \fIsource\fR. This second form is assumed
+when the final operand names an existing directory.
+.sp
+.LP
+If \fBmv\fR determines that the mode of \fItarget_file\fR forbids writing, it
+prints the mode (see \fBchmod\fR(2)), ask for a response, and read the standard
+input for one line. If the response is affirmative, the \fBmv\fR occurs, if
+permissible; otherwise, the command exits. Notice that the mode displayed can
+not fully represent the access permission if \fItarget\fR is associated with an
+\fBACL\fR. When the parent directory of \fIsource\fR is writable and has the
+sticky bit set, one or more of the following conditions must be true:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the user must own the file
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the user must own the directory
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file must be writable by the user
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the user must be a privileged user
+.RE
+.sp
+.LP
+If \fIsource\fR is a file and \fItarget_file\fR is a link to another file with
+links, the other links remain and \fItarget_file\fR becomes a new file.
+.sp
+.LP
+If \fIsource\fR and \fItarget_file\fR/\fItarget_dir\fR are on different file
+systems, \fBmv\fR copies the source and deletes the original. Any hard links to
+other files are lost. \fBmv\fR attempts to duplicate the source file
+characteristics to the target, that is, the owner and group id, permission
+modes, modification and access times, \fBACL\fRs, and extended attributes, if
+applicable. For symbolic links, \fBmv\fR preserves only the owner and group of
+the link itself.
+.sp
+.LP
+If unable to preserve owner and group id, \fBmv\fR clears \fBS_ISUID\fR and
+\fBS_ISGID\fR bits in the target. \fBmv\fR prints a diagnostic message to
+stderr if unable to clear these bits, though the exit code is not affected.
+\fBmv\fR might be unable to preserve extended attributes if the target file
+system does not have extended attribute support. \fB/usr/xpg4/bin/mv\fR prints
+a diagnostic message to stderr for all other failed attempts to duplicate file
+characteristics. The exit code is not affected.
+.sp
+.LP
+In order to preserve the source file characteristics, users must have the
+appropriate file access permissions. This includes being super-user or having
+the same owner id as the destination file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+\fBmv\fR moves the file(s) without prompting even if it is writing over an
+existing \fItarget\fR. Note that this is the default if the standard input is
+not a terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+\fBmv\fR prompts for confirmation whenever the move would overwrite an existing
+\fItarget\fR. An affirmative answer means that the move should proceed. Any
+other answer prevents \fBmv\fR from overwriting the \fItarget\fR.
+.RE
+
+.SS "/usr/bin/mv"
+.sp
+.LP
+Specifying both the \fB-f\fR and the \fB-i\fR options is not considered an
+error. The \fB-f\fR option overrides the \fB-i\fR option.
+.SS "/usr/xpg4/bin/mv"
+.sp
+.LP
+Specifying both the \fB-f\fR and the \fB-i\fR options is not considered an
+error. The last option specified determines the behavior of \fBmv\fR.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsource\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of a file or directory to be moved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItarget_file\fR\fR
+.ad
+.RS 15n
+.rt
+A new path name for the file or directory being moved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItarget_dir\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of an existing directory into which to move the input files.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBmv\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBmv\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input files were moved successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/mv"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStable
+.TE
+
+.SS "/usr/xpg4/bin/mv"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcp\fR(1), \fBcpio\fR(1), \fBln\fR(1), \fBrm\fR(1), \fBsetfacl\fR(1),
+\fBchmod\fR(2), \fBattributes\fR(5), \fBenviron\fR(5), \fBfsattr\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+A \fB--\fR permits the user to mark explicitly the end of any command line
+options, allowing \fBmv\fR to recognize filename arguments that begin with a
+\fB-\fR. As an aid to BSD migration, \fBmv\fR accepts \fB-\fR as a synonym for
+\fB--\fR. This migration aid might disappear in a future release.
diff --git a/usr/src/man/man1/nawk.1 b/usr/src/man/man1/nawk.1
new file mode 100644
index 0000000000..bb5d8cacd1
--- /dev/null
+++ b/usr/src/man/man1/nawk.1
@@ -0,0 +1,1889 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2005, 2006 Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nawk 1 "24 May 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+nawk \- pattern scanning and processing language
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/nawk\fR [\fB-F\fR \fIERE\fR] [\fB-v\fR \fIassignment\fR] \fI\&'program'\fR | \fB-f\fR \fIprogfile\fR...
+ [\fIargument\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/awk\fR [\fB-F\fR \fIERE\fR] [\fB-v\fR \fIassignment\fR]... \fI\&'program'\fR | \fB-f\fR \fIprogfile\fR...
+ [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fB/usr/bin/nawk\fR and \fB/usr/xpg4/bin/awk\fR utilities execute
+\fIprogram\fRs written in the \fBnawk\fR programming language, which is
+specialized for textual data manipulation. A \fBnawk\fR \fIprogram\fR is a
+sequence of patterns and corresponding actions. The string specifying
+\fIprogram\fR must be enclosed in single quotes (') to protect it from
+interpretation by the shell. The sequence of pattern - action statements can be
+specified in the command line as \fIprogram\fR or in one, or more, file(s)
+specified by the \fB-f\fR\fIprogfile\fR option. When input is read that matches
+a pattern, the action associated with the pattern is performed.
+.sp
+.LP
+Input is interpreted as a sequence of records. By default, a record is a line,
+but this can be changed by using the \fBRS\fR built-in variable. Each record of
+input is matched to each pattern in the \fIprogram\fR. For each pattern
+matched, the associated action is executed.
+.sp
+.LP
+The \fBnawk\fR utility interprets each input record as a sequence of fields
+where, by default, a field is a string of non-blank characters. This default
+white-space field delimiter (blanks and/or tabs) can be changed by using the
+\fBFS\fR built-in variable or the \fB-F\fR\fIERE\fR option. The \fBnawk\fR
+utility denotes the first field in a record \fB$1\fR, the second \fB$2\fR, and
+so forth. The symbol \fB$0\fR refers to the entire record; setting any other
+field causes the reevaluation of \fB$0\fR. Assigning to \fB$0\fR resets the
+values of all fields and the \fBNF\fR built-in variable.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIERE\fR\fR
+.ad
+.RS 17n
+.rt
+Define the input field separator to be the extended regular expression
+\fIERE\fR, before any input is read (can be a character).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIprogfile\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the pathname of the file \fIprogfile\fR containing a \fBnawk\fR
+program. If multiple instances of this option are specified, the concatenation
+of the files specified as \fIprogfile\fR in the order specified is the
+\fBnawk\fR program. The \fBnawk\fR program can alternatively be specified in
+the command line as a single argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIassignment\fR\fR
+.ad
+.RS 17n
+.rt
+The \fIassignment\fR argument must be in the same form as an \fIassignment\fR
+operand. The assignment is of the form \fIvar=value\fR, where \fIvar\fR is the
+name of one of the variables described below. The specified assignment occurs
+before executing the \fBnawk\fR program, including the actions associated with
+\fBBEGIN\fR patterns (if any). Multiple occurrences of this option can be
+specified.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprogram\fR\fR
+.ad
+.RS 12n
+.rt
+If no \fB-f\fR option is specified, the first operand to \fBnawk\fR is the text
+of the \fBnawk\fR program. The application supplies the \fIprogram\fR operand
+as a single argument to \fBnawk.\fR If the text does not end in a newline
+character, \fBnawk\fR interprets the text as if it did.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+Either of the following two types of \fIargument\fR can be intermixed:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 14n
+.rt
+A pathname of a file that contains the input to be read, which is matched
+against the set of patterns in the program. If no \fIfile\fR operands are
+specified, or if a \fIfile\fR operand is \fB\(mi\fR, the standard input is
+used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIassignment\fR\fR
+.ad
+.RS 14n
+.rt
+An operand that begins with an underscore or alphabetic character from the
+portable character set, followed by a sequence of underscores, digits and
+alphabetics from the portable character set, followed by the \fB=\fR character
+specifies a variable assignment rather than a pathname. The characters before
+the \fB=\fR represent the name of a \fBnawk\fR variable. If that name is a
+\fBnawk\fR reserved word, the behavior is undefined. The characters following
+the equal sign is interpreted as if they appeared in the \fBnawk\fR program
+preceded and followed by a double-quote (\fB"\fR) character, as a \fBSTRING\fR
+token , except that if the last character is an unescaped backslash, it is
+interpreted as a literal backslash rather than as the first character of the
+sequence \fB\e\fR\&.. The variable is assigned the value of that \fBSTRING\fR
+token. If the value is considered a \fInumeric\fRstring\fI,\fR the variable is
+assigned its numeric value. Each such variable assignment is performed just
+before the processing of the following \fIfile\fR, if any. Thus, an assignment
+before the first \fBfile\fR argument is executed after the \fBBEGIN\fR actions
+(if any), while an assignment after the last \fIfile\fR argument is executed
+before the \fBEND\fR actions (if any). If there are no \fIfile\fR arguments,
+assignments are executed before processing the standard input.
+.RE
+
+.RE
+
+.SH INPUT FILES
+.sp
+.LP
+Input files to the \fBnawk\fR program from any of the following sources:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+any \fIfile\fR operands or their equivalents, achieved by modifying the
+\fBnawk\fR variables \fBARGV\fR and \fBARGC\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+standard input in the absence of any \fIfile\fR operands
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+arguments to the \fBgetline\fR function
+.RE
+.sp
+.LP
+must be text files. Whether the variable \fBRS\fR is set to a value other than
+a newline character or not, for these files, implementations support records
+terminated with the specified separator up to \fB{LINE_MAX}\fR bytes and can
+support longer records.
+.sp
+.LP
+If \fB-\fR\fBf\fR \fIprogfile\fR is specified, the files named by each of the
+\fIprogfile\fR option-arguments must be text files containing an \fBnawk\fR
+program.
+.sp
+.LP
+The standard input are used only if no \fIfile\fR operands are specified, or if
+a \fIfile\fR operand is \fB\(mi\fR\&.
+.SH EXTENDED DESCRIPTION
+.sp
+.LP
+A \fBnawk\fR program is composed of pairs of the form:
+.sp
+.in +2
+.nf
+pattern { \fIaction\fR }
+.fi
+.in -2
+
+.sp
+.LP
+Either the pattern or the action (including the enclosing brace characters) can
+be omitted. Pattern-action statements are separated by a semicolon or by a
+newline.
+.sp
+.LP
+A missing pattern matches any record of input, and a missing action is
+equivalent to an action that writes the matched record of input to standard
+output.
+.sp
+.LP
+Execution of the \fBnawk\fR program starts by first executing the actions
+associated with all \fBBEGIN\fR patterns in the order they occur in the
+program. Then each \fIfile\fR operand (or standard input if no files were
+specified) is processed by reading data from the file until a record separator
+is seen (a newline character by default), splitting the current record into
+fields using the current value of \fBFS\fR, evaluating each pattern in the
+program in the order of occurrence, and executing the action associated with
+each pattern that matches the current record. The action for a matching pattern
+is executed before evaluating subsequent patterns. Last, the actions associated
+with all \fBEND\fR patterns is executed in the order they occur in the program.
+.SS "Expressions in nawk"
+.sp
+.LP
+Expressions describe computations used in \fIpatterns\fR and \fIactions\fR. In
+the following table, valid expression operations are given in groups from
+highest precedence first to lowest precedence last, with equal-precedence
+operators grouped between horizontal lines. In expression evaluation, where the
+grammar is formally ambiguous, higher precedence operators are evaluated before
+lower precedence operators. In this table \fIexpr,\fR \fIexpr1,\fR
+\fIexpr2,\fR and \fIexpr3\fR represent any expression, while \fIlvalue\fR
+represents any entity that can be assigned to (that is, on the left side of an
+assignment operator).
+.sp
+
+.sp
+.TS
+tab();
+cw(1.38i) cw(1.38i) cw(1.35i) cw(1.39i)
+lw(1.38i) lw(1.38i) lw(1.35i) lw(1.39i)
+.
+\fBSyntax\fR\fBName\fR\fBType of Result\fR\fBAssociativity\fR
+_
+( \fIexpr\fR )Groupingtype of \fIexpr\fRn/a
+_
+$\fIexpr\fRField referencestringn/a
+_
+++ \fIlvalue\fRPre-incrementnumericn/a
+ \(mi\(mi\fIlvalue\fRPre-decrementnumericn/a
+\fIlvalue\fR ++Post-incrementnumericn/a
+\fIlvalue\fR \(mi\(miPost-decrement numericn/a
+_
+\fIexpr\fR ^ \fIexpr\fRExponentiationnumericright
+_
+! \fIexpr\fRLogical notnumericn/a
++ \fIexpr\fRUnary plusnumericn/a
+\(mi \fIexpr\fRUnary minusnumericn/a
+_
+\fIexpr\fR * \fIexpr\fRMultiplicationnumericleft
+\fIexpr\fR / \fIexpr\fRDivisionnumericleft
+\fIexpr\fR % \fIexpr\fRModulusnumericleft
+_
+\fIexpr\fR + \fIexpr\fRAdditionnumericleft
+\fIexpr\fR \(mi \fIexpr\fRSubtractionnumeric left
+_
+\fIexpr\fR \fIexpr\fRString concatenationstringleft
+_
+\fIexpr\fR < \fIexpr\fRLess thannumericnone
+\fIexpr\fR <= \fIexpr\fRLess than or equal tonumericnone
+\fIexpr\fR != \fIexpr\fRNot equal tonumericnone
+\fIexpr\fR == \fIexpr\fREqual tonumericnone
+\fIexpr\fR > \fIexpr\fRGreater thannumericnone
+\fIexpr\fR >= \fIexpr\fRGreater than or equal tonumericnone
+_
+\fIexpr\fR ~ \fIexpr\fRERE matchnumericnone
+\fIexpr\fR !~ \fIexpr\fRERE non-match numericnone
+_
+\fIexpr\fR in arrayArray membershipnumericleft
+( \fIindex\fR ) inMulti-dimension arraynumericleft
+ \fIarray\fR membership
+_
+\fBexpr\fR && \fIexpr\fRLogical ANDnumericleft
+_
+\fBexpr\fR |\|| \fIexpr\fRLogical ORnumericleft
+_
+\fIexpr1\fR ? \fIexpr2\fRConditional expressiontype of selectedright
+ : \fIexpr3\fR \fIexpr2\fR or \fIexpr3\fR
+_
+\fIlvalue\fR ^= \fIexpr\fRExponentiationnumericright
+assignment
+\fIlvalue\fR %= \fIexpr\fRModulus assignmentnumericright
+\fIlvalue\fR *= \fIexpr\fRMultiplicationnumericright
+assignment
+\fIlvalue\fR /= \fIexpr\fRDivision assignmentnumericright
+\fIlvalue\fR += \fIexpr\fRAddition assignmentnumericright
+\fIlvalue\fR \(mi= \fIexpr\fRSubtraction assignmentnumericright
+\fIlvalue\fR = \fIexpr\fRAssignmenttype of \fIexpr\fRright
+.TE
+
+.sp
+.LP
+Each expression has either a string value, a numeric value or both. Except as
+stated for specific contexts, the value of an expression is implicitly
+converted to the type needed for the context in which it is used. A string
+value is converted to a numeric value by the equivalent of the following calls:
+.sp
+.in +2
+.nf
+setlocale(LC_NUMERIC, "");
+\fInumeric_value\fR = atof(\fIstring_value\fR);
+.fi
+.in -2
+
+.sp
+.LP
+A numeric value that is exactly equal to the value of an integer is converted
+to a string by the equivalent of a call to the \fBsprintf\fR function with the
+string \fB%d\fR as the \fBfmt\fR argument and the numeric value being converted
+as the first and only \fIexpr\fR argument. Any other numeric value is
+converted to a string by the equivalent of a call to the \fBsprintf\fR function
+with the value of the variable \fBCONVFMT\fR as the \fBfmt\fR argument and the
+numeric value being converted as the first and only \fIexpr\fR argument.
+.sp
+.LP
+A string value is considered to be a \fInumeric string\fR in the following
+case:
+.RS +4
+.TP
+1.
+Any leading and trailing blank characters is ignored.
+.RE
+.RS +4
+.TP
+2.
+If the first unignored character is a \fB+\fR or \fB\(mi\fR, it is ignored.
+.RE
+.RS +4
+.TP
+3.
+If the remaining unignored characters would be lexically recognized as a
+\fBNUMBER\fR token, the string is considered a \fInumeric string\fR.
+.RE
+.sp
+.LP
+If a \fB\(mi\fR character is ignored in the above steps, the numeric value of
+the \fInumeric string\fR is the negation of the numeric value of the recognized
+\fBNUMBER\fR token. Otherwise the numeric value of the \fInumeric string\fR is
+the numeric value of the recognized \fBNUMBER\fR token. Whether or not a string
+is a \fInumeric string\fR is relevant only in contexts where that term is used
+in this section.
+.sp
+.LP
+When an expression is used in a Boolean context, if it has a numeric value, a
+value of zero is treated as false and any other value is treated as true.
+Otherwise, a string value of the null string is treated as false and any other
+value is treated as true. A Boolean context is one of the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the first subexpression of a conditional expression.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+an expression operated on by logical NOT, logical \fBAND,\fR or logical OR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the second expression of a \fBfor\fR statement.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the expression of an \fBif\fR statement.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the expression of the \fBwhile\fR clause in either a \fBwhile\fR or \fBdo\fR
+\fB\&.\|.\|.\fR \fBwhile\fR statement.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+an expression used as a pattern (as in Overall Program Structure).
+.RE
+.sp
+.LP
+The \fBnawk\fR language supplies arrays that are used for storing numbers or
+strings. Arrays need not be declared. They are initially empty, and their sizes
+changes dynamically. The subscripts, or element identifiers, are strings,
+providing a type of associative array capability. An array name followed by a
+subscript within square brackets can be used as an \fIlvalue\fR and as an
+expression, as described in the grammar. Unsubscripted array names are used in
+only the following contexts:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a parameter in a function definition or function call.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the \fBNAME\fR token following any use of the keyword \fBin\fR.
+.RE
+.sp
+.LP
+A valid array \fIindex\fR consists of one or more comma-separated expressions,
+similar to the way in which multi-dimensional arrays are indexed in some
+programming languages. Because \fBnawk\fR arrays are really one-dimensional,
+such a comma-separated list is converted to a single string by concatenating
+the string values of the separate expressions, each separated from the other by
+the value of the \fBSUBSEP\fR variable.
+.sp
+.LP
+Thus, the following two index operations are equivalent:
+.sp
+.in +2
+.nf
+var[expr1, expr2, ... exprn]
+var[expr1 SUBSEP expr2 SUBSEP ... SUBSEP exprn]
+.fi
+.in -2
+
+.sp
+.LP
+A multi-dimensioned \fIindex\fR used with the \fBin\fR operator must be put in
+parentheses. The \fBin\fR operator, which tests for the existence of a
+particular array element, does not create the element if it does not exist.
+Any other reference to a non-existent array element automatically creates it.
+.SS "Variables and Special Variables"
+.sp
+.LP
+Variables can be used in an \fBnawk\fR program by referencing them. With the
+exception of function parameters, they are not explicitly declared.
+Uninitialized scalar variables and array elements have both a numeric value of
+zero and a string value of the empty string.
+.sp
+.LP
+Field variables are designated by a \fB$\fR followed by a number or numerical
+expression. The effect of the field number \fIexpression\fR evaluating to
+anything other than a non-negative integer is unspecified. Uninitialized
+variables or string values need not be converted to numeric values in this
+context. New field variables are created by assigning a value to them.
+References to non-existent fields (that is, fields after \fB$NF\fR) produce the
+null string. However, assigning to a non-existent field (for example,
+\fB$(NF+2) = 5\fR) increases the value of \fBNF\fR, create any intervening
+fields with the null string as their values and cause the value of \fB$0\fR to
+be recomputed, with the fields being separated by the value of \fBOFS\fR. Each
+field variable has a string value when created. If the string, with any
+occurrence of the decimal-point character from the current locale changed to a
+period character, is considered a \fInumeric string\fR (see \fBExpressions in
+nawk\fR above), the field variable also has the numeric value of the \fInumeric
+string\fR.
+.SS "/usr/bin/nawk, /usr/xpg4/bin/awk"
+.sp
+.LP
+\fBnawk\fR sets the following special variables that are supported by both
+\fB/usr/bin/nawk\fR and \fB/usr/xpg4/bin/awk\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBARGC\fR\fR
+.ad
+.RS 12n
+.rt
+The number of elements in the \fBARGV\fR array.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBARGV\fR\fR
+.ad
+.RS 12n
+.rt
+An array of command line arguments, excluding options and the \fIprogram\fR
+argument, numbered from zero to \fBARGC\fR\(mi1.
+.sp
+The arguments in \fBARGV\fR can be modified or added to; \fBARGC\fR can be
+altered. As each input file ends, \fBnawk\fR treats the next non-null element
+of \fBARGV\fR, up to the current value of \fBARGC\fR\(mi1, inclusive, as the
+name of the next input file. Setting an element of \fBARGV\fR to null means
+that it is not treated as an input file. The name \fB\(mi\fR indicates the
+standard input. If an argument matches the format of an \fIassignment\fR
+operand, this argument is treated as an assignment rather than a \fIfile\fR
+argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBENVIRON\fR\fR
+.ad
+.RS 12n
+.rt
+The variable \fBENVIRON\fR is an array representing the value of the
+environment. The indices of the array are strings consisting of the names of
+the environment variables, and the value of each array element is a string
+consisting of the value of that variable. If the value of an environment
+variable is considered a \fInumeric string\fR, the array element also has its
+numeric value.
+.sp
+In all cases where \fBnawk\fR behavior is affected by environment variables
+(including the environment of any commands that \fBnawk\fR executes via the
+\fBsystem\fR function or via pipeline redirections with the \fBprint\fR
+statement, the \fBprintf\fR statement, or the \fBgetline\fR function), the
+environment used is the environment at the time \fBnawk\fR began executing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFILENAME\fR\fR
+.ad
+.RS 12n
+.rt
+A pathname of the current input file. Inside a \fBBEGIN\fR action the value is
+undefined. Inside an \fBEND\fR action the value is the name of the last input
+file processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFNR\fR\fR
+.ad
+.RS 12n
+.rt
+The ordinal number of the current record in the current file. Inside a
+\fBBEGIN\fR action the value is zero. Inside an \fBEND\fR action the value is
+the number of the last record processed in the last file processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFS\fR\fR
+.ad
+.RS 12n
+.rt
+Input field separator regular expression; a space character by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNF\fR\fR
+.ad
+.RS 12n
+.rt
+The number of fields in the current record. Inside a \fBBEGIN\fR action, the
+use of \fBNF\fR is undefined unless a \fBgetline\fR function without a
+\fIvar\fR argument is executed previously. Inside an \fBEND\fR action, \fBNF\fR
+retains the value it had for the last record read, unless a subsequent,
+redirected, \fBgetline\fR function without a \fIvar\fR argument is performed
+prior to entering the \fBEND\fR action.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNR\fR\fR
+.ad
+.RS 12n
+.rt
+The ordinal number of the current record from the start of input. Inside a
+\fBBEGIN\fR action the value is zero. Inside an \fBEND\fR action the value is
+the number of the last record processed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOFMT\fR\fR
+.ad
+.RS 12n
+.rt
+The \fBprintf\fR format for converting numbers to strings in output statements
+\fB"%.6g"\fR by default. The result of the conversion is unspecified if the
+value of \fBOFMT\fR is not a floating-point format specification.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOFS\fR\fR
+.ad
+.RS 12n
+.rt
+The \fBprint\fR statement output field separator; a space character by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBORS\fR\fR
+.ad
+.RS 12n
+.rt
+The \fBprint\fR output record separator; a newline character by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLENGTH\fR\fR
+.ad
+.RS 12n
+.rt
+The length of the string matched by the \fBmatch\fR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRS\fR\fR
+.ad
+.RS 12n
+.rt
+The first character of the string value of \fBRS\fR is the input record
+separator; a newline character by default. If \fBRS\fR contains more than one
+character, the results are unspecified. If \fBRS\fR is null, then records are
+separated by sequences of one or more blank lines. Leading or trailing blank
+lines do not produce empty records at the beginning or end of input, and the
+field separator is always newline, no matter what the value of \fBFS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRSTART\fR\fR
+.ad
+.RS 12n
+.rt
+The starting position of the string matched by the \fBmatch\fR function,
+numbering from 1. This is always equivalent to the return value of the
+\fBmatch\fR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSUBSEP\fR\fR
+.ad
+.RS 12n
+.rt
+The subscript separator string for multi-dimensional arrays. The default value
+is \fB\e034\fR\&.
+.RE
+
+.SS "/usr/xpg4/bin/awk"
+.sp
+.LP
+The following variable is supported for \fB/usr/xpg4/bin/awk\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCONVFMT\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBprintf\fR format for converting numbers to strings (except for output
+statements, where \fBOFMT\fR is used). The default is \fB%.6g\fR.
+.RE
+
+.SS "Regular Expressions"
+.sp
+.LP
+The \fBnawk\fR utility makes use of the extended regular expression notation
+(see \fBregex\fR(5)) except that it allows the use of C-language conventions to
+escape special characters within the EREs, namely \fB\e\e\fR, \fB\ea\fR,
+\fB\eb\fR, \fB\ef\fR, \fB\en\fR, \fB\er\fR, \fB\et\fR, \fB\ev\fR, and those
+specified in the following table. These escape sequences are recognized both
+inside and outside bracket expressions. Note that records need not be
+separated by newline characters and string constants can contain newline
+characters, so even the \fB\en\fR sequence is valid in \fBnawk\fR EREs. Using
+a slash character within the regular expression requires escaping as shown in
+the table below:
+.sp
+
+.sp
+.TS
+tab();
+lw(.61i) lw(2.44i) lw(2.44i)
+lw(.61i) lw(2.44i) lw(2.44i)
+.
+\fBEscape Sequence\fR\fBDescription\fR\fBMeaning\fR
+_
+\fB\e"\fRBackslash quotation-markQuotation-mark character
+_
+\fB\e/\fRBackslash slashSlash character
+_
+\fB\e\fR\fIddd\fRT{
+A backslash character followed by the longest sequence of one, two, or three octal-digit characters (01234567). If all of the digits are 0, (that is, representation of the NULL character), the behavior is undefined.
+T}T{
+The character encoded by the one-, two- or three-digit octal integer. Multi-byte characters require multiple, concatenated escape sequences, including the leading \e for each byte.
+T}
+_
+\fB\e\fR\fIc\fRT{
+A backslash character followed by any character not described in this table or special characters (\fB\e\e\fR, \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR, \fB\er\fR, \fB\et\fR, \fB\ev\fR).
+T}Undefined
+.TE
+
+.sp
+.LP
+A regular expression can be matched against a specific field or string by using
+one of the two regular expression matching operators, \fB~\fR and \fB!\|~\fR.
+These operators interpret their right-hand operand as a regular expression and
+their left-hand operand as a string. If the regular expression matches the
+string, the \fB~\fR expression evaluates to the value \fB1\fR, and the
+\fB!\|~\fR expression evaluates to the value \fB0\fR. If the regular expression
+does not match the string, the \fB~\fR expression evaluates to the value
+\fB0\fR, and the \fB!\|~\fR expression evaluates to the value \fB1\fR. If the
+right-hand operand is any expression other than the lexical token \fBERE\fR,
+the string value of the expression is interpreted as an extended regular
+expression, including the escape conventions described above. Notice that these
+same escape conventions also are applied in the determining the value of a
+string literal (the lexical token \fBSTRING\fR), and is applied a second time
+when a string literal is used in this context.
+.sp
+.LP
+When an \fBERE\fR token appears as an expression in any context other than as
+the right-hand of the \fB~\fR or \fB!\|~\fR operator or as one of the built-in
+function arguments described below, the value of the resulting expression is
+the equivalent of:
+.sp
+.in +2
+.nf
+$0 ~ /\fIere\fR/
+.fi
+.in -2
+
+.sp
+.LP
+The \fIere\fR argument to the \fBgsub,\fR \fBmatch,\fR \fBsub\fR functions, and
+the \fIfs\fR argument to the \fBsplit\fR function (see \fBString Functions\fR)
+is interpreted as extended regular expressions. These can be either \fBERE\fR
+tokens or arbitrary expressions, and are interpreted in the same manner as the
+right-hand side of the \fB~\fR or \fB!\|~\fR operator.
+.sp
+.LP
+An extended regular expression can be used to separate fields by using the
+\fB-F\fR \fIERE\fR option or by assigning a string containing the expression to
+the built-in variable \fBFS\fR. The default value of the \fBFS\fR variable is a
+single space character. The following describes \fBFS\fR behavior:
+.RS +4
+.TP
+1.
+If \fBFS\fR is a single character:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fBFS\fR is the space character, skip leading and trailing blank characters;
+fields are delimited by sets of one or more blank characters.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, if \fBFS\fR is any other character \fIc\fR, fields are delimited by
+each single occurrence of \fIc\fR.
+.RE
+.RE
+.RS +4
+.TP
+2.
+Otherwise, the string value of \fBFS\fR is considered to be an extended
+regular expression. Each occurrence of a sequence matching the extended regular
+expression delimits fields.
+.RE
+.sp
+.LP
+Except in the \fBgsub\fR, \fBmatch\fR, \fBsplit\fR, and \fBsub\fR built-in
+functions, regular expression matching is based on input records. That is,
+record separator characters (the first character of the value of the variable
+\fBRS\fR, a newline character by default) cannot be embedded in the expression,
+and no expression matches the record separator character. If the record
+separator is not a newline character, newline characters embedded in the
+expression can be matched. In those four built-in functions, regular expression
+matching are based on text strings. So, any character (including the newline
+character and the record separator) can be embedded in the pattern and an
+appropriate pattern matches any character. However, in all \fBnawk\fR regular
+expression matching, the use of one or more NULL characters in the pattern,
+input record or text string produces undefined results.
+.SS "Patterns"
+.sp
+.LP
+A \fIpattern\fR is any valid \fIexpression,\fR a range specified by two
+expressions separated by comma, or one of the two special patterns \fBBEGIN\fR
+or \fBEND\fR.
+.SS "Special Patterns"
+.sp
+.LP
+The \fBnawk\fR utility recognizes two special patterns, \fBBEGIN\fR and
+\fBEND\fR. Each \fBBEGIN\fR pattern is matched once and its associated action
+executed before the first record of input is read (except possibly by use of
+the \fBgetline\fR function in a prior \fBBEGIN\fR action) and before command
+line assignment is done. Each \fBEND\fR pattern is matched once and its
+associated action executed after the last record of input has been read. These
+two patterns have associated actions.
+.sp
+.LP
+\fBBEGIN\fR and \fBEND\fR do not combine with other patterns. Multiple
+\fBBEGIN\fR and \fBEND\fR patterns are allowed. The actions associated with the
+\fBBEGIN\fR patterns are executed in the order specified in the program, as are
+the \fBEND\fR actions. An \fBEND\fR pattern can precede a \fBBEGIN\fR pattern
+in a program.
+.sp
+.LP
+If an \fBnawk\fR program consists of only actions with the pattern \fBBEGIN\fR,
+and the \fBBEGIN\fR action contains no \fBgetline\fR function, \fBnawk\fR exits
+without reading its input when the last statement in the last \fBBEGIN\fR
+action is executed. If an \fBnawk\fR program consists of only actions with the
+pattern \fBEND\fR or only actions with the patterns \fBBEGIN\fR and \fBEND\fR,
+the input is read before the statements in the \fBEND\fR actions are executed.
+.SS "Expression Patterns"
+.sp
+.LP
+An expression pattern is evaluated as if it were an expression in a Boolean
+context. If the result is true, the pattern is considered to match, and the
+associated action (if any) is executed. If the result is false, the action is
+not executed.
+.SS "Pattern Ranges"
+.sp
+.LP
+A pattern range consists of two expressions separated by a comma. In this case,
+the action is performed for all records between a match of the first expression
+and the following match of the second expression, inclusive. At this point, the
+pattern range can be repeated starting at input records subsequent to the end
+of the matched range.
+.SS "Actions"
+.sp
+.LP
+An action is a sequence of statements. A statement can be one of the following:
+.sp
+.in +2
+.nf
+if ( \fIexpression\fR ) \fIstatement\fR [ else \fIstatement\fR ]
+while ( \fIexpression\fR ) \fIstatement\fR
+do \fIstatement\fR while ( \fIexpression\fR )
+for ( \fIexpression\fR ; \fIexpression\fR ; \fIexpression\fR ) \fIstatement\fR
+for ( \fIvar\fR in \fIarray\fR ) \fIstatement\fR
+delete \fIarray\fR[\fIsubscript\fR] #delete an array element
+break
+continue
+{ [ \fIstatement\fR ] .\|.\|. }
+\fIexpression\fR # commonly variable = expression
+print [ \fIexpression-list\fR ] [ >\fIexpression\fR ]
+printf format [ ,\fIexpression-list\fR ] [ >\fIexpression\fR ]
+next # skip remaining patterns on this input line
+exit [expr] # skip the rest of the input; exit status is expr
+return [expr]
+.fi
+.in -2
+
+.sp
+.LP
+Any single statement can be replaced by a statement list enclosed in braces.
+The statements are terminated by newline characters or semicolons, and are
+executed sequentially in the order that they appear.
+.sp
+.LP
+The \fBnext\fR statement causes all further processing of the current input
+record to be abandoned. The behavior is undefined if a \fBnext\fR statement
+appears or is invoked in a \fBBEGIN\fR or \fBEND\fR action.
+.sp
+.LP
+The \fBexit\fR statement invokes all \fBEND\fR actions in the order in which
+they occur in the program source and then terminate the program without reading
+further input. An \fBexit\fR statement inside an \fBEND\fR action terminates
+the program without further execution of \fBEND\fR actions. If an expression
+is specified in an \fBexit\fR statement, its numeric value is the exit status
+of \fBnawk\fR, unless subsequent errors are encountered or a subsequent
+\fBexit\fR statement with an expression is executed.
+.SS "Output Statements"
+.sp
+.LP
+Both \fBprint\fR and \fBprintf\fR statements write to standard output by
+default. The output is written to the location specified by
+\fIoutput_redirection\fR if one is supplied, as follows:
+.sp
+.in +2
+.nf
+\fB>\fR \fIexpression\fR\fB>>\fR \fIexpression\fR\fB|\fR \fIexpression\fR
+.fi
+.in -2
+
+.sp
+.LP
+In all cases, the \fIexpression\fR is evaluated to produce a string that is
+used as a full pathname to write into (for \fB>\fR or \fB>>\fR) or as a command
+to be executed (for \fB|\fR). Using the first two forms, if the file of that
+name is not currently open, it is opened, creating it if necessary and using
+the first form, truncating the file. The output then is appended to the file.
+As long as the file remains open, subsequent calls in which \fIexpression\fR
+evaluates to the same string value simply appends output to the file. The file
+remains open until the \fBclose\fR function, which is called with an expression
+that evaluates to the same string value.
+.sp
+.LP
+The third form writes output onto a stream piped to the input of a command. The
+stream is created if no stream is currently open with the value of
+\fIexpression\fR as its command name. The stream created is equivalent to one
+created by a call to the \fBpopen\fR(3C) function with the value of
+\fIexpression\fR as the \fIcommand\fR argument and a value of \fBw\fR as the
+\fImode\fR argument. As long as the stream remains open, subsequent calls in
+which \fIexpression\fR evaluates to the same string value writes output to the
+existing stream. The stream remains open until the \fBclose\fR function is
+called with an expression that evaluates to the same string value. At that
+time, the stream is closed as if by a call to the \fBpclose\fR function.
+.sp
+.LP
+These output statements take a comma-separated list of \fIexpression\fR \fIs\fR
+referred in the grammar by the non-terminal symbols \fBexpr_list,\fR
+\fBprint_expr_list\fR or \fBprint_expr_list_opt.\fR This list is referred to
+here as the \fIexpression list\fR, and each member is referred to as an
+\fIexpression argument\fR.
+.sp
+.LP
+The \fBprint\fR statement writes the value of each expression argument onto the
+indicated output stream separated by the current output field separator (see
+variable \fBOFS\fR above), and terminated by the output record separator (see
+variable \fBORS\fR above). All expression arguments is taken as strings, being
+converted if necessary; with the exception that the \fBprintf\fR format in
+\fBOFMT\fR is used instead of the value in \fBCONVFMT\fR. An empty expression
+list stands for the whole input record \fB(\fR$0\fB)\fR.
+.sp
+.LP
+The \fBprintf\fR statement produces output based on a notation similar to the
+File Format Notation used to describe file formats in this document Output is
+produced as specified with the first expression argument as the string
+\fBformat\fR and subsequent expression arguments as the strings \fBarg1\fR to
+\fBargn,\fR inclusive, with the following exceptions:
+.RS +4
+.TP
+1.
+The \fIformat\fR is an actual character string rather than a graphical
+representation. Therefore, it cannot contain empty character positions. The
+space character in the \fIformat\fR string, in any context other than a
+\fIflag\fR of a conversion specification, is treated as an ordinary character
+that is copied to the output.
+.RE
+.RS +4
+.TP
+2.
+If the character set contains a Delta character and that character appears
+in the \fIformat\fR string, it is treated as an ordinary character that is
+copied to the output.
+.RE
+.RS +4
+.TP
+3.
+The \fIescape sequences\fR beginning with a backslash character is treated
+as sequences of ordinary characters that are copied to the output. Note that
+these same sequences is interpreted lexically by \fBnawk\fR when they appear in
+literal strings, but they is not treated specially by the \fBprintf\fR
+statement.
+.RE
+.RS +4
+.TP
+4.
+A \fIfield width\fR or \fIprecision\fR can be specified as the \fB*\fR
+character instead of a digit string. In this case the next argument from the
+expression list is fetched and its numeric value taken as the field width or
+precision.
+.RE
+.RS +4
+.TP
+5.
+The implementation does not precede or follow output from the \fBd\fR or
+\fBu\fR conversion specifications with blank characters not specified by the
+\fIformat\fR string.
+.RE
+.RS +4
+.TP
+6.
+The implementation does not precede output from the \fBo\fR conversion
+specification with leading zeros not specified by the \fIformat\fR string.
+.RE
+.RS +4
+.TP
+7.
+For the \fBc\fR conversion specification: if the argument has a numeric
+value, the character whose encoding is that value is output. If the value is
+zero or is not the encoding of any character in the character set, the behavior
+is undefined. If the argument does not have a numeric value, the first
+character of the string value is output; if the string does not contain any
+characters the behavior is undefined.
+.RE
+.RS +4
+.TP
+8.
+For each conversion specification that consumes an argument, the next
+expression argument is evaluated. With the exception of the \fBc\fR conversion,
+the value is converted to the appropriate type for the conversion
+specification.
+.RE
+.RS +4
+.TP
+9.
+If there are insufficient expression arguments to satisfy all the conversion
+specifications in the \fIformat\fR string, the behavior is undefined.
+.RE
+.RS +4
+.TP
+10.
+If any character sequence in the \fIformat\fR string begins with a %
+character, but does not form a valid conversion specification, the behavior is
+unspecified.
+.RE
+.sp
+.LP
+Both \fBprint\fR and \fBprintf\fR can output at least \fB{LINE_MAX}\fR bytes.
+.SS "Functions"
+.sp
+.LP
+The \fBnawk\fR language has a variety of built-in functions: arithmetic,
+string, input/output and general.
+.SS "Arithmetic Functions"
+.sp
+.LP
+The arithmetic functions, except for \fBint\fR, are based on the \fBISO\fR
+\fBC\fR standard. The behavior is undefined in cases where the \fBISO\fR
+\fBC\fR standard specifies that an error be returned or that the behavior is
+undefined. Although the grammar permits built-in functions to appear with no
+arguments or parentheses, unless the argument or parentheses are indicated as
+optional in the following list (by displaying them within the \fB[ ]\fR
+brackets), such use is undefined.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBatan2(\fR\fIy\fR,\fIx\fR\fB)\fR\fR
+.ad
+.RS 17n
+.rt
+Return arctangent of \fIy\fR/\fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcos\fR(\fIx\fR)\fR
+.ad
+.RS 17n
+.rt
+Return cosine of \fIx,\fR where \fIx\fR is in radians.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsin\fR(\fIx\fR)\fR
+.ad
+.RS 17n
+.rt
+Return sine of \fIx,\fR where \fIx\fR is in radians.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexp\fR(\fIx\fR)\fR
+.ad
+.RS 17n
+.rt
+Return the exponential function of \fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlog\fR(\fIx\fR)\fR
+.ad
+.RS 17n
+.rt
+Return the natural logarithm of \fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsqrt\fR(\fIx\fR)\fR
+.ad
+.RS 17n
+.rt
+Return the square root of \fIx\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBint\fR(\fIx\fR)\fR
+.ad
+.RS 17n
+.rt
+Truncate its argument to an integer. It is truncated toward 0 when \fIx\fR > 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrand()\fR\fR
+.ad
+.RS 17n
+.rt
+Return a random number \fIn\fR, such that 0 \(<= \fIn\fR < 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsrand\fR([\fBexpr\fR])\fR
+.ad
+.RS 17n
+.rt
+Set the seed value for \fBrand\fR to \fIexpr\fR or use the time of day if
+\fIexpr\fR is omitted. The previous seed value is returned.
+.RE
+
+.SS "String Functions"
+.sp
+.LP
+The string functions in the following list shall be supported. Although the
+grammar permits built-in functions to appear with no arguments or parentheses,
+unless the argument or parentheses are indicated as optional in the following
+list (by displaying them within the \fB[ ]\fR brackets), such use is undefined.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgsub\fR(\fIere\fR,\fIrepl\fR[,\|\fIin\fR])\fR
+.ad
+.sp .6
+.RS 4n
+Behave like \fBsub\fR (see below), except that it replaces all occurrences of
+the regular expression (like the \fBed\fR utility global substitute) in
+\fB$0\fR or in the \fIin\fR argument, when specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindex\fR(\fIs\fR,\fIt\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Return the position, in characters, numbering from 1, in string \fIs\fR where
+string \fIt\fR first occurs, or zero if it does not occur at all.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlength\fR[([\fIs\fR])]\fR
+.ad
+.sp .6
+.RS 4n
+Return the length, in characters, of its argument taken as a string, or of the
+whole record, \fB$0\fR, if there is no argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmatch\fR(\fIs\fR,\fIere\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Return the position, in characters, numbering from 1, in string \fIs\fR where
+the extended regular expression \fIere\fR occurs, or zero if it does not occur
+at all. \fBRSTART\fR is set to the starting position (which is the same as the
+returned value), zero if no match is found; \fBRLENGTH\fR is set to the length
+of the matched string, \(mi1 if no match is found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsplit\fR(\fIs\fR,\fIa\fR[,\|\fIfs\fR])\fR
+.ad
+.sp .6
+.RS 4n
+Split the string \fIs\fR into array elements \fIa\fR[1], \fIa\fR[2],
+\fB\&...,\fR \fIa\fR[\fIn\fR], and return \fIn\fR. The separation is done with
+the extended regular expression \fIfs\fR or with the field separator \fBFS\fR
+if \fIfs\fR is not given. Each array element has a string value when created.
+If the string assigned to any array element, with any occurrence of the
+decimal-point character from the current locale changed to a period character,
+would be considered a \fInumeric string\fR; the array element also has the
+numeric value of the \fInumeric string\fR. The effect of a null string as the
+value of \fIfs\fR is unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsprintf\fR(\fBfmt\fR,\fIexpr\fR,\fIexpr\fR,\fB\&...\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Format the expressions according to the \fBprintf\fR format given by \fIfmt\fR
+and return the resulting string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsub\fR(\fIere\fR,\fIrepl\fR[,\|\fIin\fR])\fR
+.ad
+.sp .6
+.RS 4n
+Substitute the string \fIrepl\fR in place of the first instance of the extended
+regular expression \fBERE\fR in string in and return the number of
+substitutions. An ampersand ( \fB&\fR ) appearing in the string \fIrepl\fR is
+replaced by the string from in that matches the regular expression. An
+ampersand preceded with a backslash ( \fB\e\fR ) is interpreted as the literal
+ampersand character. An occurrence of two consecutive backslashes is
+interpreted as just a single literal backslash character. Any other occurrence
+of a backslash (for example, preceding any other character) is treated as a
+literal backslash character. If \fIrepl\fR is a string literal, the handling of
+the ampersand character occurs after any lexical processing, including any
+lexical backslash escape sequence processing. If \fBin\fR is specified and it
+is not an \fBlvalue\fR the behavior is undefined. If in is omitted, \fBnawk\fR
+uses the current record (\fB$0\fR) in its place.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsubstr\fR(\fIs\fR,\fIm\fR[,\|\fIn\fR])\fR
+.ad
+.sp .6
+.RS 4n
+Return the at most \fIn\fR-character substring of \fIs\fR that begins at
+position \fIm,\fR numbering from 1. If \fIn\fR is missing, the length of the
+substring is limited by the length of the string \fIs\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtolower\fR(\fIs\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Return a string based on the string \fIs\fR. Each character in \fIs\fR that is
+an upper-case letter specified to have a \fBtolower\fR mapping by the
+\fBLC_CTYPE\fR category of the current locale is replaced in the returned
+string by the lower-case letter specified by the mapping. Other characters in
+\fIs\fR are unchanged in the returned string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtoupper\fR(\fIs\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Return a string based on the string \fIs\fR. Each character in \fIs\fR that is
+a lower-case letter specified to have a \fBtoupper\fR mapping by the
+\fBLC_CTYPE\fR category of the current locale is replaced in the returned
+string by the upper-case letter specified by the mapping. Other characters in
+\fIs\fR are unchanged in the returned string.
+.RE
+
+.sp
+.LP
+All of the preceding functions that take \fIERE\fR as a parameter expect a
+pattern or a string valued expression that is a regular expression as defined
+below.
+.SS "Input/Output and General Functions"
+.sp
+.LP
+The input/output and general functions are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclose(\fR\fIexpression\fR)\fR
+.ad
+.RS 27n
+.rt
+Close the file or pipe opened by a \fBprint\fR or \fBprintf\fR statement or a
+call to \fBgetline\fR with the same string-valued \fIexpression\fR. If the
+close was successful, the function returns \fB0\fR; otherwise, it returns
+non-zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexpression\fR|\fBgetline\fR[\fIvar\fR]\fR
+.ad
+.RS 27n
+.rt
+Read a record of input from a stream piped from the output of a command. The
+stream is created if no stream is currently open with the value of
+\fIexpression\fR as its command name. The stream created is equivalent to one
+created by a call to the \fBpopen\fR function with the value of
+\fIexpression\fR as the \fIcommand\fR argument and a value of \fBr\fR as the
+\fImode\fR argument. As long as the stream remains open, subsequent calls in
+which \fIexpression\fR evaluates to the same string value reads subsequent
+records from the file. The stream remains open until the \fBclose\fR function
+is called with an expression that evaluates to the same string value. At that
+time, the stream is closed as if by a call to the \fBpclose\fR function. If
+\fIvar\fR is missing, \fB$0\fR and \fBNF\fR is set. Otherwise, \fIvar\fR is
+set.
+.sp
+The \fBgetline\fR operator can form ambiguous constructs when there are
+operators that are not in parentheses (including concatenate) to the left of
+the \fB|\fR (to the beginning of the expression containing \fBgetline\fR). In
+the context of the \fB$\fR operator, \fB|\fR behaves as if it had a lower
+precedence than \fB$\fR. The result of evaluating other operators is
+unspecified, and all such uses of portable applications must be put in
+parentheses properly.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetline\fR\fR
+.ad
+.RS 30n
+.rt
+Set \fB$0\fR to the next input record from the current input file. This form of
+\fBgetline\fR sets the \fBNF\fR, \fBNR\fR, and \fBFNR\fR variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetline\fR \fIvar\fR\fR
+.ad
+.RS 30n
+.rt
+Set variable \fIvar\fR to the next input record from the current input file.
+This form of \fBgetline\fR sets the \fBFNR\fR and \fBNR\fR variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetline\fR [\fIvar\fR] \fB<\fR \fIexpression\fR\fR
+.ad
+.RS 30n
+.rt
+Read the next record of input from a named file. The \fIexpression\fR is
+evaluated to produce a string that is used as a full pathname. If the file of
+that name is not currently open, it is opened. As long as the stream remains
+open, subsequent calls in which \fIexpression\fR evaluates to the same string
+value reads subsequent records from the file. The file remains open until the
+\fBclose\fR function is called with an expression that evaluates to the same
+string value. If \fIvar\fR is missing, \fB$0\fR and \fBNF\fR is set. Otherwise,
+\fIvar\fR is set.
+.sp
+The \fBgetline\fR operator can form ambiguous constructs when there are binary
+operators that are not in parentheses (including concatenate) to the right of
+the \fB<\fR (up to the end of the expression containing the \fBgetline\fR). The
+result of evaluating such a construct is unspecified, and all such uses of
+portable applications must be put in parentheses properly.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsystem\fR(\fIexpression\fR)\fR
+.ad
+.RS 30n
+.rt
+Execute the command given by \fIexpression\fR in a manner equivalent to the
+\fBsystem\fR(3C) function and return the exit status of the command.
+.RE
+
+.sp
+.LP
+All forms of \fBgetline\fR return \fB1\fR for successful input, \fB0\fR for end
+of file, and \fB\(mi1\fR for an error.
+.sp
+.LP
+Where strings are used as the name of a file or pipeline, the strings must be
+textually identical. The terminology ``same string value'' implies that
+``equivalent strings'', even those that differ only by space characters,
+represent different files.
+.SS "User-defined Functions"
+.sp
+.LP
+The \fBnawk\fR language also provides user-defined functions. Such functions
+can be defined as:
+.sp
+.in +2
+.nf
+\fBfunction\fR \fIname\fR(\fIargs\fR,\|.\|.\|.) { \fIstatements\fR }
+.fi
+.in -2
+
+.sp
+.LP
+A function can be referred to anywhere in an \fBnawk\fR program; in particular,
+its use can precede its definition. The scope of a function is global.
+.sp
+.LP
+Function arguments can be either scalars or arrays; the behavior is undefined
+if an array name is passed as an argument that the function uses as a scalar,
+or if a scalar expression is passed as an argument that the function uses as an
+array. Function arguments are passed by value if scalar and by reference if
+array name. Argument names are local to the function; all other variable names
+are global. The same name is not used as both an argument name and as the name
+of a function or a special \fBnawk\fR variable. The same name must not be used
+both as a variable name with global scope and as the name of a function. The
+same name must not be used within the same scope both as a scalar variable and
+as an array.
+.sp
+.LP
+The number of parameters in the function definition need not match the number
+of parameters in the function call. Excess formal parameters can be used as
+local variables. If fewer arguments are supplied in a function call than are in
+the function definition, the extra parameters that are used in the function
+body as scalars are initialized with a string value of the null string and a
+numeric value of zero, and the extra parameters that are used in the function
+body as arrays are initialized as empty arrays. If more arguments are supplied
+in a function call than are in the function definition, the behavior is
+undefined.
+.sp
+.LP
+When invoking a function, no white space can be placed between the function
+name and the opening parenthesis. Function calls can be nested and recursive
+calls can be made upon functions. Upon return from any nested or recursive
+function call, the values of all of the calling function's parameters are
+unchanged, except for array parameters passed by reference. The \fBreturn\fR
+statement can be used to return a value. If a \fBreturn\fR statement appears
+outside of a function definition, the behavior is undefined.
+.sp
+.LP
+In the function definition, newline characters are optional before the opening
+brace and after the closing brace. Function definitions can appear anywhere in
+the program where a \fIpattern-action\fR pair is allowed.
+.SH USAGE
+.sp
+.LP
+The \fBindex\fR, \fBlength\fR, \fBmatch\fR, and \fBsubstr\fR functions should
+not be confused with similar functions in the \fBISO C\fR standard; the
+\fBnawk\fR versions deal with characters, while the \fBISO C\fR standard deals
+with bytes.
+.sp
+.LP
+Because the concatenation operation is represented by adjacent expressions
+rather than an explicit operator, it is often necessary to use parentheses to
+enforce the proper evaluation precedence.
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBnawk\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.SH EXAMPLES
+.sp
+.LP
+The \fBnawk\fR program specified in the command line is most easily specified
+within single-quotes (for example, \fB\&'\fR\fIprogram\fR\fB\&'\fR) for
+applications using \fBsh\fR, because \fBnawk\fR programs commonly contain
+characters that are special to the shell, including double-quotes. In the cases
+where a \fBnawk\fR program contains single-quote characters, it is usually
+easiest to specify most of the program as strings within single-quotes
+concatenated by the shell with quoted single-quote characters. For example:
+.sp
+.in +2
+.nf
+nawk '/'\e''/ { print "quote:", $0 }'
+.fi
+.in -2
+
+.sp
+.LP
+prints all lines from the standard input containing a single-quote character,
+prefixed with \fBquote:\fR.
+.sp
+.LP
+The following are examples of simple \fBnawk\fR programs:
+.LP
+\fBExample 1 \fRWrite to the standard output all input lines for which field 3
+is greater than 5:
+.sp
+.in +2
+.nf
+\fB$3 > 5\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRWrite every tenth line:
+.sp
+.in +2
+.nf
+\fB(NR % 10) == 0\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRWrite any line with a substring matching the regular
+expression:
+.sp
+.in +2
+.nf
+\fB/(G|D)(2[0-9][[:alpha:]]*)/\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRPrint any line with a substring containing a G or D, followed
+by a sequence of digits and characters:
+.sp
+.LP
+This example uses character classes \fBdigit\fR and \fBalpha\fR to match
+language-independent digit and alphabetic characters, respectively.
+
+.sp
+.in +2
+.nf
+\fB/(G|D)([[:digit:][:alpha:]]*)/\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRWrite any line in which the second field matches the regular
+expression and the fourth field does not:
+.sp
+.in +2
+.nf
+\fB$2 ~ /xyz/ && $4 !~ /xyz/\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRWrite any line in which the second field contains a backslash:
+.sp
+.in +2
+.nf
+\fB$2 ~ /\e\e/\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRWrite any line in which the second field contains a backslash
+(alternate method):
+.sp
+.LP
+Notice that backslash escapes are interpreted twice, once in lexical processing
+of the string and once in processing the regular expression.
+
+.sp
+.in +2
+.nf
+\fB$2 ~ "\e\e\e\e"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRWrite the second to the last and the last field in each line,
+separating the fields by a colon:
+.sp
+.in +2
+.nf
+\fB{OFS=":";print $(NF-1), $NF}\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRWrite the line number and number of fields in each line:
+.sp
+.LP
+The three strings representing the line number, the colon and the number of
+fields are concatenated and that string is written to standard output.
+
+.sp
+.in +2
+.nf
+\fB{print NR ":" NF}\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 10 \fRWrite lines longer than 72 characters:
+.sp
+.in +2
+.nf
+\fB{length($0) > 72}\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 11 \fRWrite first two fields in opposite order separated by the OFS:
+.sp
+.in +2
+.nf
+\fB{ print $2, $1 }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 12 \fRSame, with input fields separated by comma or space and tab
+characters, or both:
+.sp
+.in +2
+.nf
+\fBBEGIN { FS = ",[\et]*|[\et]+" }
+ { print $2, $1 }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 13 \fRAdd up first column, print sum and average:
+.sp
+.in +2
+.nf
+\fB{s += $1 }
+END {print "sum is ", s, " average is", s/NR}\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 14 \fRWrite fields in reverse order, one per line (many lines out
+for each line in):
+.sp
+.in +2
+.nf
+\fB{ for (i = NF; i > 0; --i) print $i }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 15 \fRWrite all lines between occurrences of the strings "start" and
+"stop":
+.sp
+.in +2
+.nf
+\fB/start/, /stop/\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 16 \fRWrite all lines whose first field is different from the
+previous one:
+.sp
+.in +2
+.nf
+\fB$1 != prev { print; prev = $1 }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 17 \fRSimulate the echo command:
+.sp
+.in +2
+.nf
+\fBBEGIN {
+ for (i = 1; i < ARGC; ++i)
+ printf "%s%s", ARGV[i], i==ARGC-1?"\en":""
+ }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 18 \fRWrite the path prefixes contained in the PATH environment
+variable, one per line:
+.sp
+.in +2
+.nf
+\fBBEGIN {
+ n = split (ENVIRON["PATH"], path, ":")
+ for (i = 1; i <= n; ++i)
+ print path[i]
+ }\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 19 \fRPrint the file "input", filling in page numbers starting at 5:
+.sp
+.LP
+If there is a file named \fBinput\fR containing page headers of the form
+
+.sp
+.in +2
+.nf
+Page#
+.fi
+.in -2
+
+.sp
+.LP
+and a file named \fBprogram\fR that contains
+
+.sp
+.in +2
+.nf
+/Page/{ $2 = n++; }
+{ print }
+.fi
+.in -2
+
+.sp
+.LP
+then the command line
+
+.sp
+.in +2
+.nf
+\fBnawk -f program n=5 input\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints the file \fBinput\fR, filling in page numbers starting at 5.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect execution: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_NUMERIC\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the radix character used when interpreting numeric input, performing
+conversions between numeric and string values and formatting numeric output.
+Regardless of locale, the period character (the decimal-point character of the
+POSIX locale) is the decimal-point character recognized in processing \fBawk\fR
+programs (including assignments in command-line arguments).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input files were processed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+The exit status can be altered within the program by using an \fBexit\fR
+expression.
+
+.SH SEE ALSO
+.sp
+.LP
+\fBawk\fR(1), \fBed\fR(1), \fBegrep\fR(1), \fBgrep\fR(1), \fBlex\fR(1),
+\fBsed\fR(1), \fBpopen\fR(3C), \fBprintf\fR(3C), \fBsystem\fR(3C),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBregex\fR(5),
+\fBXPG4\fR(5)
+.sp
+.LP
+Aho, A. V., B. W. Kernighan, and P. J. Weinberger, \fIThe AWK Programming
+Language\fR, Addison-Wesley, 1988.
+.SH DIAGNOSTICS
+.sp
+.LP
+If any \fIfile\fR operand is specified and the named file cannot be accessed,
+\fBnawk\fR writes a diagnostic message to standard error and terminate without
+any further action.
+.sp
+.LP
+If the program specified by either the \fIprogram\fR operand or a
+\fIprogfile\fR operand is not a valid \fBnawk\fR program (as specified in
+\fBEXTENDED DESCRIPTION\fR), the behavior is undefined.
+.SH NOTES
+.sp
+.LP
+Input white space is not preserved on output if fields are involved.
+.sp
+.LP
+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 (\fB""\fR) to it.
diff --git a/usr/src/man/man1/nc.1 b/usr/src/man/man1/nc.1
new file mode 100644
index 0000000000..0aab2f1f71
--- /dev/null
+++ b/usr/src/man/man1/nc.1
@@ -0,0 +1,910 @@
+'\" te
+.\" Copyright (c) 1996 David Sacerdote All rights reserved.
+.\" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this
+.\" software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.TH nc 1 "Apr 9 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+nc \- arbitrary TCP and UDP connections and listens
+.SH SYNOPSIS
+.LP
+.nf
+\fBnc\fR \fB-h\fR
+.fi
+
+.LP
+.nf
+\fBnc\fR [\fB-46dnrtuvz\fR] [\fB-i\fR \fIinterval\fR] [\fB-P\fR \fIproxy_username\fR] [\fB-p\fR \fIport\fR]
+ [\fB-s\fR \fIsource_ip_address\fR] [\fB-T\fR \fIToS\fR] [\fB-w\fR \fItimeout\fR]
+ [\fB-X\fR \fIproxy_protocol\fR] [\fB-x\fR \fIproxy_address\fR[:\fIport\fR]]
+ \fIhostname\fR \fIport_list\fR
+.fi
+
+.LP
+.nf
+\fBnc\fR \fB-l\fR [\fB-46Ddnrtuvz\fR] [\fB-i\fR \fIinterval\fR] [\fB-T\fR \fIToS\fR] [\fIhostname\fR] \fIport\fR
+.fi
+
+.LP
+.nf
+\fBnc\fR \fB-l\fR [\fB-46Ddnrtuvz\fR] [\fB-i\fR \fIinterval\fR] [\fB-T\fR \fIToS\fR] \fB-p\fR \fIport\fR
+.fi
+
+.LP
+.nf
+\fBnc\fR \fB-U\fR [\fB-Ddtvz\fR] [\fB-i\fR \fIinterval\fR] [\fB-w\fR \fItimeout\fR] \fIpath\fR
+.fi
+
+.LP
+.nf
+\fBnc\fR \fB-Ul\fR [\fB-46Ddktv\fR] [\fB-i\fR \fIinterval\fR] \fIpath\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnc\fR (or \fBnetcat\fR) utility is used for a variety of tasks
+associated with TCP or UDP. \fBnc\fR can open TCP connections, send UDP
+packets, listen on arbitrary TCP and UDP ports, perform port scanning, and deal
+with both IPv4 and IPv6. Unlike \fBtelnet\fR(1), \fBnc\fR scripts nicely, and
+separates error messages onto standard error instead of sending them to
+standard output.
+.sp
+.LP
+The \fBnc\fR command is often used for the following tasks:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+simple TCP proxies
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+shell-script based HTTP clients and servers
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+network daemon testing
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a SOCKS or HTTP \fBProxyCommand\fR for \fBssh\fR(1)
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-4\fR\fR
+.ad
+.sp .6
+.RS 4n
+Force \fBnc\fR to use IPv4 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-6\fR\fR
+.ad
+.sp .6
+.RS 4n
+Force \fBnc\fR to use IPv6 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable debugging on the socket.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not attempt to read from \fBstdin\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print \fBnc\fR help.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIinterval\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a delay time of \fIinterval\fR between lines of text sent and received.
+This option also causes a delay time between connections to multiple ports.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.sp .6
+.RS 4n
+Force \fBnc\fR to listen for another connection after its current connection is
+closed.
+.sp
+It is an error to use this option without the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Listen for an incoming connection rather than initiate a connection to a remote
+host.
+.sp
+It is an error to use this option in conjunction with the \fB-s\fR or \fB-z\fR
+options. Additionally, any \fItimeout\fR specified with the \fB-w\fR option is
+ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not do any naming or service lookups on any addresses, hostnames, or ports.
+.sp
+Use of this option means that \fIhostname\fR and \fIport\fR arguments are
+restricted to numeric values.
+.sp
+If used with \fB-v\fR option all addresses and ports are printed in numeric
+form, in addition to the restriction imposed on the arguments. This option does
+not have any effect when used in conjunction with the \fB-U\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIproxy_username\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a username (\fIproxy_username\fR) to present to a proxy server that
+requires authentication. If \fIproxy_username\fR is not specified,
+authentication is not attempted. Proxy authentication is only supported for
+\fBHTTP CONNECT\fR proxies at present.
+.sp
+It is an error to use this option in conjunction with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIport\fR\fR
+.ad
+.sp .6
+.RS 4n
+When used without \fB-l\fR option, specify the source port \fBnc\fR should use,
+subject to privilege restrictions and availability. When used with the \fB-l\fR
+option, set the listen port.
+.sp
+This option can be used with \fB-l\fR option only provided global port argument
+is not specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Choose source or destination ports randomly instead of sequentially within a
+range or in the order that the system assigns them.
+.sp
+It is an error to use this option in conjunction with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsource_ip_address\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the IP of the interface which is used to send the packets.
+.sp
+It is an error to use this option in conjunction with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fIToS\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify IP Type of Service (\fBToS\fR) for the connection. Valid values are the
+tokens: \fBlowdelay\fR, \fBthroughput\fR, \fBreliability\fR, or an 8-bit
+hexadecimal value preceded by \fB0x\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Cause \fBnc\fR to send \fIRFC 854\fR \fBDON'T\fR and \fBWON'T\fR responses to
+\fIRFC 854\fR \fBDO\fR and \fBWILL\fR requests. This makes it possible to use
+\fBnc\fR to script \fBtelnet\fR sessions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the use of Unix Domain Sockets. If you specify this option without
+\fB-l\fR, \fBnc\fR, it becomes \fBAF_UNIX\fR client. If you specify this option
+with the \fB-l\fR option, a \fBAF_UNIX\fR server is created.
+.sp
+Use of this option requires that a single argument of a valid Unix domain path
+has to be provided to \fBnc\fR, not a host name or port.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use UDP instead of the default option of TCP.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify verbose output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fItimeout\fR\fR
+.ad
+.sp .6
+.RS 4n
+Silently close the connection if a connection and \fBstdin\fR are idle for more
+than \fItimeout\fR seconds.
+.sp
+This option has no effect on the \fB-l\fR option, that is, \fBnc\fR listens
+forever for a connection, with or without the \fB-w\fR flag. The default is no
+timeout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR \fIproxy_protocol\fR\fR
+.ad
+.sp .6
+.RS 4n
+Use the specified protocol when talking to the proxy server. Supported
+protocols are \fB4\fR (\fBSOCKS v.4\fR), \fB5\fR (\fBSOCKS v.5\fR) and
+\fBconnect\fR (\fBHTTP\fR proxy). If the protocol is not specified, \fBSOCKS v.
+5\fR is used.
+.sp
+It is an error to use this option in conjunction with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIproxy_address\fR[:\fIport\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Request connection to \fIhostname\fR using a proxy at \fIproxy_address\fR and
+\fIport\fR. If \fIport\fR is not specified, the well-known port for the proxy
+protocol is used (\fB1080\fR for \fBSOCKS\fR, \fB3128\fR for \fBHTTP\fR).
+.sp
+It is an error to use this option in conjunction with the \fB-l\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.sp .6
+.RS 4n
+Scan for listening daemons, without sending any data to them.
+.sp
+It is an error to use this option in conjunction with the \fB-l\fR option.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhostname\fR\fR
+.ad
+.RS 13n
+.rt
+Specify host name.
+.sp
+\fIhostname\fR can be a numerical IP address or a symbolic hostname (unless the
+\fB-n\fR option is specified).
+.sp
+In general, \fIhostname\fR must be specified, unless the \fB-l\fR option is
+given or \fB-U\fR is used (in which case the argument is a path). If
+\fIhostname\fR argument is specified with \fB-l\fR option then \fIport\fR
+argument must be given as well and \fBnc\fR tries to bind to that address and
+port. If \fIhostname\fR argument is not specified with \fB-l\fR option then
+\fBnc\fR tries to listen on a wildcard socket for given \fIport\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath\fR\fR
+.ad
+.RS 13n
+.rt
+Specify pathname.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIport\fR\fR
+.ad
+.br
+.na
+\fB\fIport_list\fR\fR
+.ad
+.RS 13n
+.rt
+Specify port.
+.sp
+\fIport_list\fR can be specified as single integers, ranges or combinations of
+both. Specify ranges in the form of \fInn-mm\fR. The \fIport_list\fR must have
+at least one member, but can have multiple ports/ranges separated by commas.
+.sp
+In general, a destination port must be specified, unless the \fB-U\fR option is
+given, in which case a Unix Domain Socket path must be specified instead of
+\fIhostname\fR.
+.RE
+
+.SH USAGE
+.SS "Client/Server Model"
+.sp
+.LP
+It is quite simple to build a very basic client/server model using \fBnc\fR. On
+one console, start \fBnc\fR listening on a specific port for a connection. For
+example, the command:
+.sp
+.in +2
+.nf
+$ nc -l 1234
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+listens on port \fB1234\fR for a connection. On a second console (or a second
+machine), connect to the machine and port to which \fBnc\fR is listening:
+.sp
+.in +2
+.nf
+$ nc 127.0.0.1 1234
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+There should now be a connection between the ports. Anything typed at the
+second console is concatenated to the first, and vice-versa. After the
+connection has been set up, \fBnc\fR does not really care which side is being
+used as a \fBserver\fR and which side is being used as a \fBclient\fR. The
+connection can be terminated using an \fBEOF\fR (Ctrl/d).
+.SS "Data Transfer"
+.sp
+.LP
+The example in the previous section can be expanded to build a basic data
+transfer model. Any information input into one end of the connection is output
+to the other end, and input and output can be easily captured in order to
+emulate file transfer.
+.sp
+.LP
+Start by using \fBnc\fR to listen on a specific port, with output captured into
+a file:
+.sp
+.in +2
+.nf
+$ nc -l 1234 > filename.out
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Using a second machine, connect to the listening \fBnc\fR process, feeding it
+the file which is to be transferred:
+.sp
+.in +2
+.nf
+$ nc host.example.com 1234 < filename.in
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+After the file has been transferred, the connection closes automatically.
+.SS "Talking to Servers"
+.sp
+.LP
+It is sometimes useful to talk to servers \fBby hand\fR rather than through a
+user interface. It can aid in troubleshooting, when it might be necessary to
+verify what data a server is sending in response to commands issued by the
+client.
+.sp
+.LP
+For example, to retrieve the home page of a web site:
+.sp
+.in +2
+.nf
+$ echo -n "GET / HTTP/1.0\er\en\er\en" | nc host.example.com 80
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This also displays the headers sent by the web server. They can be filtered, if
+necessary, by using a tool such as \fBsed\fR(1).
+.sp
+.LP
+More complicated examples can be built up when the user knows the format of
+requests required by the server. As another example, an email can be submitted
+to an SMTP server using:
+.sp
+.in +2
+.nf
+$ nc localhost 25 << EOF
+HELO host.example.com
+MAIL FROM: <user@host.example.com
+RCTP TO: <user2@host.example.com
+DATA
+Body of email.
+\&.
+QUIT
+EOF
+.fi
+.in -2
+.sp
+
+.SS "Port Scanning"
+.sp
+.LP
+It can be useful to know which ports are open and running services on a target
+machine. The \fB-z\fR flag can be used to tell \fBnc\fR to report open ports,
+rather than to initiate a connection.
+.sp
+.LP
+In this example:
+.sp
+.in +2
+.nf
+$ nc -z host.example.com 20-30
+Connection to host.example.com 22 port [tcp/ssh] succeeded!
+Connection to host.example.com 25 port [tcp/smtp] succeeded!
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The port range was specified to limit the search to ports 20 - 30.
+.sp
+.LP
+Alternatively, it might be useful to know which server software is running, and
+which versions. This information is often contained within the greeting
+banners. In order to retrieve these, it is necessary to first make a
+connection, and then break the connection when the banner has been retrieved.
+This can be accomplished by specifying a small timeout with the \fB-w\fR flag,
+or perhaps by issuing a \fBQUIT\fR command to the server:
+.sp
+.in +2
+.nf
+$ echo "QUIT" | nc host.example.com 20-30
+SSH-2.0-Sun_SSH_1.1
+Protocol mismatch.
+220 host.example.com IMS SMTP Receiver Version 0.84 Ready
+.fi
+.in -2
+.sp
+
+.SS "\fBinetd\fR Capabilities"
+.sp
+.LP
+One of the possible uses is to create simple services by using \fBinetd\fR(1M).
+.sp
+.LP
+The following example creates a redirect from TCP port 8080 to port 80 on host
+\fBrealwww\fR:
+.sp
+.in +2
+.nf
+# cat << EOF >> /etc/services
+wwwredir 8080/tcp # WWW redirect
+EOF
+# cat << EOF > /tmp/wwwredir.conf
+wwwredir stream tcp nowait nobody /usr/bin/nc /usr/bin/nc -w 3 realwww 80
+EOF
+# inetconv -i /tmp/wwwredir.conf
+wwwredir -> /var/svc/manifest/network/wwwredir-tcp.xml
+Importing wwwredir-tcp.xml ...Done
+# inetadm -l wwwredir/tcp
+SCOPE NAME=VALUE
+name="wwwredir"
+endpoint_type="stream"
+proto="tcp"
+isrpc=FALSE
+wait=FALSE
+exec="/usr/bin/nc -w 3 realwww 80"
+arg0="/usr/bin/nc"
+user="nobody"
+default bind_addr=""
+default bind_fail_max=-1
+default bind_fail_interval=-1
+default max_con_rate=-1
+default max_copies=-1
+default con_rate_offline=-1
+default failrate_cnt=40
+default failrate_interval=60
+default inherit_env=TRUE
+default tcp_trace=TRUE
+default tcp_wrappers=FALSE
+.fi
+.in -2
+.sp
+
+.SS "Privileges"
+.sp
+.LP
+To bind to a privileged port number \fBnc\fR needs to be granted the
+\fBnet_privaddr\fR privilege. If Solaris Trusted Extensions are configured and
+the port \fBnc\fR should listen on is configured as a multi-level port \fBnc\fR
+also needs the \fBnet_bindmlp\fR privilege.
+.sp
+.LP
+Privileges can be assigned to the user or role directly, by specifying them in
+the account's default privilege set in \fBuser_attr\fR(4). However, this means
+that any application that this user or role starts have these additional
+privileges. To only grant the \fBprivileges\fR(5) when \fBnc\fR is invoked, the
+recommended approach is to create and assign an \fBrbac\fR(5) rights profile.
+See \fBEXAMPLES\fR for additional information.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBnc\fR
+.sp
+.LP
+Open a TCP connection to port \fB42\fR of \fBhost.example.com\fR, using port
+\fB3141\fR as the source port, with a timeout of \fB5\fR seconds:
+
+.sp
+.in +2
+.nf
+$ nc -p 3141 -w 5 host.example.com 42
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Open a UDP connection to port \fB53\fR of \fBhost.example.com\fR:
+
+.sp
+.in +2
+.nf
+$ nc -u host.example.com 53
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Open a TCP connection to port 42 of \fBhost.example.com\fR using \fB10.1.2.3\fR
+as the IP for the local end of the connection:
+
+.sp
+.in +2
+.nf
+$ nc -s 10.1.2.3 host.example.com 42
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Use a list of ports and port ranges for a port scan on various ports:
+
+.sp
+.in +2
+.nf
+$ nc -z host.example.com 21-25,53,80,110-120,443
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Create and listen on a Unix Domain Socket:
+
+.sp
+.in +2
+.nf
+$ nc -lU /var/tmp/dsocket
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Create and listen on a UDP socket with associated port \fB8888\fR:
+
+.sp
+.in +2
+.nf
+$ nc -u -l -p 8888
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+which is the same as:
+
+.sp
+.in +2
+.nf
+$ nc -u -l 8888
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Create and listen on a TCP socket with associated port \fB2222\fR and bind to
+address \fB127.0.0.1\fR only:
+
+.sp
+.in +2
+.nf
+$ nc -l 127.0.0.1 2222
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Connect to port \fB42\fR of \fBhost.example.com\fR using an HTTP proxy at
+\fB10.2.3.4\fR, port \fB8080\fR. This example could also be used by
+\fBssh\fR(1). See the \fBProxyCommand\fR directive in \fBssh_config\fR(4) for
+more information.
+
+.sp
+.in +2
+.nf
+$ nc -x10.2.3.4:8080 -Xconnect host.example.com 42
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The same example again, this time enabling proxy authentication with username
+\fBruser\fR if the proxy requires it:
+
+.sp
+.in +2
+.nf
+$ nc -x10.2.3.4:8080 -Xconnect -Pruser host.example.com 42
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To run \fBnc\fR with the smallest possible set of privileges as a user or role
+that has additional privileges (such as the default \fBroot\fR account) it can
+be invoked using \fBppriv\fR(1) as well. For example, limiting it to only run
+with the privilege to bind to a privileged port:
+
+.sp
+.in +2
+.nf
+$ ppriv -e -sA=basic,!file_link_any,!proc_exec,!proc_fork,\e
+!proc_info,!proc_session,net_privaddr nc -l 42
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To allow a user or role to use only \fBnc\fR with the \fBnet_privaddr\fR
+privilege, a rights profile needs to be created:
+
+.sp
+.in +2
+.nf
+/etc/security/exec_attr
+Netcat privileged:solaris:cmd:::/usr/bin/nc:privs=net_privaddr
+
+/etc/security/prof_attr
+Netcat privileged:::Allow nc to bind to privileged ports:help=None.html
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Assigning this rights profile using \fBuser_attr\fR(4) permits the user or role
+to run \fBnc\fR allowing it to listen on any port. To permit a user or role to
+use \fBnc\fR only to listen on specific ports a wrapper script should be
+specified in the rights profiles:
+
+.sp
+.in +2
+.nf
+/etc/security/exec_attr
+Netcat restricted:solaris:cmd:::/usr/bin/nc-restricted:privs=net_privaddr
+
+/etc/security/prof_attr
+Netcat restricted:::Allow nc to bind to privileged ports:help=None.html
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and write a shell script that restricts the permissible options, for example,
+one that permits one to bind only on ports between \fB42\fR and \fB64\fR
+(non-inclusive):
+
+.sp
+.in +2
+.nf
+/usr/bin/nc-restricted:
+
+#!/bin/sh
+[ $# -eq 1 ] && [ $1 -gt 42 -a $1 -lt 64 ] && /usr/bin/nc -l -p "$1"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This grants the extra privileges when the user or role invokes \fBnc\fR using
+the wrapper script from a profile shell. See \fBpfsh\fR(1), \fBpfksh\fR(1),
+\fBpfcsh\fR(1), and \fBpfexec\fR(1).
+
+.sp
+.LP
+Invoking \fBnc\fR directly does not run it with the additional privileges, and
+neither does invoking the script without using \fBpfexec\fR or a profile shell.
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The package name is Committed. The command line syntax is Committed for the
+\fB-4\fR, \fB-6,\fR \fB-l\fR, \fB-n\fR, \fB-p\fR ,\fB-u\fR, and \fB-w\fR
+options and their arguments (if any). The \fIname\fR and \fIport\fR list
+arguments are Committed. The port range syntax is Uncommitted. The interface
+stability level for all other command line options and their arguments is
+Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBpfcsh\fR(1), \fBpfexec\fR(1), \fBpfksh\fR(1), \fBpfsh\fR(1),
+\fBppriv\fR(1), \fBsed\fR(1), \fBssh\fR(1), \fBtelnet\fR(1), \fBinetadm\fR(1M),
+\fBinetconv\fR(1M), \fBinetd\fR(1M), \fBssh_config\fR(4), \fBuser_attr\fR(4),
+\fBattributes\fR(5), \fBprivileges\fR(5), \fBrbac\fR(5)
+.SH AUTHORS
+.sp
+.LP
+The original implementation of \fBnc\fR was written by Hobbit,
+\fBhobbit@avian.org\fR.
+.sp
+.LP
+\fBnc\fR was rewritten with IPv6 support by Eric Jackson,
+\fBericj@monkey.org\fR.
+.SH NOTES
+.sp
+.LP
+UDP port scans always succeeds, that is, reports the port as open, rendering
+the \fB-uz\fR combination of flags relatively useless.
diff --git a/usr/src/man/man1/nca.1 b/usr/src/man/man1/nca.1
new file mode 100644
index 0000000000..69772419c9
--- /dev/null
+++ b/usr/src/man/man1/nca.1
@@ -0,0 +1,173 @@
+'\" te
+.\" Copyright (C) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nca 1 "22 Feb 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+nca, snca \- the Solaris Network Cache and Accelerator (NCA)
+.SH DESCRIPTION
+.sp
+.LP
+The Solaris Network Cache and Accelerator ("\fBNCA\fR") is a kernel module
+designed to provide improved web server performance. The kernel module,
+\fBncakmod\fR, services \fBHTTP\fR requests. To improve the performance of
+servicing \fBHTTP\fR requests, the \fBNCA\fR kernel module maintains an
+in-kernel cache of web pages. If the \fBNCA\fR kernel module cannot service the
+request itself, it passes the request to the \fBhttp\fR daemon (\fBhttpd\fR).
+It uses either a sockets interface, with family type designated \fBPF_NCA\fR,
+or a private Solaris doors interface that is based on the Solaris doors RPC
+mechanism, to pass the request.
+.sp
+.LP
+To use the sockets interface, the web server must open a socket of family type
+\fBPF_NCA\fR. The \fBPF_NCA\fR family supports only \fBSOCK_STREAM\fR and
+protocol 0, otherwise an error occurs.
+.sp
+.LP
+The following features are not presently supported:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+You cannot initiate a connection from a \fBPF_NCA\fR type socket. The
+\fBconnect\fR(3SOCKET) interface on \fBPF_NCA\fR fails.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+System calls that are associated with type \fBSO_DGRAM\fR, such as
+\fBsend()\fR, \fBsendto()\fR, \fBsendmsg()\fR, \fBrecv()\fR, \fBrecvfrom()\fR,
+and \fBrecvmsg()\fR, fails.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+You cannot set TCP or IP options on a \fBPF_NCA\fR type socket through
+\fBsetsockopt\fR(3SOCKET).
+.RE
+.sp
+.LP
+The \fBNCA\fR cache consistency is maintained by honoring \fBHTTP\fR headers
+that deal with a given content type and expiration date, much the same way as a
+proxy cache.
+.sp
+.LP
+For configuration information, see \fISystem Administration Guide: IP
+Services\fR
+.sp
+.LP
+When native \fBPF_NCA\fR socket support does not exist in the web server, the
+\fBncad_addr\fR(4) interface must be used to provide NCA support in that web
+server.
+.sp
+.LP
+\fBNCA\fR is intended to be run on a dedicated web server. Running other large
+processes while running \fBNCA\fR might cause undesirable behavior.
+.sp
+.LP
+\fBNCA\fR supports the logging of in-kernel cache hits. See
+\fBncalogd.conf\fR(4). \fBNCA\fR stores logs in a binary format. Use the
+\fBncab2clf\fR(1) utility to convert the log from a binary format to the Common
+Log File format.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nca/ncakmod.conf\fR\fR
+.ad
+.RS 25n
+.rt
+Lists configuration parameters for \fBNCA\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nca/ncalogd.conf\fR\fR
+.ad
+.RS 25n
+.rt
+Lists configuration parameters for \fBNCA\fR logging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nca/nca.if\fR\fR
+.ad
+.RS 25n
+.rt
+Lists the physical interfaces on which \fBNCA\fR runs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nca/ncaport.conf\fR\fR
+.ad
+.RS 25n
+.rt
+\fBncaport\fR configuration file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hostname.{}{0-9}\fR\fR
+.ad
+.RS 25n
+.rt
+Lists all physical interfaces configured on the server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hosts\fR\fR
+.ad
+.RS 25n
+.rt
+Lists all host names associated with the server. Entries in this file must
+match with entries in \fB/etc/hostname.{}{0-9}\fR for \fBNCA\fR to function.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBncab2clf\fR(1), \fBncakmod\fR(1), \fBclose\fR(2), \fBread\fR(2),
+\fBwrite\fR(2), \fBsendfilev\fR(3EXT), \fBaccept\fR(3SOCKET),
+\fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET), \fBdoor_bind\fR(3C),
+\fBdoor_call\fR(3C), \fBdoor_create\fR(3C), \fBgetsockopt\fR(3SOCKET),
+\fBlisten\fR(3SOCKET), \fBsetsockopt\fR(3SOCKET), \fBshutdown\fR(3SOCKET),
+\fBsocket.h\fR(3HEAD), \fBsocket\fR(3SOCKET), \fBncad_addr\fR(4),
+\fBnca.if\fR(4), \fBncakmod.conf\fR(4), \fBncaport.conf\fR(4),
+\fBncalogd.conf\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: IP Services\fR
diff --git a/usr/src/man/man1/ncab2clf.1 b/usr/src/man/man1/ncab2clf.1
new file mode 100644
index 0000000000..65f2cf4867
--- /dev/null
+++ b/usr/src/man/man1/ncab2clf.1
@@ -0,0 +1,229 @@
+'\" te
+.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ncab2clf 1 "28 Sep 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+ncab2clf \- convert binary log file to Common Log File format
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ncab2clf\fR [\fB-Dhv\fR] [\fB-i\fR \fIinput-file\fR] [\fB-o\fR \fIoutput-file\fR]
+ [\fB-b\fR \fIsize\fR] [\fB-n\fR \fInumber\fR] [\fB-s\fR \fIdatetime\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBncab2clf\fR command is used to convert the log file generated by the
+Solaris Network Cache and Accelerator ("\fBNCA\fR") from binary format, to
+Common Log File ("\fBCLF\fR") format. If no \fIinput-file\fR is specified,
+\fBncab2clf\fR uses \fBstdin\fR. If no \fIoutput-file\fR is specified, the
+output goes to \fBstdout\fR.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the binary-log-file blocking in kilobytes; the default is 64 Kbyte.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies that direct \fBI/O\fR be disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 18n
+.rt
+Prints usage message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIinput-file\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the input file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR\fR
+.ad
+.RS 18n
+.rt
+Output \fInumber\fR CLF records.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutput-file\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIdatetime\fR\fR
+.ad
+.RS 18n
+.rt
+Skip any records before the date and time specified in \fIdatetime\fR. You can
+specify the date and time in CLF format or in the format specified by the
+\fBtouch\fR(1) utility. CLF format is the dominant format, so \fBncab2clf\fR
+first analyzes \fIdatetime\fR assuming CLF.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Provides verbose output.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRConverting a Binary File to a Common Log File Format
+.sp
+.LP
+The following example converts the binary file \fB/var/nca/logs/nca.blf\fR to a
+file \fB/var/nca/logs/nca.clf\fR, which is in Common Log File format.
+
+.sp
+.in +2
+.nf
+example% \fBncab2clf -D -i /var/nca/logs/nca.blf -o /var/nca/logs/nca.clf\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRConverting Multiple Log Files
+.sp
+.LP
+The following script may be used to convert multiple log files. The directory
+designated by "\fB*\fR" must only contain log files.
+
+.sp
+.in +2
+.nf
+!/bin/ksh
+for filename in *
+do
+ ncab2clf -D < $filename > $filename.clf
+done
+.fi
+.in -2
+
+.LP
+\fBExample 3 \fRUsing \fB-s\fR and \fB-n\fR on a Raw Device
+.sp
+.LP
+The following example shows how \fBncab2clf\fR can be used on a raw device. If
+not using the \fB-n\fR option, the default is to convert all records from the
+starting location to the end of the file. The date and time specified with
+\fB-s\fR, below, is in CLF format.
+
+.sp
+.in +2
+.nf
+example% ncab2clf -s '10/Apr/2001:09:23:13' -n 100 < /dev/dsk/c2t1d0s6
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+The file converted successfully
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBnca\fR(1), \fBncakmod\fR(1), \fBnca.if\fR(4), \fBncakmod.conf\fR(4),
+\fBncalogd.conf\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: IP Services\fR
+.SH NOTES
+.sp
+.LP
+The binary log files generated by \fBNCA\fR can become very large. When
+converting these large binary files, use the \fB-b\fR option to the
+\fBncab2clf\fR command to help performance.
+.sp
+.LP
+Direct \fBI/O\fR is a benefit to the user if the data being written does not
+come in as large chunks. However, if the user wishes to convert the log file in
+large chunks using the \fB-b\fR option, then direct \fBI/O\fR should be
+disabled by using the \fB-D\fR option.
diff --git a/usr/src/man/man1/ncakmod.1 b/usr/src/man/man1/ncakmod.1
new file mode 100644
index 0000000000..ed3dded2d2
--- /dev/null
+++ b/usr/src/man/man1/ncakmod.1
@@ -0,0 +1,123 @@
+'\" te
+.\" Copyright (C) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ncakmod 1 "28 Sep 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+ncakmod \- start or stop the NCA kernel module
+.SH SYNOPSIS
+.LP
+.nf
+\fB/etc/init.d/ncakmod\fR \fBstart\fR | \fBstop\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBncakmod\fR is used to start or stop the Solaris Network Cache and
+Accelerator ("NCA") kernel module.
+.sp
+.LP
+When the \fBstart\fR option is specified at the command-line, the \fBNCA\fR
+kernel module will be activated for all physical interfaces listed in the
+\fBnca.if\fR file. When the \fBncakmod\fR command is invoked with the
+\fBstop\fR option, the NCA kernel module will print the following message:
+.sp
+.in +2
+.nf
+To stop NCA, please set the status configuration parameter
+to disable in ncakmod.conf and then reboot your system. See
+the ncakmod.conf(4) manual page for more information.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Note that in order to properly stop \fBNCA\fR on your system, you must first
+edit the \fBncakmod.conf\fR(4) file and set the status field to "disable," then
+reboot your system.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstart\fR\fR
+.ad
+.RS 9n
+.rt
+Starts the \fBNCA\fR kernel module.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR\fR
+.ad
+.RS 9n
+.rt
+Describes the current method for stopping the \fBNCA\fR feature.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRStarting and Stopping the NCA Feature
+.sp
+.LP
+The following command is used to start the NCA feature:
+
+.sp
+.in +2
+.nf
+example% \fB/etc/init.d/ncakmod start\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/init.d/ncakmod\fR\fR
+.ad
+.RS 25n
+.rt
+The NCA kernel module startup script.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nca/ncakmod.conf\fR\fR
+.ad
+.RS 25n
+.rt
+Specifies configuration options for the NCA kernel module.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBnca\fR(1), \fBncab2clf\fR(1), \fBncad_addr\fR(4), \fBnca.if\fR(4),
+\fBncakmod.conf\fR(4), \fBncalogd.conf\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/newform.1 b/usr/src/man/man1/newform.1
new file mode 100644
index 0000000000..cbae5c43c6
--- /dev/null
+++ b/usr/src/man/man1/newform.1
@@ -0,0 +1,323 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH newform 1 "21 Jul 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+newform \- change the format of a text file
+.SH SYNOPSIS
+.LP
+.nf
+\fBnewform\fR [\fB-s\fR] [\fB-i\fR\fItabspec\fR] [\fB-o\fR\fItabspec\fR] [\fB-b\fR\fIn\fR] [\fB-e\fR\fIn\fR] [\fB-p\fR\fIn\fR]
+ [\fB-a\fR\fIn\fR] [\fB-f\fR] [\fB-c\fR\fIchar\fR] [\fB-l\fR\fIn\fR] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBnewform\fR reads lines from the named \fIfilename\fRs, 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.
+.sp
+.LP
+Except for \fB-s\fR, command line options may appear in any order, may be
+repeated, and may be intermingled with the optional \fIfilename\fRs. Command
+line options are processed in the order specified. This means that option
+sequences like ``\fB-e\fR15 \fB-l\fR60'' will yield results different from
+``\fB-l\fR60 \fB-e\fR15''. Options are applied to all \fIfilename\fRs on the
+command line.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 14n
+.rt
+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
+\fB*\fR and any characters to the right of it are discarded. The first tab is
+always discarded.
+.sp
+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.
+.sp
+For example, to convert a file with leading digits, one or more tabs, and text
+on each line, to a file beginning with the text, all tabs after the first
+expanded to spaces, padded with spaces out to column 72 (or truncated to column
+72), and the leading digits placed starting at column 73, the command would be:
+.sp
+\fBnewform \|\fR\fB-s\fR\fB \|\fR\fB-i\fR\fB \|\fR\fB-l\fR\fB \|\fR\fB-a\fR\fB
+\|\fR\fB-e\fR\fB \|\fIfilename\fR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fItabspec\fR \fR
+.ad
+.RS 14n
+.rt
+Input tab specification: expands tabs to spaces, according to the tab
+specifications given. \fITabspec\fR recognizes all tab specification forms
+described in \fBtabs\fR(1). In addition, \fItabspec\fR may be \fB-\fR, in which
+\fBnewform\fR assumes that the tab specification is to be found in the first
+line read from the standard input (see \fBfspec\fR(4)). If no \fItabspec\fR is
+given, \fItabspec\fR defaults to \fB\(mi8\fR\&. A \fItabspec\fR of \fB\(mi0\fR
+expects no tabs; if any are found, they are treated as \fB\(mi1\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fItabspec\fR \fR
+.ad
+.RS 14n
+.rt
+Output tab specification: replaces spaces by tabs, according to the tab
+specifications given. The tab specifications are the same as for
+\fB-i\fR\fItabspec\fR. If no \fItabspec\fR is given, \fItabspec\fR defaults to
+\fB\(mi8\fR\&. A \fItabspec\fR of \fB\(mi0\fR means that no spaces will be
+converted to tabs on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fIn\fR \fR
+.ad
+.RS 14n
+.rt
+Truncate \fIn\fR characters from the beginning of the line when the line length
+is greater than the effective line length (see \fB\(mil\fIn\fR\fR). Default is
+to truncate the number of characters necessary to obtain the effective line
+length. The default value is used when \fB-b\fR with no \fIn\fR is used. This
+option can be used to delete the sequence numbers from a \fBCOBOL\fR program as
+follows:
+.sp
+\fBnewform \|\fR\fB-l\fR\fB1 \|\fR\fB-b\fR\fB7 \|\fIfilename\fR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fIn\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-b\fR\fIn\fR except that characters are truncated from the end of
+the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fIn\fR\fR
+.ad
+.RS 14n
+.rt
+Prefix \fIn\fR characters (see \fB-c\fR\fIchar\fR) to the beginning of a line
+when the line length is less than the effective line length. Default is to
+prefix the number of characters necessary to obtain the effective line length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fIn\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-p\fR\fIn\fR except characters are appended to the end of a line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 14n
+.rt
+Write 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 \fBlast\fR \fB-o\fR option. If no
+\fB-o\fR option is specified, the line which is printed will contain the
+default specification of \fB\(mi8\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fIchar\fR\fR
+.ad
+.RS 14n
+.rt
+Change the prefix/append character to \fIchar\fR. Default character for
+\fIchar\fR is a space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fIn\fR\fR
+.ad
+.RS 14n
+.rt
+Set the effective line length to \fIn\fR characters. If \fIn\fR is not entered,
+\fB-l\fR defaults to 72. The default line length without the \fB-l\fR option is
+80 characters. Note: Tabs and backspaces are considered to be one character
+(use \fB-i\fR to expand tabs to spaces).
+.sp
+The \fB\(mil1\fR must be used to set the effective line length shorter than any
+existing line in the file so that the \fB-b\fR option is activated.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR \fR
+.ad
+.RS 13n
+.rt
+Input file
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+Operation failed.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsplit\fR(1), \fBtabs\fR(1), \fBfspec\fR(4), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+All diagnostics are fatal.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBusage:\fR \fB \|.\|.\|.\fR \fR
+.ad
+.sp .6
+.RS 4n
+\fBnewform\fR was called with a bad option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"not \fR\fB-s\fR\fB format"\fR\fR
+.ad
+.sp .6
+.RS 4n
+There was no tab on one line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"can't open file"\fR\fR
+.ad
+.sp .6
+.RS 4n
+Self-explanatory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"internal line too long"\fR\fR
+.ad
+.sp .6
+.RS 4n
+A line exceeds 512 characters after being expanded in the internal work buffer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"tabspec in error" \fR\fR
+.ad
+.sp .6
+.RS 4n
+A tab specification is incorrectly formatted, or specified tab stops are not
+ascending.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"tabspec indirection illegal" \fR\fR
+.ad
+.sp .6
+.RS 4n
+A \fItabspec\fR read from a file (or standard input) may not contain a
+\fItabspec\fR referencing another file (or standard input).
+.RE
+
+.SH NOTES
+.sp
+.LP
+\fBnewform\fR normally only keeps track of physical characters; however, for
+the \fB-i\fR and \fB-o\fR options, \fBnewform\fR will keep track of backspaces
+in order to line up tabs in the appropriate logical columns.
+.sp
+.LP
+\fBnewform\fR will not prompt the user if a \fItabspec\fR is to be read from
+the standard input (by use of \fB\fR\fB-i\fR\fB-\fR or \fB\fR\fB-o\fR\fB-\fR).
+.sp
+.LP
+If the \fB-f\fR option is used, and the last \fB-o\fR option specified was
+\fB\fR\fB-o\fR\fB-\fR, and was preceded by either a \fB\fR\fB-o\fR\fB-\fR or a
+\fB\fR\fB-i\fR\fB-\fR, the tab specification format line will be incorrect.
diff --git a/usr/src/man/man1/newgrp.1 b/usr/src/man/man1/newgrp.1
new file mode 100644
index 0000000000..aaf521842c
--- /dev/null
+++ b/usr/src/man/man1/newgrp.1
@@ -0,0 +1,283 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH newgrp 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+newgrp \- log in to a new group
+.SH SYNOPSIS
+.SS "Command"
+.LP
+.nf
+\fB/usr/bin/newgrp\fR [\fB-|\fR \fB-l\fR] [\fIgroup\fR]
+.fi
+
+.SS "sh Built-in"
+.LP
+.nf
+\fBnewgrp\fR [\fIargument\fR]
+.fi
+
+.SS "ksh Built-in"
+.LP
+.nf
+\fB*newgrp\fR [\fIargument\fR]
+.fi
+
+.SS "ksh93 Built-in"
+.LP
+.nf
+\fB+newgrp\fR [\fIargument\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "Command"
+.sp
+.LP
+The \fBnewgrp\fR command logs a user into a new group by changing a user's real
+and effective group ID. The user remains logged in and the current directory is
+unchanged. The execution of \fBnewgrp\fR always replaces the current shell with
+a new shell, even if the command terminates with an error (unknown group).
+.sp
+.LP
+Any variable that is not exported is reset to null or its default value.
+Exported variables retain their values. System variables (such as \fBPS1\fR,
+\fBPS2\fR, \fBPATH\fR, \fBMAIL\fR, and \fBHOME\fR), are reset to default values
+unless they have been exported by the system or the user. For example, when a
+user has a primary prompt string (\fBPS1\fR) other than \fB$\fR (default) and
+has not exported \fBPS1\fR, the user's \fBPS1\fR is set to the default prompt
+string \fB$\fR, even if \fBnewgrp\fR terminates with an error. Note that the
+shell command \fBexport\fR (see \fBsh\fR(1) and \fBset\fR(1)) is the method to
+export variables so that they retain their assigned value when invoking new
+shells.
+.sp
+.LP
+With no operands and options, \fBnewgrp\fR changes the user's group IDs (real
+and effective) back to the group specified in the user's password file entry.
+This is a way to exit the effect of an earlier \fBnewgrp\fR command.
+.sp
+.LP
+A password is demanded if the group has a password and the user is not listed
+in \fB/etc/group\fR as being a member of that group. The only way to create a
+password for a group is to use \fBpasswd\fR(1), then cut and paste the password
+from \fB/etc/shadow\fR to \fB/etc/group\fR. Group passwords are antiquated and
+not often used.
+.SS "sh Built-in"
+.sp
+.LP
+Equivalent to \fBexec\fR \fBnewgrp\fR \fIargument\fR where \fIargument\fR
+represents the options and/or operand of the \fBnewgrp\fR command.
+.SS "ksh Built-in"
+.sp
+.LP
+Equivalent to \fBexec\fR to\fB/bin/newgrp\fR \fIargument\fR where
+\fIargument\fR represents the options and/or operand of the \fBnewgrp\fR
+command.
+.sp
+.LP
+On this man page, \fBksh\fR(1) commands that are preceded by one or two \fB*\fR
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by \fB**\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93 Built-in"
+.sp
+.LP
+Equivalent to \fBexec\fR to\fB/bin/newgrp\fR \fIargument\fR where
+\fIargument\fR represents the options and/or operand of the \fBnewgrp\fR
+command.
+.sp
+.LP
+On this man page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR (plus signs) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR | \fB\(mi\fR\fR
+.ad
+.RS 13n
+.rt
+Change the environment to what would be expected if the user actually logged in
+again as a member of the new group.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIgroup\fR\fR
+.ad
+.RS 12n
+.rt
+A group name from the group database or a non-negative numeric group ID.
+Specifies the group ID to which the real and effective group IDs is set. If
+\fIgroup\fR is a non-negative numeric string and exists in the group database
+as a group name (see \fBgetgrnam\fR(3C)), the numeric group ID associated with
+that group name is used as the group ID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+\fBsh\fR and \fBksh\fR only. Options and/or operand of the \fBnewgrp\fR
+command.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBnewgrp\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+If \fBnewgrp\fR succeeds in creating a new shell execution environment, whether
+or not the group identification was changed successfully, the exit status is
+the exit status of the shell. Otherwise, the following exit value is returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 15n
+.rt
+System group file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+System password file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/newgrp, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlogin\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBset\fR(1), \fBsh\fR(1),
+\fBIntro\fR(3), \fBgetgrnam\fR(3C), \fBgroup\fR(4), \fBpasswd\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/news.1 b/usr/src/man/man1/news.1
new file mode 100644
index 0000000000..a7fb93c7be
--- /dev/null
+++ b/usr/src/man/man1/news.1
@@ -0,0 +1,119 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH news 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+news \- print news items
+.SH SYNOPSIS
+.LP
+.nf
+\fBnews\fR [\fB-a\fR] [\fB-n\fR] [\fB-s\fR] [\fIitems\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBnews\fR is used to keep the user informed of current events. By convention,
+these events are described by files in the directory \fB/var/news\fR.
+.sp
+.LP
+When invoked without arguments, \fBnews\fR prints the contents of all current
+files in \fB/var/news\fR, most recent first, with each preceded by an
+appropriate header. \fBnews\fR stores the ``currency'' time as the modification
+date of a file named \fB\&.news_time\fR in the user's home directory (the
+identity of this directory is determined by the environment variable
+\fB\fR\fB$HOME\fR\fB \fR\fB);\fR only files more recent than this currency time
+are considered ``current.''
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fR
+.ad
+.RS 7n
+.rt
+ Print all items, regardless of currency. In this case, the stored time is not
+changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.RS 7n
+.rt
+ Report the names of the current items without printing their contents, and
+without changing the stored time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 7n
+.rt
+ report how many current items exist, without printing their names or contents,
+and without changing the stored time. It is useful to include such an
+invocation of \fBnews\fR in one's \fB\&.profile\fR file, or in the system's
+\fB/etc/profile\fR.
+.RE
+
+.sp
+.LP
+All other arguments are assumed to be specific news items that are to be
+printed.
+.sp
+.LP
+If a \fIdelete\fR is typed during the printing of a news item, printing stops
+and the next item is started. Another \fIdelete\fR within one second of the
+first causes the program to terminate.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for a description of the \fBLC_CTYPE\fR environment
+variable that affects the execution of \fBnews\fR.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/profile\fR\fR
+.ad
+.RS 20n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/news/*\fR\fR
+.ad
+.RS 20n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.news_time\fR\fR
+.ad
+.RS 20n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBprofile\fR(4), \fBattributes\fR(5), \fBenviron\fR(5)
diff --git a/usr/src/man/man1/newtask.1 b/usr/src/man/man1/newtask.1
new file mode 100644
index 0000000000..41d5d8f663
--- /dev/null
+++ b/usr/src/man/man1/newtask.1
@@ -0,0 +1,255 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH newtask 1 "17 Nov 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+newtask \- create new task and optionally change project
+.SH SYNOPSIS
+.LP
+.nf
+\fBnewtask\fR [\fB-p\fR \fIproject\fR] [\fB-v\fR] [\fB-c\fR \fIpid\fR | [\fB-Fl\fR] [\fIcommand...\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnewtask\fR command executes the user's default shell or a specified
+command, placing the executed command in a new task owned by the specified
+project. The user's default shell is the one specified in the \fBpasswd\fR
+database, and is determined using \fBgetpwnam()\fR.
+.sp
+.LP
+Alternatively, newtask can be used to cause an already running process to enter
+a newly created task. A project for the new task can also be specified in this
+form of the command. This might be desirable for processes that are mission
+critical and cannot be restarted in order to put them into a new project.
+.sp
+.LP
+In the case that extended accounting is active, the \fBnewtask\fR command can
+additionally cause the creation of a task accounting record marking the
+completion of the preceding system task.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIpid\fR\fR
+.ad
+.RS 10n
+.rt
+Cause a running process to enter a newly created task. A project for the new
+task can also be specified using the \fB-p\fR option. The invoking user must
+either own the process or have super-user privileges.
+.sp
+If the project is being changed, the process owner must be a member of the
+specified project, or the invoking user must have super-user privileges. When
+the project is changed for a running process, its pool binding as well as
+resource controls are modified to match the configuration of the new project.
+Controls not explicitly specified in the project entry is preserved.
+.sp
+This option is incompatible with the \fB-F\fR and \fB-l\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 10n
+.rt
+Creates a finalized task, within which further \fBnewtask\fR or
+\fBsettaskid\fR(2) invocations would fail. Finalized tasks can be useful at
+some sites for simplifying the attribution of resource consumption.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 10n
+.rt
+Changes the environment to what would be expected if the user actually logged
+in again as a member of the new project.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 10n
+.rt
+Changes the project \fBID\fR of the new task to that associated with the given
+project name. The invoking user must be a valid member of the requested
+project, or must have super-user privileges, for the command to succeed. If no
+project name is specified, the new task is started in the invoking user's
+current project.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 10n
+.rt
+Verbose: displays the system task id as the new system task is begun.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIproject\fR\fR
+.ad
+.RS 11n
+.rt
+The project to which resource usage by the created task should be charged. The
+requested project must be defined in the project databases defined in
+\fBnsswitch.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 11n
+.rt
+The command to be executed as the new task. If no command is given, the user's
+login shell is invoked. (If the login shell is not available, \fB/bin/sh\fR is
+invoked.)
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating a New Shell
+.sp
+.LP
+The following example creates a new shell in the \fBcanada\fR project,
+displaying the task id:
+
+.sp
+.in +2
+.nf
+example$ \fBid -p\fR
+uid=565(gh) gid=10(staff) projid=10(default)
+example$ \fBnewtask -v -p canada\fR
+38
+example$ \fBid -p\fR
+uid=565(gh) gid=10(staff) projid=82(canada)
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRRunning the \fBdate\fR Command
+.sp
+.LP
+The following example runs the date command in the \fBrussia\fR project:
+
+.sp
+.in +2
+.nf
+example$ \fBnewtask -p russia date\fR
+Tue Aug 31 11:12:10 PDT 1999
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRChanging the Project of an Existing Process
+.sp
+.LP
+The following example changes the project of the existing process with a pid of
+\fB9999\fR to \fBrussia\fR:
+
+.sp
+.in +2
+.nf
+example$ \fBnewtask -c 9999 -p russia\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+A fatal error occurred during execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/project\fR\fR
+.ad
+.RS 16n
+.rt
+Local database containing valid project definitions for this machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/pid/*\fR\fR
+.ad
+.RS 16n
+.rt
+Process information and control files.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBproc\fR(1), \fBid\fR(1M), \fBpoolbind\fR(1M), \fBexecvp\fR(2),
+\fBsetrctl\fR(2), \fBsettaskid\fR(2), \fBsetproject\fR(3PROJECT),
+\fBnsswitch.conf\fR(4), \fBproc\fR(4), \fBproject\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/nice.1 b/usr/src/man/man1/nice.1
new file mode 100644
index 0000000000..fd5e671e30
--- /dev/null
+++ b/usr/src/man/man1/nice.1
@@ -0,0 +1,198 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nice 1 "23 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+nice \- invoke a command with an altered scheduling priority
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/nice\fR [\fB-\fIincrement\fR\fR | \fB-n\fR \fIincrement\fR] \fIcommand\fR
+ [\fIargument\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/nice\fR [\fB-\fIincrement\fR\fR | \fB-n\fR \fIincrement\fR] \fIcommand\fR
+ [\fIargument\fR]...
+.fi
+
+.SS "csh Builtin"
+.LP
+.nf
+\fBnice\fR [\fB-\fIincrement\fR\fR | +\fIincrement\fR] [\fIcommand\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnice\fR utility invokes \fBcommand\fR, requesting that it be run with a
+different system scheduling priority. The \fBpriocntl\fR(1) command is a more
+general interface to scheduler functions.
+.sp
+.LP
+The invoking process (generally the user's shell) must be in a scheduling class
+that supports \fBnice\fR.
+.sp
+.LP
+If the C shell (see \fBcsh\fR(1)) is used, the full path of the command must be
+specified. Otherwise, the \fBcsh\fR built-in version of \fBnice\fR will be
+invoked. See \fBcsh Builtin\fR below.
+.SS "/usr/bin/nice"
+.sp
+.LP
+If \fBnice\fR executes commands with arguments, it uses the default shell
+\fB/usr/bin/sh\fR (see \fBsh\fR(1)).
+.SS "/usr/xpg4/bin/nice"
+.sp
+.LP
+If \fBnice\fR executes commands with arguments, it uses \fB/usr/xpg4/bin/sh\fR
+(see \fBksh\fR(1)).
+.SS "csh Builtin"
+.sp
+.LP
+\fBnice\fR is also a \fBcsh\fR built-in command with behavior different from
+the utility versions. See \fBcsh\fR(1) for description.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIincrement\fR | \fB-n\fR \fIincrement\fR\fR
+.ad
+.RS 29n
+.rt
+\fIincrement\fR is a positive or negative decimal integer that has the same
+effect on the execution of the utility as if the utility had called the
+\fBnice()\fR function with the numeric value of the \fIincrement\fR
+option-argument. See \fBnice\fR(2). \fBnice()\fR errors, other than
+\fBEINVAL\fR, are ignored. If not specified, an increment of \fB10\fR is
+assumed.
+.sp
+The super-user may run commands with priority higher than normal by using a
+negative increment such as \fB-10\fR\&. A negative \fIincrement\fR assigned by
+an unprivileged user is ignored.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 12n
+.rt
+The name of a command that is to be invoked. If \fIcommand\fR names any of the
+special built-in utilities (see \fBshell_builtins\fR(1)), the results are
+undefined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+Any string to be supplied as an argument when invoking \fIcommand\fR.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBnice\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBPATH\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+If \fIcommand\fR is invoked, the exit status of \fBnice\fR will be the exit
+status of \fIcommand\fR. Otherwise, \fBnice\fR will exit with one of the
+following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1-125\fR\fR
+.ad
+.RS 9n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 9n
+.rt
+\fIcommand\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 9n
+.rt
+\fIcommand\fR could not be found.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/nice"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/nice"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBnohup\fR(1), \fBpriocntl\fR(1), \fBsh\fR(1),
+\fBshell_builtins\fR(1), \fBnice\fR(2), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/nl.1 b/usr/src/man/man1/nl.1
new file mode 100644
index 0000000000..ee000bdbb0
--- /dev/null
+++ b/usr/src/man/man1/nl.1
@@ -0,0 +1,431 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nl 1 "28 Mar 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+nl \- line numbering filter
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/nl\fR [\fB-p\fR] [\fB-b\fR [\fItype\fR]] [\fB-d\fR [\fIdelim\fR]] [\fB-f\fR [\fItype\fR]]
+ [\fB-h\fR [\fItype\fR]] [\fB-i\fR [\fIincr\fR]] [\fB-l\fR [\fInum\fR]] [\fB-n\fR [\fIformat\fR]]
+ [\fB-s\fR [\fIsep\fR]] [\fB-w\fR [\fIwidth\fR]] [\fB-v\fR [\fIstartnum\fR]] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/nl\fR [\fB-p\fR] [\fB-b\fR \fItype\fR] [\fB-d\fR \fIdelim\fR] [\fB-f\fR \fItype\fR]
+ [\fB-h\fR \fItype\fR] [\fB-i\fR \fIincr\fR] [\fB-l\fR \fInum\fR] [\fB-n\fR \fIformat\fR] [\fB-s\fR \fIsep\fR]
+ [\fB-w\fR \fIwidth\fR] [\fB-v\fR \fIstartnum\fR] [\fIfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnl\fR utility reads lines from the named \fIfile\fR, or the standard
+input if no \fIfile\fR is named, and reproduces the lines on the standard
+output. Lines are numbered on the left in accordance with the command options
+in effect.
+.sp
+.LP
+\fBnl\fR 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. For example,
+\fB-bt\fR (the default) numbers non-blank lines in the body section and does
+not number any lines in the header and footer sections.
+.sp
+.LP
+The start of logical page sections are signaled by input lines containing
+nothing but the following delimiter character(s):
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+Line contentsStart Of
+_
+\e:\e:\e:header
+_
+\e:\e:body
+_
+\e:footer
+.TE
+
+.sp
+.LP
+Unless optioned otherwise, \fBnl\fR assumes the text being read is in a single
+logical page body.
+.SH OPTIONS
+.sp
+.LP
+Command options may appear in any order and may be intermingled with an
+optional file name. Only one file may be named. The specified default is used
+when the option is not entered on the command line. \fB/usr/xpg4/bin/nl\fR
+options require option arguments. A \fBSPACE\fR character \fBmay\fR separate
+options from option arguments. \fB/usr/bin/nl\fR options \fBmay\fR have option
+arguments. If option-arguments of \fB/usr/bin/nl\fR options are not specified,
+these options result in the default. The supported options are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fItype\fR\fR
+.ad
+.RS 14n
+.rt
+Specifies which logical page body lines are to be numbered. Recognized
+\fItype\fRs and their meanings are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.RS 8n
+.rt
+number all lines
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.RS 8n
+.rt
+number all non-empty lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBn\fR\fR
+.ad
+.RS 8n
+.rt
+no line numbering
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fIexp\fR\fR\fR
+.ad
+.RS 8n
+.rt
+number only lines that contain the regular expression specified in \fIexp\fR.
+See NOTES below.
+.RE
+
+Default \fItype\fR for logical page body is \fBt\fR (text lines numbered).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fItype\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-b\fR\fItype\fR except for footer. Default \fItype\fR for logical
+page footer is \fBn\fR (no lines numbered).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fIdelim\fR\fR
+.ad
+.RS 14n
+.rt
+The two delimiter characters specifying the start of a logical page section may
+be changed from the default characters (\e\|:\|) to two user-specified
+characters. If only one character is entered, the second character remains the
+default character (:). No space should appear between the \fB-d\fR and the
+delimiter characters. To enter a backslash, use two backslashes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fItype\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-b\fR\fItype\fR except for header. Default \fItype\fR for logical
+page header is \fBn\fR (no lines numbered).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fIincr\fR\fR
+.ad
+.RS 14n
+.rt
+\fIincr\fR is the increment value used to number logical page lines. Default
+\fIincr\fR is \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fInum\fR\fR
+.ad
+.RS 14n
+.rt
+\fInum\fR is the number of blank lines to be considered as one. For example,
+\fB\(mil2\fR results in only the second adjacent blank being numbered (if the
+appropriate \fB-ha\fR, \fB-ba\fR, and/or \fB-fa\fR option is set). Default
+\fInum\fR is \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fIformat\fR\fR
+.ad
+.RS 14n
+.rt
+\fIformat\fR is the line numbering format. Recognized values are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBln\fR\fR
+.ad
+.RS 6n
+.rt
+left justified, leading zeroes suppressed
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrn\fR\fR
+.ad
+.RS 6n
+.rt
+right justified, leading zeroes suppressed
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrz\fR\fR
+.ad
+.RS 6n
+.rt
+right justified, leading zeroes kept
+.RE
+
+Default \fIformat\fR is \fBrn\fR (right justified).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 14n
+.rt
+Do not restart numbering at logical page delimiters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIsep\fR\fR
+.ad
+.RS 14n
+.rt
+\fIsep\fR is the character(s) used in separating the line number and the
+corresponding text line. Default \fIsep\fR is a \fBTAB\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fIstartnum\fR\fR
+.ad
+.RS 14n
+.rt
+\fIstartnum\fR is the initial value used to number logical page lines. Default
+\fIstartnum\fR is \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fIwidth\fR\fR
+.ad
+.RS 14n
+.rt
+\fIwidth\fR is the number of characters to be used for the line number. Default
+\fIwidth\fR is \fB6\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a text file to be line-numbered.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example of the nl command
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% \fBnl -v10 -i10 -d!+ filename1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+will cause the first line of the page body to be numbered \fB10\fR, the second
+line of the page body to be numbered \fB20\fR, the third \fB30\fR, and so
+forth. The logical page delimiters are !+.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBnl\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fIlocale\fR/LC_COLLATE/CollTable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Collation table generated by \fBlocaledef\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/\fIlocale\fR/LC_COLLATE/coll.so\fR\fR
+.ad
+.sp .6
+.RS 4n
+Shared object containing string transformation library routines
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/xpg4/bin/nl"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpr\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBregex\fR(5),
+\fBregexp\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Internationalized Regular Expressions are used in the POSIX and "C" locales. In
+other locales, Internationalized Regular Expressions are used if the following
+two conditions are met:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fB/usr/lib/locale/\fIlocale\fR/LC_COLLATE/CollTable\fR is present.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fB/usr/lib/locale/\fIlocale\fR/LC_COLLATE/coll.so\fR is not present.
+.RE
+.sp
+.LP
+Otherwise, Simple Regular Expressions are used.
+.sp
+.LP
+Internationalized Regular Expressions are explained on \fBregex\fR(5). Simple
+Regular Expressions are explained on \fBregexp\fR(5).
diff --git a/usr/src/man/man1/nm.1 b/usr/src/man/man1/nm.1
new file mode 100644
index 0000000000..951fa822ab
--- /dev/null
+++ b/usr/src/man/man1/nm.1
@@ -0,0 +1,1007 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nm 1 "10 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+nm \- print name list of an object file
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/nm\fR [\fB-ACDhlnPprRsTuVv\fR] [\fB-efox\fR] [\fB-g\fR | \fB-u\fR]
+ [\fB-t\fR \fIformat\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/nm\fR [\fB-ACDhlnPprRsTuVv\fR] [\fB-efox\fR] [\fB-g\fR | \fB-u\fR]
+ [\fB-t\fR \fIformat\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnm\fR utility displays the symbol table of each \fBELF\fR object file
+that is specified by \fIfile\fR.
+.sp
+.LP
+If no symbolic information is available for a valid input file, the \fBnm\fR
+utility reports that fact, but not consider it an error condition.
+.SH OPTIONS
+.sp
+.LP
+The output of \fBnm\fR can be controlled using the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 13n
+.rt
+Writes the full path name or library name of an object on each line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 13n
+.rt
+Demangles C++ symbol names before printing them out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 13n
+.rt
+Displays the \fBSHT_DYNSYM\fR symbol information. This is the symbol table used
+by \fBld.so.1\fR and is present even in stripped dynamic executables. If
+\fB-D\fR is not specified, the default behavior is to display the
+\fBSHT_SYMTAB\fR symbol information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 13n
+.rt
+See NOTES below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 13n
+.rt
+See NOTES below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 13n
+.rt
+Writes only external (global) symbol information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 13n
+.rt
+Does not display the output heading data.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 13n
+.rt
+Displays the \fBSHT_SUNW_LDYNSYM\fR symbol information. This symbol table
+contains local function symbols. \fBSHT_SUNW_LDYNSM\fR symbol tables are
+present even in stripped dynamic executables. These symbols augment the global
+symbols that are found in \fBSHT_DYNSYM\fR symbol table. If \fB-L\fR is not
+specified, the default behavior is to display the \fBSHT_SYMTAB\fR symbol
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 13n
+.rt
+Distinguishes between \fBWEAK\fR and \fBGLOBAL\fR symbols by appending a * to
+the key letter for \fBWEAK\fR symbols.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 13n
+.rt
+Sorts external symbols by name before they are printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 13n
+.rt
+Prints the value and size of a symbol in octal instead of decimal (equivalent
+to \fB-t\fR \fBo\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 13n
+.rt
+Produces easy to parse, terse output. Each symbol name is preceded by its value
+(blanks if undefined) and one of the letters:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA\fR\fR
+.ad
+.RS 5n
+.rt
+Absolute symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBB\fR\fR
+.ad
+.RS 5n
+.rt
+bss (uninitialized data space) symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBC\fR\fR
+.ad
+.RS 5n
+.rt
+COMMON symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.RS 5n
+.rt
+Data object symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR\fR
+.ad
+.RS 5n
+.rt
+File symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBN\fR\fR
+.ad
+.RS 5n
+.rt
+Symbol has no type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBL\fR\fR
+.ad
+.RS 5n
+.rt
+Thread-Local storage symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR\fR
+.ad
+.RS 5n
+.rt
+Section symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT\fR\fR
+.ad
+.RS 5n
+.rt
+Text symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBU\fR\fR
+.ad
+.RS 5n
+.rt
+Undefined.
+.RE
+
+If the symbol's binding attribute is:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLOCAL\fR\fR
+.ad
+.RS 10n
+.rt
+The key letter is lower case.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBWEAK\fR\fR
+.ad
+.RS 10n
+.rt
+The key letter is upper case. If the \fB-l\fR modifier is specified, the upper
+case key letter is followed by a \fB*\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBGLOBAL\fR\fR
+.ad
+.RS 10n
+.rt
+The key letter is upper case.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 13n
+.rt
+Writes information in a portable output format, as specified in \fBStandard
+Output\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 13n
+.rt
+Prepends the name of the object file or archive to each output line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 13n
+.rt
+Prints the archive name (if present), followed by the object file and symbol
+name. If the \fB-r\fR option is also specified, this option is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Prints section name instead of section index.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIformat\fR\fR
+.ad
+.RS 13n
+.rt
+Writes each numeric value in the specified format. The format is dependent on
+the single character used as the \fIformat\fR option-argument:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.RS 5n
+.rt
+The offset is written in decimal (default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 5n
+.rt
+The offset is written in octal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 5n
+.rt
+The offset is written in hexadecimal.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 13n
+.rt
+See \fBNOTES\fR.
+.RE
+
+.SS "/usr/bin/nm"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Prints undefined symbols only.
+.RE
+
+.SS "/usr/xpg4/bin/nm"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Prints long listing for each undefined symbol. See \fBOUTPUT\fR below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Sorts external symbols by value before they are printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the version of the \fBnm\fR command executing on the standard error
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the value and size of a symbol in hexadecimal instead of decimal
+(equivalent to \fB-t\fR \fBx\fR).
+.RE
+
+.sp
+.LP
+Options can be used in any order, either singly or in combination, and can
+appear anywhere in the command line. When conflicting options are specified
+(such as \fB-v\fR and \fB-n\fR, or \fB-o\fR and \fB-x\fR) the first is taken
+and the second ignored with a warning message to the user. (See \fB-R\fR for
+exception.)
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of an object file, executable file or object-file library.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+This section describes the \fBnm\fR utility's output options.
+.SS "Standard Output"
+.sp
+.LP
+For each symbol, the following information is printed:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBIndex\fR\fR
+.ad
+.RS 15n
+.rt
+The index of the symbol. (The index appears in brackets.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBValue\fR\fR
+.ad
+.RS 15n
+.rt
+The value of the symbol is one of the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A section offset for defined symbols in a relocatable file.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Alignment constraints for symbols whose section index is \fBSHN_COMMON\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A virtual address in executable and dynamic library files.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSize\fR\fR
+.ad
+.RS 15n
+.rt
+The size in bytes of the associated object.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBType\fR\fR
+.ad
+.RS 15n
+.rt
+A symbol is of one of the following types:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNOTYPE\fR\fR
+.ad
+.RS 11n
+.rt
+No type was specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOBJECT\fR\fR
+.ad
+.RS 11n
+.rt
+A data object such as an array or variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFUNC\fR\fR
+.ad
+.RS 11n
+.rt
+A function or other executable code.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBREGI\fR\fR
+.ad
+.RS 11n
+.rt
+A register symbol (\fBSPARC\fR only).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSECTION\fR\fR
+.ad
+.RS 11n
+.rt
+A section symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFILE\fR\fR
+.ad
+.RS 11n
+.rt
+Name of the source file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOMMON\fR\fR
+.ad
+.RS 11n
+.rt
+An uninitialized common block.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTLS\fR\fR
+.ad
+.RS 11n
+.rt
+A variable associated with Thread-Local storage.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBBind\fR\fR
+.ad
+.RS 15n
+.rt
+The symbol's binding attributes.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLOCAL symbols\fR\fR
+.ad
+.RS 18n
+.rt
+Have a scope limited to the object file containing their definition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBGLOBAL symbols\fR\fR
+.ad
+.RS 18n
+.rt
+Are visible to all object files being combined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBWEAK symbols\fR\fR
+.ad
+.RS 18n
+.rt
+Are essentially global symbols with a lower precedence than \fBGLOBAL\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOther\fR\fR
+.ad
+.RS 15n
+.rt
+A symbol's visibility.
+.sp
+The lower bits of the \fBst_other\fR member of the \fBElf32_Sym\fR structure,
+and the \fBElf64_Sym\fR structure, defined in \fB<sys/elf.h>\fR, are currently
+used and can be one of:
+.sp
+.in +2
+.nf
+#define STV_DEFAULT 0
+#define STV_INTERNAL 1
+#define STV_HIDDEN 2
+#define STV_PROTECTED 3
+#define STV_EXPORTED 4
+#define STV_SINGLETON 5
+#define STV_ELIMINATE 6
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBShndx\fR\fR
+.ad
+.RS 15n
+.rt
+Except for three special values, this is the section header table index in
+relation to which the symbol is defined. The following special values exist:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBABS\fR\fR
+.ad
+.RS 10n
+.rt
+Indicates the symbol's value does not change through relocation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOMMON\fR\fR
+.ad
+.RS 10n
+.rt
+Indicates an unallocated block and the value provides alignment constraints.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBUNDEF\fR\fR
+.ad
+.RS 10n
+.rt
+Indicates an undefined symbol.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBName\fR\fR
+.ad
+.RS 15n
+.rt
+The name of the symbol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBObject Name\fR\fR
+.ad
+.RS 15n
+.rt
+The name of the object or library if \fB-A\fR is specified.
+.RE
+
+.sp
+.LP
+If the \fB-P\fR option is specified, the previous information is displayed
+using the following portable format. The three versions differ depending on
+whether \fB-t\fR \fBd\fR, \fB-t\fR \fBo\fR, or \fB-t\fR \fBx\fR was specified,
+respectively:
+.sp
+.in +2
+.nf
+\fB"%s%s %s %d %d\n",\fR \fIlibrary/object name\fR, \fIname\fR\fB, type,\fR \fIvalue\fR, \e
+ \fBsize "%s%s %s %o %o\n",\fR \fIlibrary/object name\fR, \fIname\fR, \e
+ \fBtype,\fR \fIvalue\fR \fB, size "%s%s %s %x %x\n",\fR \fIlibrary/object name\fR, \fIname\fR, \e
+ \fBtype,\fR \fIvalue\fR\fB, size\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where \fIlibrary/object name\fR is formatted as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB-A\fR is not specified, \fIlibrary/object name\fR is an empty string.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB-A\fR is specified and the corresponding \fIfile\fR operand does not name
+a library:
+.sp
+.in +2
+.nf
+\fB"%s: ", \fIfile\fR\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB-A\fR is specified and the corresponding \fIfile\fR operand names a
+library. In this case, \fIobject file\fR names the object file in the library
+containing the symbol being described:
+.sp
+.in +2
+.nf
+\fB"%s[%s]: ", \fIfile\fR, \fIobject file\fR\fR
+.fi
+.in -2
+.sp
+
+.RE
+.sp
+.LP
+If \fB-A\fR is not specified, then if more than one \fIfile\fR operand is
+specified or if only one \fIfile\fR operand is specified and it names a
+library, \fBnm\fR writes a line identifying the object containing the following
+symbols before the lines containing those symbols, in the form:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the corresponding \fIfile\fR operand does not name a library:
+.sp
+.in +2
+.nf
+\fB"%s:\n", \fIfile\fR\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the corresponding \fIfile\fR operand names a library; in this case,
+\fIobject file\fR is the name of the file in the library containing the
+following symbols:
+.sp
+.in +2
+.nf
+\fB"%s[%s]:\n", \fIfile\fR, \fIobject file\fR\fR
+.fi
+.in -2
+.sp
+
+.RE
+.sp
+.LP
+If \fB-P\fR is specified, but \fB-t\fR is not, the format is as if \fB-t\fR
+\fBx\fR had been specified.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBnm\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SH /USR/XPG4/BIN/NM
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBas\fR(1), \fBdump\fR(1), \fBld\fR(1), \fBld.so.1\fR(1),
+\fBar.h\fR(3HEAD), \fBa.out\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The following options are obsolete because of changes to the object file format
+and might be deleted in a future release.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Prints only external and static symbols. The symbol table now contains only
+static and external symbols. Automatic symbols no longer appear in the symbol
+table. They do appear in the debugging information produced by \fBcc\fR
+\fB-g\fR, which can be examined using \fBdump\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Produces full output. Redundant symbols (such as \fB\&.text\fR, \fB\&.data\fR,
+and so forth), which existed previously, do not exist and producing full output
+is identical to the default output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 6n
+.rt
+By default, \fBnm\fR prints the entire name of the symbols listed. Since symbol
+names have been moved to the last column, the problem of overflow is removed
+and it is no longer necessary to truncate the symbol name.
+.RE
+
diff --git a/usr/src/man/man1/nohup.1 b/usr/src/man/man1/nohup.1
new file mode 100644
index 0000000000..47e700a55b
--- /dev/null
+++ b/usr/src/man/man1/nohup.1
@@ -0,0 +1,455 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nohup 1 "19 Jun 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+nohup \- run a command immune to hangups
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/nohup\fR \fIcommand\fR [\fIargument\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/nohup\fR \fB-p\fR [\fB-Fa\fR] \fIpid\fR [\fIpid\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/nohup\fR \fB-g\fR [\fB-Fa\fR] \fIgpid\fR [\fIgpid\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/nohup\fR \fIcommand\fR [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnohup\fR utility invokes the named \fIcommand\fR with the arguments
+supplied. When the \fIcommand\fR is invoked, \fBnohup\fR arranges for the
+\fBSIGHUP\fR signal to be ignored by the process.
+.sp
+.LP
+When invoked with the \fB-p\fR or \fB-g\fR flags, \fBnohup\fR arranges for
+processes already running as identified by a list of process \fBID\fRs or a
+list of process group \fBID\fRs to become immune to hangups.
+.sp
+.LP
+The \fBnohup\fR utility can be used when it is known that \fIcommand\fR takes a
+long time to run and the user wants to log out of the terminal. When a shell
+exits, the system sends its children \fBSIGHUP\fR signals, which by default
+cause them to be killed. All stopped, running, and background jobs ignores
+\fBSIGHUP\fR and continue running, if their invocation is preceded by the
+\fBnohup\fR command or if the process programmatically has chosen to ignore
+\fBSIGHUP\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/nohup\fR\fR
+.ad
+.RS 27n
+.rt
+Processes run by \fB/usr/bin/nohup\fR are immune to \fBSIGHUP\fR (hangup) and
+\fBSIGQUIT\fR (quit) signals.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/nohup\fR \fB-p\fR [\fB-Fa\fR]\fR
+.ad
+.RS 27n
+.rt
+Processes specified by \fBID\fR are made immune to \fBSIGHUP\fR and
+\fBSIGQUIT\fR, and all output to the controlling terminal is redirected to
+\fBnohup.out\fR. If \fB-F\fR is specified, \fBnohup\fR forces control of each
+process. If \fB-a\fR is specified, \fBnohup\fR changes the signal disposition
+of \fBSIGHUP\fR and \fBSIGQUIT\fR even if the process has installed a handler
+for either signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/nohup\fR \fB-g\fR [\fB-Fa\fR]\fR
+.ad
+.RS 27n
+.rt
+Every process in the same process group as the processes specified by \fBID\fR
+are made immune to \fBSIGHUP\fR and \fBSIGQUIT\fR, and all output to the
+controlling terminal is redirected to \fBnohup.out\fR. If \fB-F\fR is
+specified, \fBnohup\fR forces control of each process. If \fB-a\fR is
+specified, \fBnohup\fR changes the signal disposition of \fBSIGHUP\fR and
+\fBSIGQUIT\fR even if the process has installed a handler for either signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/xpg4/bin/nohup\fR\fR
+.ad
+.RS 27n
+.rt
+Processes run by \fB/usr/xpg4/bin/nohup\fR are immune to \fBSIGHUP\fR.
+.sp
+The \fBnohup\fR utility does not arrange to make processes immune to a
+\fBSIGTERM\fR (terminate) signal, so unless they arrange to be immune to
+\fBSIGTERM\fR or the shell makes them immune to \fBSIGTERM\fR, they will
+receive it.
+.sp
+If \fBnohup.out\fR is not writable in the current directory, output is
+redirected to \fB$HOME/nohup.out\fR. If a file is created, the file has read
+and write permission (\fB600\fR. See \fBchmod\fR(1). If the standard error is a
+terminal, it is redirected to the standard output, otherwise it is not
+redirected. The priority of the process run by \fBnohup\fR is not altered.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Always changes the signal disposition of target processes. This option is valid
+only when specified with \fB-p\fR or \fB-g\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Force. Grabs the target processes even if another process has control. This
+option is valid only when specified with \fB-p\fR or \fB-g.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 6n
+.rt
+Operates on a list of process groups. This option is not valid with \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Operates on a list of processes. This option is not valid with \fB-g\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 12n
+.rt
+A decimal process \fBID\fR to be manipulated by \fBnohup\fR \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpgid\fR\fR
+.ad
+.RS 12n
+.rt
+A decimal process group \fBID\fR to be manipulated by \fBnohup\fR \fB-g\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 12n
+.rt
+The name of a command that is to be invoked. If the \fIcommand\fR operand names
+any of the special \fBshell_builtins\fR(1) utilities, the results are
+undefined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+Any string to be supplied as an argument when invoking the \fIcommand\fR
+operand.
+.RE
+
+.SH USAGE
+.sp
+.LP
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only if the primary controlling process, typically a debugger, has
+stopped the victim process and the primary controlling process is doing nothing
+at the moment of application of the \fBproc\fR tool in question.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRApplying nohup to pipelines or command lists
+.sp
+.LP
+It is frequently desirable to apply \fBnohup\fR to pipelines or lists of
+commands. This can be done only by placing pipelines and command lists in a
+single file, called a shell script. One can then issue:
+
+.sp
+.in +2
+.nf
+example$ \fBnohup sh \fIfile\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and the \fBnohup\fR applies to everything in \fIfile\fR. If the shell script
+\fIfile\fR is to be executed often, then the need to type \fBsh\fR can be
+eliminated by giving \fIfile\fR execute permission.
+
+.sp
+.LP
+Add an ampersand and the contents of \fIfile\fR are run in the background with
+interrupts also ignored (see \fBsh\fR(1)):
+
+.sp
+.in +2
+.nf
+example$ \fBnohup \fIfile\fR &\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRApplying nohup -p to a process
+.sp
+.in +2
+.nf
+example$ \fBlong_running_command &\fR
+example$ \fBnohup -p `pgrep long_running_command`\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRApplying nohup -g to a process group
+.sp
+.in +2
+.nf
+example$ \fBmake &\fR
+example$ \fBps -o sid -p $$\fR
+ SID
+81079
+example$ \fBnohup -g `pgrep -s 81079 make`\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBnohup\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBPATH\fR, \fBNLSPATH\fR, and \fBPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.RS 8n
+.rt
+Determine the path name of the user's home directory: if the output file
+\fBnohup.out\fR cannot be created in the current directory, the \fBnohup\fR
+command uses the directory named by \fBHOME\fR to create the file.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcommand\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 7n
+.rt
+An error occurred in \fBnohup\fR, or \fIcommand\fR could not be found
+.RE
+
+.sp
+.LP
+Otherwise, the exit values of \fBnohup\fR are those of the \fIcommand\fR
+operand.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnohup.out\fR\fR
+.ad
+.RS 19n
+.rt
+The output file of the \fBnohup\fR execution if standard output is a terminal
+and if the current directory is writable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/nohup.out\fR\fR
+.ad
+.RS 19n
+.rt
+The output file of the \fBnohup\fR execution if standard output is a terminal
+and if the current directory is not writable.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/nohup"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/nohup"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBbatch\fR(1), \fBchmod\fR(1), \fBcsh\fR(1), \fBksh\fR(1), \fBnice\fR(1),
+\fBpgrep\fR(1), \fBproc\fR(1), \fBps\fR(1), \fBsh\fR(1),
+\fBshell_builtins\fR(1), \fBsignal\fR(3C), \fBproc\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH WARNINGS
+.sp
+.LP
+If you are running the Korn shell (\fBksh\fR(1)) as your login shell, and have
+\fBnohup\fR'ed jobs running when you attempt to log out, you are warned with
+the message:
+.sp
+.in +2
+.nf
+You have jobs running.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+You need to log out a second time to actually log out. However, your background
+jobs continues to run.
+.SH NOTES
+.sp
+.LP
+The C-shell (\fBcsh\fR(1)) has a built-in command \fBnohup\fR that provides
+immunity from \fBSIGHUP\fR, but does not redirect output to \fBnohup.out\fR.
+Commands executed with `\fB&\fR\&' are automatically immune to \fBHUP\fR
+signals while in the background.
+.sp
+.LP
+\fBnohup\fR does not recognize command sequences. In the case of the following
+command,
+.sp
+.in +2
+.nf
+example$ \fBnohup command1; command2\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the \fBnohup\fR utility applies only to \fBcommand1\fR. The command,
+.sp
+.in +2
+.nf
+example$ \fBnohup (command1; command2)\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+is syntactically incorrect.
diff --git a/usr/src/man/man1/nroff.1 b/usr/src/man/man1/nroff.1
new file mode 100644
index 0000000000..b3fe693389
--- /dev/null
+++ b/usr/src/man/man1/nroff.1
@@ -0,0 +1,409 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc.) All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH nroff 1 "1 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+nroff \- format documents for display or line-printer
+.SH SYNOPSIS
+.LP
+.nf
+\fBnroff\fR [\fB-ehiq\fR] [\fB-m\fR\fIname\fR] [\fB-n\fR\fIN\fR] [\fB-o\fR\fIpagelist\fR] [\fB-r\fR\fIaN\fR] [\fB-s\fR\fIN\fR]
+ [\fB-T\fR\fIname\fR] [\fB-u\fR\fIN\fR] [\fIfilename...\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBnroff\fR utility formats text in the named \fIfilename\fR for
+typewriter-like devices. See also \fBtroff\fR(1).
+.sp
+.LP
+If no \fIfilename\fR argument is present, \fBnroff\fR reads the standard input.
+An argument consisting of a `\fB\(mi\fR\&' is taken to be a file name
+corresponding to the standard input.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported. Options can appear in any order so long as
+they appear \fIbefore\fR the files.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 14n
+.rt
+Produces equally-spaced words in adjusted lines, using full terminal
+resolution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 14n
+.rt
+Uses output \fITAB\fR characters during horizontal spacing to speed output and
+reduces output character count. \fITAB\fR settings are assumed to be every 8
+nominal character widths.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 14n
+.rt
+Reads the standard input after the input files are exhausted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 14n
+.rt
+Does not print output that was read from an \fB\&.rd\fR request.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fIname\fR\fR
+.ad
+.RS 14n
+.rt
+Prepends the macro file \fB/usr/share/lib/tmac/\fIname\fR\fR to the input
+files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fIN\fR\fR
+.ad
+.RS 14n
+.rt
+Numbers first generated page \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fIpagelist\fR\fR
+.ad
+.RS 14n
+.rt
+Prints only pages whose page numbers appear in the comma-separated \fIlist\fR
+of numbers and ranges. A range \fIN\fR\fB-\fR\fIM\fR means pages \fIN\fR
+through \fIM\fR; an initial \fB-N\fR means from the beginning to page \fIN\fR;
+and a final \fIN\fR\(mi means from \fIN\fR to the end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fIaN\fR\fR
+.ad
+.RS 14n
+.rt
+Sets register \fIa\fR (one-character) to \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIN\fR\fR
+.ad
+.RS 14n
+.rt
+Stops every \fIN\fR pages. \fBnroff\fR halts prior to every \fIN\fR pages
+(default \fIN\fR=1) to allow paper loading or changing, and resumes upon
+receipt of a \fINEWLINE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fIname\fR\fR
+.ad
+.RS 14n
+.rt
+Prepares output for a device of the specified \fIname\fR. Known \fIname\fRs
+are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB37\fR\fR
+.ad
+.RS 14n
+.rt
+Teletype Corporation Model 37 terminal \(em this is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlp\fR | \fBtn300\fR\fR
+.ad
+.RS 14n
+.rt
+\fBGE\fR \(em any line printer or terminal without half-line capability.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB300\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-300.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB300-12\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-300 \(em 12-pitch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB300S\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-300S.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB300S-12\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-300S.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB382\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-382 (fancy \fBDTC\fR 382).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB450\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-450 (Diablo Hyterm).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB450-12\fR\fR
+.ad
+.RS 14n
+.rt
+\fBDASI\fR-450 (Diablo Hyterm) \(em 12-pitch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB832\fR\fR
+.ad
+.RS 14n
+.rt
+\fBAJ\fR 832.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fIN\fR\fR
+.ad
+.RS 14n
+.rt
+Set the emboldening factor for the font mounted in position \fB3\fR to \fIN\fR.
+If \fIN\fR is missing, then set the emboldening factor to \fB0\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+The file containing text to be processed by \fBnroff\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRFormatting with a macro package
+.sp
+.LP
+The following command formats \fBusers.guide\fR using the \fB-me\fR macro
+package, and stopping every 4 pages:
+
+.sp
+.in +2
+.nf
+example% \fBnroff \(mis4 \(mime users.guide\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBnroff\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+and \fBNLSPATH\fR.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/tmp/trtmp*\fR\fR
+.ad
+.sp .6
+.RS 4n
+temporary file (see NOTES)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/tmac.*\fR\fR
+.ad
+.sp .6
+.RS 4n
+standard macro files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/nterm/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+terminal driving tables for \fBnroff\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/nterm/README\fR\fR
+.ad
+.sp .6
+.RS 4n
+index to terminal description files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchecknr\fR(1), \fBcol\fR(1), \fBeqn\fR(1), \fBman\fR(1), \fBtbl\fR(1),
+\fBtroff\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBme\fR(5),
+\fBms\fR(5), \fBterm\fR(5)
+.SH NOTES
+.sp
+.LP
+\fB/usr/tmp\fR is currently a symbolic link to \fB/var/tmp\fR.
+.sp
+.LP
+Previous documentation incorrectly described the numeric register \fByr\fR as
+being the \fBLast two digits of current year\fR. \fByr\fR is in actuality the
+number of years since 1900. To correctly obtain the last two digits of the
+current year through the year 2099, the definition given below of string
+register \fByy\fR can be included in a document and subsequently used to
+display a two-digit year. Notice that any other available one- or two-character
+register name can be substituted for \fByy\fR.
+.sp
+.in +2
+.nf
+\&.\e" definition of new string register yy--last two digits of year
+\&.\e" use yr (# of years since 1900) if it is < 100
+\&.ie \en(yr<100 .ds yy \en(yr
+\&.el \e{ .\e" else, subtract 100 from yr, store in ny
+\&.nr ny \en(yr-100
+\&.ie \en(ny>9 \e{ .\e" use ny if it is two digits
+\&.ds yy \en(ny
+\&.\e" remove temporary number register ny
+\&.rr ny \e}
+\&.el \e{.ds yy 0
+\&.\e" if ny is one digit, append it to 0
+\&.as yy \en(ny
+\&.rr ny \e} \e}
+.fi
+.in -2
+
diff --git a/usr/src/man/man1/od.1 b/usr/src/man/man1/od.1
new file mode 100644
index 0000000000..10ad0619b0
--- /dev/null
+++ b/usr/src/man/man1/od.1
@@ -0,0 +1,715 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH od 1 "20 May 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+od \- octal dump
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/od\fR [\fB-bcCDdFfOoSsvXx\fR] [\fB-\fR] [\fIfile\fR] [\fIoffset_string\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/od\fR [\fB-bcCDdFfOoSsvXx\fR] [\fB-A\fR \fIaddress_base\fR] [\fB-j\fR \fIskip\fR]
+ [\fB-N\fR \fIcount\fR] [\fB-t\fR \fItype_string\fR]... [\fB-\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/od\fR [\fB-bcCDdFfOoSsvXx\fR] [\fIfile\fR] [\fIoffset_string\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/od\fR [\fB-bcCDdFfOoSsvXx\fR] [\fB-A\fR \fIaddress_base\fR]
+ [\fB-j\fR \fIskip\fR] [\fB-N\fR \fIcount\fR] [\fB-t\fR \fItype_string\fR]... [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBod\fR command copies sequentially each input file to standard output and
+transforms the input data according to the output types specified by the
+\fB-t\fR or \fB-bcCDdFfOoSsvXx\fR options. If no output type is specified, the
+default output is as if \fB-t\fR \fBo2\fR had been specified. Multiple types
+can be specified by using multiple \fB-bcCDdFfOoSstvXx\fR options. Output lines
+are written for each type specified in the order in which the types are
+specified. If no \fIfile\fR is specified, the standard input is used. The
+[\fIoffset_string\fR] operand is mutually exclusive from the \fB-A\fR,
+\fB-j\fR, \fB-N\fR, and \fB-t\fR options. For the purposes of this description,
+the following terms are used:
+.sp
+.ne 2
+.mk
+.na
+\fBword\fR
+.ad
+.RS 20n
+.rt
+Refers to a 16-bit unit, independent of the word size of the machine.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBlong word\fR
+.ad
+.RS 20n
+.rt
+Refers to a 32-bit unit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdouble long word\fR
+.ad
+.RS 20n
+.rt
+Refers to a 64-bit unit.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fIaddress_base\fR \fR
+.ad
+.RS 20n
+.rt
+Specifies the input offset base. The \fIaddress_base\fR option-argument must be
+a character. The characters \fBd\fR, \fBo\fR and \fBx\fR specify that the
+offset base will be written in decimal, octal or hexadecimal, respectively. The
+character \fBn\fR specifies that the offset will not be written. Unless
+\fB-A\fR \fBn\fR is specified, the output line will be preceded by the input
+offset, cumulative across input files, of the next byte to be written. In
+addition, the offset of the byte following the last byte written will be
+displayed after all the input data has been processed. Without the \fB-A\fR
+\fIaddress_base\fR option and the [\fIoffset_string\fR] operand, the input
+offset base is displayed in octal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fR
+.ad
+.RS 20n
+.rt
+Interprets bytes in octal. This is equivalent to \fB-t\fR \fBo1\fR.
+.RE
+
+.SS "/usr/bin/od"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 7n
+.rt
+Displays single-byte characters. Certain non-graphic characters appear as
+C-language escapes:
+.sp
+.in +2
+.nf
+null \fB\e0\fR
+backspace \fB\eb\fR
+form-feed \fB\ef\fR
+new-line \fB\en\fR
+return \fB\er\fR
+tab \fB\et\fR
+.fi
+.in -2
+.sp
+
+Others appear as 3-digit octal numbers. For example:
+.sp
+.in +2
+.nf
+\fBecho "hello world" | od \(mic\fR
+0000000 h e l l o w o r l d \en
+0000014
+.fi
+.in -2
+.sp
+
+.RE
+
+.SS "/usr/xpg4/bin/od"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets bytes as single-byte or multibyte characters according to the
+current setting of the \fBLC_CTYPE\fR locale category. Printable multibyte
+characters are written in the area corresponding to the first byte of the
+character. The two-character sequence \fB**\fR is written in the area
+corresponding to each remaining byte in the character, as an indication that
+the character is continued. Non-graphic characters appear the same as they
+would using the \fB-C\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets bytes as single-byte or multibyte characters according to the
+current setting of the \fBLC_CTYPE\fR locale category. Printable multibyte
+characters are written in the area corresponding to the first byte of the
+character. The two-character sequence ** is written in the area corresponding
+to each remaining byte in the character, as an indication that the character is
+continued. Certain non-graphic characters appear as C escapes:
+.sp
+.in +2
+.nf
+null \fB\e0\fR
+backspace \fB\eb\fR
+form-feed \fB\ef\fR
+new-line \fB\en\fR
+return \fB\er\fR
+tab \fB\et\fR
+.fi
+.in -2
+.sp
+
+Other non-printable characters appear as one three-digit octal number for each
+byte in the character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets words in unsigned decimal. This is equivalent to \fB-t\fR \fBu2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets long words in unsigned decimal. This is equivalent to \fB-t\fR
+\fBu4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets long words in floating point. This is equivalent to \fB-t\fR
+\fBf4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets double long words in extended precision. This is equivalent to
+\fB-t\fR \fBf8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR \fIskip\fR \fR
+.ad
+.RS 19n
+.rt
+Jumps over \fIskip\fR bytes from the beginning of the input. The \fBod\fR
+command will read or seek past the first \fIskip\fR bytes in the concatenated
+input files. If the combined input is not at least \fIskip\fR bytes long, the
+\fBod\fR command will write a diagnostic message to standard error and exit
+with a non-zero exit status.
+.sp
+By default, the \fIskip\fR option-argument is interpreted as a decimal number.
+With a leading \fB0x\fR or \fB0X\fR, the offset is interpreted as a hexadecimal
+number; otherwise, with a leading \fB0\fR, the offset will be interpreted as an
+octal number. Appending the character \fBb\fR, \fBk\fR, or \fBm\fR to offset
+will cause it to be interpreted as a multiple of \fB512\fR, \fB1024\fR or
+\fB1\|048\|576\fR bytes, respectively. If the \fIskip\fR number is hexadecimal,
+any appended \fBb\fR is considered to be the final hexadecimal digit. The
+address is displayed starting at \fB0000000\fR, and its base is not implied by
+the base of the \fIskip\fR option-argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIcount\fR \fR
+.ad
+.RS 19n
+.rt
+Formats no more than \fIcount\fR bytes of input. By default, \fIcount\fR is
+interpreted as a decimal number. With a leading \fB0x\fR or \fB0X\fR,
+\fIcount\fR is interpreted as a hexadecimal number; otherwise, with a leading
+\fB0\fR, it is interpreted as an octal number. If \fIcount\fR bytes of input
+(after successfully skipping, if \fB-j\fR\fIskip\fR is specified) are not
+available, it will not be considered an error. The \fBod\fR command will format
+the input that is available. The base of the address displayed is not implied
+by the base of the \fIcount\fR option-argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets words in octal. This is equivalent to \fB-t\fR \fBo2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets long words in unsigned octal. This is equivalent to \fB-t\fR
+\fBo4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets words in signed decimal. This is equivalent to \fB-t\fR \fBd2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets long words in signed decimal. This is equivalent to \fB-t\fR
+\fBd4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItype_string\fR \fR
+.ad
+.RS 19n
+.rt
+Specifies one or more output types. The \fItype_string\fR option-argument must
+be a string specifying the types to be used when writing the input data. The
+string must consist of the type specification characters:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR \fR
+.ad
+.RS 6n
+.rt
+\fINamed character\fR. Interprets bytes as named characters. Only the least
+significant seven bits of each byte will be used for this type specification.
+Bytes with the values listed in the following table will be written using the
+corresponding names for those characters.
+.sp
+The following are named characters in \fBod\fR:
+.sp
+.in +2
+.nf
+Value Name
+
+\000 nul
+\001 soh
+\002 stx
+\003 etx
+\004 eot
+\005 enq
+\006 ack
+\007 bel
+\010 bs
+\011 ht
+\012 lf
+\013 vt
+\014 ff
+\015 cr
+\016 so
+\017 si
+\020 dle
+\021 dc1
+\022 dc2
+\023 dc3
+\024 dc4
+\025 nak
+\026 syn
+\027 etb
+\030 can
+\031 em
+\032 sub
+\033 esc
+\034 fs
+\035 gs
+\036 rs
+\037 us
+\040 sp
+\177 del
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR \fR
+.ad
+.RS 6n
+.rt
+\fICharacter\fR. Interprets bytes as single-byte or multibyte characters
+specified by the current setting of the \fBLC_CTYPE\fR locale category.
+Printable multibyte characters are written in the area corresponding to the
+first byte of the character. The two-character sequence \fB**\fR is written in
+the area corresponding to each remaining byte in the character, as an
+indication that the character is continued. Certain non-graphic characters
+appear as C escapes: \fB\e0\fR, \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR,
+\fB\er\fR, \fB\et\fR, \fB\ev\fR\&. Other non-printable characters appear as one
+three-digit octal number for each byte in the character.
+.RE
+
+The type specification characters \fBd\fR, \fBf\fR, \fBo\fR, \fBu\fR, and
+\fBx\fR can be followed by an optional unsigned decimal integer that specifies
+the number of bytes to be transformed by each instance of the output type.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fR \fR
+.ad
+.RS 18n
+.rt
+\fIFloating point\fR. Can be followed by an optional \fBF\fR, \fBD\fR, or
+\fBL\fR indicating that the conversion should be applied to an item of type
+\fBfloat\fR, \fBdouble\fR, or \fBlong double\fR, respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR, \fBo\fR, \fBu\fR, and \fBx\fR\fR
+.ad
+.RS 18n
+.rt
+\fISigned decimal\fR, \fIoctal\fR, \fIunsigned decimal\fR, and
+\fIhexadecimal\fR, respectively. Can be followed by an optional \fBC\fR,
+\fBS\fR, \fBI\fR, or \fBL\fR indicating that the conversion should be applied
+to an item of type \fBchar\fR, \fBshort\fR, \fBint\fR, or \fBlong\fR,
+respectively.
+.RE
+
+Multiple types can be concatenated within the same \fItype_string\fR and
+multiple \fB-t\fR options can be specified. Output lines are written for each
+type specified in the order in which the type specification characters are
+specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fR
+.ad
+.RS 19n
+.rt
+Shows all input data (verbose). Without the \fB-v\fR option, all groups of
+output lines that would be identical to the immediately preceding output line
+(except for byte offsets), will be replaced with a line containing only an
+asterisk (*).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets words in hex. This is equivalent to \fB-t\fR \fBx2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR \fR
+.ad
+.RS 19n
+.rt
+Interprets long words in hex. This is equivalent to \fB-t\fR \fBx4\fR.
+.RE
+
+.SH OPERANDS
+.SS "/usr/bin/od"
+.sp
+.LP
+The following operands are supported for \fB/usr/bin/od\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR \fR
+.ad
+.RS 26n
+.rt
+Uses the standard input in addition to any files specified. When this operand
+is not given, the standard input is used only if no \fIfile\fR operands are
+specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 26n
+.rt
+A path name of a file to be read. If no \fIfile\fR operands are specified, the
+standard input will be used. If there are no more than two operands, none of
+the \fB-A\fR, \fB-j\fR, \fB-N\fR, or \fB-t\fR options is specified, and
+\fIany\fR of the following are true:
+.RS +4
+.TP
+1.
+the first character of the last operand is a plus sign (+)
+.RE
+.RS +4
+.TP
+2.
+the first character of the second operand is numeric
+.RE
+.RS +4
+.TP
+3.
+the first character of the second operand is \fBx\fR and the second
+character of the second operand is a lower-case hexadecimal character or digit
+.RE
+.RS +4
+.TP
+4.
+the second operand is named "\fBx\fR"
+.RE
+.RS +4
+.TP
+5.
+the second operand is named "\fB\&.\fR"
+.RE
+then the corresponding operand is assumed to be an offset operand rather than a
+file operand.
+.sp
+Without the \fB-N\fR count option, the display continues until an end-of-file
+is reached.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[+][0]\fR \fIoffset\fR \fB[.][b|B]\fR\fR
+.ad
+.br
+.na
+\fB\fB[+][0][\fR\fIoffset\fR] \fB[.]\fR\fR
+.ad
+.br
+.na
+\fB\fB[+][0x|x]\fR[\fIoffset\fR]\fR
+.ad
+.br
+.na
+\fB\fB[+][0x|x]\fR \fIoffset\fR\fB[B]\fR\fR
+.ad
+.RS 26n
+.rt
+The \fIoffset_string\fR operand specifies the byte offset in the file where
+dumping is to commence. The offset is interpreted in octal bytes by default.
+If \fIoffset\fR begins with "\fB0\fR", it is interpreted in octal. If
+\fIoffset\fR begins with "\fBx\fR" or "\fB0x\fR", it is interpreted in
+hexadecimal and any appended "\fBb\fR" is considered to be the final
+hexadecimal digit. If "." is appended, the offset is interpreted in decimal. If
+"\fBb\fR" or "\fBB\fR" is appended, the offset is interpreted in units of
+\fB512\fR bytes. If the \fBfile\fR argument is omitted, the \fIoffset\fR
+argument must be preceded by a plus sign (\fB+\fR). The address is displayed
+starting at the given offset. The radix of the address will be the same as the
+radix of the offset, if specified, otherwise it will be octal. Decimal
+overrides octal, and it is an error to specify both hexadecimal and decimal
+conversions in the same offset operand.
+.RE
+
+.SS "/usr/xpg4/bin/od"
+.sp
+.LP
+The following operands are supported for \fB/usr/xpg4/bin/od\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 29n
+.rt
+Same as \fB/usr/bin/od\fR, except only one of the first two conditions must be
+true.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[+] [0] \fR\fIoffset\fR \fB[.]\|[b|B]\fR\fR
+.ad
+.br
+.na
+\fB\fB+ [\fR\fIoffset\fR] \fB[.]\fR\fR
+.ad
+.br
+.na
+\fB\fB[+][0x]\fR[\fIoffset\fR]\fR
+.ad
+.br
+.na
+\fB\fB[+][0x]\fR \fIoffset\fR\fB\|[B]\fR\fR
+.ad
+.br
+.na
+\fB\fB+x [\fR\fIoffset\fR\fB]\fR\fR
+.ad
+.br
+.na
+\fB\fB+x\fR\fIoffset \fR\fB[B]\fR\fR
+.ad
+.RS 29n
+.rt
+Description of \fIoffset_string\fR is the same as for \fB/usr/bin/od\fR.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBod\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_NUMERIC\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/od"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+.TE
+
+.SS "/usr/xpg4/bin/od"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIenabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsed\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/on.1 b/usr/src/man/man1/on.1
new file mode 100644
index 0000000000..0ea19ac374
--- /dev/null
+++ b/usr/src/man/man1/on.1
@@ -0,0 +1,156 @@
+'\" te
+.\" Copyright (c) 2003, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH on 1 "8 Oct 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+on \- execute a command on a remote system with the local environment
+.SH SYNOPSIS
+.LP
+.nf
+\fBon\fR [\fB-i\fR] [\fB-d\fR] [\fB-n\fR] \fIhost\fR \fIcommand\fR [\fIargument\fR] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBon\fR program is used to execute commands on another system, in an
+environment similar to that invoking the program. All environment variables are
+passed and the current working directory is preserved. To preserve the working
+directory, the working file system must be either already mounted on the host
+or be exported to it. Relative path names will only work if they are within the
+current file system. Absolute path names may cause problems.
+.sp
+.LP
+The standard input is connected to the standard input of the remote command.
+The standard output and the standard error from the remote command are sent to
+the corresponding files for the \fBon\fR command.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Debug mode. Prints out some messages as work is being done.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Interactive mode. Uses remote echoing and special character processing. This
+option is needed for programs that expect to be talking to a terminal. All
+terminal modes and window size changes are propagated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+No Input. This option causes the remote program to get EOF when it reads from
+the standard input, instead of passing the standard input from the standard
+input of the \fBon\fR program. For example, \fB-n\fR is necessary when running
+commands in the background with job control.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchkey\fR(1), \fBrlogin\fR(1), \fBrsh\fR(1), \fBtelnet\fR(1),
+\fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunknown host\fR\fR
+.ad
+.sp .6
+.RS 4n
+Host name not found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcannot connect to server\fR\fR
+.ad
+.sp .6
+.RS 4n
+Host down or not running the server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcan't find\fR\fR
+.ad
+.sp .6
+.RS 4n
+Problem finding the working directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcan't locate mount point\fR \fR
+.ad
+.sp .6
+.RS 4n
+Problem finding current file system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRPC: Authentication error\fR \fR
+.ad
+.sp .6
+.RS 4n
+The server requires \fBDES\fR authentication and you do not have a secret key
+registered with keyserv. Perhaps you logged in without a password. Try to
+keylogin. If that fails, try to set your publickey with chkey.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBon \fIserver\fR: RPC: can't encode arguments\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB10240\fR byte limit for arguments to be encoded and passed from the
+sending to the receiving system has been exceeded.
+.RE
+
+.sp
+.LP
+Other diagnostic messages may be passed back from the server.
+.SH BUGS
+.sp
+.LP
+When the working directory is remote mounted over \fBNFS\fR, a Control-Z hangs
+the window.
+.sp
+.LP
+Root cannot use \fBon\fR.
diff --git a/usr/src/man/man1/optisa.1 b/usr/src/man/man1/optisa.1
new file mode 100644
index 0000000000..592360606f
--- /dev/null
+++ b/usr/src/man/man1/optisa.1
@@ -0,0 +1,60 @@
+'\" te
+.\" Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH optisa 1 "25 Jul 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+optisa \- determine which variant instruction set is optimal to use
+.SH SYNOPSIS
+.LP
+.nf
+\fBoptisa\fR \fIinstruction_set\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBoptisa\fR prints which \fIinstruction_set\fR out of the ones specified in
+the command will perform best on this machine. In this case, ``best'' is
+defined by the order in which instruction set names are returned by
+\fBisalist\fR(1). Possible values for \fIinstruction_set\fR are given in
+\fBisalist\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+One of the \fIinstruction_set\fR values you specified is printed by this
+command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+There is no output; that is, this machine cannot use any \fIinstruction_set\fR
+that you specified with the \fBoptisa\fR command.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBisalist\fR(1), \fBuname\fR(1), \fBattributes\fR(5), \fBisalist\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBoptisa\fR is preferable to \fBuname\fR \fB-p\fR or \fBuname\fR \fB-m\fR
+(see \fBuname\fR(1)) in determining which of several binary versions of a given
+program should be used on the given machine.
diff --git a/usr/src/man/man1/pack.1 b/usr/src/man/man1/pack.1
new file mode 100644
index 0000000000..ba04397c52
--- /dev/null
+++ b/usr/src/man/man1/pack.1
@@ -0,0 +1,330 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pack 1 "13 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+pack, pcat, unpack \- compress and expand files
+.SH SYNOPSIS
+.LP
+.nf
+\fBpack\fR [\fB-f/\fR] [\fB-\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBpcat\fR \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBunpack\fR [\fB-/\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.SS "pack"
+.sp
+.LP
+The \fBpack\fR command attempts to store the specified files in a compressed
+form. Wherever possible (and useful), each input file \fBfile\fR is replaced by
+a packed file \fBfile\fR\fB\&.z\fR with the same access modes, access and
+modified dates, and owner as those of \fBfile\fR. If \fBpack\fR is successful,
+\fBfile\fR is removed.
+.sp
+.LP
+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 \fB\&.z\fR file, it is usually not worthwhile to pack files
+smaller than three blocks, unless the character frequency distribution is very
+skewed, which can occur with printer plots or pictures.
+.sp
+.LP
+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.
+.sp
+.LP
+The \fBpack\fR utility returns a value that is the number of files that it
+failed to compress. If that number exceeds \fB255\fR, \fB255\fR is returned.
+.sp
+.LP
+No packing occurs if:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file appears to be already packed
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file name is too long to add the \fB\&.z\fR suffix
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file has links
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file is a directory
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file cannot be opened
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file is empty
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+no disk storage blocks are saved by packing
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a file called \fBfile\fR\fB\&.z\fR already exists
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the \fB\&.z\fR file cannot be created
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+an I/O error occurred during processing.
+.RE
+.sp
+.LP
+The last segment of the file name must be short enough to allow space for the
+appended \fB\&.z\fRextension. Directories cannot be compressed.
+.SS "pcat"
+.sp
+.LP
+The \fBpcat\fR command does for packed files what \fBcat\fR(1) does for
+ordinary files, except that \fBpcat\fR cannot be used as a filter. The
+specified files are unpacked and written to the standard output.
+.sp
+.LP
+\fBpcat\fR returns the number of files it was unable to unpack. Failure can
+occur if:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file cannot be opened;
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the file does not appear to be the output of \fBpack\fR.
+.RE
+.SS "unpack"
+.sp
+.LP
+The \fBunpack\fR command expands files created by \fBpack\fR. For each
+\fBfile\fR specified in the command, a search is made for a file called
+\fBfile\fR\fB\&.z\fR (or just \fBfile\fR, if \fBfile\fR ends in \fB\&.z\fR). If
+this file appears to be a packed file, it is replaced by its expanded version.
+The new file has the \fB\&.z\fR suffix stripped from its name, and has the same
+access modes, access and modification dates, and owner as those of the packed
+file.
+.sp
+.LP
+\fBunpack\fR returns a value that is the number of files it was unable to
+unpack. Failure can occur for the same reasons that it can in \fBpcat\fR, as
+well as for the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a file with the unpacked name already exists;
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the unpacked file cannot be created.
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following options are supported by \fBpack\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Forces packing of \fBfile\fR. This is useful for causing an entire directory to
+be packed even if some of the files do not benefit. Packed files can be
+restored to their original form using \fBunpack\fR or \fBpcat\fR.
+.RE
+
+.sp
+.LP
+The following options are supported by \fBpack\fR and \fBunpack\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-/\fR\fR
+.ad
+.RS 6n
+.rt
+When packing or unpacking, copies any ACL and extended system attributes
+associated with the source file to the target file. If an ACL or extended
+system attributes cannot be copied, the original file is retained, a diagnostic
+message is written to \fBstderr\fR, and the final exit status is
+\fBnon-zero\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be packed, unpacked, or pcated; \fBfile\fR can include
+or omit the \fB\&.z\fR suffix.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 8n
+.rt
+\fBpack\fR uses Huffman (minimum redundancy) codes on a byte-by-byte basis. If
+the \fB\(mi\fR argument is used, an internal flag is set that causes the number
+of times each byte is used, its relative frequency, and the code for the byte
+to be printed on the standard output. Additional occurrences of \fB\(mi\fR in
+place of \fBfile\fR causes the internal flag to be set and reset.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBpack\fR,
+\fBpcat\fR, and \fBunpack\fR when encountering files greater than or equal to 2
+Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRViewing a Packed File
+.sp
+.LP
+To view a packed file named \fBfile.z\fR use:
+
+.sp
+.LP
+\fBexample%\fR \fBpcat\fR \fBfile.z\fR
+
+.sp
+.LP
+or just:
+
+.sp
+.LP
+\fBexample%\fR \fBpcat\fR \fBfile\fR
+
+.LP
+\fBExample 2 \fRMaking and Unpacked Copy:
+.sp
+.LP
+To make an unpacked copy, say \fBnnn\fR, of a packed file named \fBfile.z\fR
+(without destroying \fBfile.z\fR) use the command:
+
+.sp
+.LP
+\fBexample%\fR \fBpcat\fR \fBfile\fR \fB>nnn\fR
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpack\fR, \fBpcat\fR, and \fBunpack\fR:
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred. The number of files the command failed to pack/unpack is
+returned. If the number of failures exceeds \fB255\fR, then \fB255\fR is
+returned.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+lw(2.75i) |lw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+\fBATTRIBUTE TYPE\fR\fBATTRIBUTE VALUE\fR
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBcompress\fR(1), \fBzcat\fR(1), \fBfgetattr\fR(3C),
+\fBfsetattr\fR(3C)\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5)
diff --git a/usr/src/man/man1/pagesize.1 b/usr/src/man/man1/pagesize.1
new file mode 100644
index 0000000000..5af07231b6
--- /dev/null
+++ b/usr/src/man/man1/pagesize.1
@@ -0,0 +1,41 @@
+'\" te
+.\" Copyright (c) 2003, Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pagesize 1 "4 May 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+pagesize \- display the size or sizes of a page of memory
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/pagesize\fR [\fB-a\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpagesize\fR utility prints the default size of a page of memory in
+bytes, as returned by \fBgetpagesize\fR(3C). This program is useful in
+constructing portable shell scripts.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Prints out all possible hardware address translation sizes supported by the
+system.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBppgsz\fR(1), \fBgetpagesize\fR(3C), \fBgetpagesizes\fR(3C),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/pargs.1 b/usr/src/man/man1/pargs.1
new file mode 100644
index 0000000000..ca8aa2d8f5
--- /dev/null
+++ b/usr/src/man/man1/pargs.1
@@ -0,0 +1,206 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pargs 1 "19 Jun 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+pargs \- print process arguments, environment variables, or auxiliary
+vector
+.SH SYNOPSIS
+.LP
+.nf
+\fBpargs\fR [\fB-aceFlx\fR] [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpargs\fR utility examines a target process or process core file and
+prints arguments, environment variables and values, or the process auxiliary
+vector.
+.sp
+.LP
+\fBpargs\fR outputs unprintable characters as escaped octal in the format
+\fB\e\fR\fIxxx\fR, unless the character is one of the characters specified in
+the "\fBEscape Sequences\fR" section of \fBformats\fR(5), in which case the
+character is printed as specified in that section.
+.sp
+.LP
+\fBpargs\fR attempts to be sensitive to the locale of the target process. If
+the target process and the \fBpargs\fR process do not share a common character
+encoding, \fBpargs\fR attempts to employ the \fBiconv\fR(3C) facility to
+generate a printable version of the extracted strings. In the event that such
+a conversion is impossible, strings are displayed as 7-bit \fBASCII\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Prints process arguments as contained in \fBargv[]\fR (default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Treats strings in the target process as though they were encoded in 7-bit
+\fBASCII\fR, regardless of the locale of the target. The use of \fBiconv\fR(3C)
+is suppressed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Prints process environment variables and values as pointed at by the
+\fB_environ\fR symbol or by \fBpr_envp\fR in \fB/proc/\fIpid\fR/psinfo\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Force. Grabs the target process even if another process has control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the arguments as a single command line. The command line is printed in
+a manner suitable for interpretation by \fB/bin/sh\fR. If the arguments contain
+unprintable characters, or if the target process is in a different locale, a
+warning message is displayed. The resulting command line might not be
+interpreted correctly by \fB/bin/sh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Prints process auxiliary vector.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 8n
+.rt
+Process \fBID\fR list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcore\fR\fR
+.ad
+.RS 8n
+.rt
+Process core file.
+.RE
+
+.SH USAGE
+.sp
+.LP
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only if the primary controlling process, typically a debugger, has
+stopped the victim process and the primary controlling process is doing nothing
+at the moment of application of the \fBproc\fR tool in question.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error has occurred (such as no such process, permission denied, or invalid
+option).
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/pid/*\fR\fR
+.ad
+.RS 15n
+.rt
+Process information and control files.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBproc\fR(1), \fBiconv\fR(3C), \fBproc\fR(4), \fBascii\fR(5),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBformats\fR(5)
diff --git a/usr/src/man/man1/passwd.1 b/usr/src/man/man1/passwd.1
new file mode 100644
index 0000000000..d7735ddf0f
--- /dev/null
+++ b/usr/src/man/man1/passwd.1
@@ -0,0 +1,1208 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH passwd 1 "25 Feb 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+passwd \- change login password and password attributes
+.SH SYNOPSIS
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR files | \fB-r\fR ldap | \fB-r\fR nis | \fB-r\fR nisplus] [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR files] [\fB-egh\fR] [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR files] \fB-s\fR [\fB-a\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR files] \fB-s\fR [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR files] [\fB-d\fR | \fB-l\fR | \fB-u\fR | \fB-N\fR] [\fB-f\fR] [\fB-n\fR \fImin\fR]
+ [\fB-w\fR \fIwarn\fR] [\fB-x\fR \fImax\fR] \fIname\fR
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR ldap [\fB-egh\fR] [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR ldap ] \fB-s\fR [\fB-a\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR [\fB-r\fR ldap ] \fB-s\fR [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR ldap [\fB-d | -l | -u | -N\fR] [\fB-f\fR] [\fB-n\fR \fImin\fR] [\fB-w\fR \fIwarn\fR] [\fB-x\fR \fImax\fR] \fIname\fR
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR nis [\fB-egh\fR] [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR nisplus [\fB-egh\fR] [\fB-D\fR \fIdomainname\fR] [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR nisplus \fB-s\fR [\fB-a\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR nisplus [\fB-D\fR \fIdomainname\fR] \fB-s\fR [\fIname\fR]
+.fi
+
+.LP
+.nf
+\fBpasswd\fR \fB-r\fR nisplus [\fB-l\fR | \fB-u\fR | \fB-N\fR] [\fB-f\fR] [\fB-n\fR \fImin\fR] [\fB-w\fR \fIwarn\fR]
+ [\fB-x\fR \fImax\fR] [\fB-D\fR \fIdomainname\fR] \fIname\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpasswd\fR command changes the password or lists password attributes
+associated with the user's login \fIname\fR. Additionally, privileged users can
+use \fBpasswd\fR to install or change passwords and attributes associated with
+any login \fIname\fR.
+.sp
+.LP
+When used to change a password, \fBpasswd\fR prompts everyone for their old
+password, if any. It then prompts for the new password twice. When the old
+password is entered, \fBpasswd\fR checks to see if it has aged sufficiently. If
+\fBaging\fR is insufficient, \fBpasswd\fR terminates; see \fBpwconv\fR(1M),
+\fBnistbladm\fR(1), and \fBshadow\fR(4) for additional information.
+.sp
+.LP
+The \fBpwconv\fR command creates and updates \fB/etc/shadow\fR with information
+from \fB/etc/passwd\fR. \fBpwconv\fR relies on a special value of \fBx\fR in
+the password field of \fB/etc/passwd\fR. This value of \fBx\fRindicates that
+the password for the user is already in \fB/etc/shadow\fR and should not be
+modified.
+.sp
+.LP
+If aging is sufficient, a check is made to ensure that the new password meets
+construction requirements. When the new password is entered a second time, the
+two copies of the new password are compared. If the two copies are not
+identical, the cycle of prompting for the new password is repeated for, at
+most, two more times.
+.sp
+.LP
+Passwords must be constructed to meet the following requirements:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each password must have \fBPASSLENGTH\fR characters, where \fBPASSLENGTH\fR is
+defined in \fB/etc/default/passwd\fR and is set to \fB6\fR. Setting
+\fBPASSLENGTH\fR to more than eight characters requires configuring
+\fBpolicy.conf\fR(4) with an algorithm that supports greater than eight
+characters.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each password must meet the configured complexity constraints specified in
+\fB/etc/default/passwd\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each password must not be a member of the configured dictionary as specified in
+\fB/etc/default/passwd\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+For accounts in name services which support password history checking, if prior
+password history is defined, new passwords must not be contained in the prior
+password history.
+.RE
+.sp
+.LP
+If all requirements are met, by default, the \fBpasswd\fR command consults
+\fB/etc/nsswitch.conf\fR to determine in which repositories to perform password
+update. It searches the \fBpasswd\fR and \fBpasswd_compat\fR entries. The
+sources (repositories) associated with these entries are updated. However, the
+password update configurations supported are limited to the following cases.
+Failure to comply with the configurations prevents users from logging onto the
+system. The password update configurations are:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files ldap\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files nis\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: files nisplus\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: compat\fR (==> files nis)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: compat\fR (==> files ldap)
+.sp
+\fBpasswd_compat: ldap\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBpasswd: compat\fR (==> files nisplus)
+.sp
+\fBpasswd_compat: nisplus\fR
+.RE
+.sp
+.LP
+You can add the \fBad\fR keyword to any of the \fBpasswd\fR configurations in
+the above list. However, you cannot use the \fBpasswd\fR command to change the
+password of an Active Directory (AD) user. If the \fBad\fR keyword is found in
+the \fBpasswd\fR entry during a password update operation, it is ignored. To
+update the password of an AD user, use the \fBkpasswd\fR(1) command.
+.sp
+.LP
+Network administrators, who own the NIS+ password table, can change any
+password attributes. The administrator configured for updating LDAP shadow
+information can also change any password attributes. See \fBldapclient\fR(1M).
+.sp
+.LP
+When a user has a password stored in one of the name services as well as a
+local \fBfiles\fR entry, the \fBpasswd\fR command updates both. It is possible
+to have different passwords in the name service and local files entry. Use
+\fBpasswd\fR \fB-r\fR to change a specific password repository.
+.sp
+.LP
+In the \fBfiles\fR case, super-users (for instance, real and effective uid
+equal to \fB0\fR, see \fBid\fR(1M) and \fBsu\fR(1M)) can change any password.
+Hence, \fBpasswd\fR does not prompt privileged users for the old password.
+Privileged users are not forced to comply with password aging and password
+construction requirements. A privileged user can create a null password by
+entering a carriage return in response to the prompt for a new password. (This
+differs from \fBpasswd\fR \fB-d\fR because the \fBpassword\fR prompt is still
+displayed.) If NIS is in effect, superuser on the root master can change any
+password without being prompted for the old NIS \fBpasswd\fR, and is not forced
+to comply with password construction requirements.
+.sp
+.LP
+If LDAP is in effect, superuser on any Native LDAP client system can change any
+password without being prompted for the old LDAP passwd, and is not forced to
+comply with password construction requirements.
+.sp
+.LP
+Normally, \fBpasswd\fR entered with no arguments changes the password of the
+current user. When a user logs in and then invokes \fBsu\fR(1M) to become
+superuser or another user, \fBpasswd\fR changes the original user's password,
+not the password of the superuser or the new user.
+.sp
+.LP
+Any user can use the \fB-s\fR option to show password attributes for his or her
+own login \fIname\fR, provided they are using the \fB-r\fR \fBnisplus\fR
+argument. Otherwise, the \fB-s\fR argument is restricted to the superuser.
+.sp
+.LP
+The format of the display is:
+.sp
+.in +2
+.nf
+\fIname status mm/dd/yy min max warn\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or, if password aging information is not present,
+.sp
+.in +2
+.nf
+\fIname status\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 12n
+.rt
+The login \fBID\fR of the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstatus\fR\fR
+.ad
+.RS 12n
+.rt
+The password status of \fIname\fR.
+.sp
+The \fIstatus\fR field can take the following values:
+.sp
+.ne 2
+.mk
+.na
+\fBLK\fR
+.ad
+.RS 6n
+.rt
+This account is \fBlocked\fR account. See Security.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBNL\fR
+.ad
+.RS 6n
+.rt
+This account is a \fBno login\fR account. See \fBSecurity\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBNP\fR
+.ad
+.RS 6n
+.rt
+This account has no password and is therefore open without authentication.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBPS\fR
+.ad
+.RS 6n
+.rt
+This account has a password.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm/dd/yy\fR\fR
+.ad
+.RS 12n
+.rt
+The date password was last changed for \fIname\fR. All password aging dates are
+determined using Greenwich Mean Time (Universal Time) and therefore can differ
+by as much as a day in other time zones.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImin\fR\fR
+.ad
+.RS 12n
+.rt
+The minimum number of days required between password changes for \fIname\fR.
+\fBMINWEEKS\fR is found in \fB/etc/default/passwd\fR and is set to \fBNULL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImax\fR\fR
+.ad
+.RS 12n
+.rt
+The maximum number of days the password is valid for \fIname\fR. \fBMAXWEEKS\fR
+is found in \fB/etc/default/passwd\fR and is set to \fBNULL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIwarn\fR\fR
+.ad
+.RS 12n
+.rt
+The number of days relative to \fImax\fR before the password expires and the
+\fIname\fR are warned.
+.RE
+
+.SS "Security"
+.sp
+.LP
+\fBpasswd\fR uses \fBpam\fR(3PAM) for password change. It calls PAM with a
+service name \fBpasswd\fR and uses service module type \fBauth\fR for
+authentication and password for password change.
+.sp
+.LP
+Locking an account (\fB-l\fR option) does not allow its use for password based
+login or delayed execution (such as \fBat\fR(1), \fBbatch\fR(1), or
+\fBcron\fR(1M)). The \fB-N\fR option can be used to disallow password based
+login, while continuing to allow delayed execution.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 17n
+.rt
+Shows password attributes for all entries. Use only with the \fB-s\fR option.
+\fIname\fR must not be provided. For the \fBnisplus\fR repository, this shows
+only the entries in the NIS+ password table in the local domain that the
+invoker is authorized to read. For the \fBfiles\fR and \fBldap\fR repositories,
+this is restricted to the superuser.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR \fIdomainname\fR\fR
+.ad
+.RS 17n
+.rt
+Consults the \fBpasswd.org_dir\fR table in \fBdomainname\fR. If this option is
+not specified, the default \fBdomainname\fR returned by
+\fBnis_local_directory\fR(3NSL) are used. This domain name is the same as that
+returned by \fBdomainname\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 17n
+.rt
+Changes the login shell. For the \fBfiles\fR repository, this only works for
+the superuser. Normal users can change the \fBldap\fR, \fBnis\fR, or
+\fBnisplus\fR repositories. The choice of shell is limited by the requirements
+of \fBgetusershell\fR(3C). If the user currently has a shell that is not
+allowed by \fBgetusershell\fR, only root can change it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 17n
+.rt
+Changes the gecos (finger) information. For the \fBfiles\fR repository, this
+only works for the superuser. Normal users can change the \fBldap\fR,
+\fBnis\fR, or \fBnisplus\fR repositories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 17n
+.rt
+Changes the home directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the repository to which an operation is applied. The supported
+repositories are \fBfiles\fR, \fBldap\fR, \fBnis\fR, or \fBnisplus\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIname\fR\fR
+.ad
+.RS 17n
+.rt
+Shows password attributes for the login \fIname\fR. For the \fBnisplus\fR
+repository, this works for everyone. However for the \fBfiles\fR and \fBldap\fR
+repositories, this only works for the superuser. It does not work at all for
+the \fBnis\fR repository which does not support password aging.
+.sp
+The output of this option, and only this option is Stable and parsable. The
+format is \fIusername\fR followed by white space followed by one of the
+following codes.
+.sp
+New codes might be added in the future so code that parses this must be
+flexible in the face of unknown codes. While all existing codes are two
+characters in length that might not always be the case.
+.sp
+The following are the current status codes:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLK\fR\fR
+.ad
+.RS 6n
+.rt
+Account is locked for UNIX authenitcation. \fBpasswd -l\fR was run or the
+authentication failed \fBRETRIES\fR times.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNL\fR\fR
+.ad
+.RS 6n
+.rt
+The account is a no login account. \fBpasswd -N\fR has been run.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNP\fR\fR
+.ad
+.RS 6n
+.rt
+Account has no password. \fBpasswd -d\fR was run.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPS\fR\fR
+.ad
+.RS 6n
+.rt
+The account probably has a valid password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBUN\fR\fR
+.ad
+.RS 6n
+.rt
+The data in the password field is unknown. It is not a recognizable hashed
+password or any of the above entries. See \fBcrypt\fR(3C) for valid password
+hashes.
+.RE
+
+.RE
+
+.SS "Privileged User Options"
+.sp
+.LP
+Only a privileged user can use the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 11n
+.rt
+Deletes password for \fIname\fR and unlocks the account. The login \fIname\fR
+is not prompted for password. It is only applicable to the \fBfiles\fR and
+\fBldap\fR repositories.
+.sp
+If the \fBlogin\fR(1) option \fBPASSREQ=YES\fR is configured, the account is
+not able to login. \fBPASSREQ=YES\fR is the delivered default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 11n
+.rt
+Forces the user to change password at the next login by expiring the password
+for \fIname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 11n
+.rt
+Locks password entry for \fIname\fR. See the \fB-d\fR or \fB-u\fR option for
+unlocking the account.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR\fR
+.ad
+.RS 11n
+.rt
+Makes the password entry for name a value that cannot be used for login, but
+does not lock the account. See the \fB-d\fR option for removing the value, or
+to set a password to allow logins.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fImin\fR\fR
+.ad
+.RS 11n
+.rt
+Sets minimum field for \fIname\fR. The \fImin\fR field contains the minimum
+number of days between password changes for \fIname\fR. If \fImin\fR is greater
+than \fImax\fR, the user can not change the password. Always use this option
+with the \fB-x\fR option, unless \fImax\fR is set to \fB\(mi1\fR (aging turned
+off). In that case, \fImin\fR need not be set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 11n
+.rt
+Unlocks a locked password for entry name. See the \fB-d\fR option for removing
+the locked password, or to set a password to allow logins.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIwarn\fR\fR
+.ad
+.RS 11n
+.rt
+Sets warn field for \fIname\fR. The \fIwarn\fR field contains the number of
+days before the password expires and the user is warned. This option is not
+valid if password aging is disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fImax\fR\fR
+.ad
+.RS 11n
+.rt
+Sets maximum field for \fIname\fR. The \fImax\fR field contains the number of
+days that the password is valid for \fIname\fR. The aging for \fIname\fR is
+turned off immediately if \fImax\fR is set to \fB\(mi1\fR\&.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 8n
+.rt
+User login name.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+If any of the \fBLC_*\fR variables, that is, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+\fBLC_TIME\fR, \fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR (see
+\fBenviron\fR(5)), are not set in the environment, the operational behavior of
+\fBpasswd\fR for each corresponding locale category is determined by the value
+of the \fBLANG\fR environment variable. If \fBLC_ALL\fR is set, its contents
+are used to override both the \fBLANG\fR and the other \fBLC_*\fR variables. If
+none of the above variables is set in the environment, the \fBC\fR (U.S. style)
+locale determines how \fBpasswd\fR behaves.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR\fR
+.ad
+.RS 15n
+.rt
+Determines how \fBpasswd\fR handles characters. When \fBLC_CTYPE\fR is set to a
+valid value, \fBpasswd\fR can display and handle text and filenames containing
+valid characters for that locale. \fBpasswd\fR can display and handle Extended
+Unix Code (\fBEUC\fR) characters where any individual character can be 1, 2, or
+3 bytes wide. \fBpasswd\fR can also handle \fBEUC\fR characters of 1, 2, or
+more column widths. In the \fBC\fR locale, only characters from ISO 8859-1 are
+valid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR\fR
+.ad
+.RS 15n
+.rt
+Determines how diagnostic and informative messages are presented. This includes
+the language and style of the messages, and the correct form of affirmative and
+negative responses. In the \fBC\fR locale, the messages are presented in the
+default form found in the program itself (in most cases, U.S. English).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The \fBpasswd\fR command exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Success.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+Permission denied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 6n
+.rt
+Invalid combination of options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 6n
+.rt
+Unexpected failure. Password file unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR\fR
+.ad
+.RS 6n
+.rt
+Unexpected failure. Password file(s) missing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB5\fR\fR
+.ad
+.RS 6n
+.rt
+Password file(s) busy. Try again later.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB6\fR\fR
+.ad
+.RS 6n
+.rt
+Invalid argument to option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB7\fR\fR
+.ad
+.RS 6n
+.rt
+Aging option is disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB8\fR\fR
+.ad
+.RS 6n
+.rt
+No memory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB9\fR\fR
+.ad
+.RS 6n
+.rt
+System error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB10\fR\fR
+.ad
+.RS 6n
+.rt
+Account expired.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/default/passwd\fR\fR
+.ad
+.RS 23n
+.rt
+Default values can be set for the following flags in \fB/etc/default/passwd\fR.
+For example: \fBMAXWEEKS=26\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDICTIONDBDIR\fR\fR
+.ad
+.RS 16n
+.rt
+The directory where the generated dictionary databases reside. Defaults to
+\fB/var/passwd\fR.
+.sp
+If neither \fBDICTIONLIST\fR nor \fBDICTIONDBDIR\fR is specified, the system
+does not perform a dictionary check.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDICTIONLIST\fR\fR
+.ad
+.RS 16n
+.rt
+DICTIONLIST can contain list of comma separated dictionary files such as
+\fBDICTIONLIST=\fR\fIfile1\fR, \fIfile2\fR, \fIfile3\fR. Each dictionary file
+contains multiple lines and each line consists of a word and a NEWLINE
+character (similar to \fB/usr/share/lib/dict/words\fR.) You must specify full
+pathnames. The words from these files are merged into a database that is used
+to determine whether a password is based on a dictionary word.
+.sp
+If neither \fBDICTIONLIST\fR nor \fBDICTIONDBDIR\fR is specified, the system
+does not perform a dictionary check.
+.sp
+To pre-build the dictionary database, see \fBmkpwdict\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHISTORY\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum number of prior password history to keep for a user. Setting the
+\fBHISTORY\fR value to zero (\fB0\fR), or removing the flag, causes the prior
+password history of all users to be discarded at the next password change by
+any user. The default is not to define the \fBHISTORY\fR flag. The maximum
+value is \fB26.\fR Currently, this functionality is enforced only for user
+accounts defined in the \fBfiles\fR name service (local
+\fBpasswd\fR(4)/\fBshadow\fR(4)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAXREPEATS\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum number of allowable consecutive repeating characters. If
+\fBMAXREPEATS\fR is not set or is zero (\fB0\fR), the default is no checks
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMAXWEEKS\fR\fR
+.ad
+.RS 16n
+.rt
+Maximum time period that password is valid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINALPHA\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum number of alpha character required. If \fBMINALPHA\fR is not set, the
+default is \fB2\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINDIFF\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum differences required between an old and a new password. If
+\fBMINDIFF\fR is not set, the default is \fB3\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINDIGIT\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum number of digits required. If \fBMINDIGIT\fR is not set or is set to
+zero (\fB0\fR), the default is no checks. You cannot be specify \fBMINDIGIT\fR
+if \fBMINNONALPHA\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINLOWER\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum number of lower case letters required. If not set or zero (0), the
+default is no checks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINNONALPHA\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum number of non-alpha (including numeric and special) required. If
+\fBMINNONALPHA\fR is not set, the default is \fB1\fR. You cannot specify
+\fBMINNONALPHA\fR if \fBMINDIGIT\fR or \fBMINSPECIAL\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINWEEKS\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum time period before the password can be changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINSPECIAL\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum number of special (non-alpha and non-digit) characters required. If
+\fBMINSPECIAL\fR is not set or is zero (\fB0\fR), the default is no checks. You
+cannot specify \fBMINSPECIAL\fR if you also specify \fBMINNONALPHA\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMINUPPER\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum number of upper case letters required. If \fBMINUPPER\fR is not set or
+is zero (\fB0\fR), the default is no checks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNAMECHECK\fR\fR
+.ad
+.RS 16n
+.rt
+Enable/disable checking or the login name. The default is to do login name
+checking. A case insensitive value of \fBno\fR disables this feature.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPASSLENGTH\fR\fR
+.ad
+.RS 16n
+.rt
+Minimum length of password, in characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBWARNWEEKS\fR\fR
+.ad
+.RS 16n
+.rt
+Time period until warning of date of password's ensuing expiration.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBWHITESPACE\fR\fR
+.ad
+.RS 16n
+.rt
+Determine if white space characters are allowed in passwords. Valid values are
+\fBYES\fR and \fBNO\fR. If \fBWHITESPACE\fR is not set or is set to \fBYES\fR,
+white space characters are allowed.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/oshadow\fR\fR
+.ad
+.RS 23n
+.rt
+Temporary file used by \fBpasswd\fR, \fBpassmgmt\fR and \fBpwconv\fR to update
+the real shadow file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 23n
+.rt
+Password file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/shadow\fR\fR
+.ad
+.RS 23n
+.rt
+Shadow password file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/shells\fR\fR
+.ad
+.RS 23n
+.rt
+Shell database.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Uncommitted. The options are Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBat\fR(1), \fBbatch\fR(1), \fBfinger\fR(1), \fBkpasswd\fR(1), \fBlogin\fR(1),
+\fBnistbladm\fR(1), \fBcron\fR(1M), \fBdomainname\fR(1M), \fBeeprom\fR(1M),
+\fBid\fR(1M), \fBldapclient\fR(1M), \fBmkpwdict\fR(1M), \fBpassmgmt\fR(1M),
+\fBpwconv\fR(1M), \fBsu\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M),
+\fBusermod\fR(1M), \fBcrypt\fR(3C), \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C),
+\fBgetusershell\fR(3C), \fBnis_local_directory\fR(3NSL), \fBpam\fR(3PAM),
+\fBloginlog\fR(4), \fBnsswitch.conf\fR(4), \fBpam.conf\fR(4), \fBpasswd\fR(4),
+\fBpolicy.conf\fR(4), \fBshadow\fR(4), \fBshells\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5),
+\fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_ldap\fR(5),
+\fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5), \fBpam_unix_session\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBpam_unix\fR(5) module is no longer supported. Similar functionality is
+provided by \fBpam_unix_account\fR(5), \fBpam_unix_auth\fR(5),
+\fBpam_unix_session\fR(5), \fBpam_authtok_check\fR(5),
+\fBpam_authtok_get\fR(5), \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), and
+\fBpam_passwd_auth\fR(5).
+.sp
+.LP
+The \fBnispasswd\fR and \fBypasswd\fR commands are wrappers around
+\fBpasswd\fR. Use of \fBnispasswd\fR and \fBypasswd\fR is discouraged. Use
+\fBpasswd\fR \fB-r\fR \fIrepository_name\fR instead.
+.sp
+.LP
+NIS+ might not be supported in future releases of the Solaris operating system.
+Tools to aid the migration from NIS+ to LDAP are available in the current
+Solaris release. For more information, visit
+http://www.sun.com/directory/nisplus/transition.html.
+.sp
+.LP
+Changing a password in the \fBfiles\fR and \fBldap\fR repositories clears the
+failed login count.
+.sp
+.LP
+Changing a password reactivates an account deactivated for inactivity for the
+length of the inactivity period.
+.sp
+.LP
+Input terminal processing might interpret some key sequences and not pass them
+to the \fBpasswd\fR command.
+.sp
+.LP
+An account with no password, status code \fBNP\fR, might not be able to login.
+See the \fBlogin\fR(1) \fBPASSREQ\fR option.
diff --git a/usr/src/man/man1/paste.1 b/usr/src/man/man1/paste.1
new file mode 100644
index 0000000000..29b3097b26
--- /dev/null
+++ b/usr/src/man/man1/paste.1
@@ -0,0 +1,304 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH paste 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+paste \- merge corresponding or subsequent lines of files
+.SH SYNOPSIS
+.LP
+.nf
+\fBpaste\fR [\fB-s\fR] [\fB-d\fR \fIlist\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpaste\fR utility will concatenate the corresponding lines of the given
+input files, and write the resulting lines to standard output.
+.sp
+.LP
+The default operation of \fBpaste\fR will concatenate the corresponding lines
+of the input files. The \fBNEWLINE\fR character of every line except the line
+from the last input file will be replaced with a \fBTAB\fR character.
+.sp
+.LP
+If an \fBEOF\fR (end-of-file) condition is detected on one or more input files,
+but not all input files, \fBpaste\fR will behave as though empty lines were
+read from the files on which \fBEOF\fR was detected, unless the \fB-s\fR option
+is specified.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIlist\fR \fR
+.ad
+.RS 12n
+.rt
+Unless a backslash character (\|\e\|) appears in \fIlist\fR, each character in
+\fIlist\fR is an element specifying a delimiter character. If a backslash
+character appears in \fIlist\fR, the backslash character and one or more
+characters following it are an element specifying a delimiter character as
+described below. These elements specify one or more delimiters to use, instead
+of the default \fBTAB\fR character, to replace the \fBNEWLINE\fR character of
+the input lines. The elements in \fIlist\fR are used circularly. That is, when
+the list is exhausted, the first element from the list is reused.
+.sp
+When the \fB-s\fR option is specified:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The last newline character in a file will not be modified.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The delimiter will be reset to the first element of list after each \fIfile\fR
+operand is processed.
+.RE
+When the option is not specified:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fBNEWLINE\fR characters in the file specified by the last \fIfile\fR will
+not be modified.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The delimiter will be reset to the first element of \fIlist\fR each time a line
+is processed from each file.
+.RE
+If a backslash character appears in \fIlist\fR, it and the character following
+it will be used to represent the following delimiter characters:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\en\fR \fR
+.ad
+.RS 9n
+.rt
+Newline character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\et\fR \fR
+.ad
+.RS 9n
+.rt
+Tab character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\e\fR \fR
+.ad
+.RS 9n
+.rt
+Backslash character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e0\fR \fR
+.ad
+.RS 9n
+.rt
+Empty string (not a null character). If \fB\e0\fR is immediately followed by
+the character \fBx\fR, the character \fBX\fR, or any character defined by the
+\fBLC_CTYPE\fR \fBdigit\fR keyword, the results are unspecified.
+.RE
+
+If any other characters follow the backslash, the results are unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 12n
+.rt
+Concatenate all of the lines of each separate input file in command line order.
+The \fBNEWLINE\fR character of every line except the last line in each input
+file will be replaced with the \fBTAB\fR character, unless otherwise specified
+by the \fB-d\fR option.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 9n
+.rt
+A path name of an input file. If \fB\(mi\fR is specified for one or more of the
+\fIfile\fRs, the standard input will be used. The standard input will be read
+one line at a time, circularly, for each instance of \fB\(mi\fR\&.
+Implementations support pasting of at least 12 \fIfile\fR operands.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBpaste\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRListing a directory in one column
+.sp
+.in +2
+.nf
+example% \fBls | paste -d" " \(mi\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRListing a directory in four columns
+.sp
+.in +2
+.nf
+example% \fBls | paste \(mi \(mi \(mi \(mi\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRCombining pairs of lines from a file into single lines
+.sp
+.in +2
+.nf
+example% \fBpaste -s -d"\e t\e n" file\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpaste\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcut\fR(1), \fBgrep\fR(1), \fBpr\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"line too long"\fR\fR
+.ad
+.RS 22n
+.rt
+Output lines are restricted to 511 characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"too many files"\fR\fR
+.ad
+.RS 22n
+.rt
+Except for \fB-s\fR option, no more than 12 input files may be specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"no delimiters"\fR\fR
+.ad
+.RS 22n
+.rt
+The \fB-d\fR option was specified with an empty list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB"cannot open \fR\fBfile\fR\fB"\fR\fR
+.ad
+.RS 22n
+.rt
+The specified file cannot be opened.
+.RE
+
diff --git a/usr/src/man/man1/pathchk.1 b/usr/src/man/man1/pathchk.1
new file mode 100644
index 0000000000..f989d658a1
--- /dev/null
+++ b/usr/src/man/man1/pathchk.1
@@ -0,0 +1,346 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pathchk 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+pathchk \- check path names
+.SH SYNOPSIS
+.LP
+.nf
+\fBpathchk\fR [\fB-p\fR] \fIpath\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpathchk\fR command will check that one or more path names are valid
+(that is, they could be used to access or create a file without causing syntax
+errors) and portable (that is, no filename truncation will result). More
+extensive portability checks are provided by the \fB-p\fR option.
+.sp
+.LP
+By default, \fBpathchk\fR will check each component of each \fIpath\fR operand
+based on the underlying file system. A diagnostic will be written for each
+\fIpath\fR operand that:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+is longer than \fIPATH_MAX\fR bytes.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contains any component longer than \fINAME_MAX\fR bytes in its containing
+directory
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contains any component in a directory that is not searchable
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contains any character in any component that is not valid in its containing
+directory.
+.RE
+.sp
+.LP
+The format of the diagnostic message is not specified, but will indicate the
+error detected and the corresponding \fIpath\fR operand.
+.sp
+.LP
+It will not be considered an error if one or more components of a \fIpath\fR
+operand do not exist as long as a file matching the path name specified by the
+missing components could be created that does not violate any of the checks
+specified above.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Instead of performing checks based on the underlying file system, write a
+diagnostic for each \fIpath\fR operand that:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+is longer than \fB_POSIX_PATH_MAX \fR bytes
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contains any component longer than \fB_POSIX_NAME_MAX\fR bytes
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contains any character in any component that is not in the portable filename
+character set.
+.RE
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath\fR\fR
+.ad
+.RS 8n
+.rt
+A path to be checked.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBpathchk\fR
+when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the pathchk command
+.sp
+.LP
+To verify that all paths in an imported data interchange archive are legitimate
+and unambiguous on the current system:
+
+.sp
+.in +2
+.nf
+example% \fBpax -f archive | sed -e '/ == .*/s///' | xargs pathchk
+if [ $? -eq 0 ]
+then
+ pax -r -f archive
+else
+ echo Investigate problems before importing files.
+ exit 1
+fi\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To verify that all files in the current directory hierarchy could be moved to
+any system conforming to the X/Open specification that also supports the
+\fBpax\fR(1) command:
+
+.sp
+.in +2
+.nf
+example% \fBfind . -print | xargs pathchk -p
+if [ $? \(mieq 0 ]
+then
+ pax -w -f archive .
+else
+ echo Portable archive cannot be created.
+ exit 1
+fi\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To verify that a user-supplied path names a readable file and that the
+application can create a file extending the given path without truncation and
+without overwriting any existing file:
+
+.sp
+.in +2
+.nf
+example% \fBcase $- in
+ *C*) reset="";;
+ *) reset="set +C"
+ set -C;;
+esac
+test -r "$path" && pathchk "$path.out" &&
+ rm "$path.out" > "$path.out"
+if [ $? -ne 0 ]; then
+ printf "%s: %s not found or %s.out fails \e
+creation checks.\en" $0 "$path" "$path"
+ $reset # reset the noclobber option in case a trap
+ # on EXIT depends on it
+ exit 1
+fi
+$reset
+PROCESSING < "$path" > "$path.out"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following assumptions are made in this example:
+
+.RS +4
+.TP
+1.
+\fBPROCESSING\fR represents the code that will be used by the application to
+use \fB$path\fR once it is verified that \fB$path.out\fR will work as intended.
+.RE
+.RS +4
+.TP
+2.
+The state of the \fBnoclobber\fR option is unknown when this code is invoked
+and should be set on exit to the state it was in when this code was invoked.
+(The \fBreset\fR variable is used in this example to restore the initial
+state.)
+.RE
+.RS +4
+.TP
+3.
+Note the usage of:
+.sp
+.in +2
+.nf
+\fBrm "$path.out" > "$path.out"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.ne 2
+.mk
+.na
+\fBa.\fR
+.ad
+.RS 6n
+.rt
+The \fBpathchk\fR command has already verified, at this point, that
+\fB$path.out\fR will not be truncated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBb.\fR
+.ad
+.RS 6n
+.rt
+With the \fBnoclobber\fR option set, the shell will verify that \fB$path.out\fR
+does not already exist before invoking \fBrm\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBc.\fR
+.ad
+.RS 6n
+.rt
+If the shell succeeded in creating \fB$path.out\fR, \fBrm\fR will remove it so
+that the application can create the file again in the \fBPROCESSING\fR step.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBd.\fR
+.ad
+.RS 6n
+.rt
+If the \fBPROCESSING\fR step wants the file to exist already when it is
+invoked, the:
+.sp
+.in +2
+.nf
+\fBrm "$path.out" > "$path.out"\fR
+.fi
+.in -2
+.sp
+
+should be replaced with:
+.sp
+.in +2
+.nf
+\fB> "$path.out"\fR
+.fi
+.in -2
+.sp
+
+which will verify that the file did not already exist, but leave
+\fB$path.out\fR in place for use by \fBPROCESSING\fR.
+.RE
+
+.RE
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpathchk\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All \fIpath\fR operands passed all of the checks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpax\fR(1), \fBtest\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/pax.1 b/usr/src/man/man1/pax.1
new file mode 100644
index 0000000000..3156dedab3
--- /dev/null
+++ b/usr/src/man/man1/pax.1
@@ -0,0 +1,3024 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pax 1 "16 Jul 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+pax \- portable archive interchange
+.SH SYNOPSIS
+.LP
+.nf
+\fBpax\fR [\fB-cdnv\fR] [\fB-H\fR | \fB-L\fR] [\fB-f\fR \fIarchive\fR] [\fB-o\fR \fIoptions\fR]...
+ [\fB-s\fR \fIreplstr\fR]... [\fIpattern\fR]...
+.fi
+
+.LP
+.nf
+\fBpax\fR \fB-r\fR [\fB-cdiknuv@/\fR] [\fB-H\fR | \fB-L\fR] [\fB-f\fR \fIarchive\fR] [\fB-o\fR \fIoptions\fR]...
+ [\fB-p\fR \fIstring\fR]... [\fB-s\fR \fIreplstr\fR]... [\fIpattern\fR]...
+.fi
+
+.LP
+.nf
+\fBpax\fR \fB-w\fR [\fB-dituvX@/\fR] [\fB-H\fR | \fB-L\fR] [\fB-b\fR \fIblocksize\fR] [\fB-a\fR]
+ [\fB-f\fR \fIarchive\fR] [\fB-o\fR \fIoptions\fR]... [\fB-s\fR \fIreplstr\fR]...
+ [\fB-x\fR \fIformat\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fBpax\fR \fB-r\fR \fB-w\fR [\fB-diklntuvX@/\fR] [\fB-H\fR | \fB-L\fR] [\fB-o\fR \fIoptions\fR]...
+ [\fB-p\fR \fIstring\fR]... [\fB-s\fR \fIreplstr\fR]... [\fIfile\fR]... \fIdirectory\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpax\fR reads, writes, and writes lists of the members of archive files and
+copies directory hierarchies. A variety of archive formats are supported. See
+the \fB-x\fR \fIformat\fR option.
+.SS "Modes of Operations"
+.sp
+.LP
+The action to be taken depends on the presence of the \fB-r\fR and \fB-w\fR
+options. The four combinations of \fB-r\fR and \fB-w\fR are referred to as the
+four modes of operation: \fBlist\fR, \fBread\fR, \fBwrite\fR, and \fBcopy\fR
+modes, corresponding respectively to the four forms shown in the SYNOPSIS.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist\fR\fR
+.ad
+.RS 9n
+.rt
+In \fBlist\fR mode, that is, when neither \fB-r\fR nor \fB-w\fR are specified,
+\fBpax\fR writes the names of the members of the archive file read from the
+standard input, with path names matching the specified patterns, to standard
+output. If a named file has extended attributes, the extended attributes are
+also listed. If a named file is of type directory, the file hierarchy rooted at
+that file is listed as well.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBread\fR\fR
+.ad
+.RS 9n
+.rt
+In \fBread\fR mode, that is, when \fB-r\fR is specified, but \fB-w\fR is not,
+\fBpax\fR extracts the members of the archive file read from the standard
+input, with path names matching the specified patterns. If an extracted file is
+of type directory, the file hierarchy rooted at that file is extracted as well.
+The extracted files are created performing path name resolution with the
+directory in which \fBpax\fR was invoked as the current working directory.
+.sp
+If an attempt is made to extract a directory when the directory already exists,
+this is not considered an error. If an attempt is made to extract a \fBFIFO\fR
+when the \fBFIFO\fR already exists, this is not considered an error.
+.sp
+The ownership, access and modification times, and file mode of the restored
+files are discussed under the \fB-p\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwrite\fR\fR
+.ad
+.RS 9n
+.rt
+In \fBwrite\fR mode, that is, when \fB-w\fR is specified, but \fB-r\fR is not,
+\fBpax\fR writes the contents of the \fIfile\fR operands to the standard output
+in an archive format. If no \fIfile\fR operands are specified, a list of files
+to copy, one per line, are read from the standard input. A file of type
+directory includes all of the files in the file hierarchy rooted at the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcopy\fR\fR
+.ad
+.RS 9n
+.rt
+In \fBcopy\fR mode, that is, when both \fB-r\fR and \fB-w\fR are specified,
+\fBpax\fR copies the \fIfile\fR operands to the destination directory.
+.sp
+If no \fIfile\fR operands are specified, a list of files to copy, one per line,
+are read from the standard input. A file of type directory includes all of the
+files in the file hierarchy rooted at the file.
+.sp
+The effect of the \fBcopy\fR is as if the copied files were written to an
+archive file and then subsequently extracted, except that there can be hard
+links between the original and the copied files. If the destination directory
+is a subdirectory of one of the files to be copied, the results are
+unspecified. It is an error if \fIdirectory\fR does not exist, is not writable
+by the user, or is not a directory.
+.RE
+
+.sp
+.LP
+In \fBread\fR or \fBcopy\fR modes, if intermediate directories are necessary to
+extract an archive member, \fBpax\fR performs actions equivalent to the
+\fBmkdir\fR(2) function, called with the following arguments:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The intermediate directory used as the \fIpath\fR argument.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The octal value of \fB777\fR or \fBrwx\fR (read, write, and execute
+permissions) as the \fImode\fR argument (see \fBchmod\fR(1)).
+.RE
+.sp
+.LP
+If any specified \fIpattern\fR or \fIfile\fR operands are not matched by at
+least one file or archive member, \fBpax\fR writes a diagnostic message to
+standard error for each one that did not match and exits with a non-zero exit
+status.
+.sp
+.LP
+The supported archive formats are automatically detected on input. The default
+output archive format is \fBtar\fR(1).
+.sp
+.LP
+A single archive can span multiple files. \fBpax\fR determines what file to
+read or write as the next file.
+.sp
+.LP
+If the selected archive format supports the specification of linked files, it
+is an error if these files cannot be linked when the archive is extracted,
+except if the files to be linked are symbolic links and the system is not
+capable of making hard links to symbolic links. In that case, separate copies
+of the symbolic link are created instead. Any of the various names in the
+archive that represent a file can be used to select the file for extraction.
+For archive formats that do not store file contents with each name that causes
+a hard link, if the file that contains the data is not extracted during this
+\fBpax\fR session, either the data is restored from the original file, or a
+diagnostic message is displayed with the name of a file that can be used to
+extract the data. In traversing directories, \fBpax\fR detects infinite loops,
+that is, entering a previously visited directory that is an ancestor of the
+last file visited. When it detects an infinite loop, \fBpax\fR writes a
+diagnostic message to standard error and terminates.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 16n
+.rt
+Appends files to the end of the archive. This option does not work for some
+archive devices, such as 1/4-inch streaming tapes and 8mm tapes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIblocksize\fR\fR
+.ad
+.RS 16n
+.rt
+Blocks the output at a positive decimal integer number of bytes per write to
+the archive file. Devices and archive formats can impose restrictions on
+blocking. Blocking is automatically determined on input. Portable applications
+must not specify a \fIblocksize\fR value larger than \fB32256\fR. Default
+blocking when creating archives depends on the archive format. See the \fB-x\fR
+option below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 16n
+.rt
+Matches all file or archive members except those specified by the \fIpattern\fR
+or \fIfile\fR operands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 16n
+.rt
+Causes files of type directory being copied or archived or archive members of
+type directory being extracted or listed to match only the file or archive
+member itself and not the file hierarchy rooted at the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIarchive\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the path name of the input or output archive, overriding the default
+standard input (in \fBlist\fR or \fBread\fR modes) or standard output
+(\fBwrite\fR mode).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 16n
+.rt
+If a symbolic link referencing a file of type directory is specified on the
+command line, \fBpax\fR archives the file hierarchy rooted in the file
+referenced by the link, using the name of the link as the root of the file
+hierarchy. Otherwise, if a symbolic link referencing a file of any other file
+type which \fBpax\fR can normally archive is specified on the command line,
+then \fBpax\fR archives the file referenced by the link, using the name of the
+link. The default behavior is to archive the symbolic link itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 16n
+.rt
+Interactively renames files or archive members. For each archive member
+matching a \fIpattern\fR operand or file matching a \fIfile\fR operand, a
+prompt is written to the file \fB/dev/tty\fR. The prompt contains the name of
+the file or archive member. A line is then read from \fB/dev/tty\fR. If this
+line is blank, the file or archive member is skipped. If this line consists of
+a single period, the file or archive member is processed with no modification
+to its name. Otherwise, its name is replaced with the contents of the line.
+\fBpax\fR immediately exits with a non-zero exit status if end-of-file is
+encountered when reading a response or if \fB/dev/tty\fR cannot be opened for
+reading and writing.
+.sp
+The results of extracting a hard link to a file that has been renamed during
+extraction are unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 16n
+.rt
+Prevents the overwriting of existing files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 16n
+.rt
+Links files. In \fBcopy\fR mode, hard links are made between the source and
+destination file hierarchies whenever possible. If specified in conjunction
+with \fB-H\fR or \fB-L\fR, when a symbolic link is encountered, the hard link
+created in the destination file hierarchy is to the file referenced by the
+symbolic link. If specified when neither \fB-H\fR nor \fB-L\fR is specified,
+when a symbolic link is encountered, the implementation creates a hard link to
+the symbolic link in the source file hierarchy or copies the symbolic link to
+the destination.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 16n
+.rt
+If a symbolic link referencing a file of type directory is specified on the
+command line or encountered during the traversal of a file hierarchy, \fBpax\fR
+archives the file hierarchy rooted in the file referenced by the link, using
+the name of the link as the root of the file hierarchy. Otherwise, if a
+symbolic link referencing a file of any other file type which \fBpax\fR can
+normally archive is specified on the command line or encountered during the
+traversal of a file hierarchy, \fBpax\fR archives the file referenced by the
+link, using the name of the link. The default behavior is to archive the
+symbolic link itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 16n
+.rt
+Selects the first archive member that matches each \fIpattern\fR operand. No
+more than one archive member is matched for each pattern, although members of
+type directory still match the file hierarchy rooted at that file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoptions\fR\fR
+.ad
+.RS 16n
+.rt
+Provides information to the implementation to modify the algorithm for
+extracting or writing files. The value of options consists of one or more
+comma-separated keywords of the form:
+.sp
+.in +2
+.nf
+\fIkeyword\fR[[:]=\fIvalue\fR][,\fIkeyword\fR[[:]=\fIvalue\fR], ...]
+.fi
+.in -2
+.sp
+
+Some keywords apply only to certain file formats, as indicated with each
+description. Use of keywords that are inapplicable to the file format being
+processed produces undefined results.
+.sp
+Keywords in the \fIoptions\fR argument must be a string that would be a valid
+portable filename.
+.sp
+Keywords are not expected to be filenames, merely to follow the same character
+composition rules as portable filenames.
+.sp
+Keywords can be preceded with white space. The \fIvalue\fR field consists of
+zero or more characters. Within \fIvalue\fR, the application precedes any
+literal comma with a backslash, which is ignored, but preserves the comma as
+part of \fIvalue\fR. A comma as the final character, or a comma followed solely
+by white space as the final characters, in \fIoptions\fR is ignored. Multiple
+\fB-o\fR options can be specified. If keywords given to these multiple \fB-o\fR
+options conflict, the keywords and values appearing later in command line
+sequence take precedence and the earlier ones are silently ignored. The
+following keyword values of \fIoptions\fR are supported for the file formats as
+indicated:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdelete=\fR\fIpattern\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword is applicable only to the \fB-x\fR \fBpax\fR format. When used in
+\fBwrite\fR or \fBcopy\fR mode, \fBpax\fR omits from extended header records
+that it produces any keywords matching the string pattern. When used in
+\fBread\fR or \fBlist\fR mode, \fBpax\fR ignores any keywords matching the
+string pattern in the extended header records. In both cases, matching is
+performed using the pattern matching notation. For example:
+.sp
+.in +2
+.nf
+\fB-o delete=security.*\fR
+.fi
+.in -2
+.sp
+
+would suppress security-related information.
+.sp
+When multiple \fB-o\fR \fBdelete=\fR\fIpattern\fR options are specified, the
+patterns are additive. All keywords matching the specified string patterns are
+omitted from extended header records that \fBpax\fR produces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexthdr.name=\fR\fIstring\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword is applicable only to the \fB-x\fR \fBpax\fR format. This keyword
+allows user control over the name that is written into the \fBustar\fR header
+blocks for the extended header. The name is the contents of \fIstring\fR, after
+the following character substitutions have been made:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%d\fR\fR
+.ad
+.RS 6n
+.rt
+The directory name of the file, equivalent to the result of the \fIdirname\fR
+utility on the translated path name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%f\fR\fR
+.ad
+.RS 6n
+.rt
+The filename of the file, equivalent to the result of the \fIbasename\fR
+utility on the translated path name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%p\fR\fR
+.ad
+.RS 6n
+.rt
+The process ID of the \fBpax\fR process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 6n
+.rt
+A '%' character.
+.RE
+
+Any other '%' characters in \fIstring\fR produce undefined results.
+.sp
+If no \fB-o\fR \fBexthdr.name\fR=\fIstring\fR is specified, \fBpax\fR uses the
+following default value:
+.sp
+.in +2
+.nf
+%d/PaxHeaders.%p/%f
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBglobexthdr.name=\fR\fIstring\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword is applicable only to the \fB-x\fR \fBpax\fR format. When used in
+\fBwrite\fR or \fBcopy\fR mode with the appropriate options, \fBpax\fR creates
+global extended header records with \fBustar\fR header blocks that are treated
+as regular files by previous versions of \fBpax\fR. This keyword allows user
+control over the name that is written into the \fBustar\fR header blocks for
+global extended header records. The name is the contents of \fIstring\fR, after
+the following character substitutions have been made:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%n\fR\fR
+.ad
+.RS 6n
+.rt
+An integer that represents the sequence number of the global extended header
+record in the archive, starting at \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%p\fR\fR
+.ad
+.RS 6n
+.rt
+The process ID of the \fBpax\fR process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 6n
+.rt
+A '%' character.
+.RE
+
+Any other '%' characters in \fIstring\fR produce undefined results.
+.sp
+If no \fB-o\fR \fBglobexthdr.name\fR=\fIstring\fR is specified, \fBpax\fR uses
+the following default value:
+.sp
+.in +2
+.nf
+$TMPDIR/GlobalHead.%p.%n
+.fi
+.in -2
+.sp
+
+where \fB$TMPDIR\fR represents the value of the \fBTMPDIR\fR environment
+variable. If \fBTMPDIR\fR is not set, \fBpax\fR uses \fB/tmp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinvalid=\fR\fIaction\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword is applicable only to the \fB-x\fR \fBpax\fR format. This keyword
+allows user control over the action \fBpax\fR takes upon encountering values in
+an extended header record that, in \fBread\fR or \fBcopy\fR mode, are invalid
+in the destination hierarchy or, in \fBlist\fR mode , cannot be written in the
+codeset and current locale of the implementation. The following are invalid
+values that are recognized by \fBpax\fR:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+In \fBread\fR or \fBcopy\fR mode, a filename or link name that contains
+character encodings invalid in the destination hierarchy. For example, the name
+can contain embedded \fBNUL\fRs.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+In \fBread\fR or \fBcopy\fR mode, a filename or link name that is longer than
+the maximum allowed in the destination hierarchy, for either a path name
+component or the entire path name.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+In \fBlist\fR mode, any character string value (filename, link name, user name,
+and so on) that cannot be written in the codeset and current locale of the
+implementation.
+.RE
+The following mutually-exclusive values of the \fIaction\fR argument are
+supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbypass\fR\fR
+.ad
+.RS 10n
+.rt
+In \fBread\fR or \fBcopy\fR mode, \fBpax\fR bypasses the file, causing no
+change to the destination hierarchy. In \fBlist\fR mode, \fBpax\fR writes all
+requested valid values for the file, but its method for writing invalid values
+is unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrename\fR\fR
+.ad
+.RS 10n
+.rt
+In \fBread\fR or \fBcopy\fR mode, \fBpax\fR acts as if the \fB-i\fR option were
+in effect for each file with invalid filename or link name values, allowing the
+user to provide a replacement name interactively. In \fBlist\fR mode, \fBpax\fR
+behaves identically to the \fBbypass\fR action.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBUTF-8\fR\fR
+.ad
+.RS 10n
+.rt
+\fBpax\fR uses the actual \fBUTF-8\fR encoding for the name when it is used in
+\fBread\fR, \fBcopy\fR, or \fBlist\fR mode and a filename, link name, owner
+name, or any other field in an extended header record cannot be translated from
+the \fBpax\fR \fBUTF-8\fR codeset format to the codeset and current locale of
+the implementation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwrite\fR\fR
+.ad
+.RS 10n
+.rt
+In \fBread\fR or \fBcopy\fR mode, \fBpax\fR writes the file, translating the
+name, regardless of whether this can overwrite an existing file with a valid
+name. In \fBlist\fR mode, \fBpax\fR behaves identically to the \fBbypass\fR
+action.
+.RE
+
+If no \fB-o\fR \fBinvalid=\fR option is specified, \fBpax\fR acts as if
+\fB-o\fR \fBinvalid=bypass\fR were specified. Any overwriting of existing files
+that can be allowed by the \fB-o\fR \fBinvalid=\fR \fIaction\fRs are subject to
+permission (\fB-p\fR) and modification time (\fB-u\fR) restrictions, and are
+suppressed if the \fB-k\fR option is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlinkdata\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword is applicable only to the \fB-x\fR \fBpax\fR format. In
+\fBwrite\fR mode, \fBpax\fR writes the contents of a file to the archive even
+when that file is merely a hard link to a file whose contents have already been
+written to the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlistopt=\fR\fIformat\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword specifies the output format of the table of contents produced when
+the \fB-v\fR option is specified in \fBlist\fR mode. (See \fBList Mode Format
+Specifications\fR below.) To avoid ambiguity, the \fBlistopt=\fR\fIformat\fR is
+the only or final \fIkeyword\fR=\fIvalue\fR pair in an \fB-o\fR
+option-argument. All characters in the remainder of the option-argument are
+considered to be part of the format string. When multiple \fB-o\fR
+\fBlistopt=\fR\fIformat\fR options are specified, the format strings are
+considered to be a single, concatenated string, evaluated in command line
+order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtimes\fR\fR
+.ad
+.sp .6
+.RS 4n
+This keyword is applicable only to the \fB-x\fR \fBpax\fR and \fB-x\fR
+\fBxustar\fR formats. When used in write or copy mode, \fBpax\fR includes
+\fBatime\fR and \fImtime\fR extended header records for each file.
+.RE
+
+In addition to these keywords, if the \fB-x\fR \fBpax\fR format is specified,
+any of the keywords and values, including implementation extensions, can be
+used in \fB-o\fR option-arguments, in either of two modes:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyword=\fR\fIvalue\fR\fR
+.ad
+.RS 18n
+.rt
+When used in \fBwrite\fR or \fBcopy\fR mode, these keyword/value pairs are
+included at the beginning of the archive as \fBtypeflag g\fR global extended
+header records. When used in \fBread\fR or \fBlist\fR mode, these keyword/value
+pairs act as if they had been at the beginning of the archive as \fBtypeflag
+g\fR global extended header records.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyword:=\fR\fIvalue\fR\fR
+.ad
+.RS 18n
+.rt
+When used in \fBwrite\fR or \fBcopy\fR mode, these keyword/value pairs are
+included as records at the beginning of a \fBtypeflag x\fR extended header for
+each file. This is equivalent to the equal-sign form except that it creates no
+\fBtypeflag g\fR global extended header records. When used in \fBread\fR or
+\fBlist\fR mode, these keyword/value pairs act as if they were included as
+records at the end of each extended header. Thus, they override any global or
+file-specific extended header record keywords of the same names. For example,
+in the command:
+.sp
+.in +2
+.nf
+\fBpax -r -o "
+gname:=mygroup,
+" <archive\fR
+.fi
+.in -2
+.sp
+
+the group name is forced to a new value for all files read from the archive.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIstring\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies one or more file characteristic options (privileges). The
+\fIstring\fR option-argument must be a string specifying file characteristics
+to be retained or discarded on extraction. The string consists of the
+specification characters \fBa\fR, \fBe\fR, \fBm\fR, \fBo\fR, and \fBp\fR.
+Multiple characteristics can be concatenated within the same string and
+multiple \fB-p\fR options can be specified. The meaning of the specification
+characters is as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa\fR\fR
+.ad
+.RS 5n
+.rt
+Does not preserve file access times.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.RS 5n
+.rt
+Preserves the user \fBID\fR, group \fBID\fR, file mode bits, access time, and
+modification time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR\fR
+.ad
+.RS 5n
+.rt
+Does not preserve file modification times.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 5n
+.rt
+Preserves the user \fBID\fR and group \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.RS 5n
+.rt
+Preserves the file mode bits.
+.RE
+
+In the preceding list, \fBpreserve\fR indicates that an attribute stored in the
+archive is given to the extracted file, subject to the permissions of the
+invoking process. Otherwise, the attribute is determined as part of the normal
+file creation action. The access and modification times of the file is
+preserved unless otherwise specified with the \fB-p\fR option or not stored in
+the archive. All attributes that are not preserved are determined as part of
+the normal file creation action.
+.sp
+If neither the \fBe\fR nor the \fBo\fR specification character is specified, or
+the user \fBID\fR and group \fBID\fR are not preserved for any reason,
+\fBpax\fR does not set the \fBsetuid\fR and \fBsetgid\fR bits of the file mode.
+.sp
+If the preservation of any of these items fails for any reason, \fBpax\fR
+writes a diagnostic message to standard error. Failure to preserve these items
+affects the final exit status, but does not cause the extracted file to be
+deleted.
+.sp
+If file-characteristic letters in any of the \fIstring\fR option-arguments are
+duplicated or conflict with each other, the ones given last take precedence.
+For example, if \fB-p\fR \fBeme\fR is specified, file modification times are
+preserved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 16n
+.rt
+Reads an archive file from standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIreplstr\fR\fR
+.ad
+.RS 16n
+.rt
+Modifies file or archive member names named by \fIpattern\fR or \fIfile\fR
+operands according to the substitution expression \fIreplstr\fR, which is based
+on the \fBed\fR(1) \fBs\fR (substitution) utility, using the regular expression
+syntax of \fBregex\fR(5). The concepts of ``address'' and ``line'' are
+meaningless in the context of the \fBpax\fR command, and must not be supplied.
+The format is:
+.sp
+.in +2
+.nf
+-s /\fIold\fR/\fInew\fR/ [gp]
+.fi
+.in -2
+.sp
+
+where, as in \fBed\fR, \fIold\fR is a basic regular expression and \fInew\fR
+can contain an ampersand (\fB&\fR), a \e\fIn\fR backreference, where \fIn\fR is
+a digit, or subexpression matching. The \fIold\fR string is also permitted to
+contain newlines.
+.sp
+Any non-null character can be used as a delimiter (\fB/\fR shown here).
+Multiple \fB-s\fR expressions can be specified. The expressions are applied in
+the order specified, terminating with the first successful substitution. The
+optional trailing \fBg\fR is as defined in the \fBed\fR command. The optional
+trailing \fBp\fR causes successful substitutions to be written to standard
+error. File or archive member names that substitute to the empty string are
+ignored when reading and writing archives.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 16n
+.rt
+When reading files from the file system, and if the user has the permissions
+required by \fButime()\fR to do so, sets the access time of each file read to
+the access time that it had before being read by \fBpax\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 16n
+.rt
+Ignores files that are older (having a less recent file modification time) than
+a pre-existing file or archive member with the same name.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBread\fR mode\fR
+.ad
+.RS 14n
+.rt
+An archive member with the same name as a file in the file system is extracted
+if the archive member is newer than the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwrite\fR mode\fR
+.ad
+.RS 14n
+.rt
+An archive file member with the same name as a file in the file system is
+superseded if the file is newer than the archive member. If option \fB-a\fR is
+also specified, this is accomplished by appending to the archive. Otherwise, it
+is unspecified whether this is accomplished by actual replacement in the
+archive or by appending to the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcopy\fR mode\fR
+.ad
+.RS 14n
+.rt
+The file in the destination hierarchy is replaced by the file in the source
+hierarchy or by a link to the file in the source hierarchy if the file in the
+source hierarchy is newer.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 16n
+.rt
+In \fBlist\fR mode, produces a verbose table of contents (see \fBStandard
+Output\fR). Otherwise, writes archive member path names and extended attributes
+to standard error (see \fBStandard Error\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 16n
+.rt
+Writes files to the standard output in the specified archive format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIformat\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the output archive format. The \fBpax\fR utility recognizes the
+following formats:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcpio\fR\fR
+.ad
+.RS 10n
+.rt
+The extended \fBcpio\fR(1) interchange format. See IEEE Std 1003.1-2001. The
+default \fIblocksize\fR for this format for character special archive files is
+\fB5120\fR. Implementations support all \fIblocksize\fR values less than or
+equal to \fB32256\fR that are multiples of \fB512\fR.
+.sp
+This archive format allows files with \fBUID\fRs and \fBGID\fRs up to
+\fB262143\fR to be stored in the archive. Files with \fBUID\fRs and \fBGID\fRs
+greater than this value are archived with the \fBUID\fR and \fBGID\fR of
+\fB60001\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpax\fR\fR
+.ad
+.RS 10n
+.rt
+The \fBpax\fR interchange format. See IEEE Std 1003.1-2001. The default
+\fIblocksize\fR for this format for character special archive files is
+\fB5120\fR. Implementations support all \fIblocksize\fR values less than or
+equal to \fB32256\fR that are multiples of \fB512\fR.
+.sp
+Similar to \fBustar\fR. Also allows archiving and extracting files whose size
+is greater than 8GB; whose \fBUID\fR, \fBGID\fR, \fIdevmajor\fR, or
+\fIdevminor\fR values are greater than \fB2097151\fR; whose path (including
+filename) is greater than \fB255\fR characters; or whose \fIlinkname\fR is
+greater than \fB100\fR characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBustar\fR\fR
+.ad
+.RS 10n
+.rt
+The extended \fBtar\fR(1) interchange format. See the IEEE 1003.1(1990)
+specifications. The default \fIblocksize\fR for this format for character
+special archive files is \fB10240\fR. Implementations support all
+\fIblocksize\fR values less than or equal to \fB32256\fR that are multiples of
+\fB512\fR.
+.sp
+This archive format allows files with \fBUID\fRs and \fBGID\fRs up to
+\fB2097151\fR to be stored in the archive. Files with \fBUID\fRs and \fBGID\fRs
+greater than this value are archived with the \fBUID\fR and \fBGID\fR of
+\fB60001\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxustar\fR\fR
+.ad
+.RS 10n
+.rt
+Similar to \fBustar\fR. Also allows archiving and extracting files whose size
+is greater than 8GB; whose \fBUID\fR, \fBGID\fR, \fIdevmajor\fR, or
+\fIdevminor\fR values are greater than \fB2097151\fR; whose path (including
+filename) is greater than \fB255\fR characters; or whose \fIlinkname\fR is
+greater than \fB100\fR characters. This option should not be used if the
+archive is to be extracted by an archiver that cannot handle the larger values.
+.RE
+
+Any attempt to append to an archive file in a format different from the
+existing archive format causes \fBpax\fR to exit immediately with a non-zero
+exit status.
+.sp
+In \fBcopy\fR mode, if no \fB-x\fR format is specified, \fBpax\fR behaves as if
+\fB-x\fR \fBpax\fR were specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.RS 16n
+.rt
+When traversing the file hierarchy specified by a path name, \fBpax\fR does not
+descend into directories that have a different device ID (\fBst_dev\fR, see
+\fBstat\fR(2)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-@\fR\fR
+.ad
+.RS 16n
+.rt
+Includes extended attributes in the archive. \fBpax\fR does not place extended
+attributes in the archive by default.
+.sp
+When traversing the file hierarchy specified by a path name, \fBpax\fR descends
+into the attribute directory for any file with extended attributes. Extended
+attributes go into the archive as special files.
+.sp
+When this flag is used during file extraction, any extended attributes
+associated with a file being extracted are also extracted. Extended attribute
+files can only be extracted from an archive as part of a normal file extract.
+Attempts to explicitly extract attribute records are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-/\fR\fR
+.ad
+.RS 16n
+.rt
+Includes extended system attributes in the archive. \fBpax\fR does not place
+extended system attributes in the archive by default.
+.sp
+When traversing the file hierarchy specified by a path name, \fBpax\fR descends
+into the attribute directory for any file with extended attributes. Extended
+attributes go into the archive as special files. When this flag is used during
+file extraction, any extended attributes associated with a file being extracted
+are also extracted. Extended attribute files can only be extracted from an
+archive as part of a normal file extract. Attempts to explicitly extract
+attribute records are ignored.
+.RE
+
+.sp
+.LP
+Specifying more than one of the mutually-exclusive options \fB-H\fR and
+\fB-L\fR is not considered an error. The last option specified determines the
+behavior of the utility.
+.sp
+.LP
+The options that operate on the names of files or archive members (\fB-c\fR,
+\fB-i\fR, \fB-n\fR, \fB-s\fR, \fB-u\fR and \fB-v\fR) interact as follows.
+.sp
+.LP
+In \fBread\fR mode, the archive members are selected based on the
+user-specified \fIpattern\fR operands as modified by the \fB-c\fR, \fB-n\fR and
+\fB-u\fR options. Then, any \fB-s\fR and \fB-i\fR options modify, in that
+order, the names of the selected files. The \fB-v\fR option writes names
+resulting from these modifications.
+.sp
+.LP
+In \fBwrite\fR mode, the files are selected based on the user-specified path
+names as modified by the \fB-n\fR and \fB-u\fR options. Then, any \fB-s\fR and
+\fB-i\fR options modify, in that order, the names of these selected files. The
+\fB-v\fR option writes names resulting from these modifications.
+.sp
+.LP
+If both the \fB-u\fR and \fB-n\fR options are specified, \fBpax\fR does not
+consider a file selected unless it is newer than the file to which it is
+compared.
+.SS "List Mode Format Specifications"
+.sp
+.LP
+In \fBlist\fR mode with the \fB-o\fR \fBlistopt=\fR\fIformat\fR option, the
+format argument is applied for each selected file. \fBpax\fR appends a NEWLINE
+to the \fBlistopt\fR output for each selected file. The \fIformat\fR argument
+is used as the format string with the following exceptions. (See
+\fBprintf\fR(1) for the first five exceptions.)
+.RS +4
+.TP
+1.
+A \fBSPACE\fR character in the format string, in any context other than a
+flag of a conversion specification, is treated as an ordinary character that is
+copied to the output.
+.RE
+.RS +4
+.TP
+2.
+A \fB\&' '\fR character in the format string is treated as a \fB\&' '\fR
+character, not as a SPACE.
+.RE
+.RS +4
+.TP
+3.
+In addition to the escape sequences described in the \fBformats\fR(5) manual
+page, (\fB\e\e\fR, \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR, \fB\er\fR,
+\fB\et\fR, \fB\ev\fR), \fB\e\fR\fIddd\fR, where \fIddd\fR is a one-, two-, or
+three-digit octal number, is written as a byte with the numeric value specified
+by the octal number.
+.RE
+.RS +4
+.TP
+4.
+Output from the \fBd\fR or \fBu\fR conversion specifiers is not preceded or
+followed with BLANKs not specified by the format operand.
+.RE
+.RS +4
+.TP
+5.
+Output from the \fBo\fR conversion specifier is not preceded with zeros that
+are not specified by the format operand.
+.RE
+.RS +4
+.TP
+6.
+The sequence (\fIkeyword\fR) can occur before a format conversion specifier.
+The conversion argument is defined by the value of \fIkeyword\fR. The following
+keywords are supported (see IEEE Std 1003.1-2001):
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Any of the Field Name entries in \fBustar Header Block\fR and \fBOctet-Oriented
+cpio Archive Entry\fR. The implementation supports the \fBcpio\fR keywords
+without the leading \fBc_\fR in addition to the form required by \fBValues for
+cpio c_ mode Field\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Any keyword defined for the extended header in \fBpax Extended Header\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Any keyword provided as an implementation-defined extension within the extended
+header defined in \fBpax Extended Header\fR.
+.RE
+For example, the sequence "\fB%(charset)s\fR" is the string value of the name
+of the character set in the extended header.
+.sp
+The result of the keyword conversion argument is the value from the applicable
+header field or extended header, without any trailing \fBNUL\fRs.
+.sp
+All keyword values used as conversion arguments are translated from the UTF -8
+encoding to the character set appropriate for the local file system, user
+database, and so on, as applicable.
+.RE
+.RS +4
+.TP
+7.
+An additional conversion specifier character, \fBT\fR, is used to specify
+time formats. The \fBT\fR conversion specifier character can be preceded by the
+sequence (\fIkeyword\fR=\fIsubformat\fR), where \fIsubformat\fR is a date
+format as defined by \fIdate\fR operands. The default \fIkeyword\fR is
+\fImtime\fR and the default \fIsubformat\fR is:
+.sp
+.in +2
+.nf
+%b %e %H:%M %Y
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+8.
+An additional conversion specifier character, \fBM\fR, is used to specify
+the file mode string as defined in \fBls\fR Standard Output. If (\fIkeyword\fR)
+is omitted, the \fBmode\fR keyword is used. For example, \fB%.1M\fR writes the
+single character corresponding to the \fIentry type\fR field of the \fBls\fR
+\fB-l\fR command.
+.RE
+.RS +4
+.TP
+9.
+An additional conversion specifier character, \fBD\fR, is used to specify
+the device for block or special files, if applicable, in an
+implementation-defined format. If not applicable, and (\fIkeyword\fR) is
+specified, then this conversion is equivalent to \fB%\fR(\fIkeyword\fR)\fBu\fR.
+If not applicable, and (\fIkeyword\fR) is omitted, then this conversion is
+equivalent to SPACE.
+.RE
+.RS +4
+.TP
+10.
+An additional conversion specifier character, \fBF\fR, is used to specify a
+path name. The \fBF\fR conversion character can be preceded by a sequence of
+comma-separated keywords:
+.sp
+.in +2
+.nf
+(\fIkeyword\fR[,\fIkeyword\fR] ... )
+.fi
+.in -2
+.sp
+
+The values for all the keywords that are non-null are concatenated, each
+separated by a '\fB/\fR'. The default is (\fBpath\fR) if the keyword \fBpath\fR
+is defined. Otherwise, the default is (\fIprefix\fR,\fBname\fR).
+.RE
+.RS +4
+.TP
+11.
+An additional conversion specifier character, \fBL\fR, is used to specify a
+symbolic link expansion. If the current file is a symbolic link, then \fB%L\fR
+expands to:
+.sp
+.in +2
+.nf
+"%s -> %s", \fIvalue of keyword\fR, \fIcontents of link\fR
+.fi
+.in -2
+.sp
+
+Otherwise, the \fB%L\fR conversion specification is the equivalent of \fB%F\fR.
+.RE
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdirectory\fR\fR
+.ad
+.RS 13n
+.rt
+The destination directory path name for \fBcopy\fR mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 13n
+.rt
+A path name of a file to be copied or archived.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 13n
+.rt
+A pattern matching one or more path names of archive members. A pattern must
+conform to the pattern matching notation found on the \fBfnmatch\fR(5) manual
+page. The default, if no \fIpattern\fR is specified, is to select all members
+in the archive.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+Output formats are discussed below:
+.SS "Standard Output"
+.sp
+.LP
+In \fBwrite\fR mode, if \fB-f\fR is not specified, the standard output is the
+archive formatted according to one of the formats described below. See \fB-x\fR
+\fBformat\fR for a list of supported formats.
+.sp
+.LP
+In \fBlist\fR mode, when the \fB-o\fR \fBlistopt=\fR\fIformat\fR option has
+been specified, the selected archive members are written to standard output
+using the format described above under \fBList Mode Format Specifications\fR.
+In \fBlist\fR mode without the \fB-o\fR \fBlistopt=\fR\fIformat\fR option, the
+table of contents of the selected archive members are written to standard
+output using the following format:
+.sp
+.in +2
+.nf
+"%s\en", \fIpathname\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the \fB-v\fR option is specified in \fBlist\fR mode, the table of contents
+of the selected archive members are written to standard output using the
+following formats:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+For path names representing hard links to previous members of the archive:
+.sp
+.in +2
+.nf
+"%s == %s\en", <\fIls\fR -l \fIlisting, linkname\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+For all other path names:
+.sp
+.in +2
+.nf
+"%s\en", <\fIls\fR -l \fIlisting\fR>
+.fi
+.in -2
+.sp
+
+where <\fIls\fR \fB-l\fR \fIlisting\fR> is the format specified by the \fBls\fR
+command with the \fB-l\fR option. When writing path names in this format, it is
+unspecified what is written for fields for which the underlying archive format
+does not have the correct information, although the correct number of
+blank-character-separated fields is written.
+.RE
+.sp
+.LP
+In \fBlist\fR mode, standard output is not buffered more than a line at a time.
+.SS "Standard Error"
+.sp
+.LP
+If \fB-v\fR is specified in \fBread\fR, \fBwrite\fR or \fBcopy\fR modes,
+\fBpax\fR writes the path names it processes to the standard error output using
+the following format:
+.sp
+.in +2
+.nf
+"%s\en", \fIpathname\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+These path names are written as soon as processing is begun on the file or
+archive member, and are flushed to standard error. The trailing NEWLINE
+character, which is not buffered, is written when the file has been read or
+written.
+.sp
+.LP
+If the \fB-s\fR option is specified, and the replacement string has a trailing
+\fBp\fR, substitutions are written to standard error in the following format:
+.sp
+.in +2
+.nf
+"%s >> %s\en", <\fIoriginal pathname\fR>, <\fInew pathname\fR>
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In all operating modes of \fBpax\fR, optional messages of unspecified format
+concerning the input archive format and volume number, the number of files,
+blocks, volumes, and media parts as well as other diagnostic messages can be
+written to standard error.
+.sp
+.LP
+In all formats, for both standard output and standard error, it is unspecified
+how non-printable characters in path names or link names are written.
+.sp
+.LP
+When \fBpax\fR is in \fBread\fR mode or \fBlist\fR mode, using the \fB-x\fR
+\fBpax\fR archive format, and a file name, link name, owner name, or any other
+field in an extended header record cannot be translated from the \fBpax\fR
+UTF-8 codeset format to the codeset and current locale of the implementation,
+\fBpax\fR writes a diagnostic message to standard error, processes the file as
+described for the \fB-o\fR \fBinvalid=\fRoption, and then processes the next
+file in the archive.
+.SS "Output Files"
+.sp
+.LP
+In \fBread\fR mode, the extracted output files are of the archived file type.
+In \fBcopy\fR mode, the copied output files are the type of the file being
+copied . In either mode, existing files in the destination hierarchy are
+overwritten only when all permission (\fB-p\fR), modification time (\fB-u\fR),
+and invalid-value (\fB-o\fR \fBinvalid=\fR) tests allow it. In \fBwrite\fR
+mode, the output file named by the \fB-f\fR option-argument is a file formatted
+according to one of the specifications in IEEE Std 1003.1-2001.
+.SH ERRORS
+.sp
+.LP
+If \fBpax\fR cannot create a file or a link when reading an archive, or cannot
+find a file when writing an archive, or cannot preserve the user \fBID\fR,
+group \fBID\fR, or file mode when the \fB-p\fR option is specified, a
+diagnostic message is written to standard error and a non-zero exit status is
+returned, but processing continues. In the case where \fBpax\fR cannot create a
+link to a file, \fBpax\fR does not, by default, create a second copy of the
+file.
+.sp
+.LP
+If the extraction of a file from an archive is prematurely terminated by a
+signal or error, \fBpax\fR can have only partially extracted the file or, if
+the \fB-n\fR option was not specified, can have extracted a file of the same
+name as that specified by the user, but which is not the file the user wanted.
+Additionally, the file modes of extracted directories can have additional bits
+from the read, write, execute mask set as well as incorrect modification and
+access times.
+.SH USAGE
+.sp
+.LP
+The \fB-p\fR (privileges) option was invented to reconcile differences between
+historical \fBtar\fR(1) and \fBcpio\fR(1) implementations. In particular, the
+two utilities use \fB-m\fR in diametrically opposed ways. The \fB-p\fR option
+also provides a consistent means of extending the ways in which future file
+attributes can be addressed, such as for enhanced security systems or
+high-performance files. Although it can seem complex, there are really two
+modes that are most commonly used:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fBe\fR\fR
+.ad
+.RS 8n
+.rt
+Preserve everything. This would be used by the historical superuser, someone
+with all the appropriate privileges, to preserve all aspects of the files as
+they are recorded in the archive. The \fBe\fR flag is the sum of \fBo\fR and
+\fBp\fR, and other implementation-dependent attributes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fBp\fR\fR
+.ad
+.RS 8n
+.rt
+Preserve the file mode bits. This would be used by the user with regular
+privileges who wished to preserve aspects of the file other than the ownership.
+The file times are preserved by default, but two other flags are offered to
+disable these and use the time of extraction.
+.RE
+
+.sp
+.LP
+The one path name per line format of standard input precludes path names
+containing newlines. Although such path names violate the portable filename
+guidelines, they can exist and their presence can inhibit usage of \fBpax\fR
+within shell scripts. This problem is inherited from historical archive
+programs. The problem can be avoided by listing file name arguments on the
+command line instead of on standard input.
+.sp
+.LP
+It is almost certain that appropriate privileges are required for \fBpax\fR to
+accomplish parts of this. Specifically, creating files of type block special or
+character special, restoring file access times unless the files are owned by
+the user (the \fB-t\fR option), or preserving file owner, group, and mode (the
+\fB-p\fR option) all probably require appropriate privileges.
+.sp
+.LP
+In \fBread\fR mode, implementations are permitted to overwrite files when the
+archive has multiple members with the same name. This can fail if permissions
+on the first version of the file do not permit it to be overwritten.
+.sp
+.LP
+When using the \fB-x\fR \fBxustar\fR and \fB-x\fR \fB-pax\fR archive formats,
+if the underlying file system reports that the file being archived contains
+holes, the Solaris \fBpax\fR utility records the presence of holes in an
+extended header record when the file is archived. If this extended header
+record is associated with a file in the archive, those holes are recreated
+whenever that file is extracted from the archive. See the \fBSEEK_DATA\fR and
+\fBSEEK_HOLE\fR whence values in \fBlseek\fR(2). In all other cases, any
+\fBNUL\fR (\fB\e0\fR) characters found in the archive is written to the file
+when it is extracted.
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBpax\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SS "Standard Input"
+.sp
+.LP
+In \fBwrite\fR mode, the standard input is used only if no \fIfile\fR operands
+are specified. It is a text file containing a list of path names, one per line,
+without leading or trailing blanks. In \fBlist\fR and \fBread\fR modes, if
+\fB-f\fR is not specified, the standard input is an archive file. Otherwise,
+the standard input is not used.
+.SS "Input Files"
+.sp
+.LP
+The input file named by the \fIarchive\fR option-argument, or standard input
+when the archive is read from there, is a file formatted according to one of
+the formats described below. See \fBExtended Description\fR. The file
+\fB/dev/tty\fR is used to write prompts and read responses.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCopying the Contents of the Current Directory
+.sp
+.LP
+The following command:
+
+.sp
+.in +2
+.nf
+example% \fBpax -w -f /dev/rmt/1m .\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+copies the contents of the current directory to tape drive 1, medium density.
+This assumes historical System V device naming procedures. The historical
+\fBBSD\fR device name would be \fB/dev/rmt9\fR.
+
+.LP
+\fBExample 2 \fRCopying the Directory Hierarchy
+.sp
+.LP
+The following commands:
+
+.sp
+.in +2
+.nf
+example% \fBmkdir newdir\fR
+example% \fBpax -rw olddir newdir\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+copy the \fBolddir\fR directory hierarchy to \fBnewdir\fR.
+
+.LP
+\fBExample 3 \fRReading an Archive Extracted Relative to the Current Directory
+.sp
+.LP
+The following command:
+
+.sp
+.in +2
+.nf
+example% \fBpax -r -s ',^//*usr//*,,' -f a.pax\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+reads the archive \fBa.pax\fR, with all files rooted in \fB/usr\fR in the
+archive extracted relative to the current directory.
+
+.LP
+\fBExample 4 \fROverriding the Default Output Description
+.sp
+.LP
+Using the option:
+
+.sp
+.in +2
+.nf
+\fB-o listopt="%M %(atime)T %(size)D %(name)s"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+overrides the default output description in \fBStandard Output\fR and instead
+writes:
+
+.sp
+.in +2
+.nf
+-rw-rw- - - Jan 12 15:53 2003 1492 /usr/foo/bar
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Using the options:
+
+.sp
+.in +2
+.nf
+\fB-o listopt='%L\et%(size)D\en%.7' \e
+-o listopt='(name)s\en%(atime)T\en%T'\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+overrides the default output description in standard output and instead writes:
+
+.sp
+.in +2
+.nf
+usr/foo/bar -> /tmp 1492
+/usr/foo
+Jan 12 15:53 1991
+Jan 31 15:53 2003
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpax\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_COLLATE\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the locale for the behaviour of ranges, equivalence classes, and
+multi-character collating elements used in the pattern matching expressions for
+the \fIpattern\fR operand, the basic regular expression for the \fB-s\fR
+option, and the extended regular expression defined for the \fByesexpr\fR
+locale keyword in the \fBLC_MESSAGES\fR category.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTMPDIR\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the path name that provides part of the default global extended
+header record file, as described for the \fB-o\fR \fBglobexthdr=\fR keyword as
+described in the OPTIONS section.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the timezone used to calculate date and time strings when the
+\fB-v\fR option is specified. If \fBTZ\fR is unset or null, an unspecified
+default timezone is used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All files were processed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH EXTENDED DESCRIPTION
+.SS "\fBpax\fR Interchange Format"
+.sp
+.LP
+A \fBpax\fR archive tape or file produced in the \fB-xpax\fR format contains a
+series of blocks. The physical layout of the archive is identical to the
+\fBustar\fR format described in \fBustar Interchange Format\fR. Each file
+archived is represented by the following sequence:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+An optional header block with extended header records. This header block is of
+the form 27403 with a \fItypeflag\fR value of \fBx\fR or \fBg\fR. The extended
+header records is included as the data for this header block.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A header block that describes the file. Any fields in the preceding optional
+extended header overrides the associated fields in this header block for this
+file.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Zero or more blocks that contain the contents of the file.
+.RE
+.sp
+.LP
+At the end of the archive file there are two 512-byte blocks filled with binary
+zeroes, interpreted as an end-of-archive indicator.
+.sp
+.LP
+The following is a schematic of an example archive with global extended header
+records and two actual files in pax format archive. In the example, the second
+file in the archive has no extended header preceding it, presumably because it
+has no need for extended attributes.
+.sp
+
+.sp
+.TS
+tab();
+cw(2.67i) cw(2.83i)
+lw(2.67i) lw(2.83i)
+.
+DescriptionBlock
+Global Extended Headerustar Header [\fItypeflag\fR=g]
+Global Extended Header Data
+File 1: Extended Header is includedustar Header [\fItypeflag\fR=x]
+Extended Header Data
+[\fItypeflag\fR=0]
+ustar Header Data for File 1
+File 2: No Extended Header is includedustar Header [\fItypeflag\fR=0]
+Data for File2
+End of Archive IndicatorBlock of binary zeros
+Block of binary zeros
+.TE
+
+.SS "\fBpax\fR Header Block"
+.sp
+.LP
+The \fBpax\fR header block is identical to the \fBustar\fR header block
+described in \fBustar Interchange Format\fR except that two additional
+\fItypeflag\fR values are defined:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 5n
+.rt
+Represents global extended header records for the following files in the
+archive. The format of these extended header records are as described in \fBpax
+Extended Header\fR. Each value affects all subsequent files that do not
+override that value in their own extended header record and until another
+global extended header record is reached that provides another value for the
+same field. The \fItypeflag\fR \fBg\fR global headers should not be used with
+interchange media that could suffer partial data loss in transporting the
+archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 5n
+.rt
+Represents extended header records for the following file in the archive (which
+has its own \fBustar\fR header block). The format of these extended header
+records is as described in \fBpax Extended Header\fR.
+.RE
+
+.sp
+.LP
+For both of these types, the \fIsize\fR field is the size of the extended
+header records in octets. The other fields in the header block are not
+meaningful to this version of \fBpax\fR. However, if this archive is read by
+\fBpax\fR conforming to a previous version of \fIISO POSIX-2:1993 Standard\fR,
+the header block fields are used to create a regular file that contains the
+extended header records as data. Therefore, header block field values should be
+selected to provide reasonable file access to this regular file.
+.sp
+.LP
+A further difference from the \fBustar\fR header block is that data blocks for
+files of \fItypeflag\fR \fB1\fR (the digit one) (hard link) might be included,
+which means that the \fIsize\fR field can be greater than zero. Archives
+created by \fBpax\fR \fB-o\fR \fBlinkdata\fR includes these data blocks with
+the hard links.
+.SS "\fBpax\fR Extended Header"
+.sp
+.LP
+A \fBpax\fR extended header contains values that are inappropriate for the
+\fBustar\fR header block because of limitations in that format: fields
+requiring a character encoding other than that described in the \fIISO/IEC 646:
+1991 standard\fR, fields representing file attributes not described in the
+\fBustar\fR header, and fields whose format or length do not fit the
+requirements of the \fBustar\fR header. The values in an extended header add
+attributes to the specified file or files or override values in the specified
+header blocks, as indicated in the following list of keywords. See the
+description of the \fItypeflag\fR \fBg\fR header block.
+.sp
+.LP
+An extended header consists of one or more records, each constructed as
+follows:
+.sp
+.in +2
+.nf
+"%d %s=%s\en", \fIlength\fR, \fIkeyword\fR, \fIvalue\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The extended header records are encoded according to the\fI ISO/IEC 10646-1:
+2000 standard\fR (UTF-8). \fIlength\fR, \fBBLANK\fR, equals sign (\fB=\fR), and
+NEWLINE are limited to the portable character set, as encoded in UTF-8.
+\fIkeyword\fR and \fIvalue\fR can be any UTF-8 characters. \fIlength\fR is the
+decimal length of the extended header record in octets, including the trailing
+NEWLINE.
+.sp
+.LP
+\fIkeyword\fR is one of the entries from the following list or a keyword
+provided as an implementation extension. Keywords consisting entirely of
+lowercase letters, digits, and periods are reserved for future standardization.
+A keyword does not include an equals sign.
+.sp
+.LP
+In the following list, the notation of \fBfile(s)\fR or \fBblock(s)\fR are used
+to acknowledge that a keyword affects the specified single file after a
+\fItypeflag\fR \fBx\fR extended header, but possibly multiple files after
+\fItypeflag\fR \fBg\fR. Any requirements in the list for \fBpax\fR to include a
+record when in write or copy mode applies only when such a record has not
+already been provided through the use of the \fB-o\fR option. When used in copy
+mode, \fBpax\fR behaves as if an archive had been created with applicable
+extended header records and then extracted.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBatime\fR\fR
+.ad
+.RS 16n
+.rt
+The file access time for the specified files, equivalent to the value of the
+\fBst_atime\fR member of the stat structure for a file, as described by the
+\fBstat\fR(2) function. The access time (\fBatime\fR) is restored if the
+process has the appropriate privilege required to do so. The format of the
+\fIvalue\fR is as described in \fBpax Extended Header File Times\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcharset\fR\fR
+.ad
+.RS 16n
+.rt
+The name of the character set used to encode the data in the specified files.
+The entries in the following table are defined to refer to known standards;
+additional names can be agreed on between the originator and recipient.
+.sp
+
+.sp
+.TS
+tab();
+lw(2.75i) lw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+\fIvalue\fRFormal Standard
+ISO-IR 646 1990ISO/IEC646:1990
+ISO-IR 8859 1 1998ISO/IEC8859-1:1998
+ISO-IR 8859 2 1999ISO/IEC 8859-2:1999
+ISO-IR 8859 3 1999ISO/IEC 8859-3:1999
+ISO-IR 8859 4 1999ISO/IEC8859-4:1998
+ISO-IR 8859 5 1999ISO/IEC8859-5-1999
+ISO-IR 8859 6 1999ISO/IEC8859-6-1999
+ISO-IR 8859 7 1987ISO/IEC8859-7:1987
+ISO-IR 8859 8 1999ISO/IEC8859-8:1999
+ISO-IR 8859 9 1999ISO/IEC8859-9:1999
+ISO-IR 8859 10 1998ISO/IEC8859-10:1999
+ISO-IR 8859 13 1998ISO/IEC8859-13:1998
+ISO-IR 8859 14 1998ISO/IEC8859-14:1998
+ISO-IR 8859 15 1999ISO/IEC8859-15:1999
+ISO-IR 10646 2000ISO/IEC 10646:2000
+ISO-IR 10646 2000 UTF-8ISO/IEC 10646,UTF-8 encoding
+BINARYNone
+.TE
+
+The encoding is included in an extended header for information only; when
+\fBpax\fR is used as described in \fIIEEE Std 1003.1-200\fIx\fR\fR, it does not
+translate the file data into any other encoding. The BINARY entry indicates
+unencoded binary data. When used in write or copy mode, it is
+implementation-defined whether \fBpax\fR includes a \fBcharset\fR extended
+header record for a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcomment\fR\fR
+.ad
+.RS 16n
+.rt
+A series of characters used as a comment. All characters in the \fIvalue\fR
+field are ignored by \fBpax\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgid\fR\fR
+.ad
+.RS 16n
+.rt
+The group ID of the group that owns the file, expressed as a decimal number
+using digits from the \fIISO/IEC 646: 1991 standard\fR. This record overrides
+the \fBgid\fR field in the specified header blocks. When used in write or copy
+mode, \fBpax\fR includes a \fBgid\fR extended header record for each file whose
+group ID is greater than 2097151 (octal \fB7777777\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIgname\fR\fR
+.ad
+.RS 16n
+.rt
+The group of the files, formatted as a group name in the group database. This
+record overrides the \fBgid\fR and \fIgname\fR fields in the specified header
+blocks, and any \fBgid\fR extended header record. When used in read, copy, or
+list mode, \fBpax\fR translates the name from the UTF-8 encoding in the header
+record to the character set appropriate for the group database on the receiving
+system. If any of the UTF-8 characters cannot be translated, and if the \fB-o
+invalid=UTF-8\fR option is not specified, the results are
+implementation-defined. When used in write or copy mode, \fBpax\fR includes a
+\fIgname\fR extended header record for each file whose group name cannot be
+represented entirely with the letters and digits of the portable character set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlinkpath\fR\fR
+.ad
+.RS 16n
+.rt
+The pathname of a link being created to another file, of any type, previously
+archived. This record overrides the \fIlinkname\fR field in the specified
+\fBustar\fR header blocks. The specified \fBustar\fR header block determines
+the type of link created. If \fItypeflag\fR of the specified header block is 1,
+it is a hard link. If \fItypeflag\fR is 2, it is a symbolic link and the
+\fBlinkpath\fR value is the contents of the symbolic link. \fBpax\fR translates
+the name of the link (contents of the symbolic link) from the UTF-8 encoding to
+the character set appropriate for the local file system. When used in write or
+copy mode, \fBpax\fR includes a \fBlinkpath\fR extended header record for each
+link whose pathname cannot be represented entirely with the members of the
+portable character set other than \fBNULL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImtime\fR\fR
+.ad
+.RS 16n
+.rt
+The pathname of a link being created to another file, of any type, previously
+archived. This record overrides the \fIlinkname\fR field in the specified
+\fBustar\fR header blocks. The specified \fBustar\fR header block determines
+the type of link created. If \fItypeflag\fR of the specified header block is
+\fB1\fR, it is a hard link. If \fItypeflag\fR is \fB2\fR, it is a symbolic link
+and the \fBlinkpath\fR value is the contents of the symbolic link. \fBpax\fR
+translates the name of the link (contents of the symbolic link) from the UTF-8
+encoding to the character set appropriate for the local file system. When used
+in write or copy mode, \fBpax\fR includes a \fBlinkpath\fR extended header
+record for each link whose pathname cannot be represented entirely with the
+members of the portable character set other than \fBNULL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpath\fR\fR
+.ad
+.RS 16n
+.rt
+The pathname of the specified files. This record overrides the name and
+\fIprefix\fR fields in the specified header blocks. \fBpax\fR translates the
+pathname of the file from the UTF-8 encoding to the character set appropriate
+for the local file system. When used in write or copy mode, \fBpax\fR includes
+a path extended header record for each file whose pathname cannot be
+represented entirely with the members of the portable character set other than
+\fBNULL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrealtime.\fR\fIany\fR\fR
+.ad
+.RS 16n
+.rt
+The keywords prefixed by \fBrealtime\fR are reserved for future
+standardization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsecurity.\fR\fIany\fR\fR
+.ad
+.RS 16n
+.rt
+The keywords prefixed by \fBsecurity\fR are reserved for future
+standardization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsize\fR\fR
+.ad
+.RS 16n
+.rt
+The size of the file in octets, expressed as a decimal number using digits from
+the \fIISO/IEC 646: 1991 standard\fR. This record overrides the \fIsize\fR
+field in the specified header blocks. When used in write or copy mode,
+\fBpax\fR includes a size extended header record for each file with a
+\fIsize\fR value greater than \fB8589934591\fR (octal \fB77777777777\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuid\fR\fR
+.ad
+.RS 16n
+.rt
+The user \fBID\fR of the file owner, expressed as a decimal number using digits
+from the I\fISO/IEC 646:1991\fR standard. This record overrides the \fBuid\fR
+field in the following header block(s). When used in write or copy mode,
+\fBpax\fR includes a \fBuid\fR extended header record for each file whose owner
+ID is greater than \fB2097151 (octal 7777777)\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuname\fR\fR
+.ad
+.RS 16n
+.rt
+The owner of the specified files, formatted as a user name in the user
+database. This record overrides the \fIuid\fR and \fIuname\fR fields in the
+specified header blocks, and any \fIuid\fR extended header record. When used in
+read, copy, or list mode, \fBpax\fR translates the name from the UTF-8 encoding
+in the header record to the character set appropriate for the user database on
+the receiving system. If any of the UTF-8 characters cannot be translated, and
+if the \fB-o invalid= UTF-8\fR option is not specified, the results are
+implementation-defined. When used in write or copy mode, \fBpax\fR includes a
+\fIuname\fR extended header record for each file whose user name cannot be
+represented entirely with the letters and digits of the portable character set.
+.RE
+
+.sp
+.LP
+If the \fBvalue\fR field is zero length, it deletes any header block field,
+previously entered extended header value, or global extended header value of
+the same name.
+.sp
+.LP
+If a keyword in an extended header record (or in an \fB-o\fR option-argument)
+overrides or deletes a corresponding field in the \fBustar\fR header block,
+\fBpax\fR ignores the contents of that header block field.
+.sp
+.LP
+Unlike the \fBustar\fR header block fields, \fBNULLs\fR does not delimit
+values; all characters within the value field are considered data for the
+field.
+.SS "\fBpax\fR Extended Header Keyword Precedence"
+.sp
+.LP
+This section describes the precedence in which the various header records and
+fields and command line options are selected to apply to a file in the archive.
+When \fBpax\fR is used in read or list modes, it determines a file attribute in
+the following sequence:
+.RS +4
+.TP
+1.
+If \fB-o delete\fR\fB=\fR\fIkeyword-prefix\fR is used, the affected
+attributes is determined from step 7, if applicable, or ignored otherwise.
+.RE
+.RS +4
+.TP
+2.
+If \fB-o\fR \fIkeyword:=\fR is used, the affected attributes is ignored.
+.RE
+.RS +4
+.TP
+3.
+If \fB-o\fR \fIkeyword:=value\fR is used, the affected attribute is assigned
+the value.
+.RE
+.RS +4
+.TP
+4.
+If there is a \fItypeflag\fR \fBx\fR extended header record, the affected
+attribute is assigned the value. When extended header records conflict, the
+last one given in the header takes precedence.
+.RE
+.RS +4
+.TP
+5.
+If \fB-o\fR \fIkeyword=value\fR is used, the affected attribute is assigned
+the value.
+.RE
+.RS +4
+.TP
+6.
+If there is a \fItypeflag g\fR global extended header record, the affected
+attribute is assigned the value. When global extended header records conflict,
+the last one given in the global header takes precedence.
+.RE
+.RS +4
+.TP
+7.
+Otherwise, the attribute is determined from the \fBustar\fR header block.
+.RE
+.SS "\fBpax\fR Extended Header File Times"
+.sp
+.LP
+\fBpax\fR writes an \fImtime\fR record for each file in write or copy modes if
+the file's modification time cannot be represented exactly in the \fBustar\fR
+header logical record described in \fBustar\fR Interchange Format. This can
+occur if the time is out of \fBustar\fR range, or if the file system of the
+underlying implementation supports non-integer time granularities and the time
+is not an integer. All of these time records are formatted as a decimal
+representation of the time in seconds since the Epoch. If a period (\fB\&.\fR)
+decimal point character is present, the digits to the right of the point
+represents the units of a sub-second timing granularity, where the first digit
+is tenths of a second and each subsequent digit is a tenth of the previous
+digit. In read or copy mode, \fBpax\fR truncates the time of a file to the
+greatest value that is not greater than the input header file time. In write or
+copy mode, \fBpax\fR outputs a time exactly if it can be represented exactly as
+a decimal number, and otherwise generates only enough digits so that the same
+time is recovered if the file is extracted on a system whose underlying
+implementation supports the same time granularity.
+.SS "\fBustar\fR Interchange Format"
+.sp
+.LP
+A \fBustar\fR archive tape or file contains a series of logical records. Each
+logical record is a fixed-size logical record of 512 octets. Although this
+format can be thought of as being stored on 9-track industry-standard 12.7mm
+(0.5 in) magnetic tape, other types of transportable media are not excluded.
+Each file archived is represented by a header logical record that describes the
+file, followed by zero or more logical records that give the contents of the
+file. At the end of the archive file there are two 512-octet logical records
+filled with binary zeros, interpreted as an end-of-archive indicator.
+.sp
+.LP
+The logical records can be grouped for physical I/O operations, as described
+under the \fB-b\fR\fIblocksize\fR and \fB-x\fR \fBustar\fR options. Each group
+of logical records can be written with a single operation equivalent to the
+\fBwrite\fR(2) function. On magnetic tape, the result of this write is a single
+tape physical block. The last physical block always is the full size, so
+logical records after the two zero logical records can contain undefined data.
+.sp
+.LP
+The header logical record is structured as shown in the following table. All
+lengths and offsets are in decimal.
+.sp
+\fBTable 1 \fR\fBustar\fR Header Block
+.sp
+.TS
+tab();
+cw(1.83i) cw(1.83i) cw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+Field NameOctet OffsetLength (in Octets)
+\fIname\fR\fB0\fR100
+\fImode\fR1008
+\fIuid\fR1088
+\fIgid\fR1168
+\fIsize\fR12412
+\fImtime\fR13612
+\fIchksum\fR1488
+\fItypeflag\fR1561
+\fIlinkname\fR157100
+\fImagic\fR2576
+\fIversion\fR2632
+\fIuname\fR26532
+\fIgname\fR29732
+\fIdevmajor\fR3298
+\fIdevminor\fR3378
+\fIprefix\fR345155
+.TE
+
+.sp
+.LP
+All characters in the header logical record is represented in the coded
+character set of the \fIISO/IEC 646: 1991\fR standard. For maximum portability
+between implementations, names should be selected from characters represented
+by the portable filename character set as octets with the most significant bit
+zero. If an implementation supports the use of characters outside of slash and
+the portable filename character set in names for files, users, and groups, one
+or more implementation-defined encodings of these characters are provided for
+interchange purposes.
+.sp
+.LP
+\fBpax\fR never creates filenames on the local system that cannot be accessed
+using the procedures described in \fIIEEE Std 1003.1-200x\fR. If a filename is
+found on the medium that would create an invalid filename, it is
+implementation-defined whether the data from the file is stored on the file
+hierarchy and under what name it is stored. \fBpax\fR can choose to ignore
+these files as long as it produces an error indicating that the file is being
+ignored. Each field within the header logical record is contiguous; that is,
+there is no padding used.
+.sp
+.LP
+Each field within the header logical record is contiguous. There is no padding
+used. Each character on the archive medium is stored contiguously.
+.sp
+.LP
+The fields \fImagic\fR, \fIuname\fR and \fIgname\fR are character strings, each
+of which is terminated by a NULL character. The fields \fIname\fR,
+\fIlinkname\fR, and \fIprefix\fR are NULL-terminated character strings except
+when all characters in the array contain non-NULL characters including the last
+character. The \fIversion\fR field is two octets containing the characters
+\fB00\fR (zero-zero) The \fItypeflag\fR contains a single character. All other
+fields are leading zero-filled octal numbers using digits from the \fIISO/IEC
+646:1991\fR standard IRV. Each numeric field is terminated by one or more SPACE
+of NULL characters.
+.sp
+.LP
+Each character on the archive medium is stored contiguously. The fields
+\fImagic\fR, \fIuname\fR, and \fIgname\fR are character strings each terminated
+by a \fBNULL\fR character.
+.sp
+.LP
+\fIname\fR, \fIlinkname\fR, and \fIprefix\fR are NULL-terminated character
+strings except when all characters in the array contain non-NULL characters
+including the last character. The \fIversion\fR field is two octets containing
+the characters \fB00\fR (zero-zero). The \fItypeflag\fR contains a single
+character. All other fields are leading zero-filled octal numbers using digits
+from the \fIISO/IEC 646: 1991\fR standard IRV. Each numeric field is terminated
+by one or more spaces or NULL characters.
+.sp
+.LP
+The \fIname\fR and the \fIprefix\fR fields produce the pathname of the file. A
+new pathname is formed, if \fIprefix\fR is not an empty string (its first
+character is not \fBNULL\fR), by concatenating \fIprefix\fR (up to the first
+\fBNULL\fR character), a slash character, and name; otherwise, name is used
+alone. In either case, name is terminated at the first \fBNULL\fR character. If
+\fIprefix\fR begins with a \fBNULL\fR character, it is ignored. In this manner,
+pathnames of at most 256 characters can be supported. If a pathname does not
+fit in the space provided, \fBpax\fR notifies the user of the error, and does
+not store any part of the file-header or data-on the medium.
+.sp
+.LP
+The \fIlinkname\fR field does not use the \fIprefix\fR to produce a pathname.
+As such, a \fIlinkname\fR is limited to 100 characters. If the name does not
+fit in the space provided, \fBpax\fR notifies the user of the error, and does
+not attempt to store the link on the medium. The \fImode\fR field provides 12
+bits encoded in the \fIISO/IEC 646: 1991\fR standard octal digit
+representation. The encoded bits represent the following values in the
+\fBustar\fR \fImode\fR field:
+.sp
+
+.sp
+.TS
+tab();
+lw(.57i) lw(1.64i) lw(3.29i)
+lw(.57i) lw(1.64i) lw(3.29i)
+.
+Bit ValueIEE Std 1003.1-2001 BitDescription
+04000S_ISUIDSet UID on execution
+02000S_ISGIDSet GID on exectution
+01000\fIreserved\fRReserved for future standardization
+00400S_IRUSRRead permission for file owner class
+00200S_IWUSRWrite permission for file owner class
+00100S_IXUSRT{
+Execute/search permission for file owner class
+T}
+00040S_IRGRPRead permission for file group class
+00020S_IWGRPWrite permission for file group class
+00010S_IXGRPT{
+Execute/search permission for file group class
+T}
+00004S_IROTHRead permission for file other class
+00002S_IWOTHWrite permission for file other class
+00001S_IXOTHT{
+Execute/search permission for file other class
+T}
+.TE
+
+.sp
+.LP
+When appropriate privilege is required to set one of these mode bits, and the
+user restoring the files from the archive does not have the appropriate
+privilege, the mode bits for which the user does not have appropriate privilege
+are ignored. Some of the mode bits in the archive format are not mentioned
+elsewhere in volume \fIIEEE Std 1003.1-200x\fR. If the implementation does not
+support those bits, they can be ignored.
+.sp
+.LP
+The \fIuid\fR and \fIgid\fR fields are the user and group ID of the owner and
+group of the file, respectively.
+.sp
+.LP
+The \fIsize\fR field is the size of the file in octets. If the \fItypeflag\fR
+field is set to specify a file to be of type \fB1\fR (a link) or \fI2\fR (a
+symbolic link), the \fIsize\fR field is specified as zero. If the
+\fItypeflag\fR field is set to specify a file of type 5 (directory), the
+\fIsize\fR field is interpreted as described under the definition of that
+record type. No data logical records are stored for types 1, 2, or 5. If the
+\fItypeflag\fR field is set to 3 (character special file), 4 (block special
+file), or 6 (FIFO), the meaning of the \fIsize\fR field is unspecified by
+volume \fIIEEE Std 1003.1-200x\fR, and no data logical records is stored on the
+medium. Additionally, for type 6, the \fIsize\fR field is ignored when reading.
+If the \fItypeflag\fR field is set to any other value, the number of logical
+records written following the header is (\fIsize\fR+511)/512, ignoring any
+fraction in the result of the division.
+.sp
+.LP
+The \fImtime\fR field is the modification time of the file at the time it was
+archived. It is the \fIISO/IEC 646: 1991\fR standard representation of the
+octal value of the modification time obtained from the \fBstat()\fR function.
+.sp
+.LP
+The \fIchksum\fR field is the \fIISO/IEC 646: 1991\fR standard IRV
+representation of the octal value of the simple sum of all octets in the header
+logical record. Each octet in the header is treated as an unsigned value. These
+values are added to an unsigned integer, initialized to zero, the precision of
+which is not less than 17 bits. When calculating the checksum, the \fIchksum\fR
+field is treated as if it were all spaces.
+.sp
+.LP
+The \fItypeflag\fR field specifies the type of file archived. If a particular
+implementation does not recognize the type, or the user does not have
+appropriate privilege to create that type, the file is extracted as if it were
+a regular file if the file type is defined to have a meaning for the \fIsize\fR
+field that could cause data logical records to be written on the medium. If
+conversion to a regular file occurs, \fBpax\fR produces an error indicating
+that the conversion took place. All of the \fItypeflag\fR fields are coded in
+the \fIISO/IEC 646: 1991\fR standard IRV:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 17n
+.rt
+Represents a regular file. For backward compatibility, a \fItypeflag\fR value
+of binary zero ('\e0') should be recognized as meaning a regular file when
+extracting files from the archive. Archives written with this version of the
+archive file format create regular files with a \fItypeflag\fR value of the
+\fIISO/IEC 646: 1991\fR standard IRV '0'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 17n
+.rt
+Represents a file linked to another file, of any type, previously archived.
+Such files are identified by each file having the same device and file serial
+number. The linked-to name is specified in the \fIlinkname\fR field with a
+\fBNULL\fR-character terminator if it is less than 100 octets in length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 17n
+.rt
+Represents a symbolic link. The contents of the symbolic link are stored in the
+\fIlinkname\fR field.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3,4\fR\fR
+.ad
+.RS 17n
+.rt
+Represents character special files and block special files respectively. In
+this case the \fIdevmajor\fR and \fIdevminor\fR fields contain information
+defining the device, the format of which is unspecified by volume \fIIEEE Std
+1003.1-200x\fR. Implementations can map the device specifications to their own
+local specification or can ignore the entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB5\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies a directory or subdirectory. On systems where disk allocation is
+performed on a directory basis, the \fIsize\fR field contain the maximum number
+of octets (which can be rounded to the nearest disk block allocation unit) that
+the directory can hold. A \fIsize\fR field of zero indicates no such limiting.
+Systems that do not support limiting in this manner should ignore the
+\fIsize\fR field.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB6\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies a FIFO special file. The archiving of a FIFO file archives the
+existence of this file and not its contents.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB7\fR\fR
+.ad
+.RS 17n
+.rt
+Reserved to represent a file to which an implementation has associated some
+high- performance attribute. Implementations without such extensions should
+treat this file as a regular file (type 0).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBA-Z\fR\fR
+.ad
+.RS 17n
+.rt
+The letters \fBA\fR through \fBZ\fR inclusive are reserved for custom
+implementations. All other values are reserved for future versions of \fIIEEE
+Std 1003.1-200x\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSUN.devmajor\fR\fR
+.ad
+.RS 17n
+.rt
+A Solaris extension to \fBpax\fR extended header keywords. Specifies the major
+device number of the file.
+.sp
+When used in write or copy mode and the \fBxustar\fR or \fBpax\fR format (see
+\fB-x format\fR) was specified, \fBpax\fR includes a \fBSUN.devmajor\fR
+extended header record for each file whose major device number is too large to
+fit in 8 octets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSUN.devminor\fR\fR
+.ad
+.RS 17n
+.rt
+A Solaris extension to \fBpax\fR extended header keywords. Specifies the minor
+device number of the file.
+.sp
+When used in write or copy mode and the \fBxustar\fR or \fBpax\fR format (see
+\fB-x format\fR) is specified, \fBpax\fR includes a \fBSUN.\fR\fIdevminor\fR
+extended header record for each file whose minor device number is too large to
+fit in 8 octets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSUN.holesdata\fR\fR
+.ad
+.RS 17n
+.rt
+A Solaris extension to \fBpax\fR extended header keywords. Specifies the data
+and hole pairs for a sparse file.
+.sp
+In write or copy modes and when the \fBxustar\fR or \fBpax\fR format (see \fB-x
+format\fR) is specified, \fBpax\fR includes a \fBSUN.holesdate\fR extended
+header record if the underlying file system supports the detection of files
+with holes (see \fBfpathconf\fR(2)) and reports that there is at least one hole
+in the file being archived. \fIvalue\fR consists of two or more consecutive
+entries of the following form:
+.sp
+.in +2
+.nf
+\fBSPACE\fR\fIdata_offset\fR\fBSPACE\fR\fIhole_offset\fR
+.fi
+.in -2
+.sp
+
+where the data and hole offsets are the long values returned by passing
+\fBSEEK_DATA\fR and \fBSEEK_HOLE\fR to \fBlseek\fR(2), respectively. For
+example, the following entry is an example of the \fBSUN.holesdata\fR entry in
+the extended header for a file with data offsets at bytes 0, 24576, and 49152,
+and hole offsets at bytes 8192, 32768, and 49159: 49 \fBSUN.holesdata= 0 8192
+24576 32768 49152 49159\fR:
+.sp
+.in +2
+.nf
+49 SUN.holesdata= 0 8192 24576 32768 49152 49159
+.fi
+.in -2
+.sp
+
+When extracting a file from an archive in read or copy modes, if a
+\fBSUN.holesdata =\fR pair is found in the extended header for the file, then
+the file is restored with the holes identified using this data. For example,
+for the \fBSUN.holesdata\fR provided in the example above, bytes from 0 to 8192
+are restored as data, a hole is created up to the next data position (24576),
+bytes 24576 to 32768 is restored as data, and so forth.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX\fR\fR
+.ad
+.RS 17n
+.rt
+A Solaris custom \fBtypeflag\fR implementation which specifies an \fBxustar\fR
+format (see \fB-x format\fR) extended header. The \fBtypeflag 'x'\fR extended
+header is treated as a \fBustar typeflag 'x'\fR extended header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBE\fR\fR
+.ad
+.RS 17n
+.rt
+A Solaris custom \fBtypeflag\fR implementation which specifies an extended
+attributes header. See \fBfsattr\fR(5).
+.RE
+
+.sp
+.LP
+Attempts to archive a socket using \fBustar\fR interchange format produce a
+diagnostic message. Handling of other file types is implementation-defined.
+.sp
+.LP
+The \fImagic\fR field is the specification that this archive was output in this
+archive format. If this field contains \fBustar\fR (the five characters from
+the \fIISO/IEC 646: 1991\fR standard IRV shown followed by \fBNULL\fR), the
+\fIuname\fR and \fIgname\fR fields contain the \fIISO/IEC 646: 1991\fR standard
+IRV representation of the owner and group of the file, respectively (truncated
+to fit, if necessary). When the file is restored by a privileged,
+protection-preserving version of the utility, the user and group databases are
+scanned for these names. If found, the user and group IDs contained within
+these files are used rather than the values contained within the \fIuid\fR and
+\fBgid\fR fields.
+.SS "\fBcpio\fR Interchange Format"
+.sp
+.LP
+The octet-oriented \fBcpio\fR archive format are a series of entries, each
+comprising a header that describes the file, name of the file, and contents of
+the file.
+.sp
+.LP
+An archive can be recorded as a series of fixed-size blocks of octets. This
+blocking is be used only to make physical I/O more efficient. The last group of
+blocks are always at the full size.
+.sp
+.LP
+For the octet-oriented \fBcpio\fR archive format, the individual entry
+information are in the order indicated and described by the following table:
+Octet-Oriented \fBcpio\fR Archive Entry. See the \fBcpio.h\fR header for
+additional details.
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+Header Field NameLength (in Octets)Interpreted as
+\fIc_magic\fR6Octal number
+\fIc_dev\fR6Octal number
+\fIc_ino\fR6Octal number
+\fIc_mode\fR6Octal number
+\fIc_uid\fR6Octal number
+\fIc_gid\fR6Octal number
+\fIc_nlink\fR6Octal number
+\fIc_rdev\fR6Octal number
+\fIc_mtime\fR11Octal number
+\fIc_namesize\fR6Octal number
+\fIc_filesize\fR11Octal number
+.TE
+
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+Filename Field NameLengthInterpreted as
+\fIc_name\fR\fIc_namesize\fRPathname string
+.TE
+
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+Filename Field NameLengthInterpreted as
+\fIc_filedata\fR\fIc_filesize\fRData
+.TE
+
+.SS "\fBcpio\fR Header"
+.sp
+.LP
+For each file in the archive, a header as defined previously written. The
+information in the header fields is written as streams of the \fIISO/IEC 646:
+1991\fR standard characters interpreted as octal numbers. The octal numbers are
+extended to the necessary length by appending the \fIISO/IEC 646: 1991\fR
+standard IRV zeros at the most-significant-digit end of the number. The result
+is written to the most-significant digit of the stream of octets first. The
+fields are interpreted as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_magic\fR\fR
+.ad
+.RS 15n
+.rt
+Identifies the archive as being a transportable archive by containing the
+identifying value \fB"070707"\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_dev,c_ino\fR\fR
+.ad
+.RS 15n
+.rt
+Contains values that uniquely identify the file within the archive (that is, no
+files contain the same pair of \fIc_dev\fR and \fIc_ino\fR values unless they
+are links to the same file). The values are determined in an unspecified
+manner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_mode\fR\fR
+.ad
+.RS 15n
+.rt
+Contains the file type and access permissions as defined in the following
+table.
+.sp
+Directories, FIFOs, symbolic links, and regular files are supported on a system
+conforming to volume \fIIEEE Std 1003.1-200x\fR; additional values defined
+previously are reserved for compatibility with existing systems. Additional
+file types can be supported. Such files should not be written to archives
+intended to be transported to other systems.
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+File Permissions NameValueIndicates
+\fBC_IRUSR\fR\fB000400\fRby owner
+\fBC_IWUSR\fR\fB000200\fRby owner
+\fBC_IXUSR\fR\fB000100\fRby owner
+\fBC_IRGRP\fR\fB000040\fRby group
+\fBCW_IWFGP\fR\fB000020\fRby group
+\fBCW_IXGRP\fR\fB000010\fRby group
+\fBCW_IROTH\fR\fB000004\fRby others
+\fBCW_IWOTH\fR\fB000002\fRby others
+\fBCW_IXOTH\fR\fB000001\fRby others
+\fBCW_ISUID\fR\fB004000\fRSet \fBuid\fR
+\fBW_ISGID\fR\fB002000\fRSet \fBgid\fR
+\fBW_ISVTX\fR\fB001000\fRReserved
+.TE
+
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+File Type NameValueIndicates
+\fBC_ISDIR\fR\fB040000\fRDirectory
+\fBC_ISFIFO\fR\fB010000\fRFIFO
+\fBC_ISREG\fR\fB0100000\fRRegular file
+\fBC_ISLNK\fR\fB0120000\fRSymbolic link
+\fBC_ISBLK\fR\fB060000\fRBlock special file
+\fBC_ISCHR\fR\fB020000\fRCharacter special file
+\fBC_ISSOCK\fR\fB0140000\fRSocket
+\fBC_ISCTG\fR\fB0110000\fRReserved
+.TE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_uid\fR\fR
+.ad
+.RS 15n
+.rt
+Contains the user ID of the owner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_gid\fR\fR
+.ad
+.RS 15n
+.rt
+Contains the group ID of the group
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_nlink\fR\fR
+.ad
+.RS 15n
+.rt
+Contains a number greater than or equal to the number of links in the archive
+referencing the file. If the \fB-a\fR option is used to append to a \fBcpio\fR
+archive, \fBpax\fR does need not to account for the files in the existing part
+of the archive when calculating the \fIc_nlink\fR values for the appended part
+of the archive. It does also need not alter the \fIc_nlink\fR values in the
+existing part of the archive if additional files with the same \fIc_dev\fR and
+\fIc-ino\fR values are appended to the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_rdev\fR\fR
+.ad
+.RS 15n
+.rt
+Contains implementation-defined information for character or block special
+files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_mtime\fR\fR
+.ad
+.RS 15n
+.rt
+Contains the latest time of modification of the file at the time the archive
+was created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_namesize\fR\fR
+.ad
+.RS 15n
+.rt
+Contains the length of the pathname, including the terminating NULL character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc_filesize\fR\fR
+.ad
+.RS 15n
+.rt
+Contains the length of the file in octets. This is the length of the data
+section following the header structure.
+.RE
+
+.SS "\fBcpio\fR Filename"
+.sp
+.LP
+The \fIc_name\fR field contains the pathname of the file. The length of this
+field in octets is the value of \fIc_namesize\fR. If a filename is found on the
+medium that would create an invalid pathname, it is implementation-defined
+whether the data from the file is stored on the file hierarchy and under what
+name it is stored. All characters are represented in the \fIISO/IEC 646:
+1991\fR standard IRV. For maximum portability between implementations, names
+should be selected from characters represented by the portable filename
+character set as octets with the most significant bit zero. If an
+implementation supports the use of characters outside the portable filename
+character set in names for files, users, and groups, one or more
+implementation-defined encodings of these characters are provided for
+interchange purposes.\fBpax\fR does not create filenames on the local system
+that cannot be accessed by way of the procedures described in volume \fIIEEE
+Std 1003.1-200x\fR. If a filename is found on the medium that would create an
+invalid filename, it is implementation-defined whether the data from the file
+is stored on the local file system and under what name it is stored. \fBpax\fR
+can choose to ignore these files as long as it produces an error indicating
+that the file is being ignored.
+.SS "\fBcpio\fR File Data"
+.sp
+.LP
+Following \fIc_name\fR, there is \fIc_filesize\fR octets of data.
+Interpretation of such data occurs in a manner dependent on the file. If
+\fIc_filesize\fR is zero, no data is contained in \fIc_filedata\fR . When
+restoring from an archive:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the user does not have the appropriate privilege to create a file of the
+specified type, \fBpax\fR ignores the entry and writes an error message to
+standard error.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Only regular files have data to be restored. Presuming a regular file meets any
+selection criteria that might be imposed on the format-reading utility by the
+user, such data is restored.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If a user does not have appropriate privilege to set a particular \fImode\fR
+flag, the flag is ignored. Some of the \fImode\fR flags in the archive format
+are not mentioned in volume \fIIEEE Std 1003.1-200x\fR. If the implementation
+does not support those flags, they can be ignored.
+.RE
+.SS "\fBcpio\fR Special Entries"
+.sp
+.LP
+FIFO special files, directories, and the trailer are recorded with
+\fIc_filesize\fR equal to zero. For other special files, \fIc_filesize\fR is
+unspecified in volume \fIIEEE Std 1003.1-200x\fR. The header for the next file
+entry in the archive are written directly after the last octet of the file
+entry preceding it. A header denoting the filename trailer indicates the end of
+the archive; the contents of octets in the last block of the archive following
+such a header are undefined.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBcpio\fR(1), \fBed\fR(1), \fBprintf\fR(1), \fBtar\fR(1),
+\fBmkdir\fR(2), \fBlseek\fR(2), \fBstat\fR(2), \fBwrite\fR(2),
+\fBarchives.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBfnmatch\fR(5), \fBformats\fR(5)\fBfsattr\fR(5), \fBlargefile\fR(5),
+\fBregex\fR(5), \fBstandards\fR(5)
+.sp
+.LP
+\fIIEEE Std 1003.1-200x\fR, \fIISO/IEC 646: 1991\fR, \fIISO POSIX-2:1993
+Standard\fR
diff --git a/usr/src/man/man1/pfexec.1 b/usr/src/man/man1/pfexec.1
new file mode 100644
index 0000000000..d518027f37
--- /dev/null
+++ b/usr/src/man/man1/pfexec.1
@@ -0,0 +1,111 @@
+'\" te
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pfexec 1 "3 Mar 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+pfexec, pfsh, pfcsh, pfksh \- execute a command in a profile
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/pfexec\fR \fIcommand\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pfexec\fR \fB-P\fR \fIprivspec\fR \fIcommand\fR [ \fIarg\fR ]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pfsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pfcsh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pfksh\fR [ \fIoptions\fR ] [ \fIargument\fR ]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpfexec\fR program is used to execute commands with the attributes
+specified by the user's profiles in the \fBexec_attr\fR(4) database. It is
+invoked by the profile shells, \fBpfsh\fR, \fBpfcsh\fR, and \fBpfksh\fR which
+are linked to the Bourne shell, C shell, and Korn shell, respectively.
+.sp
+.LP
+Profiles are searched in the order specified in the user's entry in the
+\fBuser_attr\fR(4) database. If the same command appears in more than one
+profile, the profile shell uses the first matching entry.
+.sp
+.LP
+The second form, \fBpfexec\fR \fB-P\fR \fIprivspec\fR, allows a user to obtain
+the additional privileges awarded to the user's profiles in \fBprof_attr\fR(4).
+The privileges specification on the commands line is parsed using
+\fBpriv_str_to_set\fR(3C). The resulting privileges are intersected with the
+union of the privileges specified using the "\fBprivs\fR" keyword in
+\fBprof_attr\fR(4) for all the user's profiles and added to the inheritable set
+before executing the command.
+.SH USAGE
+.sp
+.LP
+\fBpfexec\fR is used to execute commands with predefined process attributes,
+such as specific user or group \fBID\fRs.
+.sp
+.LP
+Refer to the \fBsh\fR(1), \fBcsh\fR(1), and \fBksh\fR(1) man pages for complete
+usage descriptions of the profile shells.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRObtaining additional user privileges
+.sp
+.in +2
+.nf
+example% \fBpfexec -P all chown user file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This command runs \fBchown user file\fR with all privileges assigned to the
+current user, not necessarily all privileges.
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBprofiles\fR(1), \fBsh\fR(1), \fBexec_attr\fR(4),
+\fBprof_attr\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/pg.1 b/usr/src/man/man1/pg.1
new file mode 100644
index 0000000000..45ef440b12
--- /dev/null
+++ b/usr/src/man/man1/pg.1
@@ -0,0 +1,583 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pg 1 "25 Feb 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+pg \- files perusal filter for CRTs
+.SH SYNOPSIS
+.LP
+.nf
+\fBpg\fR [\fB-\fInumber\fR\fR] [\fB-p\fR \fIstring\fR] [\fB-cefnrs\fR] [+ \fIlinenumber\fR]
+ [+/ \fIpattern\fR /] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpg\fR command is a filter that allows the examination of \fIfilenames\fR
+one screenful at a time on a CRT. If the user types a RETURN, another page is
+displayed; other possibilities are listed below.
+.sp
+.LP
+This command is different from previous paginators in that it allows you to
+back up and review something that has already passed. The method for doing this
+is explained below.
+.sp
+.LP
+To determine terminal attributes, \fBpg\fR scans the \fBterminfo\fR(4) data
+base for the terminal type specified by the environment variable \fBTERM\fR. If
+\fBTERM\fR is not defined, the terminal type \fBdumb\fR is assumed.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 15n
+.rt
+An integer specifying the size (in lines) of the window that \fBpg\fR is to use
+instead of the default. (On a terminal containing 24 lines, the default window
+size is 23).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fIstring\fR\fR
+.ad
+.RS 15n
+.rt
+\fBpg\fR uses \fIstring\fR as the prompt. If the prompt string contains a
+\fB%d\fR, the first occurrence of \fB%d\fR in the prompt will be replaced by
+the current page number when the prompt is issued. The default prompt string is
+``\fB:\fR''.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 15n
+.rt
+Home the cursor and clear the screen before displaying each page. This option
+is ignored if \fBclear_screen\fR is not defined for this terminal type in the
+\fBterminfo\fR(4) data base.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 15n
+.rt
+\fBpg\fR does \fInot\fR pause at the end of each file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Normally, \fBpg\fR splits lines longer than the screen width, but some
+sequences of characters in the text being displayed (for instance, escape
+sequences for underlining) generate undesirable results. The \fB-f\fR option
+inhibits \fBpg\fR from splitting lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+Normally, commands must be terminated by a <\fInewline\fR> character. This
+option causes an automatic end of command as soon as a command letter is
+entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 15n
+.rt
+Restricted mode. The shell escape is disallowed. \fBpg\fR prints an error
+message but does not exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 15n
+.rt
+\fBpg\fR prints all messages and prompts in the standard output mode (usually
+inverse video).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIlinenumber\fR\fR
+.ad
+.RS 15n
+.rt
+Start up at \fIlinenumber\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+/\fR\fIpattern\fR\fB/\fR\fR
+.ad
+.RS 15n
+.rt
+Start up at the first line containing the regular expression pattern.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+A path name of a text file to be displayed. If no \fIfilename\fR is given, or
+if it is \(mi, the standard input is read.
+.RE
+
+.SH USAGE
+.SS "Commands"
+.sp
+.LP
+The responses that may be typed when \fBpg\fR pauses can be divided into three
+categories: those causing further perusal, those that search, and those that
+modify the perusal environment.
+.sp
+.LP
+Commands that cause further perusal normally take a preceding \fIaddress\fR, an
+optionally signed number indicating the point from which further text should be
+displayed. This \fIaddress\fR is interpreted in either pages or lines depending
+on the command. A signed \fIaddress\fR specifies a point relative to the
+current page or line, and an unsigned \fIaddress\fR specifies an address
+relative to the beginning of the file. Each command has a default address that
+is used if none is provided.
+.sp
+.LP
+The perusal commands and their defaults are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB(+1)<\fInewline\fR> or <\fIblank\fR>\fR
+.ad
+.RS 28n
+.rt
+This causes one page to be displayed. The address is specified in pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB(+1) \fBl\fR\fR
+.ad
+.RS 28n
+.rt
+With a relative address this causes \fBpg\fR to simulate scrolling the screen,
+forward or backward, the number of lines specified. With an absolute address
+this command prints a screenful beginning at the specified line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB(+1) \fBd\fR or \fB^D\fR\fR
+.ad
+.RS 28n
+.rt
+Simulates scrolling half a screen forward or backward.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBf\fR\fR
+.ad
+.RS 28n
+.rt
+Skip \fIi\fR screens of text.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBz\fR\fR
+.ad
+.RS 28n
+.rt
+Same as <\fInewline\fR> except that \fIi\fR, if present, becomes the new
+default number of lines per screenful.
+.RE
+
+.sp
+.LP
+The following perusal commands take no \fIaddress\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.\fR or \fB^L\fR\fR
+.ad
+.RS 13n
+.rt
+Typing a single period causes the current page of text to be redisplayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$\fR\fR
+.ad
+.RS 13n
+.rt
+Displays the last full window in the file. Use with caution when the input is a
+pipe.
+.RE
+
+.sp
+.LP
+The following commands are available for searching for text patterns in the
+text. The regular expressions are described on the \fBregex\fR(5) manual page.
+They must always be terminated by a <\fInewline\fR>, even if the \fB-n\fR
+option is specified.
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB/\fR\fIpattern\fR\fB/\fR\fR
+.ad
+.RS 14n
+.rt
+Search forward for the \fIi\fRth (default \fIi\fR=1) occurrence of
+\fIpattern\fR. Searching begins immediately after the current page and
+continues to the end of the current file, without wrap-around.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB^\fR\fIpattern\fR\fB^\fR\fR
+.ad
+.RS 14n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fB?\fR\fIpattern\fR\fB?\fR\fR
+.ad
+.RS 14n
+.rt
+Search backwards for the \fIi\fRth (default \fIi\fR=1) occurrence of
+\fIpattern\fR. Searching begins immediately before the current page and
+continues to the beginning of the current file, without wrap-around. The ^
+notation is useful for Adds 100 terminals which will not properly handle the ?.
+.RE
+
+.sp
+.LP
+After searching, \fBpg\fR will normally display the line found at the top of
+the screen. This can be modified by appending \fBm\fR or \fBb\fR to the search
+command to leave the line found in the middle or at the bottom of the window
+from now on. The suffix \fBt\fR can be used to restore the original situation.
+.sp
+.LP
+The user of \fBpg\fR can modify the environment of perusal with the following
+commands:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBn\fR\fR
+.ad
+.RS 14n
+.rt
+Begin perusing the \fIi\fRth next file in the command line. The \fIi\fR is an
+unsigned number, default value is 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBp\fR\fR
+.ad
+.RS 14n
+.rt
+Begin perusing the \fIi\fRth previous file in the command line. \fIi\fR is an
+unsigned number, default is 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIi\fR\fBw\fR\fR
+.ad
+.RS 14n
+.rt
+Display another window of text. If \fIi\fR is present, set the window size to
+\fIi\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR \fIfilename\fR\fR
+.ad
+.RS 14n
+.rt
+Save the input in the named file. Only the current file being perused is saved.
+The white space between the \fBs\fR and \fIfilename\fR is optional. This
+command must always be terminated by a <\fInewline\fR>, even if the \fB-n\fR
+option is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.RS 14n
+.rt
+Help by displaying an abbreviated summary of available commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR or \fBQ\fR\fR
+.ad
+.RS 14n
+.rt
+Quit \fBpg\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR\fBcommand\fR\fR
+.ad
+.RS 14n
+.rt
+\fICommand\fR is passed to the shell, whose name is taken from the \fBSHELL\fR
+environment variable. If this is not available, the default shell is used. This
+command must always be terminated by a <\fInewline\fR>, even if the \fB-n\fR
+option is specified.
+.RE
+
+.sp
+.LP
+At any time when output is being sent to the terminal, the user can hit the
+quit key (normally CTRL-\e) or the interrupt (break) key. This causes \fBpg\fR
+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 quit signal occurs.
+.sp
+.LP
+If the standard output is not a terminal, then \fBpg\fR acts just like
+\fBcat\fR(1), except that a header is printed before each file (if there is
+more than one).
+.SS "Large File Behavior"
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBpg\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example of the \fBpg\fR command.
+.sp
+.LP
+The following command line uses \fBpg\fR to read the system news:
+
+.sp
+.LP
+\fBexample% news | pg\fR \fB-p\fR \fB"(Page %d):"\fR
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpg\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.sp
+.LP
+The following environment variables affect the execution of \fBpg\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOLUMNS\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the horizontal screen size. If unset or \fINULL,\fR use the value of
+\fBTERM\fR, the window size, baud rate, or some combination of these, to
+indicate the terminal type for the screen size calculation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLINES\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the number of lines to be displayed on the screen. If unset or
+\fINULL,\fR use the value of \fBTERM\fR, the window size, baud rate, or some
+combination of these, to indicate the terminal type for the screen size
+calculation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 11n
+.rt
+Determine the name of the command interpreter executed for a !command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTERM\fR\fR
+.ad
+.RS 11n
+.rt
+Determine terminal attributes. Optionally attempt to search a system-dependent
+database, keyed on the value of the \fBTERM\fR environment variable. If no
+information is available, a terminal incapable of cursor-addressable movement
+is assumed.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/pg*\fR\fR
+.ad
+.sp .6
+.RS 4n
+temporary file when input is from a pipe
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/terminfo/?/*\fR\fR
+.ad
+.sp .6
+.RS 4n
+terminal information database
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBgrep\fR(1), \fBmore\fR(1), \fBterminfo\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBregex\fR(5)
+.SH NOTES
+.sp
+.LP
+While waiting for terminal input, \fBpg\fR responds to BREAK, CTRL-C, and
+CTRL\(mi\e by terminating execution. Between prompts, however, these signals
+interrupt \fBpg\fR's current task and place the user in prompt mode. These
+should be used with caution when input is being read from a pipe, since an
+interrupt is likely to terminate the other commands in the pipeline.
+.sp
+.LP
+The terminal \fB/\fR, \fB^\fR, or \fB?\fR may be omitted from the searching
+commands.
+.sp
+.LP
+If terminal tabs are not set every eight positions, undesirable results may
+occur.
+.sp
+.LP
+When using \fBpg\fR as a filter with another command that changes the terminal
+I/O options, terminal settings may not be restored correctly.
diff --git a/usr/src/man/man1/pgrep.1 b/usr/src/man/man1/pgrep.1
new file mode 100644
index 0000000000..bb88ab0bdb
--- /dev/null
+++ b/usr/src/man/man1/pgrep.1
@@ -0,0 +1,463 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pgrep 1 "6 May 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+pgrep, pkill \- find or signal processes by name and other attributes
+.SH SYNOPSIS
+.LP
+.nf
+\fBpgrep\fR [\fB-flvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-d\fR \fIdelim\fR] [\fB-P\fR \fIppidlist\fR]
+ [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
+ [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
+ [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
+ [\fIpattern\fR]
+.fi
+
+.LP
+.nf
+\fBpkill\fR [\fB-\fIsignal\fR\fR] [\fB-fvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-P\fR \fIppidlist\fR]
+ [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
+ [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
+ [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
+ [\fIpattern\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpgrep\fR utility examines the active processes on the system and reports
+the process \fBID\fRs of the processes whose attributes match the criteria
+specified on the command line. Each process \fBID\fR is printed as a decimal
+value and is separated from the next \fBID\fR by a delimiter string, which
+defaults to a newline. For each attribute option, the user can specify a set of
+possible values separated by commas on the command line. For example,
+.sp
+.in +2
+.nf
+\fBpgrep -G other,daemon\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+matches processes whose real group \fBID\fR is \fBother\fR \fBOR\fR
+\fBdaemon\fR. If multiple criteria options are specified, \fBpgrep\fR matches
+processes whose attributes match the logical \fBAND\fR of the criteria options.
+For example,
+.sp
+.in +2
+.nf
+\fBpgrep -G other,daemon -U root,daemon\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+matches processes whose attributes are:
+.br
+.in +2
+(real group \fBID\fR is \fBother\fR \fBOR\fR \fBdaemon\fR) \fBAND\fR
+.in -2
+.br
+.in +2
+(real user \fBID\fR is \fBroot\fR \fBOR\fR \fBdaemon\fR)
+.in -2
+.sp
+.LP
+\fBpkill\fR functions identically to \fBpgrep\fR, except that each matching
+process is signaled as if by \fBkill\fR(1) instead of having its process
+\fBID\fR printed. A signal name or number may be specified as the first command
+line option to \fBpkill\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIctidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose process contract ID is in the given list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdelim\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the output delimiter string to be printed between each matching
+process \fBID\fR. If no \fB-d\fR option is specified, the default is a newline
+character. The \fB-d\fR option is only valid when specified as an option to
+\fBpgrep\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 17n
+.rt
+The regular expression \fIpattern\fR should be matched against the full process
+argument string (obtained from the \fBpr_psargs\fR field of the
+\fB/proc/\fInnnnn\fR/psinfo\fR file). If no \fB-f\fR option is specified, the
+expression is matched only against the name of the executable file (obtained
+from the \fBpr_fname\fR field of the \fB/proc/\fInnnnn\fR/psinfo\fR file).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIpgrplist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose process group \fBID\fR is in the given list. If
+group 0 is included in the list, this is interpreted as the process group
+\fBID\fR of the \fBpgrep\fR or \fBpkill\fR process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIgidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose real group \fBID\fR is in the given list. Each
+group \fBID\fR may be specified as either a group name or a numerical group
+\fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-J\fR \fIprojidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose project \fBID\fR is in the given list. Each
+project \fBID\fR may be specified as either a project name or a numerical
+project \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 17n
+.rt
+Long output format. Prints the process name along with the process \fBID\fR of
+each matching process. The process name is obtained from the \fBpr_psargs\fR or
+\fBpr_fname\fR field, depending on whether the \fB-f\fR option was specified
+(see above). The \fB-l\fR option is only valid when specified as an option to
+\fBpgrep\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only the newest (most recently created) process that meets all other
+specified matching criteria. Cannot be used with option \fB-o\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only the oldest (earliest created) process that meets all other
+specified matching criteria. Cannot be used with option \fB-n\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIppidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose parent process \fBID\fR is in the given list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose process session \fBID\fR is in in the given list.
+If \fBID\fR 0 is included in the list, this is interpreted as the session
+\fBID\fR of the \fBpgrep\fR or \fBpkill\fR process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItermlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes which are associated with a terminal in the given list.
+Each terminal is specified as the suffix following "/dev/" of the terminal's
+device path name in \fB/dev\fR. For example, \fBterm/a\fR or \fBpts/0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItaskidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose task \fBID\fR is in the given list. If \fBID\fR 0
+is included in the list, this is interpreted as the task \fBID\fR of the
+\fBpgrep\fR or \fBpkill\fR process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIeuidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose effective user \fBID\fR is in the given list. Each
+user \fBID\fR may be specified as either a login name or a numerical user
+\fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR \fIuidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose real user \fBID\fR is in the given list. Each user
+\fBID\fR may be specified as either a login name or a numerical user \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 17n
+.rt
+Reverses the sense of the matching. Matches all processes \fBexcept\fR those
+which meet the specified matching criteria.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 17n
+.rt
+Considers only processes whose argument string or executable file name
+\fBexactly\fR matches the specified \fIpattern\fR to be matching processes. The
+pattern match is considered to be exact when all characters in the process
+argument string or executable file name match the pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzoneidlist\fR\fR
+.ad
+.RS 17n
+.rt
+Matches only processes whose zone \fBID\fR is in the given list. Each zone
+\fBID\fR may be specified as either a zone name or a numerical zone \fBID\fR.
+This option is only useful when executed in the global zone. If the \fBpkill\fR
+utility is used to send signals to processes in other zones, the process must
+have asserted the \fB{PRIV_PROC_ZONE}\fR privilege (see \fBprivileges\fR(5)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIsignal\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies the signal to send to each matched process. If no signal is
+specified, \fBSIGTERM\fR is sent by default. The value of \fIsignal\fR can be
+one of the symbolic names defined in \fBsignal.h\fR(3HEAD) without the
+\fBSIG\fR prefix, or the corresponding signal number as a decimal value. The
+\fB-\fR\fIsignal\fR option is only valid when specified as the first option to
+\fBpkill\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies an Extended Regular Expression (\fBERE\fR) pattern to match against
+either the executable file name or full process argument string. See
+\fBregex\fR(5) for a complete description of the \fBERE\fR syntax.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRObtaining a Process ID
+.sp
+.LP
+Obtain the process \fBID\fR of \fBsendmail\fR:
+
+.sp
+.in +2
+.nf
+example% \fBpgrep -x -u root sendmail\fR
+283
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRTerminating a Process
+.sp
+.LP
+Terminate the most recently created \fBxterm\fR:
+
+.sp
+.in +2
+.nf
+example% \fBpkill -n xterm\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+One or more processes were matched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+No processes were matched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+A fatal error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/\fInnnnn\fR/psinfo\fR\fR
+.ad
+.RS 22n
+.rt
+Process information files
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkill\fR(1), \fBproc\fR(1), \fBps\fR(1), \fBtruss\fR(1), \fBkill\fR(2),
+\fBsignal.h\fR(3HEAD), \fBproc\fR(4), \fBattributes\fR(5), \fBprivileges\fR(5),
+\fBregex\fR(5), \fBzones\fR(5)
+.SH NOTES
+.sp
+.LP
+Both utilities match the \fBERE\fR \fIpattern\fR argument against either the
+\fBpr_fname\fR or \fBpr_psargs\fR fields of the
+\fB/proc/\fR\fInnnnn\fR\fB/psinfo\fR files. The lengths of these strings are
+limited according to definitions in \fB<sys/procfs.h>\fR\&. Patterns which can
+match strings longer than the current limits may fail to match the intended set
+of processes.
+.sp
+.LP
+If the \fIpattern\fR argument contains \fBERE\fR meta-characters which are also
+shell meta-characters, it may be necessary to enclose the pattern with
+appropriate shell quotes.
+.sp
+.LP
+Defunct processes are never matched by either \fBpgrep\fR or \fBpkill\fR.
+.sp
+.LP
+The current \fBpgrep\fR or \fBpkill\fR process will never consider itself a
+potential match.
diff --git a/usr/src/man/man1/pkginfo.1 b/usr/src/man/man1/pkginfo.1
new file mode 100644
index 0000000000..d71cd4f796
--- /dev/null
+++ b/usr/src/man/man1/pkginfo.1
@@ -0,0 +1,244 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pkginfo 1 "30 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+pkginfo \- display software package information
+.SH SYNOPSIS
+.LP
+.nf
+\fBpkginfo\fR [\fB-q\fR | \fB-x\fR | \fB-l\fR] [\fB-p\fR | \fB-i\fR] [\fB-r\fR] [\fB-a\fR \fIarch\fR]
+ [\fB-v\fR \fIversion\fR] [\fB-c\fR \fIcategory\fR]... [\fIpkginst\fR]...
+.fi
+
+.LP
+.nf
+\fBpkginfo\fR [\fB-d\fR \fIdevice\fR] [\fB-R\fR \fIroot_path\fR] [\fB-q\fR | \fB-x\fR | \fB-l\fR] [\fB-a\fR \fIarch\fR]
+ [\fB-v\fR \fIversion\fR] [\fB-c\fR \fIcategory\fR]... [\fIpkginst\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpkginfo\fR displays information about software packages that are installed
+on the system (with the first synopsis) or that reside on a particular device
+or directory (with the second synopsis).
+.sp
+.LP
+Without options, \fBpkginfo\fR lists the primary category, package instance,
+and the names of all completely installed and partially installed packages. It
+displays one line for each package selected.
+.SH OPTIONS
+.sp
+.LP
+The \fB-p\fR and \fB-i\fR options are meaningless if used in conjunction with
+the \fB-d\fR option.
+.sp
+.LP
+The options \fB-q\fR, \fB-x\fR, and \fB-l\fR are mutually exclusive.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIarch\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the architecture of the package as \fBarch\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcategory\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display packages that match \fIcategory\fR. Categories are defined with the
+\fBCATEGORY\fR parameter in the \fBpkginfo\fR(4) file. If more than one
+category is supplied, the package needs to match only one category in the
+list. The match is not case specific.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdevice\fR\fR
+.ad
+.sp .6
+.RS 4n
+Defines a device, \fIdevice\fR, on which the software resides. \fIdevice\fR can
+be an absolute directory pathname or the identifiers for tape, floppy disk,
+removable disk, and so forth. The special token \fBspool\fR may be used to
+indicate the default installation spool directory (\fB/var/spool/pkg\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display information for fully installed packages only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify long format, which includes all available information about the
+designated package(s).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display information for partially installed packages only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not list any information. Used from a program to check whether or not a
+package has been installed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the installation base for relocatable packages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIroot_path\fR\fR
+.ad
+.sp .6
+.RS 4n
+Defines the full path name of a directory to use as the \fIroot_path\fR. All
+files, including package system information files, are relocated to a directory
+tree starting in the specified \fIroot_path\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify the version of the package as \fIversion\fR. The version is defined
+with the \fBVERSION\fR parameter in the \fBpkginfo\fR(4) file. All compatible
+versions can be requested by preceding the version name with a tilde
+(\fB\(ap\fR). Multiple white spaces are replaced with a single white space
+during version comparison.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Designate an extracted listing of package information. The listing contains the
+package abbreviation, package name, package architecture (if available) and
+package version (if available).
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpkginst\fR\fR
+.ad
+.sp .6
+.RS 4n
+A package designation by its instance. An instance can be the package
+abbreviation or a specific instance (for example, \fBinst.1\fR or
+\fBinst.2\fR). All instances of a package can be requested by \fBinst.*\fR. The
+asterisk character (\fB*\fR) is a special character to some shells and may need
+to be escaped. In the C-Shell, "\fB*\fR" must be surrounded by single quotes
+(\fB\&'\fR) or preceded by a backslash (\e).
+.RE
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.sp .6
+.RS 4n
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/pkg\fR\fR
+.ad
+.sp .6
+.RS 4n
+default installation spool directory
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpkgtrans\fR(1), \fBpkgadd\fR(1M), \fBpkgask\fR(1M), \fBpkgchk\fR(1M),
+\fBpkgrm\fR(1M), \fBpkginfo\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5)
+.sp
+.LP
+\fIApplication Packaging Developer\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
+GB in the same way they handle smaller files. In their current implementations,
+\fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other package commands can process a
+datastream of up to 4 GB.
diff --git a/usr/src/man/man1/pkgmk.1 b/usr/src/man/man1/pkgmk.1
new file mode 100644
index 0000000000..02f2290f10
--- /dev/null
+++ b/usr/src/man/man1/pkgmk.1
@@ -0,0 +1,312 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pkgmk 1 "30 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+pkgmk \- produce an installable package
+.SH SYNOPSIS
+.LP
+.nf
+\fBpkgmk\fR [\fB-o\fR] [\fB-a\fR \fIarch\fR] [\fB-b\fR \fIbase_src_dir\fR] [\fB-d\fR \fIdevice\fR]
+ [\fB-f\fR \fIprototype\fR] [\fB-l\fR \fIlimit\fR] [\fB-p\fR \fIpstamp\fR] [\fB-r\fR \fIroot_path\fR]
+ [\fB-v\fR \fIversion\fR] [\fIvariable=value\fR]... [\fIpkginst\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpkgmk\fR utility produces an installable package to be used as input to
+the \fBpkgadd\fR(1M) command. The package contents is in directory structure
+format.
+.sp
+.LP
+The command uses the package \fBprototype\fR(4) file as input and creates a
+\fBpkgmap\fR(4) file. The contents for each entry in the \fBprototype\fR file
+is copied to the appropriate output location. Information concerning the
+contents (checksum, file size, modification date) is computed and stored in the
+\fBpkgmap\fR file, along with attribute information specified in the
+\fBprototype\fR file.
+.sp
+.LP
+\fBpkgmk\fR searches for the files listed in the \fBprototype\fR(4) file as
+described in the following conditions. \fBNote:\fR If a prototype file contains
+the explicit location of the file to include in the package, then the following
+search explanations do not apply.
+.RS +4
+.TP
+1.
+If neither \fB-b\fR nor \fB-r\fR options are specified, the file name
+component of each file path listed in the \fBprototype\fR(4) file is expected
+to be found in the same directory as the \fBprototype\fR(4) file
+.RE
+.RS +4
+.TP
+2.
+If \fB-b\fR is specified as a relative path (without a leading "\fB/\fR"),
+then \fIbase_src_dir\fR is prepended to the relative file paths from the
+\fBprototype\fR(4) file. The resulting path is searched for in the
+\fIroot_path\fR directories. If a \fIroot_path\fR is not specified, it defaults
+to "\fB/\fR".
+.RE
+.RS +4
+.TP
+3.
+If \fB-b\fR is specified as an absolute path (with a leading "\fB/\fR"),
+then \fIbase_src_dir\fR is prepended to the relative paths from the
+\fBprototype\fR(4) file and the result is the location of the file.
+\fIroot_path\fR is \fBnot\fR searched.
+.RE
+.RS +4
+.TP
+4.
+If \fB-r\fR is specified, then full file paths are used from the
+\fBprototype\fR(4) file. Relative paths have \fIbase_src_dir\fR prepended. If
+\fIbase_src_dir\fR is not specified, it defaults to \fB""\fR. The resulting
+path is searched for in each directory of the \fIroot_path\fR.
+.RE
+.sp
+.LP
+If you created your prototype file using \fB"pkgproto a/relative/path"\fRor
+\fB"pkgproto a/relative/path=install/path"\fR, you should use the \fB-r\fR
+\fIroot_path\fR option to specify the location of \fBa/relative/path\fR so that
+\fBpkgmk\fR can correctly locate your source files.
+.sp
+.LP
+Package commands, including \fBpkgmk\fR, are \fBlargefile\fR(5)-aware. They
+handle files larger than 2 GB in the same way they handle smaller files. In
+their current implementations, \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other
+package commands can process a datastream of up to 4 GB.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIarch\fR\fR
+.ad
+.RS 19n
+.rt
+Overrides the architecture information provided in the \fBpkginfo\fR(4) file
+with \fIarch\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbase_src_dir\fR\fR
+.ad
+.RS 19n
+.rt
+Prepends the indicated \fIbase_src_dir\fR to locate relocatable objects on the
+source machine. Use this option to search for all objects in the prototype
+file. \fBpkgmk\fR expects to find the objects in /\fIbase_src_dir\fR or to
+locate the objects by use of the \fB-b\fR and \fB-r\fR options, respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdevice\fR\fR
+.ad
+.RS 19n
+.rt
+Creates the package on \fIdevice\fR. \fIdevice\fR can be an absolute directory
+pathname or the identifiers for a floppy disk or removable disk (for example,
+\fB/dev/diskette\fR). The default device is the installation spool directory
+(\fB/var/spool/pkg\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIprototype\fR\fR
+.ad
+.RS 19n
+.rt
+Uses the file \fIprototype\fR as input to the command. The default
+\fIprototype\fR filename is [\fBPp\fR]\fBrototype\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlimit\fR\fR
+.ad
+.RS 19n
+.rt
+Specifies the maximum size in 512 byte blocks of the output device as
+\fBlimit\fR. By default, if the output file is a directory or a mountable
+device, \fBpkgmk\fR employs the \fBdf\fR(1M) command to dynamically calculate
+the amount of available space on the output device. This option is useful in
+conjunction with \fBpkgtrans\fR(1) to create a package with a datastream
+format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 19n
+.rt
+Overwrites the same instance; package instance is overwritten if it already
+exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpstamp\fR\fR
+.ad
+.RS 19n
+.rt
+Overrides the production stamp definition in the \fBpkginfo\fR(4) file with
+\fIpstamp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIroot_path\fR\fR
+.ad
+.RS 19n
+.rt
+Uses the indicated \fIroot_path\fR with the source pathname appended to locate
+objects on the source machine, using a comma (\fB,\fR) as the separator for the
+path elements. If this option is specified, look for the full destination path
+in each of the directories specified. If neither \fB-b\fR nor \fB-r\fR is
+specified, look for the leaf filename in the current directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIversion\fR\fR
+.ad
+.RS 19n
+.rt
+Overrides the version information provided in the \fBpkginfo\fR(4) file with
+\fIversion\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIvariable=value\fR\fR
+.ad
+.RS 19n
+.rt
+Places the indicated variable in the packaging environment. (See
+\fBprototype\fR(4) for definitions of variable specifications.)
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpkginst\fR\fR
+.ad
+.RS 11n
+.rt
+A package designation by its instance. An instance can be the package
+abbreviation or a specific instance (for example, \fBinst.1\fR or
+\fBinst.2\fR). All instances of a package can be requested by \fBinst.*\fR. The
+asterisk character (\fB*\fR) is a special character to some shells and might
+need to be escaped. In the C-Shell, \fB*\fR must be surrounded by single quotes
+(\fB\&'\fR) or preceded by a backslash (\e).
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpkgparam\fR(1), \fBpkgproto\fR(1), \fBpkgtrans\fR(1), \fBuname\fR(1),
+\fBdf\fR(1M), \fBpkgadd\fR(1M), \fBpkginfo\fR(4), \fBpkgmap\fR(4),
+\fBprototype\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5)
+.sp
+.LP
+\fIApplication Packaging Developer\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+Architecture information is provided on the command line with the \fB-a\fR
+option or in the \fBprototype\fR(4) file. If no architecture information is
+supplied, \fBpkgmk\fR uses the output of \fBuname\fR \fB-m\fR (see
+\fBuname\fR(1)).
+.sp
+.LP
+Version information is provided on the command line with the \fB-v\fR option or
+in the \fBpkginfo\fR(4) file. If no version information is supplied, a default
+based on the current date is provided.
+.sp
+.LP
+Command line definitions for both architecture and version override the
+\fBprototype\fR(4) definitions.
+.sp
+.LP
+\fBpkgmk\fR fails if one of the following invalid combinations of zone-related
+parameters is used:
+.RS +4
+.TP
+1.
+Both \fBSUNW_PKG_ALLZONES\fR and \fBSUNW_PKG_THISZONE\fR are set to
+\fBTRUE\fR.
+.RE
+.RS +4
+.TP
+2.
+\fBSUNW_PKG_HOLLOW\fR is set to \fBTRUE\fR and \fBSUNW_PKG_ALLZONES\fR is
+set to \fBFALSE\fR.
+.RE
+.RS +4
+.TP
+3.
+The package contains a request script and \fBSUNW_PKG_THISZONE\fR set to
+\fBTRUE\fR.
+.RE
+.sp
+.LP
+For additional information regarding these parameters, see \fBpkginfo\fR(4).
diff --git a/usr/src/man/man1/pkgparam.1 b/usr/src/man/man1/pkgparam.1
new file mode 100644
index 0000000000..af190b122e
--- /dev/null
+++ b/usr/src/man/man1/pkgparam.1
@@ -0,0 +1,172 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pkgparam 1 "30 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+pkgparam \- display package parameter values
+.SH SYNOPSIS
+.LP
+.nf
+\fBpkgparam\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] [\fB-R\fR \fIroot_path\fR] \fIpkginst\fR [\fIparam\fR]...
+.fi
+
+.LP
+.nf
+\fBpkgparam\fR \fB-f\fR \fIfilename\fR [\fB-v\fR] [\fIparam\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpkgparam\fR displays the value associated with the parameter or parameters
+requested on the command line. The values are located in either the
+\fBpkginfo\fR(4) file for \fIpkginst\fR or from the specific file named with
+the \fB-f\fR option.
+.sp
+.LP
+One parameter value is shown per line. Only the value of a parameter is given
+unless the \fB-v\fR option is used. With this option, the output of the command
+is in this format:
+.sp
+.in +2
+.nf
+\fIparameter1\fR\fB='\fR\fIvalue1\fR\fB\&'\fR
+\fIparameter2\fR\fB='\fR\fIvalue2\fR\fB\&'\fR
+\fIparameter3\fR\fB='\fR\fIvalue3\fR\fB\&'\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If no parameters are specified on the command line, values for all parameters
+associated with the package are shown.
+.SH OPTIONS
+.sp
+.LP
+Options and arguments for this command are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdevice\fR\fR
+.ad
+.RS 16n
+.rt
+Specify the \fIdevice\fR on which a \fIpkginst\fR is stored. It can be a
+directory pathname or the identifiers for tape, floppy disk, or removable disk
+(for example, \fB/var/tmp\fR, \fB/dev/diskette\fR, and \fB/dev/dsk/c1d0s0\fR).
+The special token \fBspool\fR may be used to represent the default installation
+spool directory (\fB/var/spool/pkg\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfilename\fR\fR
+.ad
+.RS 16n
+.rt
+Read \fIfilename\fR for parameter values.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIroot_path\fR\fR
+.ad
+.RS 16n
+.rt
+Defines the full path name of a subdirectory to use as the \fIroot_path\fR. All
+files, including package system information files, are relocated to a directory
+tree starting in the specified \fIroot_path\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 16n
+.rt
+Verbose mode. Display name of parameter and its value.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpkginst\fR\fR
+.ad
+.RS 11n
+.rt
+Defines a specific package instance for which parameter values should be
+displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIparam\fR\fR
+.ad
+.RS 11n
+.rt
+Defines a specific parameter whose value should be displayed.
+.RE
+
+.SH ERRORS
+.sp
+.LP
+If parameter information is not available for the indicated package, the
+command exits with a non-zero status.
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpkgmk\fR(1), \fBpkgproto\fR(1), \fBpkgtrans\fR(1), \fBpkgadd\fR(1M),
+\fBpkginfo\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5)
+.sp
+.LP
+\fIApplication Packaging Developer\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+With the \fB-f\fR option, you can specify the file from which parameter values
+should be extracted. This file should be in the same format as a
+\fBpkginfo\fR(4) file. For example, such a file might be created during package
+development and used while testing software during this stage.
+.sp
+.LP
+Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
+GB in the same way they handle smaller files. In their current implementations,
+\fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other package commands can process a
+datastream of up to 4 GB.
diff --git a/usr/src/man/man1/pkgproto.1 b/usr/src/man/man1/pkgproto.1
new file mode 100644
index 0000000000..72b815995e
--- /dev/null
+++ b/usr/src/man/man1/pkgproto.1
@@ -0,0 +1,175 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pkgproto 1 "30 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+pkgproto \- generate prototype file entries for input to pkgmk command
+.SH SYNOPSIS
+.LP
+.nf
+\fBpkgproto\fR [\fB-i\fR] [\fB-c\fR \fIclass\fR] [\fIpath1\fR]
+.fi
+
+.LP
+.nf
+\fBpkgproto\fR [\fB-i\fR] [\fB-c\fR \fIclass\fR] [\fIpath1=path2\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpkgproto\fR scans the indicated paths and generates \fBprototype\fR(4) file
+entries that may be used as input to the \fBpkgmk\fR(1) command.
+.sp
+.LP
+If no paths are specified on the command line, standard input is assumed to be
+a list of paths. If the pathname listed on the command line is a directory,
+the contents of the directory is searched. However, if input is read from
+\fBstdin\fR, a directory specified as a pathname will not be searched.
+.sp
+.LP
+Package commands, such as \fBpkgproto\fR, are \fBlargefile\fR(5)-aware. They
+handle files larger than 2 GB in the same way they handle smaller files. In
+their current implementations, \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other
+package commands can process a datastream of up to 4 GB.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 12n
+.rt
+Ignores symbolic links and records the paths as \fBftype\fR=\fBf\fR (a file)
+versus \fBftype\fR=\fBs\fR (symbolic link).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIclass\fR\fR
+.ad
+.RS 12n
+.rt
+Maps the class of all paths to \fIclass\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath1\fR\fR
+.ad
+.RS 9n
+.rt
+Pathname where objects are located.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpath2\fR\fR
+.ad
+.RS 9n
+.rt
+Pathname which should be substituted on output for \fIpath1\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRBasic Usage
+.sp
+.LP
+The following example shows a common usage of \fBpkgproto\fR and a partial
+listing of the output produced.
+
+.sp
+.in +2
+.nf
+\fBexample%\fR \fBpkgproto\fR /bin=bin /usr/bin=usrbin /etc=etc
+f none bin/sed=/bin/sed 0775 bin bin
+f none bin/sh=/bin/sh 0755 bin daemon
+f none bin/sort=/bin/sort 0755 bin bin
+f none usrbin/sdb=/usr/bin/sdb 0775 bin bin
+f none usrbin/shl=/usr/bin/shl 4755 bin bin
+d none etc/master.d 0755 root daemon
+f none etc/master.d/kernel=/etc/master.d/kernel 0644 root daemon
+f none etc/rc=/etc/rc 0744 root daemon
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing \fBpkgproto\fR in a Pipeline
+.sp
+.LP
+The following command shows \fBpkgproto\fR accepting the output of the
+\fBfind\fR command.
+
+.sp
+.in +2
+.nf
+\fBexample% find /\fR \fB-type\fR d \fB-print\fR | pkgproto
+d none / 755 root root
+d none /bin 755 bin bin
+d none /usr 755 root root
+d none /usr/bin 775 bin bin
+d none /etc 755 root root
+d none /tmp 777 root root
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgtrans\fR(1), \fBpkgadd\fR(1M),
+\fBprototype\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5)
+.sp
+.LP
+\fIApplication Packaging Developer\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+By default, \fBpkgproto\fR creates symbolic link entries for any symbolic link
+encountered (\fBftype\fR=\fBs\fR). When you use the \fB-i\fR option,
+\fBpkgproto\fR creates a file entry for symbolic links (\fBftype\fR=\fBf\fR).
+The \fBprototype\fR(4) file would have to be edited to assign such file types
+as \fBv\fR (volatile), \fBe\fR (editable), or \fBx\fR (exclusive directory).
+\fBpkgproto\fR detects linked files. If multiple files are linked together, the
+first path encountered is considered the source of the link.
+.sp
+.LP
+By default, \fBpkgproto\fR prints prototype entries on the standard output.
+However, the output should be saved in a file (named \fBPrototype\fR or
+\fBprototype\fR, for convenience) to be used as input to the \fBpkgmk\fR(1)
+command.
diff --git a/usr/src/man/man1/pkgtrans.1 b/usr/src/man/man1/pkgtrans.1
new file mode 100644
index 0000000000..15a08dc64a
--- /dev/null
+++ b/usr/src/man/man1/pkgtrans.1
@@ -0,0 +1,404 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pkgtrans 1 "30 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+pkgtrans \- translate package format
+.SH SYNOPSIS
+.LP
+.nf
+\fBpkgtrans\fR [\fB-inosg\fR] [\fB-k\fR \fIkeystore\fR] [\fB-a\fR \fIalias\fR] [\fB-P\fR \fIpasswd\fR] \fIdevice1\fR \fIdevice2\fR
+ [\fIpkginst\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpkgtrans\fR utility translates an installable package from one format to
+another. It translates:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a file system format to a datastream
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a file system format to a signed datastream
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a datastream to a file system format
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+one file system format to another file system format
+.RE
+.SH OPTIONS
+.sp
+.LP
+The options and arguments for this command are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIalias\fR\fR
+.ad
+.RS 15n
+.rt
+Use public key certificate associated with friendlyName alias, and the
+corresponding private key. See \fBKEYSTORE LOCATIONS\fR and \fBKEYSTORE AND
+CERTIFICATE FORMATS\fR in \fBpkgadd\fR(1M) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 15n
+.rt
+Sign resulting datastream.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 15n
+.rt
+Copies only the \fBpkginfo\fR(4) and \fBpkgmap\fR(4) files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIkeystore\fR\fR
+.ad
+.RS 15n
+.rt
+Use keystore to retrieve private key used to generate signature. If it not
+specified, default locations are searched to find the specified private key
+specified by \fB-a\fR. If no alias is given, and multiple keys exist in the key
+store, \fBpkgtrans\fR will abort. See \fBKEYSTORE LOCATIONS\fR and \fBKEYSTORE
+AND CERTIFICATE FORMATS\fR in \fBpkgadd\fR(1M) for more information on search
+locations and formats.
+.sp
+When running as a user other than root, the default base directory for
+certificate searching is \fB~/.pkg/security\fR, where \fB~\fR is the home
+directory of the user invoking \fBpkgtrans\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+Creates a new instance of the package on the destination device if any instance
+of this package already exists, up to the number specified by the \fBMAXINST\fR
+variable in the \fBpkginfo\fR(4) file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 15n
+.rt
+Overwrites the same instance on the destination device. Package instance will
+be overwritten if it already exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpasswd\fR\fR
+.ad
+.RS 15n
+.rt
+Supply password used to decrypt the keystore. See \fBPASS PHRASE ARGUMENTS\fR
+in \fBpkgadd\fR(1M) for details on the syntax of the argument to this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 15n
+.rt
+Indicates that the package should be written to \fIdevice2\fR as a datastream
+rather than as a file system. The default behavior is to write a file system
+format on devices that support both formats.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevice1\fR\fR
+.ad
+.RS 11n
+.rt
+Indicates the source device. The package or packages on this device will be
+translated and placed on \fIdevice2\fR. See DEVICE SPECIFIERS, below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevice2\fR\fR
+.ad
+.RS 11n
+.rt
+Indicates the destination device. Translated packages will be placed on this
+device. See DEVICE SPECIFIERS, below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpkginst\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies which package instance or instances on \fIdevice1\fR should be
+translated. The token \fBall\fR may be used to indicate all packages.
+\fBpkginst.*\fR can be used to indicate all instances of a package. If no
+packages are defined, a prompt shows all packages on the device and asks which
+to translate.
+.sp
+The asterisk character (\fB*\fR) is a special character to some shells and may
+need to be escaped. In the C-Shell, the \fB*\fR must be surrounded by single
+quotes (\fB\&'\fR) or preceded by a backslash (\fB\e\fR).
+.RE
+
+.SH DEVICE SPECIFIERS
+.sp
+.LP
+Packaging tools, including \fBpkgtrans\fR, \fBpkgadd\fR(1M), and
+\fBpkgchk\fR(1M), have options for specifying a package location by specifying
+the device on which it resides. Listed below are the device types that a
+package can be stored to and retrieved from. Note that source and destination
+devices cannot be the same.
+.sp
+.ne 2
+.mk
+.na
+\fBdevice\fR
+.ad
+.RS 16n
+.rt
+Packages can be stored to a character or block device by specifying the device
+identifier as the device. Common examples of this device type are
+\fB/dev/rmt/0\fR for a removable magnetic tape and \fB/floppy/floppy0\fR for
+the first floppy disk on the system. \fBpkgtrans\fR can also produce regular
+file system files in a stream format, which is suitable for storage on a
+character device, web server, or as input to \fBpkgadd\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdevice alias\fR
+.ad
+.RS 16n
+.rt
+Devices that have been specified in \fB/etc/device.tab\fR are eligible for
+being the recipient or source of a package. Common examples of this type of
+device specification are \fBspool\fR (the default package device location) and
+\fBdisk1\fR. These names correspond to devices specified in
+\fB/etc/device.tab\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdirectory\fR
+.ad
+.RS 16n
+.rt
+Packages can be stored onto a directory by specifying an absolute path to a
+file system directory. The package contents reside in a directory within the
+specified directory. The package directory name must be identical to its
+\fBPKG\fR specification in the \fBpkginfo\fR(4) file. An example device
+specification of this type is \fB/export/packages\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRTranslating All Packages on the Floppy Disk
+.sp
+.LP
+The following example translates all packages on the floppy drive
+\fB/dev/diskette\fR and places the translations on \fB/tmp\fR:
+
+.sp
+.in +2
+.nf
+example% pkgtrans /dev/diskette /tmp all
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRTranslating Packages on \fB/tmp\fR
+.sp
+.LP
+The following example translates packages \fBpkg1\fR and \fBpkg2\fR on
+\fB/tmp\fR and places their translations (that is, a datastream) on the
+\fB9track1\fR output device:
+
+.sp
+.in +2
+.nf
+example% pkgtrans /tmp 9track1 pkg1 pkg2
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRTranslating Packages on \fB/tmp\fR
+.sp
+.LP
+The following example translates \fBpkg1\fR and \fBpkg2\fR on \fB/tmp\fR and
+places them on the diskette in a datastream format:
+
+.sp
+.in +2
+.nf
+example% pkgtrans -s /tmp /dev/diskette pkg1 pkg2
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRCreating a Signed Package
+.sp
+.LP
+The following example creates a signed package from \fBpkg1\fR and \fBpkg2\fR,
+and reads the password from the \fB$PASS\fR environment variable:
+
+.sp
+.in +2
+.nf
+example% pkgtrans -sg -k /tmp/keystore.p12 -a foo \e
+ -p env:PASS /tmp /tmp/signedpkg pkg1 pkg2
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRTranslating a Package Datastream
+.sp
+.LP
+The following example translates a package datastream into a file system format
+package:
+
+.sp
+.in +2
+.nf
+example% pkgtrans /tmp/pkg1.pkg ~/tmp pkg1
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+The \fBMAXINST\fR variable is set in the \fBpkginfo\fR(4) file and declares the
+maximum number of package instances.
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command-line syntax is Evolving. The digitally-signed stream package is
+Evolving.
+.SH SEE ALSO
+.sp
+.LP
+\fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
+\fBinstallf\fR(1M), \fBpkgadd\fR(1M), \fBpkgask\fR(1M), \fBpkgrm\fR(1M),
+\fBremovef\fR(1M), \fBpkginfo\fR(4), \fBpkgmap\fR(4), \fBattributes\fR(5),
+\fBlargefile\fR(5)
+.sp
+.LP
+\fIApplication Packaging Developer\&'s Guide\fR
+.SH NOTES
+.sp
+.LP
+By default, \fBpkgtrans\fR does not translate any instance of a package if any
+instance of that package already exists on the destination device. Using the
+\fB-n\fR option creates a new instance if an instance of this package already
+exists. Using the \fB-o\fR option overwrites an instance of this package if it
+already exists. Neither of these options are useful if the destination device
+is a datastream.
+.sp
+.LP
+Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
+GB in the same way they handle smaller files. In their current implementations,
+\fBpkgadd\fR(1M), \fBpkgtrans\fR and other package commands can process a
+datastream of up to 4 GB.
diff --git a/usr/src/man/man1/pktool.1 b/usr/src/man/man1/pktool.1
new file mode 100644
index 0000000000..4a1888b636
--- /dev/null
+++ b/usr/src/man/man1/pktool.1
@@ -0,0 +1,1406 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pktool 1 "23 Mar 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+pktool \- manage certificates and keys
+.SH SYNOPSIS
+.LP
+.nf
+\fBpktool\fR [\fB-f\fR \fIoption_file\fR] [\fB-i\fR] \fIsubcommand\fR \fIsubcommand_options\fR ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpktool\fR command allows users to manage the certificates and keys on
+multiple keystores including PKCS#11 tokens (that is, Cryptographic Framework),
+Netscape Security Services (NSS) tokens, and standard file based keystore for
+OpenSSL.
+.sp
+.LP
+\fBpktool\fR also provides support to list, delete and import a Certificate
+Revocation List (CRL). \fBpktool\fR does not provide support for creating CRLs,
+signing CRLs, or exporting CRLs. The CRL support for the PKCS#11 keystore is
+file-based.
+.SH OPTIONS
+.sp
+.LP
+The following command options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIoption_file\fR\fR
+.ad
+.RS 18n
+.rt
+Allows the user to set up the options in a file instead of entering the options
+on the command line.
+.sp
+This option is provided as a convenience for users because \fBpktool\fR can
+potentially have a large list of subcommands and associated options to be
+specified on the command line.
+.sp
+The format of the \fIoption_file\fR is one option or value pair per-line.
+.sp
+An example \fIoption_file\fR might looks as follows:
+.sp
+.in +2
+.nf
+list
+keystore=nss
+dir=/export/foo
+objtype=key
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 18n
+.rt
+Allows the user to specify the \fBsubject-DN\fR interactively for the
+\fBgencert\fR and \fBgencsr\fR subcommands. When \fB-i\fR is specified, the
+user is prompted to input some data to form a \fBsubject-DN\fR.
+.sp
+An example of using the \fB-i\fR option follows:
+.sp
+.in +2
+.nf
+Country Name (2 letter code) [US]:US
+State or Province Name (full name) [Some-State]:CA
+Locality Name (eg, city) []:Menlo Park
+Organization Name (eg, company):Sun Microsystems Inc.
+Organizational Unit Name (eg, section):OPG
+Common Name (eg, YOUR name):John Smith
+ Email Address []: john.smith@sun.com
+.fi
+.in -2
+.sp
+
+The resulting \fBsubject-DN\fR is:
+.sp
+.in +2
+.nf
+"C=US, ST=CA, L=Menlo Park, O=Sun Microsystems Inc.,\e
+ OU=OPG, emailAddress=john.smith@sun.com, \e
+ CN=John Smith"
+.fi
+.in -2
+.sp
+
+.RE
+
+.SH SUBCOMMANDS
+.sp
+.LP
+The following subcommands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdelete\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBdelete\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool delete [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [objtype=private|public|both]
+ [label=\fIobject-label\fR]
+
+pktool delete keystore=pkcs11
+ objtype=cert[:public | private | both]]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [label=\fIcert-label\fR]
+ [serial=\fIhex-serial-number\fR]
+ [issuer=\fIissuer-DN\fR]
+ [subject=\fIsubject-DN\fR]
+
+pktool delete keystore=nss
+ objtype=cert
+ [subject=\fIsubject-DN\fR]
+ [issuer=\fIissuer-DN\fR]
+ [serial=\fIhex-serial-number\fR]
+ [nickname=\fIcert-nickname\fR]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool delete keystore=nss
+ objtype=crl
+ [nickname=\fIcert-nickname\fR]
+ [subject=\fIsubject-DN\fR]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool delete keystore=pkcs11
+ objtype=key[:public | private | both]]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [label=\fIkey-label\fR]
+
+pktool delete keystore=pkcs11
+ objtype=crl
+ infile=\fIinput-fn\fR
+
+
+pktool delete keystore=file
+ objtype=cert
+ [infile=\fIinput-fn\fR]
+ [dir=\fIdirectory-path\fR]
+ [serial=\fIhex-serial-number\fR]
+ [issuer=\fIissuer-DN\fR]
+ [subject=\fIsubject-DN\fR]
+
+pktool delete keystore=file
+ objtype=key
+ [infile=\fIinput-fn\fR]
+ [dir=\fIdirectory-path\fR]
+
+pktool delete keystore=file
+ objtype=crl
+ infile=\fIinput-fn\fR
+
+.fi
+.in -2
+.sp
+
+Deletes a certificate, key, or certificate revocation list (CRL).
+.sp
+To delete a private certificate or key from PKCS#11 token, the user is prompted
+to authenticate to the PKCS#11 by entering the correct Personal Identification
+Number (PIN).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdownload\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBdownload\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+ pktool download url=\fIurl_str\fR
+ [objtype=crl|cert]
+ [http_proxy=\fIproxy_str\fR]
+ [outfile=\fIoutput-fn\fR]
+ [dir=\fIdirectory-path\fR]
+.fi
+.in -2
+.sp
+
+Downloads a CRL file or a certificate file from the specified URL location.
+Once the file is successfully downloaded, checks the validity of the downloaded
+CRL or certificate file. If the CRL or the certificate is expired,
+\fBdownload\fR issues a warning.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexport\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBexport\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool export [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ outfile=\fIoutput-fn\fR
+
+pktool export keystore=pkcs11
+ outfile=\fIoutput-fn\fR
+ [objtype=cert|key]
+ [label=\fIlabel\fR]
+ [subject=\fIsubject-DN\fR]
+ [issuer=\fIissuer-DN\fR]
+ [serial=\fIhex-serial-number\fR]
+ [outformat=pem|der|pkcs12|raw]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+
+pktool export keystore=nss
+ outfile=\fIoutput-fn\fR
+ [subject=\fIsubject-DN\fR]
+ [issuer=\fIissuer-DN\fR]
+ [serial=\fIhex-serial-number\fR]
+ [nickname=\fIcert-nickname\fR]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+ [outformat=pem|der|pkcs12]
+
+pktool export keystore=file
+ certfile=\fIcert-input-fn\fR
+ keyfile=\fIkey-input-fn\fR
+ outfile=\fIoutput-pkcs12-fn\fR
+.fi
+.in -2
+.sp
+
+Saves the contents of PKCS#11 token or certificates in the NSS token or
+file-based keystore to the specified file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgencert\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBgencert\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool gencert [-i] keystore=nss
+ label=\fIcert-nickname\fR
+ subject=\fIsubject-DN\fR
+ serial=\fIhex_serial_number\fR
+ [altname=[critical:]\fIsubjectAltName\fR]
+ [keyusage=[critical:]\fIusage\fR,\fIusage\fR...]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+ [keytype=rsa|dsa]
+ [keylen=\fIkey-size\fR]
+ [trust=\fItrust-value\fR]
+ [lifetime=\fInumber\fR-hour|\fInumber\fR-day|\fInumber\fR-year]
+ [eku=[critical:]\fIEKU_name,...\fR]
+
+pktool gencert [-i] [ keystore=pkcs11]
+ label=\fIkey/cert-label\fR
+ subject=\fIsubject-DN\fR
+ serial=\fIhex_serial_number\fR
+ [altname=[critical:]\fIsubjectAltName\fR]
+ [keyusage=[critical:]\fIusage\fR,\fIusage\fR...]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [keytype=rsa|dsa]
+ [keylen=\fIkey-size\fR]
+ [lifetime=\fInumber\fR-hour|\fInumber\fR-day|\fInumber\fR-year]
+ [eku=[critical:]\fIEKU_name,...\fR]
+
+pktool gencert [-i] keystore=file
+ outcert=\fIcert-fn\fR
+ outkey=\fIkey-fn\fR
+ subject=\fIsubject-DN\fR
+ serial=\fIhex_serial_number\fR
+ [altname=[critical:]\fIsubjectAltName\fR]
+ [keyusage=[critical:]\fIusage\fR,\fIusage\fR...]
+ [format=der|pem]
+ [keytype=rsa|dsa]
+ [keylen=\fIkey-size\fR]
+ [lifetime=\fInumber\fR-hour|\fInumber\fR-day|\fInumber\fR-year]
+ [eku=[critical:]\fIEKU_name,...\fR]
+.fi
+.in -2
+.sp
+
+Generates a self-signed certificate and installs it and its associated private
+key to the specified keystore.
+.sp
+\fBgencert\fR prompts the user to enter a PIN for token-based keystore.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgencsr\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBgencsr\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool gencsr [-i] keystore=nss
+ nickname=\fIkey-nickname\fR
+ outcsr=\fIcsr-fn\fR
+ subject=\fIsubject-DN\fR
+ [altname=[critical:]\fIsubjectAltName\fR]
+ [keyusage=[critical:]\fIusage\fR,\fIusage\fR...]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+ [keytype=rsa|dsa]
+ [keylen=\fIkey-size\fR]
+ [format=pem|der]
+ [eku=[critical:]\fIEKU_name,...\fR]
+
+pktool gencsr [-i] keystore=pkcs11
+ label=\fIkey-label\fR
+ outcsr=\fIcsr-fn\fR
+ subject=\fIsubject-DN\fR
+ [altname=[critical:]\fIsubjectAltName\fR]
+ [keyusage=[critical:]\fIusage\fR,\fIusage\fR...]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [keytype=rsa|dsa]
+ [keylen=\fIkey-size\fR]
+ [format=pem|der]
+ [eku=[critical:]\fIEKU_name,...\fR]
+
+pktool gencsr [-i] keystore=file
+ outcsr=\fIcsr-fn\fR
+ outkey=\fIkey-fn\fR
+ subject=\fIsubject-DN\fR
+ [altname=[critical:]\fIsubjectAltName\fR]
+ [keyusage=[critical:]\fIusage,usage...\fR]
+ [dir=\fIdirectory-path\fR]
+ [keytype=rsa|dsa]
+ [keylen=\fIkey-size\fR]
+ [format=pem|der]
+ [eku=[critical:]\fIEKU_name,...\fR]
+.fi
+.in -2
+.sp
+
+Creates a PKCS#10 certificate signing request (CSR) file. This CSR can be sent
+to a Certifying Authority (CA) for signing. The \fBgencsr\fR subcommand prompts
+the user to enter a PIN for token-based keystore.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgenkey\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBgenkey\fR subcommand is as follows:
+.sp
+\fB\fR
+.sp
+.in +2
+.nf
+pktool genkey [keystore=pkcs11]
+ label=\fIkey-label\fR
+ [keytype=aes|arcfour|des|3des|generic]
+ [keylen=\fIkey-size\fR (for aes, arcfour, or \e
+ generic keytypes only)]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [sensitive=y|n]
+ [extractable=y|n]
+ [print=y|n]
+
+pktool genkey keystore=nss
+ label=\fIkey-label\fR
+ [keytype=aes|arcfour|des|3des|generic]
+ [keylen=\fIkey-size\fR (for aes, arcfour, or \e
+ generic keytypes only)]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool genkey keystore=file
+ outkey=\fIkey-fn\fR
+ [keytype=aes|arcfour|des|3des|generic]
+ [keylen=\fIkey-size\fR (for aes, arcfour, \e
+ or generic keytypes only)]
+ [print=y|n]
+.fi
+.in -2
+.sp
+
+Generates a symmetric key in the specified keystore. The \fBgenkey\fR
+subcommand prompts the user to enter a PIN for token-based keystore.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimport\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBimport\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool import [token=\fItoken\fR>[:\fImanuf\fR>[:\fIserial\fR>]]]
+ infile=\fIinput-fn\fR
+
+pktool import [keystore=pkcs11]
+ infile=\fIinput-fn\fR
+ label=\fIobject-label\fR
+ [keytype=aes|arcfour|des|3des|generic]
+ [sensitive=y|n]
+ [extractable=y|n]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [objtype=cert|key]
+
+pktool import keystore=pkcs11
+ objtype=\fIcrl\fR
+ infile=\fIinput-fn\fR
+ outcrl=\fIoutput-crl-fn\fR
+ outformat=pem|der
+
+pktool import keystore=nss
+ objtype=\fIcert\fR
+ infile=\fIinput-fn\fR
+ label=\fIcert-label\fR
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+ [trust=\fItrust-value\fR]
+
+pktool import keystore=nss
+ objtype=crl
+ infile=\fIinput-fn\fR
+ [verifycrl=y|n]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool import keystore=file
+ infile=\fIinput-fn\fR
+ outkey=\fIoutput-key-fn\fR
+ outcert=\fIoutput-key-fn\fR
+ [outformat=pem|der]
+
+pktool import keystore=file
+ objtype=crl
+ infile=\fIinput-fn\fR
+ outcrl=\fIoutput-crl-fn\fR
+ outformat=pem|der
+.fi
+.in -2
+.sp
+
+Loads certificates, keys, or CRLs from the specified input file into the
+specified keystore.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinittoken\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBinittoken\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool inittoken [ slotid=slot number ]
+ [ currlabel=token[:manuf[:serial]]]
+ [ newlabel=new token label ]
+.fi
+.in -2
+.sp
+
+This command initializes a PKCS#11 token using \fBC_InitToken API\fR. The
+preferred method of locating a token is to specify its default label.
+Optionally, a new label can be assigned to the token by using the
+\fBnewlabel\fR argument. If \fBnewlabel\fR is not present, the token label is
+not modified. The user is prompted to enter the security officer (SO) PIN for
+this command to proceed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBlist\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool list [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [objtype=private|public|both]
+ [label=\fIlabel\fR]
+
+pktool list [keystore=pkcs11]
+ [objtype=cert[:public | private | both]]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [label=\fIcert-label\fR]
+ [serial=\fIhex-serial-number\fR]
+ [issuer=\fIissuer-DN\fR]
+ [subject=\fIsubject-DN\fR]
+
+pktool list [keystore=pkcs11]
+ objtype=key[:public | private | both]]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [label=\fIkey-label\fR]
+
+pktool list keystore=pkcs11
+ objtype=crl
+ infile=\fIinput-fn\fR
+
+pktool list keystore=nss
+ objtype=cert
+ [subject=\fIsubject-DN\fR]
+ [issuer=\fIissuer-DN\fR]
+ [serial=\fIhex-serial-number\fR]
+ [nickname=\fIcert-nickname\fR]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool list keystore=nss
+ objtype=key
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool list keystore=file
+ objtype=cert
+ [infile=\fIinput-fn\fR]
+ [dir=\fIdirectory-path\fR]
+ [serial=\fIhex-serial-number\fR]
+ [issuer=\fIissuer-DN\fR]
+ [subject=\fIsubject-DN\fR]
+
+pktool list keystore=file
+ objtype=\fIkey\fR
+ [infile=\fIinput-fn\fR]
+ [dir=\fIdirectory-path\fR]
+.fi
+.in -2
+.sp
+
+Lists certificates, list keys, or list certificate revocation lists (CRL). When
+displaying a private certificate or key in PKCS#11 token, the user is prompted
+to authenticate to the PKCS#11 token by entering the correct PIN.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsetpin\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBsetpin\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool setpin keystore=nss
+ [token=\fItoken\fR]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+
+pktool setpin [ keystore=pkcs11]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+ [usertype=user | so]
+.fi
+.in -2
+.sp
+
+Changes the passphrase used to authenticate a user to the PKCS#11 or NSS token.
+Passphrases can be any string of characters with lengths between 1 and 256 with
+no nulls.
+.sp
+\fBsetpin\fR prompts the user for the old passphrase, if any. If the old
+passphrase matches, \fBpktool\fR prompts for the new passphrase twice. If the
+two entries of the new passphrases match, it becomes the current passphrase for
+the token.
+.sp
+For the Sun Software PKCS#11 softtoken keystore (default), the user must use
+the \fBsetpin\fR command with the default passphrase \fBchangeme\fR as the old
+passphrase to change the passphrase of the object store. This action is needed
+to initialize and set the passphrase to a newly created token object store.
+.sp
+If the \fBusertype=so\fR option is specified for PKCS#11 based tokens, the
+Security Officer (SO) user PIN is changed as opposed to the normal user PIN.
+By default the \fBusertype\fR is assumed to be \fBuser\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsigncsr\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBsigncsr\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+signcsr keystore=pkcs11
+ signkey=\fIlabel\fR (label of key to use for signing)
+ csr=\fICSR_filename\fR
+ serial=\fIserial_number_hex_string_for_final_certificate\fR
+ outcert=\fIfilename_for_final_certificate\fR
+ issuer=\fIissuer-DN\fR
+ [store=y|n] (store the new cert in NSS DB, default=n)
+ [outlabel=\fIcertificate label\fR]
+ [format=pem|der] (certificate output format)
+ [subject=\fIsubject-DN\fR] (override the CSR subject name)
+ [altname=\fIsubjectAltName\fR] (add subjectAltName )
+ [keyusage=[critical:]\fIusage,...\fR] (add key usage bits)
+ [eku=[critical:]\fIEKU_Name,...\fR] (add Extended Key Usage )
+ [lifetime=\fInumber-hour\fR|\fInumber-day\fR|\fInumber-year\fR]
+ [token=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]]
+signcsr keystore=\fIfile\fR
+ signkey=\fIfilename\fR
+ csr=\fICSR_filename\fR
+ serial=\fIserial_number_hex_string_for_final_certificate\fR
+ outcert=\fIfilename_for_final_certificate\fR
+ issuer=\fIissuer-DN\fR
+ [format=pem|der] (certificate output format)
+ [subject=\fIsubject-DN\fR] (override the CSR subject name)
+ [altname=\fIsubjectAltName\fR] (add a subjectAltName)
+ [keyusage=[critical:]\fIusage,...\fR] (add key usage bits)
+ [lifetime=\fInumber-hour\fR|\fInumber-day\fR|\fInumber-year\fR]
+ [eku=[critical:]\fIEKU_ Name,...\fR] (add Extended Key Usage)
+signcsr keystore=nss
+ signkey=\fIlabel\fR (label of key to use for signing)
+ csr=\fICSR_filename\fR
+ serial=\fIserial_number_hex_string_for_final_certificate\fR
+ outcert=\fIfilename_for_final_certificate\fR
+ issuer=\fIissuer-DN\fR
+ [store=y|n] (store the new cert in NSS DB, default=n)
+ [outlabel=\fIcertificate label\fR]
+ [format=pem|der] (certificate output format)
+ [subject=\fIsubject-DN\fR] (override the CSR subject name)
+ [altname=\fIsubjectAltName\fR] (add a subjectAltName)
+ [keyusage=[critical:]\fIusage,...\fR] (add key usage bits)
+ [eku=[critical:]\fIEKU_Name,...\fR] (add Extended Key Usage)
+ [lifetime=\fInumber-hour\fR|\fInumber-day\fR|\fInumber-year\fR]
+ [token=token[\fI:manuf\fR[:\fIserial\fR]]]
+ [dir=\fIdirectory-path\fR]
+ [prefix=\fIDBprefix\fR]
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtokens\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fBtokens\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool tokens
+.fi
+.in -2
+.sp
+
+The tokens subcommand lists all visible PKCS#11 tokens.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.sp .6
+.RS 4n
+The format for the \fB\fR subcommand is as follows:
+.sp
+.in +2
+.nf
+pktool -?
+pktool --help
+.fi
+.in -2
+.sp
+
+The \fB-?\fR option displays usage and help information. \fB--help\fR is a
+synonym for \fB-?\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBpktool\fR subcommands support the following options:
+.sp
+.ne 2
+.mk
+.na
+\fBaltname=[critical:]\fIsubjectAltName\fR\fR
+.ad
+.sp .6
+.RS 4n
+Subject Alternative Names the certificate. The argument that follows the -A
+option should be in the form of tag=value. Valid tags are IP, DNS, EMAIL, URI,
+DN, KRB, UPN, and RID. The SubjectAltName extension is marked as \fBcritical\fR
+if the altname string is pre-peneded with the
+.sp
+Example 1: Add an IP address to the \fIsubjectAltName\fR extension.
+\fBaltname="IP=1.2.3.4"\fR Example 2: Add an email address to the
+\fIsubjectAltName\fR extension, and mark it as being critical.
+\fBaltname="critical:EMAIL=first.last@company.com"\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcurrlabel=token label\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option is only used by the \fBinittoken\fR command. This is used to
+locate the default token that is being initialized. See the \fBtoken\fR option
+for details about the format of the token name to be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdir=\fR\fIdirectory_path\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the NSS database directory, or OpenSSL keystore directory where the
+requested object is stored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeku\fR=[critical:]\fIEKU_Name\fR,[critical:]\fIEKU_Name, ...\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the extended key usage X.509v3 extension values to add to the
+certificate or certificate request.
+.sp
+Specify \fIEKU_Name\fR as one of the following: \fBserverAuth\fR,
+\fBclientAuth\fR, \fBcodeSigning\fR, \fBemailProtection\fR,
+\fBipsecEndSystem\fR, \fBipsecTunnel\fR, \fBipsecUser\fR, \fBtimeStamping\fR,
+\fBOCSPSigning\fR, \fBKPClientAuth\fR, \fBKPKdc\fR, or \fBscLogon\fR.
+.sp
+An example is:
+.sp
+.in +2
+.nf
+eku=KPClientAuth,clientAuth
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBextractable=y | n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the resulting symmetric key in the PKCS#11 token is extractable or
+not extractable. The valid values are: \fBy\fR and \fBn\fR. The default value
+is \fBy\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBformat=pem | der | pkcs12\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBgencert\fR subcommand, this option only applies to the file based
+keystore such as OpenSSL. It is used to specify the output format of the key or
+certificate file to be created. The valid formats are: \fBpem\fR or \fBder\fR.
+The default format is \fBpem\fR.
+.sp
+For the \fBgencsr\fR subcommand, this option specifies the output encoded
+format of the CSR file. The valid formats are: \fBpem\fR or \fBder\fR. The
+default format is \fBpem\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinfile=\fR\fIinput-fn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the certificate filename for \fBlist\fR and \fBdelete\fR subcommands
+when objtype=cert and keystore=file. For the \fBimport\fR subcommand, this
+option specifies the filename to be imported. Specifies the input CRL filename
+for \fBlist\fR, \fBdelete\fR and \fBimport\fR subcommands when
+\fBobjtype=crl\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBissuer=\fR\fIissuer-DN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the issuer of a certificate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeylen=\fR\fIkey-size\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the size (bits) of the private or symmetric key to generate.
+.sp
+For the \fBgencert\fR and \fBgencsr\fR subcommands, the default key length is
+1024 bits.
+.sp
+For the \fBgenkey\fR subcommand, the minimum and maximum bits of the symmetric
+key to generate using AES algorithm are \fB128\fR and \fB256\fR. Using the
+ARCFOUR algorithm, the minimum and maximum bits are \fB8\fR and \fB2048\fR. The
+minimum bits for a generic secret key is \fB8\fR and the maximum bits is
+arbitrary. The default key length for the AES, ARCFOUR or generic secret keys
+is 128. For a DES key or a 3DES key, the key length is fixed and this option is
+ignored if specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBkeystore=\fBnss | pkcs11 | file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the type of the underlying keystore: NSS token, PKCS#11 token, or
+file-based plugin.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeytype=rsa | dsa | aes | arcfour | des | 3des | generic\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the type of the private or symmetric key to generate.
+.sp
+For the \fBgencert\fR and \fBgencsr\fR subcommands, the valid private key types
+are: \fBrsa\fR, or \fBdsa\fR. The default key type is \fBrsa\fR.
+.sp
+For the \fBgenkey\fR subcommand, the valid symmetric key types are: \fBaes\fR,
+\fBarcfou\fRr, \fBdes\fR, \fB3des\fR, or \fBgeneric\fR. The default key type is
+\fBaes\fR.
+.sp
+.in +2
+.nf
+ keyusage=[critical:]usage,usage,usage,...
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+Key Usage strings:
+* digitalSignature
+* nonRepudiation
+* keyEncipherment
+* dataEncipherment
+* keyAgreement
+* keyCertSign
+* cRLSign
+* encipherOnly
+* decipherOnly
+.fi
+.in -2
+.sp
+
+Example 1: Set the KeyUsage so that the cert (or csr) can be used for signing
+and verifying data other than certificates or CRLs (digitalSignature) and also
+can be used for encrypting and decrypting data other than cryptographic keys
+(dataEncipherment). keyusage=digitalSignature,dataEncipherment
+.sp
+Example 2: The same as above (Example 1), but with the critical bit set.
+keyusage=critical:digitalSignature,dataEncipherment
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlabel=\fIkey-label\fR | \fIcert-label\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBgencert\fR subcommand, this option specifies the label of the
+private key and self-signed certificate in the PKCS#11 token.
+.sp
+For the \fBgencsr\fR subcommand, this option specifies the label of the private
+key in the PKCS#11 token.
+.sp
+For the \fBlist\fR subcommand, this option specifies the label of the X.509
+Certificate (when \fBobjtype=key\fR) or the private key (when
+\fBobjtype=cert\fR) in the PKCS#11 token to refine the list.
+.sp
+For the \fBdelete\fR subcommand, this option specifies the label of the X.509
+Certificate (when \fBobjtype=key\fR) or the private key (when
+\fBobjtype=cert\fR) to delete a designated object from the PKCS#11 token.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlifetime=\fInumber\fR-hour|\fInumber\fR-day|\fInumber\fR-year\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the validity period a certificate is valid. The certificate life time
+can be specified by \fInumber\fR\fB-hour\fR, \fInumber\fR\fI-day\fR, or
+\fInumber\fR\fB-year\fR. Only one format can be specified. The default is
+\fB1-year\fR. Examples of this option might be: \fBlifetime=1-hour,
+lifetime=2-day, lifetime=3-year\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnewlabel=token label\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option is only used by the \fBinittoken\fR command. This is used to
+change the label assigned to the token that is being initialized. See the
+\fBtoken\fR option for details about the format of the token name to be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnickname=\fR\fIcert-nickname\fR\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBgencert\fR subcommand, this option is required to specify the
+certificate's nickname for NSS keystore.
+.sp
+For the \fBlist\fR subcommand, this option specifies the nickname of the
+certificate in the NSS token to display its content. For the \fBdelete\fR
+subcommand, to delete a CRL from the NSS token, this option is used to specify
+the nickname of the issuer's certificate. For the \fBdelete\fR subcommand, to
+delete a certificate from the NSS token, this option specifies the nickname of
+the certificate. For the \fBimport\fR subcommand, to import a specified input
+file to the NSS token, this option is required to specify the nickname of the
+resulting certificate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBobjtype=cert | key | crl\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the class of the object: \fBcert,\fR \fBkey,\fR or \fBcrl\fR. For the
+\fBdownload\fR subcommand, if this option is not specified, default to
+\fBcrl\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBobjtype=public | private | both\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the type of object: private object, public object, or both. This
+option only applies to \fBlist\fR and \fBdelete\fR subcommands for the PKCS#11
+token when \fBobjtype=key\fR is specified. The default value is \fBpublic\fR.
+.sp
+For the \fBlist\fR subcommand, the label option can be combined with this
+option to further refine the list of keys. For the \fBdelete\fR subcommand,
+this option can used to narrow the keys to be deleted to only public, or
+private ones. Alternately, the label option can be omitted to indicate that all
+public, private, or both type of keys are to be deleted.The use of
+\fBpublic\fR, \fBprivate\fR and \fBboth\fR as choices for the \fBobjtype\fR
+parameter are only applicable with the PKCS#11 keystore in order to maintain
+compatibility with earlier versions of the \fBpktool\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutcert=\fR\fIcert-fn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the output certificate filename to write to. This option is required
+for the file based plugin such as OpenSSL. Option \fBoutkey=\fR\fIkey-fn\fR is
+required with this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutcrl=\fIoutput-crl-fn\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the output CRL filename to write to.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutcsr=\fR\fIcsr-fn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the output CSR filename to write to.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutfile=\fR\fIoutput-fn\fR\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBexport\fR subcommand, this option specifies the output filename to
+be created. For the \fBimport\fR subcommand, this option specifies the output
+filename of the certificate or CRL. It only applies to the file based plugin
+such as OpenSSL. For the \fBdownload\fR subcommand, if this option is not
+specified, the downloaded file name is the basename of the URL string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutformat=pem | der | pkcs12\fR\fR
+.ad
+.sp .6
+.RS 4n
+For the \fBimport\fR subcommand, this option specifies the output format of the
+certificate or key that is extracted from a specified PKCS#12 file into the
+file based plugin, The valid values are: \fBpem\fR or \fBder\fR. The default is
+\fBpem\fR. When importing a CRL to the CRL file based keystore, this option
+specifies the output format of the CRL. The valid values are: \fBpem\fR or
+\fBder\fR. The default is \fBder\fR. For the \fBexport\fR subcommand, this
+option specifies the format of the specified output file to be created. The
+supported formats are: \fBpem\fR, \fBder\fR or \fBpkcs12\fR. The default is
+\fBpkcs12\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutkey=\fR\fIkey-fn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the output private key filename to which to write. This option is
+only required when using the \fBfiles\fR keystore.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprefix=\fR\fIDBprefix\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the NSS database prefix. This option only applies to the NSS token.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprint=y | n\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option is used in the \fBgenkey\fR subcommand and it applies to the PKCS11
+and File-based keystores. If \fBprint=y\fR, the \fBgenkey\fR subcommand prints
+out the key value of the generated key in a single line of hex. The default
+value is \fBn\fR. For the PKCS11 keystore, if a symmetric key is created with
+\fBsensitive=y\fR or \fBextractable=n\fR, the key value is not displayed, even
+the \fBprint\fR option is set to \fBy\fR. The key is still created, but a
+warning like \fBcannot reveal the key value\fR is issued.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsensitive=y | n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the resulting symmetric key in the PKCS#11 token is sensitive or not
+sensitive. The valid values are: \fBy\fR and \fBn\fR. The default value is
+\fBn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBserial=\fR\fIhex-serial-number\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies a unique serial number for a certificate. The serial number must be
+specified as a hex value. Example: \fB0x0102030405060708090a0b0c0d0e0f\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsubject=\fR\fIsubject-DN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies a particular certificate owner for a certificate or certificate
+request. An example \fBsubject=\fR setting might be:
+.sp
+.in +2
+.nf
+subject=O=Sun Microsystems Inc., \e
+OU=Solaris Security Technologies Group, \e
+L=Ashburn, ST=VA, C=US, CN=John Smith
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtoken=\fItoken\fR[:\fImanuf\fR[:\fIserial\fR]]\fR\fR
+.ad
+.sp .6
+.RS 4n
+When a token label contains trailing spaces, this option does not require them
+to be typed as a convenience to the user.
+.sp
+Colon separate token identification string
+\fB\fItoken\fR:\fImanuf\fR:\fIserial\fR\fR. If any of the parts have a literal
+\fB:\fR char then it needs to be escaped using a backslash (\fB\e\fR). If no
+\fB:\fR is found then the entire string (up to 32 chars) is taken as the token
+label. If only one \fB:\fR is found then the string is the token label and the
+manufacturer. When \fBkeystore=nss\fR is specified, default to NSS internal
+token if this option is not specified. When \fBkeystore=pkcs11\fR is specified,
+default to \fBpkcs11_softtoken\fR if this option is not specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrust=\fItrust\fR-\fIvalue\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the certificate trust attributes. This is only for NSS certificates
+and that the standard NSS syntax applies.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBusertype=user | so\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the type of user for which the \fBsetpin\fR command is being
+performed. The default is for a standard user, but \fBso\fR can be specified
+in order to set the PIN for the security officer of the token.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBurl=\fR\fIurl_string\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the URL to download a CRL or a certificate file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverifycrl=y | n\fR\fR
+.ad
+.sp .6
+.RS 4n
+When importing a CRL to NSS keystore, this option specifies whether the CRL
+verification is performed. The valid values are: \fBy\fR and \fBn\fR. The
+default value is \fBn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhttp_proxy=\fR\fIproxy_str\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the proxy server hostname and port number. The format can be either
+\fIhttp\fR\fB://\fIhostname\fR[:\fIport\fR]\fR or
+\fIhostname\fR\fB[:\fIport\fR]\fR. If this option is not specified, the
+\fBdownload\fR subcommand checks the \fBhttp_proxy\fR environment variable. The
+command line option has a higher priority than the environment variable.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGenerating a Self-Signed Certificate
+.sp
+.LP
+The following example creates the certificate and stores it in the keystore
+indicated in the command:
+
+.sp
+.in +2
+.nf
+ $ pktool gencert keystore=nss nickname=WebServerCert \e
+ subject="O=Sun Microsystems Inc., OU=Solaris Security Technologies Group, \e
+ L=Ashburn, ST=VA, C=US, CN=John Smith" dir=/etc/certs \e
+ keytype=rsa keylen=2048
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRGenerating a Certificate Signing Request
+.sp
+.LP
+The following example creates the CSR and stores it in the keystore indicated
+in the command:
+
+.sp
+.in +2
+.nf
+ $ pktool gencsr keystore=nss subject="O=Sun Microsystems Inc., \e
+ OU=Solaris Security Technologies Group, L=Ashburn, ST=VA, C=US, \e
+ CN=John Smith" keytype=rsa keylen=2048 outcsr=csr.dat
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRImporting a Certificate
+.sp
+.LP
+The following example imports a certificate object from the specified input
+file into the keystore indicated in the command:
+
+.sp
+.in +2
+.nf
+ $ pktool import keystore=nss objtype=cert infile=mycert.pem \e
+ nickname=mycert
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5), \fBpkcs11_softtoken\fR(5)
+.sp
+.LP
+RSA PKCS#11 v2.11 http://www.rsasecurity.com
+.sp
+.LP
+RSA PKCS#12 v1.0 http://www.rsasecurity.com
diff --git a/usr/src/man/man1/plabel.1 b/usr/src/man/man1/plabel.1
new file mode 100644
index 0000000000..0428488128
--- /dev/null
+++ b/usr/src/man/man1/plabel.1
@@ -0,0 +1,121 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH plabel 1 "20 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+plabel \- get the label of a process
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/plabel\fR [\fB-sS\fR] [\fIpid\fR...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBplabel\fR, a proc tools command, gets the label of a process. If the
+\fIpid\fR is not specified, the label displayed is that of the \fBplabel\fR
+command. When options are not specified, the output format of the label is
+displayed in default format.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Display the label that is associated with \fIpid\fR in short form.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Display the label that is associated with \fIpid\fR in long form.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+\fBplabel\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Unsuccessful completion because of a usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Inability to translate label.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR\fR
+.ad
+.RS 5n
+.rt
+Inability to allocate memory.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBplabel\fR utility is Committed. The output is Not-an-Interface.
+.SH SEE ALSO
+.sp
+.LP
+\fBproc\fR(1), \fBgetplabel\fR(3TSOL), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The functionality described on this manual page is available only if the system
+is configured with Trusted Extensions.
diff --git a/usr/src/man/man1/plgrp.1 b/usr/src/man/man1/plgrp.1
new file mode 100644
index 0000000000..354bb7df3d
--- /dev/null
+++ b/usr/src/man/man1/plgrp.1
@@ -0,0 +1,375 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH plgrp 1 "8 Sep 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+plgrp \- observe and affect home lgroup and lgroup affinities of threads
+.SH SYNOPSIS
+.LP
+.nf
+\fBplgrp\fR [\fB-F\fR] [\fB-h\fR] \fIpid\fR |\fI core\fR [/\fIlwps\fR] ...
+.fi
+
+.LP
+.nf
+\fBplgrp\fR [\fB-F\fR] \fB-a\fR \fIlgroup_list\fR \fIpid\fR[/\fIlwps\fR] ...
+.fi
+
+.LP
+.nf
+\fBplgrp\fR [\fB-F\fR] \fB-H\fR \fIlgroup_list\fR \fIpid\fR[/\fIlwps\fR] ...
+.fi
+
+.LP
+.nf
+\fBplgrp\fR [\fB-F\fR] \fB-A\fR \fIlgroup_list\fR/\fInone\fR | \fIweak\fR |\fIstrong\fR [,...] \fIpid\fR
+ [/\fIlwps\fR] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBplgrp\fR displays or sets the home \fBlgroup\fR and \fBlgroup\fR affinities
+for one or more processes, threads, or LWPs.
+.sp
+.LP
+An \fBlgroup\fR represents the set of CPU and memory-like hardware devices that
+are at most some distance (latency) apart from each other. Each \fBlgroup\fR in
+the system is identified by a unique \fBlgroup\fR ID. The \fBlgroups\fR are
+organized into a hierarchy to facilitate finding the nearest resources (see
+lgrpinfo(1) for more about \fBlgroups\fR and the \fBlgroup\fR hierarchy).
+.sp
+.LP
+By default, each thread is assigned a home \fBlgroup\fR upon creation. When the
+system needs to allocate a CPU or memory resource for a thread, it searches the
+lgroup hierarchy from the thread's home \fBlgroup\fR for the nearest available
+resources to the thread's home.
+.sp
+.LP
+Typically, the home \fBlgroup\fR for a thread is the lgroup for which the
+thread has the most affinity. Initially, the system chooses a home \fBlgroup\fR
+for each thread, but leaves the thread's affinity for that \fBlgroup\fR set to
+\fBnone\fR. If a thread sets a stronger affinity for an lgroup in its processor
+set other than its home, the thread is rehomed to that lgroup as long as the
+thread is not bound to a CPU. The thread can be re-homed to the \fBlgroup\fR in
+its processor set with the next highest affinity when the affinity (if any) for
+its home \fBlgroup\fR is removed (set to \fBnone\fR).
+.sp
+.LP
+The different levels of lgroup affinities and their semantics are fully
+described in \fBlgrp_affinity_set\fR(3LGRP).
+.SH USAGE
+.SS "Specifying lgroups"
+.sp
+.LP
+\fIlgroup_list\fR is a comma separated list of one or more of the following:
+.sp
+.in +2
+.nf
+- \fIlgroup_ID\fR
+- Range of \fIlgroup_ID\fRs specified as
+ <start \fIlgroup_ID\fR>-<end \fIlgroup_ID\fR>
+- all
+- root
+- leaves
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBall\fR keyword represents all lgroup IDs in the system. The \fBroot\fR
+keyword represents the ID of the root \fBlgroup\fR. The \fBleaves\fR keyword
+represents the IDs of all \fBleaf\fR \fBlgroups\fR, that is, lgroups which do
+not have any children.
+.SS "Specifying Processes and Threads"
+.sp
+.LP
+\fBplgrp\fR takes one or more space separated processes or threads as
+arguments. Processes and threads can be specified in a manner similiar to the
+\fBproc\fR(1) tools. A process ID may be specified as an integer \fIpid\fR or
+\fB/proc/\fR\fIpid\fR. Shell expansions can be used to specify processes when
+\fB/proc/\fR\fIpid\fR is used. For example, \fB/proc/*\fR can be used to
+specify all the processes in the system. If a process ID is given alone, then
+all the threads of the process are included as arguments to \fBplgrp\fR.
+.sp
+.LP
+A thread can be explicitly specified with its process ID and thread ID given
+together as \fIpid\fR\fB/\fR\fIlwpid\fR. Multiple threads of a process can be
+selected at once by using the hyphen (\fB-\fR) and comma(\fB,\fR). For example,
+\fIpid\fR\fB/1,2,7-9\fR specifies threads 1, 2, 7, 8, and 9 of the process with
+\fIpid\fR as its process ID.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIlgroup_list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display \fBlgroup\fR affinities of specified processes or threads for the
+specified \fIlgroup_list\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fIlgroup_list\fR\fB/\fR\fInone\fR\fB|\fR\fIweak\fR\fB|\fR\fIstrong
+\fR\fB[,...]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set affinity of specified processes or threads for the specified
+\fIlgroup_list\fR.
+.sp
+A comma separated list of \fIlgroups\fR\fB/\fR\fIaffinity\fR assignments can be
+given to set several affinities at once.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.sp .6
+.RS 4n
+Force by grabbing the target process even if another process has control.
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only when the primary controlling process (typically a debugger) has
+stopped the victim process, but isn't doing anything during the application of
+this proc tool. See \fBWARNINGS\fR for more details.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.sp .6
+.RS 4n
+Get home \fBlgroup\fR of specified processes and/or threads. If no options are
+specified, this is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR \fIlgroup_list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set home \fBlgroup\fR of specified processes and threads.
+.sp
+This sets a strong affinity for the desired lgroup to rehome the threads. If
+more than one \fBlgroup\fR is specified, \fBplgrp\fR tries to home the threads
+to the \fBlgroups\fR in a round robin fashion.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIlwps\fR\fR
+.ad
+.RS 8n
+.rt
+Specifies thread. See \fBUSAGE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 8n
+.rt
+Specifies process ID. See \fBUSAGE\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGetting the Home \fBlgroup\fR for the Shell
+.sp
+.LP
+The following example gets the home \fBlgroup\fR for the shell:
+
+.sp
+.in +2
+.nf
+% plgrp $$
+PID/LWPID HOME
+3401/1 1
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSetting the Home \fBlgroup\fR of Multiple Threads to the Root
+\fBlgroup\fR
+.sp
+.LP
+The following example sets the home \fBlgroup\fR of multiple threads to the
+root \fBlgroup\fR:
+
+.sp
+.in +2
+.nf
+% plgrp -H root `pgrep firefox`
+ PID/LWPID HOME
+ 918/1 1 => 0
+ 934/1 2 => 0
+ 934/2 1 => 0
+ 934/3 2 => 0
+ 934/625 1 => 0
+ 934/626 2 => 0
+ 934/624 2 => 0
+ 934/623 2 => 0
+ 934/630 1 => 0
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRGetting Two Threads' Affinities for \fBlgroups 0-2\fR
+.sp
+.LP
+The following example gets two threads' affinities for \fBlgroups 1-2\fR:
+
+.sp
+.in +2
+.nf
+% plgrp -a 0-2 101398/1 101337/1
+PID/LWPID HOME AFFINITY
+101398/1 1 0-2/none
+101337/1 1 0-2/none
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRSetting \fBlgroup\fR Affinities
+.sp
+.LP
+The following example sets lgroup affinities:
+
+.sp
+.in +2
+.nf
+% plgrp -A 0/weak,1/none,2/strong 101398
+PID/LWPID HOME AFFINITY
+101398/1 1 => 2 0,2/none => 2/strong,0/weak
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Syntax error. Nothing was changed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Non-fatal error or interrupt. Something might have changed.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command syntax is Unstable. The output formats are Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBlgrpinfo\fR(1), \fBmadv.so.1\fR(1), \fBpmadvise\fR(1), \fBpmap\fR(1),
+\fBproc\fR(1), \fBps\fR(1), \fBprstat\fR(1M), \fBlgrp_affinity_get\fR(3LGRP),
+\fBlgrp_affinity_set\fR(3LGRP), \fBlgrp_home\fR(3LGRP), \fBliblgrp\fR(3LIB),
+\fBproc\fR(4), \fBattributes\fR(5)
+.SH WARNINGS
+.sp
+.LP
+Like the \fBproc\fR(1) tools, the \fBplgrp\fR utility stops its target
+processes while inspecting them and reports the results when invoked with any
+option.
+.sp
+.LP
+There are conditions under which processes can deadlock. A process can do
+nothing while it is stopped. Stopping a heavily used process in a production
+environment (even for a short amount of time) can cause severe bottlenecks and
+even hangs of these processes, making them to be unavailable to users. Thus,
+stopping a UNIX process in a production environment should be avoided. See
+\fBproc\fR(1).
+.sp
+.LP
+A process that is stopped by this tool might be identified by issuing the
+following command:
+.sp
+.in +2
+.nf
+/usr/bin/ps -eflL
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and looking for a \fBT\fR in the first column of the output. Certain processes,
+for example, \fBsched\fR, can show the \fBT\fR status by default most of the
+time.
diff --git a/usr/src/man/man1/plimit.1 b/usr/src/man/man1/plimit.1
new file mode 100644
index 0000000000..fb36530492
--- /dev/null
+++ b/usr/src/man/man1/plimit.1
@@ -0,0 +1,234 @@
+'\" te
+.\" Copyright (c) 1998 by Sun Microsystems, Inc. All rights reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH plimit 1 "8 Jun 1998" "SunOS 5.11" "User Commands"
+.SH NAME
+plimit \- get or set the resource limits of running processes
+.SH SYNOPSIS
+.LP
+.nf
+\fBplimit\fR [\fB-km\fR] \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fBplimit\fR {\fB-cdfnstv\fR} \fIsoft\fR,\fIhard\fR... pid...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+If one or more of the \fBcdfnstv\fR options is specified, \fBplimit\fR sets the
+soft (current) limit and/or the hard (maximum) limit of the indicated
+resource(s) in the processes identified by the process-ID list, \fIpid\fR.
+Otherwise \fBplimit\fR reports the resource limits of the processes identified
+by the process-ID list, \fIpid\fR.
+.sp
+.LP
+Only the owner of a process or the super-user is permitted either to get or to
+set the resource limits of a process. Only the super-user can increase the hard
+limit.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+On output, show file sizes in kilobytes (1024 bytes) rather than in 512-byte
+blocks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+On output, show file and memory sizes in megabytes (1024*1024 bytes).
+.RE
+
+.sp
+.LP
+The remainder of the options are used to change specified resource limits. They
+each accept an argument of the form:
+.sp
+.LP
+\fIsoft\fR,\fIhard\fR
+.sp
+.LP
+where \fIsoft\fR specifies the soft (current) limit and \fIhard\fR specifies
+the hard (maximum) limit. If the hard limit is not specified, the comma may be
+omitted. If the soft limit is an empty string, only the hard limit is set. Each
+limit is either the literal string \fBunlimited\fR, or a number, with an
+optional scaling factor, as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBk\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR kilobytes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBm\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR megabytes (minutes for CPU time)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn\fR\fBh\fR\fR
+.ad
+.RS 9n
+.rt
+\fIn\fR hours (for CPU time only)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR\fB:\fR\fIss\fR\fR
+.ad
+.RS 9n
+.rt
+minutes and seconds (for CPU time only)
+.RE
+
+.sp
+.LP
+The soft limit cannot exceed the hard limit.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set core file size limits (default unit is 512-byte blocks).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set data segment (heap) size limits (default unit is kilobytes).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set file size limits (default unit is 512-byte blocks).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set file descriptor limits (no default unit).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set stack segment size limits (default unit is kilobytes).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set CPU time limits (default unit is seconds).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fI soft,hard\fR\fR
+.ad
+.RS 16n
+.rt
+Set virtual memory size limits (default unit is kilobytes).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported.
+.sp
+.ne 2
+.mk
+.na
+\fBpid\fR
+.ad
+.RS 7n
+.rt
+Process ID list.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+\fBplimit\fR returns the exit value zero on success, non-zero on failure (such
+as no such process, permission denied, or invalid option).
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/\fR\fIpid\fR\fB/*\fR\fR
+.ad
+.RS 15n
+.rt
+process information and control files
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBulimit\fR(1), \fBproc\fR(1), \fBgetrlimit\fR(2), \fBsetrlimit\fR(2),
+\fBproc\fR(4), \fBattributes\fR(5),
diff --git a/usr/src/man/man1/pmadvise.1 b/usr/src/man/man1/pmadvise.1
new file mode 100644
index 0000000000..06e60b6e7c
--- /dev/null
+++ b/usr/src/man/man1/pmadvise.1
@@ -0,0 +1,303 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pmadvise 1 "25 Sep 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+pmadvise \- applies advice about memory to a process
+.SH SYNOPSIS
+.LP
+.nf
+\fBpmadvise\fR \fB-o\fR \fIoption\fR[,\fIoption\fR] [\fB-F\fR] [\fB-l\fR] [\fB-v\fR] \fIpid\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpmadvise\fR applies advice about how memory is used in the specified process
+using \fBmadvise\fR(3C).
+.sp
+.LP
+\fBpmadvise\fR allows users to apply advice to a specific sub-range at a
+specific instant in time. \fBpmadvise\fR differs from \fBmadv.so.1\fR(1) in
+that \fBmadv.so.1\fR(1) applies the advice throughout execution of the target
+program to all segments of a specified type.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Force by grabbing the target process even if another process has control.
+.sp
+You should exercise caution when using the \fB-F\fR option. See \fBproc\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Show unresolved dynamic linker map names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Specify advice to apply in the following form:
+.sp
+.in +2
+.nf
+private=\fBadvice\fR
+shared=\fBadvice\fR
+heap=\fBadvice\fR
+stack=\fBadvice\fR
+\fBaddress\fR[:\fBlength\fR]=\fBadvice\fR
+.fi
+.in -2
+.sp
+
+where the \fBadvice\fR can be one of the following:
+.sp
+.in +2
+.nf
+normal
+random
+sequential
+willneed
+dontneed
+free
+access_lwp
+access_many
+access_default
+.fi
+.in -2
+.sp
+
+An \fBaddress\fR and \fBlength\fR can be given to specify a subrange to apply
+the advice.The \fBaddress\fR should be hexadecimal and the \fBlength\fR should
+be in bytes by default.
+.sp
+If \fBlength\fR is not specified and the starting address refers to the start
+of a segment, the advice is applied to that segment. \fBlength\fR can be
+qualified by \fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, \fBP\fR, or \fBE\fR to specify
+kilobytes, megabytes, gigabytes, terabytes, or exabytes respectively as the
+unit of measure.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Print verbose output. Display output as \fBpmap\fR(1) does, showing what advice
+is being applied where. This can be useful when the advice is being applied to
+a named region (for example, private, shared, and so forth) to get feedback on
+exactly where the advice is being applied.
+.RE
+
+.sp
+.LP
+\fBpmadvise\fR tries to process all legal options. If an illegal address range
+is specified, an error message is printed and the offending option is skipped.
+\fBpmadvise\fR quits without processing any options and prints a usage message
+when there is a syntax error.
+.sp
+.LP
+If conflicting advice is given on a region, the order of precedence is from
+most specific advice to least, that is, most general. In other words, advice
+specified for a particuliar address range takes precedence over advice for heap
+and stack which in turn takes precedence over advice for private and shared
+memory.
+.sp
+.LP
+Moreover, the advice in each of the following groups are mutually exclusive
+from the other advice within the same group:
+.sp
+.in +2
+.nf
+MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL
+MADV_WILLNEED, MADV_DONTNEED, MADV_FREE
+MADV_ACCESS_DEFAULT, MADV_ACCESS_LWP, MADV_ACCESS_MANY
+.fi
+.in -2
+.sp
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 7n
+.rt
+Process ID.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRApplying Advice to a Segment at Specified Address
+.sp
+.LP
+The following example applies advice to a segment at a specified address:
+
+.sp
+.in +2
+.nf
+% pmap $$
+100666: tcsh
+00010000 312K r-x-- /usr/bin/tcsh
+0006C000 48K rwx-- /usr/bin/tcsh
+00078000 536K rwx-- [ heap ]
+FF100000 856K r-x-- /lib/libc.so.1
+FF1E6000 32K rwx-- /lib/libc.so.1
+FF1EE000 8K rwx-- /lib/libc.so.1
+FF230000 168K r-x-- /lib/libcurses.so.1
+FF26A000 32K rwx-- /lib/libcurses.so.1
+FF272000 8K rwx-- /lib/libcurses.so.1
+FF280000 576K r-x-- /lib/libnsl.so.1
+FF310000 40K rwx-- /lib/libnsl.so.1
+FF31A000 24K rwx-- /lib/libnsl.so.1
+FF364000 8K rwxs- [ anon ]
+FF370000 48K r-x-- /lib/libsocket.so.1
+FF38C000 8K rwx-- /lib/libsocket.so.1
+FF3A0000 8K r-x-- /platform/sun4u-us3/lib/libc_psr.so.1
+FF3B0000 176K r-x-- /lib/ld.so.1
+FF3EC000 8K rwx-- /lib/ld.so.1
+FF3EE000 8K rwx-- /lib/ld.so.1
+FFBE6000 104K rw--- [ stack ]
+%
+% pmadvise -o 78000=access_lwp $$
+
+%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing the \fB-v\fR Option
+.sp
+.LP
+The following example displays verbose output from \fBpmadvise\fR:
+
+.sp
+.in +2
+.nf
+
+% pmadvise -o heap=access_lwp,stack=access_default -v $$
+1720: -sh
+00010000 88K r-x-- /sbin/sh
+00036000 8K rwx-- /sbin/sh
+00038000 16K rwx-- [ heap ] <= access_lwp
+FF250000 24K r-x-- /lib/libgen.so.1
+FF266000 8K rwx-- /lib/libgen.so.1
+FF272000 8K rwxs- [ anon ]
+FF280000 840K r-x-- /lib/libc.so.1
+FF362000 32K rwx-- /lib/libc.so.1
+FF36A000 16K rwx-- /lib/libc.so.1
+FF380000 8K r-x-- /platform/sun4u-us3/lib/libc_psr.so.1
+FF390000 64K rwx-- [ anon ]
+FF3B0000 168K r-x-- /lib/ld.so.1
+FF3EA000 8K rwx-- /lib/ld.so.1
+FF3EC000 8K rwx-- /lib/ld.so.1
+FFBFE000 8K rw--- [ stack ] <= access_default
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnon-zero\fR\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 19n
+.rt
+Process files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/prob/lib/*\fR\fR
+.ad
+.RS 19n
+.rt
+\fBproc\fR tools support files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command syntax is Evolving. The output formats are Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBmadv.so.1\fR(1), \fBpmap\fR(1), \fBproc\fR(1), \fBmadvise\fR(3C),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/pmap.1 b/usr/src/man/man1/pmap.1
new file mode 100644
index 0000000000..8dac9903b6
--- /dev/null
+++ b/usr/src/man/man1/pmap.1
@@ -0,0 +1,1084 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pmap 1 "9 Sep 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+pmap \- display information about the address space of a process
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/pmap\fR [\fB-rslF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pmap\fR \fB-L\fR [\fB-rslF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR] ...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pmap\fR \fB-x\fR [\fB-aslF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pmap\fR \fB-S\fR [\fB-alF\fR] [\fB-A\fR \fIaddress_range\fR] [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpmap\fR utility prints information about the address space of a process.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 20n
+.rt
+Prints anonymous and swap reservations for shared mappings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fIaddress_range\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the subrange of address space to display. \fIaddress_range\fR is
+specified in one of the following forms:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstart_addr\fR\fR
+.ad
+.sp .6
+.RS 4n
+A single address limits the output to the segment (or the page if the \fB-L\fR
+option is present) containing that address. If the specified address
+corresponds to the starting address of a segment, the output always includes
+the whole segment even when the \fB-L\fR option is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstart_addr\fR\fB,\fR\fR
+.ad
+.sp .6
+.RS 4n
+An address followed by comma without the end address limits the output to all
+segments (or pages if the \fB-L\fR option is present) starting from the one
+containing the specified address.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstart_addr\fR\fB,\fR\fIend_addr\fR\fR
+.ad
+.sp .6
+.RS 4n
+An address range specified by the start address and end addresses limits the
+output to all segments (or pages if the \fB-L\fR option is present) starting
+from the segment or page containing the start address through the segment or
+page containing the end address.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB,\fR\fIend_addr\fR\fR
+.ad
+.sp .6
+.RS 4n
+An address range started with comma without the start address limits the output
+to all segments (or pages if the \fB-L\fR option is present) starting from the
+first one present until the segment (or page if the \fB-L\fR option is present)
+containing the specified address.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 20n
+.rt
+Force. Grabs the target process even if another process has control.
+.sp
+See \fBUSAGE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 20n
+.rt
+Shows unresolved dynamic linker map names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 20n
+.rt
+Prints lgroup containing physical memory that backs virtual memory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 20n
+.rt
+Prints the process's reserved addresses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 20n
+.rt
+Prints \fBHAT\fR page size information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 20n
+.rt
+Displays swap reservation information per mapping. See USAGE for more
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 20n
+.rt
+Displays additional information per mapping. See USAGE for more information.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBpmap\fR utility prints information about the address space of a process.
+.sp
+.ne 2
+.mk
+.na
+\fBProcess Mappings\fR
+.ad
+.sp .6
+.RS 4n
+.sp
+.in +2
+.nf
+/usr/bin/pmap [ -rslF ] [-A \fIaddress_range\fR] [ \fIpid\fR | \fIcore\fR ] ...
+.fi
+.in -2
+.sp
+
+By default, \fBpmap\fR displays all of the mappings in the virtual address
+order they are mapped into the process. The mapping size, flags, and mapped
+object name are shown.
+.sp
+The \fB-A\fR option can be used to limit the output to a specified address
+range. The specified addresses are rounded up or down to a segment boundary and
+the output includes the segments bounded by those addresses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBProcess Lgroup Mappings\fR
+.ad
+.sp .6
+.RS 4n
+.sp
+.in +2
+.nf
+/usr/bin/pmap -L [ -rslF ] [-A \fIaddress_range\fR] \fIpid\fR ...
+.fi
+.in -2
+.sp
+
+The \fB-L\fR option can be used to determine the lgroup containing the physical
+memory backing the specified virtual memory. When used with the \fB-A\fR
+option, the specified addresses are rounded up or down to a page boundary and
+the output is limited to the page or pages bounded by those addresses.
+.sp
+This can be used in conjunction with \fBplgrp\fR(1) to discover whether the
+home lgroup of a thread of interest is the same as where the memory is located
+and whether there should be memory locality for the thread. The
+\fBlgrpinfo\fR(1) command can also be useful with this \fBpmap\fR option. It
+displays the lgroup hierarchy, contents, and characteristics which gives more
+information about the lgroups that the memory is distributed across and their
+relationship to each other and any other lgroups of interest.
+.sp
+In addition, the thread and memory placement can be changed by using
+\fBplgrp\fR(1), \fBpmadvise\fR(1), or \fBmadv.so.1\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBProcess anon/locked mapping details\fR
+.ad
+.sp .6
+.RS 4n
+.sp
+.in +2
+.nf
+/usr/bin/pmap -x [ -aslF ] [-A \fIaddress_range\fR] [ \fIpid\fR | \fIcore\fR ] ...
+.fi
+.in -2
+.sp
+
+The \fB-x\fR option displays additional information per mapping. The size of
+each mapping, the amount of resident physical memory (RSS), the amount of
+anonymous memory, and the amount of memory locked is shown with this option.
+This does not include anonymous memory taken by kernel address space due to
+this process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSwap Reservations\fR
+.ad
+.sp .6
+.RS 4n
+.sp
+.in +2
+.nf
+/usr/bin/pmap -S [ -alF ] [-A \fIaddress_range\fR] [ \fIpid\fR | \fIcore\fR ] ...
+.fi
+.in -2
+.sp
+
+The \fB-S\fR option displays swap reservation information per mapping.
+.RE
+
+.sp
+.LP
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only if the primary controlling process, typically a debugger, has
+stopped the victim process and the primary controlling process is doing nothing
+at the moment of application of the \fBproc\fR tool in question.
+.SH DISPLAY FORMATS
+.sp
+.LP
+One line of output is printed for each mapping within the process, unless the
+-\fB-s\fR or -\fB-L\fR option is specified. With \fB-s\fR option, one line is
+printed for a contiguous mapping of each hardware translation page size. With
+\fB-L\fR option one line is printed for a contiguous mapping belonging to the
+same lgroup. With both \fB-L\fR and \fB-s\fR options, one line is printed for a
+contiguous mapping of each hardware translation page size belonging to the same
+lgroup. The column headings are shown in parentheses below.
+.sp
+.ne 2
+.mk
+.na
+\fBVirtual Address (\fBAddress\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The first column of output represents the starting virtual address of each
+mapping. Virtual addresses are displayed in ascending order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBVirtual Mapping Size (\fBKbytes\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The virtual size in kilobytes of each mapping.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBResident Physical Memory (\fBRSS\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The amount of physical memory in kilobytes that is resident for each mapping,
+including that which is shared with other address spaces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBAnonymous Memory (\fBAnon\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The number of pages, counted by using the system page size, of anonymous memory
+associated with the specified mapping. Anonymous memory shared with other
+address spaces is not included, unless the \fB-a\fR option is specified.
+.sp
+Anonymous memory is reported for the process heap, stack, for 'copy on write'
+pages with mappings mapped with \fBMAP_PRIVATE\fR (see \fBmmap\fR(2)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBLocked (\fBLocked\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The number of pages locked within the mapping. Typical examples are memory
+locked with \fBmlock()\fR and System V shared memory created with
+\fBSHM_SHARE_MMU\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBPermissions/Flags (\fBMode\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The virtual memory permissions are shown for each mapping. Valid permissions
+are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr:\fR\fR
+.ad
+.RS 6n
+.rt
+The mapping can be read by the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw:\fR\fR
+.ad
+.RS 6n
+.rt
+The mapping can be written by the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx:\fR\fR
+.ad
+.RS 6n
+.rt
+Instructions that reside within the mapping can be executed by the process.
+.RE
+
+Flags showing additional information for each mapping can be displayed:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs:\fR\fR
+.ad
+.RS 6n
+.rt
+The mapping is shared such that changes made in the observed address space are
+committed to the mapped file, and are visible from all other processes sharing
+the mapping.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBR:\fR\fR
+.ad
+.RS 6n
+.rt
+Swap space is not reserved for this mapping. Mappings created with
+\fBMAP_NORESERVE\fR and System V \fBISM\fR shared memory mappings do not
+reserve swap space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB*:\fR\fR
+.ad
+.RS 6n
+.rt
+The data for the mapping is not present in the core file (only applicable when
+applied to a core file). See \fBcoreadm\fR(1M) for information on configuring
+core file content.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBLgroup (\fBLgrp\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The lgroup containing the physical memory that backs the specified mapping.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBMapping Name (\fBMapped File\fR)\fR
+.ad
+.sp .6
+.RS 4n
+A descriptive name for each mapping. The following major types of names are
+displayed for mappings:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBA mapped file:\fR For mappings between a process and a file, the \fBpmap\fR
+command attempts to resolve the file name for each mapping. If the file name
+cannot be resolved, \fBpmap\fR displays the major and minor number of the
+device containing the file, and the file system inode number of the file.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBAnonymous memory:\fR Memory not relating to any named object or file within
+the file system is reported as \fB[ anon ]\fR.
+.sp
+The \fBpmap\fR command displays common names for certain known anonymous memory
+mappings:
+.RS
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[ heap ]\fR\fR
+.ad
+.RS 22n
+.rt
+The mapping is the process heap.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[ stack ]\fR\fR
+.ad
+.RS 22n
+.rt
+The mapping is the main stack.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[ stack tid=\fIn\fR ]\fR\fR
+.ad
+.RS 22n
+.rt
+The mapping is the stack for thread \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[ altstack tid=\fIn\fR ]\fR\fR
+.ad
+.RS 22n
+.rt
+The mapping is used as the alternate signal stack for thread \fIn\fR.
+.RE
+
+.RE
+
+If the common name for the mapping is unknown, \fBpmap\fR displays \fB[ anon
+]\fR as the mapping name.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBSystem V Shared Memory:\fR Mappings created using System V shared memory
+system calls are reported with the names shown below:
+.RS
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshmid=n:\fR\fR
+.ad
+.RS 17n
+.rt
+The mapping is a System V shared memory mapping. The shared memory identifier
+that the mapping was created with is reported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBism shmid=n:\fR\fR
+.ad
+.RS 17n
+.rt
+The mapping is an "Intimate Shared Memory" variant of System V shared memory.
+\fBISM\fR mappings are created with the \fBSHM_SHARE_MMU\fR flag set, in
+accordance with \fBshmat\fR(2) (see \fBshmop\fR(2)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdism shmid=n:\fR\fR
+.ad
+.RS 17n
+.rt
+The mapping is a pageable variant of \fBISM\fR. Pageable \fBISM\fR is created
+with the \fBSHM_PAGEABLE\fR flag set in accordance with \fBshmat\fR(2) (see
+\fBshmop\fR(2)).
+.RE
+
+.RE
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBOther:\fR Mappings of other objects, including devices such as frame
+buffers. No mapping name is shown for other mapped objects.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBPage Size (\fBPgsz\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The page size in kilobytes that is used for hardware address translation for
+this mapping. See \fBmemcntl\fR(2) for further information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBSwap Space (\fBSwap\fR)\fR
+.ad
+.sp .6
+.RS 4n
+The amount of swap space in kilobytes that is reserved for this mapping. That
+is, swap space that is deducted from the total available pool of reservable
+swap space that is displayed with the command \fBswap\fR \fB-s\fR. See
+\fBswap\fR(1M).
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying Process Mappings
+.sp
+.LP
+By default, \fBpmap\fR prints one line for each mapping within the address
+space of the target process. The following example displays the address space
+of a typical bourne shell:
+
+.sp
+.in +2
+.nf
+example$ pmap 102905
+102905: sh
+00010000 192K r-x-- /usr/bin/ksh
+00040000 8K rwx-- /usr/bin/ksh
+00042000 40K rwx-- [ heap ]
+FF180000 664K r-x-- /usr/lib/libc.so.1
+FF236000 24K rwx-- /usr/lib/libc.so.1
+FF23C000 8K rwx-- /usr/lib/libc.so.1
+FF250000 8K rwx-- [ anon ]
+FF260000 16K r-x-- /usr/lib/en_US.ISO8859-1.so.2
+FF272000 16K rwx-- /usr/lib/en_US.ISO8859-1.so.2
+FF280000 560K r-x-- /usr/lib/libnsl.so.1
+FF31C000 32K rwx-- /usr/lib/libnsl.so.1
+FF324000 32K rwx-- /usr/lib/libnsl.so.1
+FF340000 16K r-x-- /usr/lib/libc_psr.so.1
+FF350000 16K r-x-- /usr/lib/libmp.so.2
+FF364000 8K rwx-- /usr/lib/libmp.so.2
+FF380000 40K r-x-- /usr/lib/libsocket.so.1
+FF39A000 8K rwx-- /usr/lib/libsocket.so.1
+FF3A0000 8K r-x-- /usr/lib/libdl.so.1
+FF3B0000 8K rwx-- [ anon ]
+FF3C0000 152K r-x-- /usr/lib/ld.so.1
+FF3F6000 8K rwx-- /usr/lib/ld.so.1
+FFBFC000 16K rw--- [ stack ]
+ total 1880K
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDisplaying Memory Allocation and Mapping Types
+.sp
+.LP
+The \fB-x\fR option can be used to provide information about the memory
+allocation and mapping types per mapping. The amount of resident, non-shared
+anonymous, and locked memory is shown for each mapping:
+
+.sp
+.in +2
+.nf
+example$ pmap -x 102908
+102908: sh
+Address Kbytes RSS Anon Locked Mode Mapped File
+00010000 88 88 - - r-x-- sh
+00036000 8 8 8 - rwx-- sh
+00038000 16 16 16 - rwx-- [ heap ]
+FF260000 16 16 - - r-x-- en_US.ISO8859-1.so.2
+FF272000 16 16 - - rwx-- en_US.ISO8859-1.so.2
+FF280000 664 624 - - r-x-- libc.so.1
+FF336000 32 32 8 - rwx-- libc.so.1
+FF360000 16 16 - - r-x-- libc_psr.so.1
+FF380000 24 24 - - r-x-- libgen.so.1
+FF396000 8 8 - - rwx-- libgen.so.1
+FF3A0000 8 8 - - r-x-- libdl.so.1
+FF3B0000 8 8 8 - rwx-- [ anon ]
+FF3C0000 152 152 - - r-x-- ld.so.1
+FF3F6000 8 8 8 - rwx-- ld.so.1
+FFBFE000 8 8 8 - rw--- [ stack ]
+-------- ----- ----- ----- ------
+total Kb 1072 1032 56 -
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The amount of incremental memory used by each additional instance of a process
+can be estimated by using the resident and anonymous memory counts of each
+mapping.
+
+.sp
+.LP
+In the above example, the bourne shell has a resident memory size of
+1032Kbytes. However, a large amount of the physical memory used by the shell is
+shared with other instances of shell. Another identical instance of the shell
+shares physical memory with the other shell where possible, and allocate
+anonymous memory for any non-shared portion. In the above example, each
+additional bourne shell uses approximately 56Kbytes of additional physical
+memory.
+
+.sp
+.LP
+A more complex example shows the output format for a process containing
+different mapping types. In this example, the mappings are as follows:
+
+.sp
+.in +2
+.nf
+0001000: Executable text, mapped from 'maps' program
+
+0002000: Executable data, mapped from 'maps' program
+
+0002200: Program heap
+
+
+0300000: A mapped file, mapped MAP_SHARED
+0400000: A mapped file, mapped MAP_PRIVATE
+
+0500000: A mapped file, mapped MAP_PRIVATE | MAP_NORESERVE
+
+0600000: Anonymous memory, created by mapping /dev/zero
+
+0700000: Anonymous memory, created by mapping /dev/zero
+ with MAP_NORESERVE
+
+0800000: A DISM shared memory mapping, created with SHM_PAGEABLE
+ with 8MB locked via mlock(2)
+
+0900000: A DISM shared memory mapping, created with SHM_PAGEABLE,
+ with 4MB of its pages touched.
+
+0A00000: A DISM shared memory mapping, created with SHM_PAGEABLE,
+ with none of its pages touched.
+
+0B00000: An ISM shared memory mapping, created with SHM_SHARE_MMU
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+example$ pmap -x 15492
+15492: ./maps
+ Address Kbytes RSS Anon Locked Mode Mapped File
+00010000 8 8 - - r-x-- maps
+00020000 8 8 8 - rwx-- maps
+00022000 20344 16248 16248 - rwx-- [ heap ]
+03000000 1024 1024 - - rw-s- dev:0,2 ino:4628487
+04000000 1024 1024 512 - rw--- dev:0,2 ino:4628487
+05000000 1024 1024 512 - rw--R dev:0,2 ino:4628487
+06000000 1024 1024 1024 - rw--- [ anon ]
+07000000 512 512 512 - rw--R [ anon ]
+08000000 8192 8192 - 8192 rwxs- [ dism shmid=0x5]
+09000000 8192 4096 - - rwxs- [ dism shmid=0x4]
+0A000000 8192 8192 - 8192 rwxsR [ ism shmid=0x2 ]
+0B000000 8192 8192 - 8192 rwxsR [ ism shmid=0x3 ]
+FF280000 680 672 - - r-x-- libc.so.1
+FF33A000 32 32 32 - rwx-- libc.so.1
+FF390000 8 8 - - r-x-- libc_psr.so.1
+FF3A0000 8 8 - - r-x-- libdl.so.1
+FF3B0000 8 8 8 - rwx-- [ anon ]
+FF3C0000 152 152 - - r-x-- ld.so.1
+FF3F6000 8 8 8 - rwx-- ld.so.1
+FFBFA000 24 24 24 - rwx-- [ stack ]
+-------- ------- ------- ------- -------
+total Kb 50464 42264 18888 16384
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDisplaying Page Size Information
+.sp
+.LP
+The \fB-s\fR option can be used to display the hardware translation page sizes
+for each portion of the address space. (See \fBmemcntl\fR(2) for futher
+information on Solaris multiple page size support).
+
+.sp
+.LP
+In the example below, we can see that the majority of the mappings are using an
+8K-Byte page size, while the heap is using a 4M-Byte page size.
+
+.sp
+.LP
+Notice that non-contiguous regions of resident pages of the same page size are
+reported as separate mappings. In the example below, the \fBlibc.so\fR library
+is reported as separate mappings, since only some of the \fBlibc.so\fR text is
+resident:
+
+.sp
+.in +2
+.nf
+example$ pmap -xs 15492
+15492: ./maps
+ Address Kbytes RSS Anon Locked Pgsz Mode Mapped File
+00010000 8 8 - - 8K r-x-- maps
+00020000 8 8 8 - 8K rwx-- maps
+00022000 3960 3960 3960 - 8K rwx-- [ heap ]
+00400000 8192 8192 8192 - 4M rwx-- [ heap ]
+00C00000 4096 - - - - rwx-- [ heap ]
+01000000 4096 4096 4096 - 4M rwx-- [ heap ]
+03000000 1024 1024 - - 8K rw-s- dev:0,2 ino:4628487
+04000000 512 512 512 - 8K rw--- dev:0,2 ino:4628487
+04080000 512 512 - - - rw--- dev:0,2 ino:4628487
+05000000 512 512 512 - 8K rw--R dev:0,2 ino:4628487
+05080000 512 512 - - - rw--R dev:0,2 ino:4628487
+06000000 1024 1024 1024 - 8K rw--- [ anon ]
+07000000 512 512 512 - 8K rw--R [ anon ]
+08000000 8192 8192 - 8192 - rwxs- [ dism shmid=0x5 ]
+09000000 4096 4096 - - 8K rwxs- [ dism shmid=0x4 ]
+0A000000 4096 - - - - rwxs- [ dism shmid=0x2 ]
+0B000000 8192 8192 - 8192 4M rwxsR [ ism shmid=0x3 ]
+FF280000 136 136 - - 8K r-x-- libc.so.1
+FF2A2000 120 120 - - - r-x-- libc.so.1
+FF2C0000 128 128 - - 8K r-x-- libc.so.1
+FF2E0000 200 200 - - - r-x-- libc.so.1
+FF312000 48 48 - - 8K r-x-- libc.so.1
+FF31E000 48 40 - - - r-x-- libc.so.1
+FF33A000 32 32 32 - 8K rwx-- libc.so.1
+FF390000 8 8 - - 8K r-x-- libc_psr.so.1
+FF3A0000 8 8 - - 8K r-x-- libdl.so.1
+FF3B0000 8 8 8 - 8K rwx-- [ anon ]
+FF3C0000 152 152 - - 8K r-x-- ld.so.1
+FF3F6000 8 8 8 - 8K rwx-- ld.so.1
+FFBFA000 24 24 24 - 8K rwx-- [ stack ]
+ -------- ------- ------- ------- -------
+total Kb 50464 42264 18888 16384
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRDisplaying Swap Reservations
+.sp
+.LP
+The \fB-S\fR option can be used to describe the swap reservations for a
+process. The amount of swap space reserved is displayed for each mapping within
+the process. Swap reservations are reported as zero for shared mappings, since
+they are accounted for only once system wide.
+
+.sp
+.in +2
+.nf
+example$ pmap -S 15492
+15492: ./maps
+ Address Kbytes Swap Mode Mapped File
+00010000 8 - r-x-- maps
+00020000 8 8 rwx-- maps
+00022000 20344 20344 rwx-- [ heap ]
+03000000 1024 - rw-s- dev:0,2 ino:4628487
+04000000 1024 1024 rw--- dev:0,2 ino:4628487
+05000000 1024 512 rw--R dev:0,2 ino:4628487
+06000000 1024 1024 rw--- [ anon ]
+07000000 512 512 rw--R [ anon ]
+08000000 8192 - rwxs- [ dism shmid=0x5]
+09000000 8192 - rwxs- [ dism shmid=0x4]
+0A000000 8192 - rwxs- [ dism shmid=0x2]
+0B000000 8192 - rwxsR [ ism shmid=0x3]
+FF280000 680 - r-x-- libc.so.1
+FF33A000 32 32 rwx-- libc.so.1
+FF390000 8 - r-x-- libc_psr.so.1
+FF3A0000 8 - r-x-- libdl.so.1
+FF3B0000 8 8 rwx-- [ anon ]
+FF3C0000 152 - r-x-- ld.so.1
+FF3F6000 8 8 rwx-- ld.so.1
+FFBFA000 24 24 rwx-- [ stack ]
+-------- ------- -------
+total Kb 50464 23496
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The swap reservation information can be used to estimate the amount of virtual
+swap used by each additional process. Each process consumes virtual swap from a
+global virtual swap pool. Global swap reservations are reported by
+the '\fBavail\fR' field of the \fBswap\fR(1M) command.
+
+.LP
+\fBExample 5 \fRLabeling Stacks in a Multi-threaded Process
+.sp
+.in +2
+.nf
+example$ pmap 121969
+121969: ./stacks
+00010000 8K r-x-- /tmp/stacks
+00020000 8K rwx-- /tmp/stacks
+FE8FA000 8K rwx-R [ stack tid=11 ]
+FE9FA000 8K rwx-R [ stack tid=10 ]
+FEAFA000 8K rwx-R [ stack tid=9 ]
+FEBFA000 8K rwx-R [ stack tid=8 ]
+FECFA000 8K rwx-R [ stack tid=7 ]
+FEDFA000 8K rwx-R [ stack tid=6 ]
+FEEFA000 8K rwx-R [ stack tid=5 ]
+FEFFA000 8K rwx-R [ stack tid=4 ]
+FF0FA000 8K rwx-R [ stack tid=3 ]
+FF1FA000 8K rwx-R [ stack tid=2 ]
+FF200000 64K rw--- [ altstack tid=8 ]
+FF220000 64K rw--- [ altstack tid=4 ]
+FF240000 112K rw--- [ anon ]
+FF260000 16K rw--- [ anon ]
+FF270000 16K r-x-- /usr/platform/sun4u/lib/libc_psr.so.1
+FF280000 672K r-x-- /usr/lib/libc.so.1
+FF338000 24K rwx-- /usr/lib/libc.so.1
+FF33E000 8K rwx-- /usr/lib/libc.so.1
+FF35A000 8K rwxs- [ anon ]
+FF360000 104K r-x-- /usr/lib/libthread.so.1
+FF38A000 8K rwx-- /usr/lib/libthread.so.1
+FF38C000 8K rwx-- /usr/lib/libthread.so.1
+FF3A0000 8K r-x-- /usr/lib/libdl.so.1
+FF3B0000 8K rwx-- [ anon ]
+FF3C0000 152K r-x-- /usr/lib/ld.so.1
+FF3F6000 8K rwx-- /usr/lib/ld.so.1
+FFBFA000 24K rwx-- [ stack ]
+ total 1400K
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRDisplaying lgroup Memory Allocation
+.sp
+.LP
+The following example displays lgroup memory allocation by mapping:
+
+.sp
+.in +2
+.nf
+example$ pmap -L `pgrep nscd`
+100095: /usr/sbin/nscd
+00010000 8K r-x-- 2 /usr/sbin/nscd
+00012000 48K r-x-- 1 /usr/sbin/nscd
+0002E000 8K rwx-- 2 /usr/sbin/nscd
+00030000 16K rwx-- 2 [ heap ]
+00034000 8K rwx-- 1 [ heap ]
+ .
+ .
+ .
+FD80A000 24K rwx-- 2 [ anon ]
+FD820000 8K r-x-- 2 /lib/libmd5.so.1
+FD840000 16K r-x-- 1 /lib/libmp.so.2
+FD860000 8K r-x-- 2 /usr/lib/straddr.so.2
+FD872000 8K rwx-- 1 /usr/lib/straddr.so.2
+FD97A000 8K rw--R 1 [ stack tid=24 ]
+FD990000 8K r-x-- 2 /lib/nss_nis.so.1
+FD992000 16K r-x-- 1 /lib/nss_nis.so.1
+FD9A6000 8K rwx-- 1 /lib/nss_nis.so.1
+FD9C0000 8K rwx-- 2 [ anon ]
+FD9D0000 8K r-x-- 2 /lib/nss_files.so.1
+FD9D2000 16K r-x-- 1 /lib/nss_files.so.1
+FD9E6000 8K rwx-- 2 /lib/nss_files.so.1
+FDAFA000 8K rw--R 2 [ stack tid=23 ]
+FDBFA000 8K rw--R 1 [ stack tid=22 ]
+FDCFA000 8K rw--R 1 [ stack tid=21 ]
+FDDFA000 8K rw--R 1 [ stack tid=20 ]
+ .
+ .
+ .
+FEFFA000 8K rw--R 1 [ stack tid=2 ]
+FF000000 8K rwx-- 2 [ anon ]
+FF004000 16K rwx-- 1 [ anon ]
+FF00A000 16K rwx-- 1 [ anon ]
+ .
+ .
+ .
+FF3EE000 8K rwx-- 2 /lib/ld.so.1
+FFBFE000 8K rw--- 2 [ stack ]
+ total 2968K
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error has occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 19n
+.rt
+process files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/proc/lib/*\fR\fR
+.ad
+.RS 19n
+.rt
+\fBproc\fR tools supporting files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command syntax is Evolving. The \fB-L\fR option and the output formats are
+Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBldd\fR(1), \fBlgrpinfo\fR(1), \fBmadv.so.1\fR(1), \fBmdb\fR(1),
+\fBplgrp\fR(1), \fBpmadvise\fR(1), \fBproc\fR(1), \fBps\fR(1),
+\fBcoreadm\fR(1M), \fBprstat\fR(1M), \fBswap\fR(1M), \fBmmap\fR(2),
+\fBmemcntl\fR(2), \fBmeminfo\fR(2), \fBshmop\fR(2), \fBdlopen\fR(3C),
+\fBproc\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/postdaisy.1 b/usr/src/man/man1/postdaisy.1
new file mode 100644
index 0000000000..a3179cba99
--- /dev/null
+++ b/usr/src/man/man1/postdaisy.1
@@ -0,0 +1,239 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postdaisy 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+postdaisy \- PostScript translator for Diablo 630 daisy-wheel files
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostdaisy\fR [\fB-c\fR \fInum\fR] [\fB-f\fR \fInum\fR] [\fB-h\fR \fInum\fR] [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR]
+ [\fB-o\fR \fIlist\fR] [\fB-p\fR \fImode\fR] [\fB-r\fR \fInum\fR] [\fB-s\fR \fInum\fR] [\fB-v\fR \fInum \fR]
+ [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postdaisy\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpostdaisy\fR filter translates Diablo 630 daisy-wheel \fIfiles\fR into
+PostScript and writes the results on the standard output. If no \fIfiles\fR are
+specified, or if \(mi is one of the input \fIfiles\fR, the standard input is
+read.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR copies of each page. By default only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI name\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR using font \fIname\fR. Any PostScript font can be used,
+although the best results will be obtained only with constant-width fonts. The
+default font is Courier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Set the initial horizontal motion index to \fInum\fR. Determines the character
+advance and the default point size, unless the \fB-s\fR option is used. The
+default is \fB12\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Magnify each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin, which is located near the upper left corner of each page. The
+default magnification is \fB1.0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default, \fInum\fR is set to \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Print pages whose numbers are given in the comma-separated \fIlist\fR. The list
+contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi \fIN2\fR. A missing
+\fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the highest.
+The page range is an expression of logical pages rather than physical sheets of
+paper. For example, if you are printing two logical pages to a sheet, and you
+specified a range of \fB4\fR, then two sheets of paper would print, containing
+four page layouts. If you specified a page range of \fB3-4\fR, when requesting
+two logical pages to a sheet; then \fIonly\fR page 3 and page 4 layouts would
+print, and they would appear on one physical sheet of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI mode\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR in either portrait or landscape \fImode\fR. Only the first
+character of \fImode\fR is significant. The default \fImode\fR is portrait.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Selects carriage return and line feed behavior. If \fInum\fR is 1, a line feed
+generates a carriage return. If \fInum\fR is 2, a carriage return generates a
+line feed. Setting \fInum\fR to 3 enables both modes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Use point size \fInum\fR instead of the default value set by the initial
+horizontal motion index.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Set the initial vertical motion index to \fInum\fR. The default is \fB8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed near the upper left corner of the page,
+with positive x to the right and positive y down the page. Positive \fInum\fR
+moves everything right. The default offset is \fB0.25\fR inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves text up the page. The default offset is \fB\(mi0.25\fR inches.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBpostdmd\fR(1), \fBpostio\fR(1),
+\fBpostmd\fR(1), \fBpostprint\fR(1), \fBpostreverse\fR(1), \fBposttek\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/postdmd.1 b/usr/src/man/man1/postdmd.1
new file mode 100644
index 0000000000..a11c62ce07
--- /dev/null
+++ b/usr/src/man/man1/postdmd.1
@@ -0,0 +1,208 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postdmd 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+postdmd \- PostScript translator for DMD bitmap files
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostdmd\fR [\fB-b\fR \fInum\fR] [\fB-c\fR \fInum\fR] [\fB-f\fR] [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR] [\fB-o\fR \fIlist\fR]
+ [\fB-p\fR \fImode\fR] [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postdmd\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpostdmd\fR translates DMD bitmap \fIfiles\fR, as produced by \fIdmdps\fR, or
+\fIfiles\fR written in the Ninth Edition \fBbitfile\fR(9.5) format into
+PostScript and writes the results on the standard output. If no \fIfiles\fR are
+specified, or if \(mi is one of the input \fIfiles\fR, the standard input is
+read.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Pack the bitmap in the output file using \fInum\fR byte patterns. A value of
+\fB0\fR turns off all packing of the output file. By default, \fInum\fR is
+\fB6\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR copies of each page. By default only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 11n
+.rt
+Flip the sense of the bits in \fIfiles\fR before printing the bitmaps.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Magnify each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin, which by default is located at the center of each page. The
+default magnification is \fB1.0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default \fInum\fR is set to \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Print pages whose numbers are given in the comma-separated \fIlist\fR. The list
+contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi \fIN2\fR. A missing
+\fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the highest.
+The page range is an expression of logical pages rather than physical sheets of
+paper. For example, if you are printing two logical pages to a sheet, and you
+specified a range of \fB4\fR, then two sheets of paper would print, containing
+four page layouts. If you specified a page range of \fB3-4\fR, when requesting
+two logical pages to a sheet; then \fIonly\fR page 3 and page 4 layouts would
+print, and they would appear on one physical sheet of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI mode\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR in either portrait or landscape \fImode\fR. Only the first
+character of \fImode\fR is significant. The default \fImode\fR is portrait.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed at the center of the page, with positive
+x to the right and positive y up the page. Positive \fInum\fR moves everything
+right. The default offset is \fB0\fR inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves everything up the page. The default offset is \fB0\fR.
+.RE
+
+.sp
+.LP
+Only one bitmap is printed on each logical page, and each of the input
+\fIfiles\fR must contain complete descriptions of at least one bitmap.
+Decreasing the pattern size using the \fB-b\fR option may help throughput on
+printers with fast processors (such as PS-810s), while increasing the pattern
+size will often be the right move on older models (such as PS-800s).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostio\fR(1),
+\fBpostmd\fR(1), \fBpostprint\fR(1), \fBpostreverse\fR(1), \fBposttek\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/postio.1 b/usr/src/man/man1/postio.1
new file mode 100644
index 0000000000..10f3459e90
--- /dev/null
+++ b/usr/src/man/man1/postio.1
@@ -0,0 +1,323 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postio 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+postio \- serial interface for PostScript printers
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostio\fR \fB-l\fR \fIline\fR [\fB-D\fR] [\fB-i\fR] [\fB-q\fR] [\fB-t\fR] [\fB-S\fR] [\fB-b\fR \fIspeed\fR] [\fB-B\fR \fInum\fR]
+ [\fB-L\fR \fIfile\fR] [\fB-P\fR \fIstring\fR] [\fB-R\fR \fInum\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postio\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBpostio\fR sends \fIfiles\fR to the PostScript printer attached to
+\fIline.\fR If no \fIfiles\fR are specified the standard input is sent.
+.SH OPTIONS
+.sp
+.LP
+The first group of \fIoptions\fR should be sufficient for most applications:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 13n
+.rt
+Enable debug mode. Guarantees that everything read on \fBline\fR will be added
+to the log file (standard error by default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 13n
+.rt
+Prevents status queries while \fIfiles\fR are being sent to the printer. When
+status queries are disabled a dummy message is appended to the log file before
+each block is transmitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fI speed\fR\fR
+.ad
+.RS 13n
+.rt
+Transmit data over \fBline\fR at baud rate \fIspeed\fR. Recognized baud rates
+are 1200, 2400, 4800, 9600, and 19200. The default \fIspeed\fR is \fB9600\fR
+baud.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fI num\fR\fR
+.ad
+.RS 13n
+.rt
+Set the internal buffer size for reading and writing \fIfiles\fR to \fInum\fR
+bytes. By default \fInum\fR is \fB2048\fR bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI line\fR\fR
+.ad
+.RS 13n
+.rt
+Connect to the printer attached to \fBline\fR. In most cases there is no
+default and \fBpostio\fR must be able to read and write \fBline\fR. If the
+\fBline\fR does not begin with a \fB/\fR it may be treated as a Datakit
+destination.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fI file\fR\fR
+.ad
+.RS 13n
+.rt
+Data received on \fBline\fR gets put in \fBfile\fR. The default log \fBfile\fR
+is standard error. Printer or status messages that don't show a change in state
+are not normally written to \fBfile\fR but can be forced out using the \fB-D\fR
+option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fI string\fR\fR
+.ad
+.RS 13n
+.rt
+Send \fIstring\fR to the printer before any of the input files. The default
+\fIstring\fR is simple PostScript code that disables timeouts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fI num\fR\fR
+.ad
+.RS 13n
+.rt
+Run \fBpostio\fR as a single process if \fInum\fR is 1 or as separate read and
+write processes if \fInum\fR is 2. By default \fBpostio\fR runs as a single
+process.
+.RE
+
+.sp
+.LP
+The next two \fIoptions\fR are provided for users who expect to run
+\fBpostio\fR on their own. Neither is suitable for use in spooler interface
+programs:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Run the program in interactive mode. Any \fIfiles\fR are sent first and
+followed by the standard input. Forces separate read and write processes and
+overrides many other options. To exit interactive mode use your interrupt or
+quit character. To get a friendly interactive connection with the printer type
+\fBexecutive\fR on a line by itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Data received on \fBline\fR and not recognized as printer or status information
+is written to the standard output. Forces separate read and write processes.
+Convenient if you have a PostScript program that will be returning useful data
+to the host.
+.RE
+
+.sp
+.LP
+The last option is not generally recommended and should only be used if all
+else fails to provide a reliable connection:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Slow the transmission of data to the printer. Severely limits throughput, runs
+as a single process, disables the \fB-q\fR option, limits the internal buffer
+size to 1024 bytes, can use an excessive amount of CPU time, and does nothing
+in interactive mode.
+.RE
+
+.sp
+.LP
+The best performance will usually be obtained by using a large internal buffer
+(the \fB-B\fR option) and by running the program as separate read and write
+processes (the \fB\fR\fB-R\fR\fB 2\fR option). Inability to fork the additional
+process causes \fBpostio\fR to continue as a single read/write process. When
+one process is used, only data sent to the printer is flow controlled.
+.sp
+.LP
+The \fIoptions\fR are not all mutually exclusive. The \fB-i\fR option always
+wins, selecting its own settings for whatever is needed to run interactive
+mode, independent of anything else found on the command line. Interactive mode
+runs as separate read and write processes and few of the other \fIoptions\fR
+accomplish anything in the presence of the \fB-i\fR option. The \fB-t\fR option
+needs a reliable two way connection to the printer and therefore tries to force
+separate read and write processes. The \fB-S\fR option relies on the status
+query mechanism, so \fB-q\fR is disabled and the program runs as a single
+process.
+.sp
+.LP
+In most cases \fBpostio\fR starts by making a connection to \fBline\fR and then
+attempts to force the printer into the IDLE state by sending an appropriate
+sequence of \fB^T\fR (status query), \fB^C\fR (interrupt), and \fB^D\fR (end
+of job) characters. When the printer goes IDLE, \fIfiles\fR are transmitted
+along with an occasional \fB^T\fR (unless the \fB-q\fR option was used). After
+all the \fIfiles\fR are sent the program waits until it's reasonably sure the
+job is complete. Printer generated error messages received at any time except
+while establishing the initial connection (or when running interactive mode)
+cause \fB postio\fR to exit with a non-zero status. In addition to being added
+to the log file, printer error messages are also echoed to standard error.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the \fBpostio\fR command.
+.sp
+.LP
+Run as a single process at 9600 baud and send \fIfile1\fR and \fIfile2\fR to
+the printer attached to \fB/dev/tty01\fR:
+
+.sp
+.in +2
+.nf
+\fBexample% postio \fR\fB-l\fR\fB /dev/tty01 \fR\fIfile1 file2\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Same as above except two processes are used, the internal buffer is set to 4096
+bytes, and data returned by the printer gets put in file \fIlog\fR:
+
+.sp
+.in +2
+.nf
+\fBexample% postio \fR\fB-R\fR\fB 2 \fR\fB-B\fR\fB 4096 \fR\fB-l/dev/tty01\fR\fB \fR\fB-L\fR\fB \fIlog file1 file2\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Establish an interactive connection with the printer at Datakit destination
+\fImy/printer\fR:
+
+.sp
+.in +2
+.nf
+\fBexample% postio \fR\fB-i\fR\fB \fR\fB-l\fR\fB \fImy/printer\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Send file program to the printer connected to \fB/dev/tty22\fR, recover any
+data in file results, and put log messages in file \fIlog\fR:
+
+.sp
+.in +2
+.nf
+\fBexample% postio \fR\fB-t\fR\fB \fR\fB-l\fR\fB /dev/tty22 \fR\fB-L\fR\fB \fIlog program\fR >\fIresults\fR\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1),
+\fBpostmd\fR(1), \fBpostprint\fR(1), \fBpostreverse\fR(1), \fBposttek\fR(1),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The input \fIfiles\fR are handled as a single PostScript job. Sending several
+different jobs, each with their own internal end of job mark (\fB^D\fR) is not
+guaranteed to work properly. \fBpostio\fR may quit before all the jobs have
+completed and could be restarted before the last one finishes.
+.sp
+.LP
+All the capabilities described above may not be available on every machine or
+even across the different versions of the UNIX system that are currently
+supported by the program.
+.sp
+.LP
+There may be no default \fBline\fR, so using the \fB-l\fR option is strongly
+recommended. If omitted, \fBpostio\fR may attempt to connect to the printer
+using the standard output. If Datakit is involved, the \fB-b\fR option may be
+ineffective and attempts by \fBpostio\fR to impose flow control over data in
+both directions may not work. The \fB-q\fR option can help if the printer is
+connected to RADIAN. The \fB-S\fR option is not generally recommended and
+should be used only if all other attempts to establish a reliable connection
+fail.
diff --git a/usr/src/man/man1/postmd.1 b/usr/src/man/man1/postmd.1
new file mode 100644
index 0000000000..9b87bda814
--- /dev/null
+++ b/usr/src/man/man1/postmd.1
@@ -0,0 +1,347 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postmd 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+postmd \- matrix display program for PostScript printers
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostmd\fR [\fB-b\fR \fInum\fR] [\fB-c\fR \fInum\fR] [\fB-d\fR \fIdimen\fR] [\fB-g\fR \fIlist\fR] [\fB-i\fR \fIlist\fR]
+ [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR] [\fB-o\fR \fIlist\fR] [\fB-p\fR \fImode\fR] [\fB-w\fR \fI window\fR]
+ [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postmd\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpostmd\fR filter reads a series of floating point numbers from
+\fIfile\fRs, translates them into a PostScript gray scale image, and writes the
+results on the standard output. In a typical application, the numbers might be
+the elements of a large matrix, written in row major order, while the printed
+image could help locate patterns in the matrix. If no \fIfile\fRs are
+specified, or if \fB-\fR is one of the input \fIfile\fRs, the standard input is
+read.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fInum\fR\fR
+.ad
+.RS 13n
+.rt
+Packs the bitmap in the output file using \fInum\fR byte patterns. A value of
+\fB0\fR turns off all packing of the output file. By default, \fInum\fR is
+\fB6\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fInum\fR\fR
+.ad
+.RS 13n
+.rt
+Prints \fInum\fR copies of each page. By default, only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdimen\fR\fR
+.ad
+.RS 13n
+.rt
+Sets the default matrix dimensions for all input \fIfile\fRs to \fIdimen\fR.
+The \fIdimen\fR string can be given as \fIrows\fR or \fIrows\fR\fBx\fR
+\fIcolumns\fR. If \fIcolumns\fR is omitted it will be set to rows. By default,
+\fBpostmd\fR assumes each matrix is square and sets the number of rows and
+columns to the square root of the number of elements in each input file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIlist\fR\fR
+.ad
+.RS 13n
+.rt
+\fIlist\fR is a comma- or space-separated string of integers, each lying
+between 0 and 255 inclusive, that assigns PostScript gray scales to the regions
+of the real line selected by the \fB-i\fR option. 255 corresponds to white, and
+0, to black. The \fBpostmd\fR filter assigns a default gray scale that omits
+white (that is, 255) and gets darker as the regions move from left to right
+along the real line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIlist\fR\fR
+.ad
+.RS 13n
+.rt
+\fIlist\fR is a comma-, space-, or slash(\fB/\fR)-separated string of \fIN\fR
+floating point numbers that partition the real line into 2\fIN\fR+1 regions.
+The \fIlist\fR must be given in increasing numerical order. The partitions are
+used to map floating point numbers read from the input \fIfile\fRs into gray
+scale integers that are either assigned automatically by \fBpostmd\fR or
+arbitrarily selected using the \fB-g\fR option. The default interval \fIlist\fR
+is \fB-1,0,1\fR, which partions the real line into seven regions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fInum\fR\fR
+.ad
+.RS 13n
+.rt
+Magnifies each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin which, by default, is located at the center of each page. The
+default magnification is \fB1.0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInum\fR\fR
+.ad
+.RS 13n
+.rt
+Prints \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default, \fInum\fR is set to \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIlist\fR\fR
+.ad
+.RS 13n
+.rt
+Prints pages whose numbers are given in the comma separated \fIlist\fR. The
+list contains single numbers \fIN\fR and ranges \fIN1 \fR- \fIN2\fR. A missing
+\fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the highest.
+The page range is an expression of logical pages rather than physical sheets of
+paper. For example, if you are printing two logical pages to a sheet, and you
+specified a range of \fB4\fR, then two sheets of paper would print, containing
+four page layouts. If you specified a page range of \fB3-4\fR, when requesting
+two logical pages to a sheet; then \fIonly\fR page 3 and page 4 layouts would
+print, and they would appear on one physical sheet of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fImode\fR\fR
+.ad
+.RS 13n
+.rt
+Prints \fIfile\fRs in either portrait or landscape \fImode\fR. Only the first
+character of \fImode\fR is significant. The default \fImode\fR is portrait.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIwindow\fR\fR
+.ad
+.RS 13n
+.rt
+\fIwindow\fR is a comma- or space-separated list of four positive integers that
+select the upper left and lower right corners of a submatrix from each of the
+input \fIfiles\fR. Row and column indices start at \fB1\fR in the upper left
+corner and the numbers in the input \fIfile\fRs are assumed to be written in
+row major order. By default, the entire matrix is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fInum\fR\fR
+.ad
+.RS 13n
+.rt
+Translates the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed at the center of the page, with positive
+x to the right and positive y up the page. Positive \fInum\fR moves everything
+right. The default offset is \fB0\fR inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR \fI num\fR\fR
+.ad
+.RS 13n
+.rt
+Translates the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves everything up the page. The default offset is \fB0\fR.
+.RE
+
+.sp
+.LP
+Only one matrix is displayed on each logical page, and each of the input
+\fIfile\fRs must contain complete descriptions of exactly one matrix. Matrix
+elements are floating point numbers arranged in row major order in each input
+file. White space, including newlines, is not used to determine matrix
+dimensions. By default, \fBpostmd\fR assumes each matrix is square and sets the
+number of rows and columns to the square root of the number of elements in the
+input file. Supplying default dimensions on the command line with the \fB-d\fR
+option overrides this default behavior, and in that case the dimensions apply
+to all input \fIfile\fRs.
+.sp
+.LP
+An optional header can be supplied with each input file and is used to set the
+matrix dimensions, the partition of the real line, the gray scale map, and a
+window into the matrix. The header consists of keyword/value pairs, each on a
+separate line. It begins on the first line of each input file and ends with the
+first unrecognized string, which should be the first matrix element. Values set
+in the header take precedence, but apply only to the current input file.
+Recognized header keywords are \fBdimension\fR, \fBinterval\fR,
+\fBgrayscale\fR, and \fBwindow\fR. The syntax of the value string that follows
+each keyword parallels what is accepted by the \fB-d\fR, \fB-i\fR, \fB-g\fR,
+and \fB-w\fR options.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGenerating an interval list
+.sp
+.LP
+For example, suppose \fIfile\fR initially contains the 1000 numbers in a 20x50
+matrix. Then you can produce exactly the same output by completing three steps.
+
+.RS +4
+.TP
+1.
+First, issue the following command line:
+.sp
+.in +2
+.nf
+example% \fBpostmd -d20x50 -i"-100 100" -g0,128,254,128,0 file\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+2.
+Second, prepend the following header to \fBfile\fR:
+.sp
+.in +2
+.nf
+example% \fBpostmd -d20x50 -i"\(mi100 100" -g0,128,254,128,0 file\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+3.
+Third, issue the following command line:
+.sp
+.in +2
+.nf
+example% \fBpostmd file\fR
+.fi
+.in -2
+.sp
+
+.RE
+.sp
+.LP
+The interval list partitions the real line into five regions and the gray scale
+list maps numbers less than -100 or greater than 100 into 0 (that is, black),
+numbers equal to -100 or 100 into 128 (that is, 50 percent black), and numbers
+between -100 and 100 into 254 (that is, almost white).
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1), \fBpostio\fR(1),
+\fBpostprint\fR(1), \fBpostreverse\fR(1), \fBposttek\fR(1), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The largest matrix that can be adequately displayed is a function of the
+interval and gray scale lists, the printer resolution, and the paper size. A
+600 by 600 matrix is an optimistic upper bound for a two element interval list
+(that is, five regions) using 8.5 by 11 inch paper on a 300 dpi printer.
+.sp
+.LP
+Using white (that is, 255) in a gray scale list is not recommended and won't
+show up in the legend and bar graph that \fBpostmd\fR displays below each
+image.
diff --git a/usr/src/man/man1/postplot.1 b/usr/src/man/man1/postplot.1
new file mode 100644
index 0000000000..f93c5e814d
--- /dev/null
+++ b/usr/src/man/man1/postplot.1
@@ -0,0 +1,220 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postplot 1 "17 Jun 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+postplot \- PostScript translator for plot(4B) graphics files
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostplot\fR [\fB-c\fR \fInum\fR] [\fB-f\fR \fIname\fR] [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR] [\fB-o\fR \fIlist\fR]
+ [\fB-p\fR \fImode\fR] [\fB-w\fR \fInum\fR] [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fIfilename\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postplot\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpostplot\fR filter translates \fBplot\fR(1B) graphics \fIfilenames\fR
+into PostScript and writes the results on the standard output. If no
+\fIfilenames\fR are specified, or if \fB\(mi\fR is one of the input
+\fIfilenames\fR, the standard input is read.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR copies of each page. By default, only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI name\fR\fR
+.ad
+.RS 11n
+.rt
+Print text using font \fIname\fR. Any PostScript font can be used, although the
+best results will be obtained only with constant width fonts. The default font
+is Courier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Magnify each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin which, by default, is located at the center of each page. The
+default magnification is 1.0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default, \fInum\fR is set to 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Print pages whose numbers are given in the comma-separated \fIlist\fR. The list
+contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi\fI N2\fR. A missing
+\fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the highest.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI mode\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfilenames\fR in either portrait or landscape \fImode\fR. Only the
+first character of \fImode\fR is significant. The default \fImode\fR is
+landscape.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Set the line width used for graphics to \fInum\fR points, where a point is
+approximately 1/72 of an inch. By default, \fInum\fR is set to 0 points, which
+forces lines to be one pixel wide.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed at the center of the page, with positive
+x to the right and positive y up the page. Positive \fInum\fR moves everything
+right. The default offset is 0.0 inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves everything up the page. The default offset is 0.0.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+The graphics filename to be translated
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit value is returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+\fIfilename\fR(s) were successfully processed.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/postplot.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBplot\fR(1B), \fBpostdaisy\fR(1),
+\fBpostdmd\fR(1), \fBpostio\fR(1), \fBpostmd\fR(1), \fBpostprint\fR(1),
+\fBpostreverse\fR(1), \fBplot\fR(4B), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default line width is too small for write-white print engines, such as the
+one used by the PS-2400.
diff --git a/usr/src/man/man1/postprint.1 b/usr/src/man/man1/postprint.1
new file mode 100644
index 0000000000..44a7d7ea21
--- /dev/null
+++ b/usr/src/man/man1/postprint.1
@@ -0,0 +1,277 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postprint 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+postprint \- PostScript translator for text files
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostprint\fR [\fB-c\fR \fInum\fR] [\fB-f\fR \fIname\fR] [\fB-l\fR \fInum\fR] [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR]
+ [\fB-o\fR \fIlist\fR] [\fB-p\fR \fImode\fR] [\fB-r\fR \fInum\fR] [\fB-s\fR \fInum\fR] [\fB-t\fR \fI num\fR]
+ [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postprint\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpostprint\fR filter translates text \fIfiles\fR into PostScript and
+writes the results on the standard output. If no \fIfiles\fR are specified, or
+if \fB\(mi\fR is one of the input \fIfiles\fR, the standard input is read.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR copies of each page. By default, only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI name\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR using font \fIname\fR. Any PostScript font can be used,
+although the best results will be obtained only with constant width fonts. The
+default font is Courier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Set the length of a page to \fInum\fR lines. By default, \fInum\fR is \fB66\fR.
+Setting \fInum\fR to \fB0\fR is allowed, and will cause \fBpostprint\fR to
+guess a value, based on the point size that's being used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Magnify each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin, which is located near the upper left corner of each page. The
+default magnification is \fB1.0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default, \fInum\fR is set to \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Print pages whose numbers are given in the comma-separated \fIlist\fR. The
+\fIlist\fR contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi\fI N2\fR. A
+missing \fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the
+highest. The page range is an expression of logical pages rather than physical
+sheets of paper. For example, if you are printing two logical pages to a
+sheet, and you specified a range of \fB4\fR, then two sheets of paper would
+print, containing four page layouts. If you specified a page range of
+\fB3-4\fR, when requesting two logical pages to a sheet; then \fIonly\fR page
+3 and page 4 layouts would print, and they would appear on one physical sheet
+of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI mode\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR in either portrait or landscape \fImode\fR. Only the first
+character of \fImode\fR is significant. The default \fImode\fR is portrait.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Selects carriage return behavior. Carriage returns are ignored if \fInum\fR is
+\fB0\fR, cause a return to column 1 if \fInum\fR is \fB1\fR, and generate a
+newline if \fInum\fR is \fB2\fR. The default \fInum\fR is \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR using point size \fInum\fR. When printing in landscape mode
+\fInum\fR is scaled by a factor that depends on the imaging area of the device.
+The default size for portrait mode is \fB10\fR. Note that increasing point
+size increases virtual image size, so you either need to load larger paper, or
+use the \fB\(mil0\fR option to scale the number of lines per page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Assume tabs are set every \fInum\fR columns, starting with the first column. By
+default, tabs are set every \fB8\fR columns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed near the upper left corner of the page,
+with positive x to the right and positive y down the page. Positive \fInum\fR
+moves everything to the right. The default offset is \fB0.25\fR inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves text up the page. The default offset is \fB\(mi0.25\fR inches.
+.RE
+
+.sp
+.LP
+A new logical page is started after 66 lines have been printed on the current
+page, or whenever an ASCII form feed character is read. The number of lines
+per page can be changed using the \fB-l\fR option. Unprintable ASCII characters
+are ignored, and lines that are too long are silently truncated by the printer.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of \fBpostprint\fR.
+.sp
+.LP
+To print \fIfile1\fR and \fIfile2\fR in landscape mode, issue the following
+command:
+
+.sp
+.in +2
+.nf
+\fBexample% postprint \fR\fB-pland\fR\fB \fR\fIfile1 file2\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To print three logical pages on each physical page in portrait mode:
+
+.sp
+.in +2
+.nf
+\fBexample% postprint \fR\fB-n3\fR\fB \fR\fBfile\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1),
+\fBpostio\fR(1), \fBpostmd\fR(1), \fBpostreverse\fR(1), \fBposttek\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/postreverse.1 b/usr/src/man/man1/postreverse.1
new file mode 100644
index 0000000000..135a99a179
--- /dev/null
+++ b/usr/src/man/man1/postreverse.1
@@ -0,0 +1,150 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH postreverse 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+postreverse \- reverse the page order in a PostScript file
+.SH SYNOPSIS
+.LP
+.nf
+\fBpostreverse\fR [\fB-o\fR \fIlist\fR] [\fB-r\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/postreverse\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpostreverse\fR filter reverses the page order in files that conform to
+Adobe's Version 1.0 or Version 2.0 file structuring conventions, and writes the
+results on the standard output. Only one input \fBfile\fR is allowed and if no
+\fBfile\fR is specified, the standard input is read.
+.sp
+.LP
+The \fBpostreverse\fR filter can handle a limited class of files that violate
+page independence, provided all global definitions are bracketed by
+\fB%%BeginGlobal\fR and \fB%%EndGlobal\fR comments. In addition, files that
+mark the end of each page with \fB%%EndPage: label ordinal\fR comments will
+also reverse properly, provided the prologue and trailer sections can be
+located. If \fBpostreverse\fR fails to find an \fB%%EndProlog\fR or
+\fB%%EndSetup\fR comment, the entire \fBfile\fR is copied, unmodified, to the
+standard output.
+.sp
+.LP
+Because global definitions are extracted from individual pages and put in the
+prologue, the output file can be minimally conforming, even if the input
+\fBfile\fR was not.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Select pages whose numbers are given in the comma-separated \fIlist\fR. The
+\fIlist\fR contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi \fIN2\fR. A
+missing \fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the
+highest. The page range is an expression of logical pages rather than physical
+sheets of paper. For example, if you are printing two logical pages to a sheet,
+and you specified a range of \fB4\fR, then two sheets of paper would print,
+containing four page layouts. If you specified a page range of \fB3-4\fR, when
+requesting two logical pages to a sheet; then \fIonly\fR page 3 and page 4
+layouts would print, and they would appear on one physical sheet of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 11n
+.rt
+Do not reverse the pages in \fBfile\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of \fBpostreverse\fR.
+.sp
+.LP
+o select pages 1 to 100 from \fBfile\fR and reverse the pages:
+
+.sp
+.in +2
+.nf
+\fBexample% postreverse \fR\fB-o1\fR\fB\(mi100 \fR\fBfile\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To print four logical pages on each physical page and reverse all the pages:
+
+.sp
+.in +2
+.nf
+\fBexample% postprint \fR\fB-n4\fR\fB \fR\fBfile\fR | postreverse
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To produce a minimally conforming file from output generated by \fBdpost\fR
+without reversing the pages:
+
+.sp
+.in +2
+.nf
+\fBexample% dpost \fR\fBfile\fR | postreverse \fB-r\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1),
+\fBpostio\fR(1), \fBpostmd\fR(1), \fBpostprint\fR(1), \fBposttek\fR(1),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+No attempt has been made to deal with redefinitions of global variables or
+procedures. If standard input is used, the input \fBfile\fR will be read three
+times before being reversed.
diff --git a/usr/src/man/man1/posttek.1 b/usr/src/man/man1/posttek.1
new file mode 100644
index 0000000000..240160afd0
--- /dev/null
+++ b/usr/src/man/man1/posttek.1
@@ -0,0 +1,207 @@
+'\" te
+.\" from SVr4 Copyright 1989 AT&T Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH posttek 1 "9 Sep 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+posttek \- PostScript translator for Tektronix 4014 files
+.SH SYNOPSIS
+.LP
+.nf
+\fBposttek\fR [\fB-c\fR \fInum\fR] [\fB-f\fR \fIname\fR] [\fB-m\fR \fInum\fR] [\fB-n\fR \fInum\fR] [\fB-o\fR \fIlist\fR]
+ [\fB-p\fR \fImode\fR] [\fB-w\fR \fInum\fR] [\fB-x\fR \fInum\fR] [\fB-y\fR \fInum\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/lp/postscript/posttek\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBposttek\fR filter translates Tektronix 4014 graphics \fIfiles\fR into
+PostScript and writes the results on the standard output. If no \fIfiles\fR are
+specified, or if \fB\(mi\fR is one of the input \fIfiles\fR, the standard input
+is read.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR copies of each page. By default, only one copy is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI name\fR\fR
+.ad
+.RS 11n
+.rt
+Print text using font \fIname\fR. Any PostScript font can be used, although the
+best results will be obtained only with constant width fonts. The default font
+is Courier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Magnify each logical page by the factor \fInum\fR. Pages are scaled uniformly
+about the origin which, by default, is located at the center of each page. The
+default magnification is \fB1.0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fInum\fR logical pages on each piece of paper, where \fInum\fR can be
+any positive integer. By default, \fInum\fR is set to \fB1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI list\fR\fR
+.ad
+.RS 11n
+.rt
+Print pages whose numbers are given in the comma-separated \fIlist\fR. The
+\fIlist\fR contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi\fI N2\fR. A
+missing \fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the
+highest. The page range is an expression of logical pages rather than physical
+sheets of paper. For example, if you are printing two logical pages to a sheet,
+and you specified a range of \fB4\fR, then two sheets of paper would print,
+containing four page layouts. If you specified a page range of \fB 3-4\fR, when
+requesting two logical pages to a sheet; then \fIonly\fR page 3 and page 4
+layouts would print, and they would appear on one physical sheet of paper.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI mode\fR\fR
+.ad
+.RS 11n
+.rt
+Print \fIfiles\fR in either portrait or landscape \fImode\fR. Only the first
+character of \fImode\fR is significant. The default \fImode\fR is landscape.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Set the line width used for graphics to \fInum\fR points, where a point is
+approximately 1/72 of an inch. By default, \fInum\fR is set to \fB0\fR points,
+which forces lines to be one pixel wide.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive x axis. The default
+coordinate system has the origin fixed at the center of the page, with positive
+x to the right and positive y up the page. Positive \fInum\fR moves everything
+right. The default offset is \fB0.0\fR inches.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fI num\fR\fR
+.ad
+.RS 11n
+.rt
+Translate the origin \fInum\fR inches along the positive y axis. Positive
+\fInum\fR moves everything up the page. The default offset is \fB0.0\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/forms.ps\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/lp/postscript/ps.requests\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdownload\fR(1), \fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1),
+\fBpostio\fR(1), \fBpostmd\fR(1), \fBpostprint\fR(1), \fBpostreverse\fR(1),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The default line width is too small for write-white print engines, such as the
+one used by the PS-2400.
diff --git a/usr/src/man/man1/ppgsz.1 b/usr/src/man/man1/ppgsz.1
new file mode 100644
index 0000000000..fcd43b778d
--- /dev/null
+++ b/usr/src/man/man1/ppgsz.1
@@ -0,0 +1,298 @@
+'\" te
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ppgsz 1 "23 Jan 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+ppgsz \- set preferred page size for stack, heap, and/or other anonymous
+segments
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ppgsz\fR [\fB-F\fR] \fB-o\fR \fIoption\fR[,\fIoption\fR] \fIcmd\fR | \fB-p\fR \fIpid\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBppgsz\fR utility sets the preferred page size for stack, heap, and/or
+other anonymous segments for the target process(es), that is, the launched
+\fIcmd\fR or the process(es) in the pid list. \fBppgsz\fR stops the target
+process(es) while changing the page size. See \fBmemcntl\fR(2).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 22n
+.rt
+Force. Sets the preferred page size options(s) for target process(es) even if
+controlled by other process(es). Caution should be exercised when using the
+\fB-F\fR flag. See \fBproc\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR[,\fIoption\fR]\fR
+.ad
+.RS 22n
+.rt
+The \fIoption\fRs are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBheap\fR=\fIsize\fR\fR
+.ad
+.RS 14n
+.rt
+This option specifies the preferred page size for the heap of the target
+process(es). \fBheap\fR is defined to be the bss (uninitialized data) and the
+brk area that immediately follows the bss (see \fBbrk\fR(2)). The preferred
+heap page size is set for the existing heap and for any additional heap memory
+allocated in the future. See NOTES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstack\fR=\fIsize\fR\fR
+.ad
+.RS 14n
+.rt
+This option specifies the preferred page size for the stack of the target
+process(es). The preferred stack page size is set for the existing stack and
+newly allocated parts of the stack as it expands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBanon\fR=\fIsize\fR\fR
+.ad
+.RS 14n
+.rt
+This option specifies the preferred page size for all existing
+\fBMAP_PRIVATE\fR anonymous segments of the target process(es), other than
+\fBheap\fR and \fBstack\fR, which are large enough to fit at least one aligned
+page of the specified size. For the segments that are large enough, the
+preferred page size is set starting at the first size-aligned address in the
+segment. The \fBanon\fR preferred pagesize is not applied to \fBMAP_PRIVATE\fR
+anonymous segments created in the future. See \fBMAP_ANON\fR in \fBmmap\fR(2).
+.sp
+Anonymous memory refers to \fBMAP_PRIVATE\fR pages that are not directly
+associated with a file in some filesystem. The \fBppgsz\fR command uses
+\fBmemcntl\fR(2) to set the preferred page size for anonymous segments. See
+\fBMC_HAT_ADVISE\fR in \fBmemcntl\fR(2).
+.RE
+
+At least one of the above options must be specified.
+.sp
+\fIsize\fR must be a supported page size (see \fBpagesize\fR(1)) or \fB0\fR, in
+which case the system will select an appropriate page size. See
+\fBmemcntl\fR(2).
+.sp
+\fIsize\fR defaults to bytes and can be specified in octal (\fB0\fR), decimal,
+or hexadecimal (\fB0x\fR). The numeric value can be qualified with \fBK\fR,
+\fBM\fR, \fBG\fR, or \fBT\fR to specify Kilobytes, Megabytes, Gigabytes, or
+Terabytes, respectively. \fB4194304\fR, \fB0x400000\fR, \fB4096K\fR,
+\fB0x1000K\fR, and \fB4M\fR are different ways to specify 4 Megabytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpid\fR\fR
+.ad
+.RS 22n
+.rt
+Sets the preferred page size option(s) for the target process(es) in the
+process-id (\fIpid\fR) list following the \fB-p\fR option. The pid list can
+also consist of names in the \fB/proc\fR directory. Only the process owner or
+the super-user is permitted to set page size.
+.sp
+\fIcmd\fR is interpreted if \fB-p\fR is not specified. \fBppgsz\fR launches
+\fIcmd\fR and applies page size option(s) to the new process.
+.sp
+The heap and stack preferred page sizes are inherited. Child process(es)
+created (see \fBfork\fR(2)) from the launched process or the target process(es)
+in the pid list after \fBppgsz\fR completes will inherit the preferred heap and
+stack page sizes. The preferred page sizes of all segments are set back to the
+default system page size on \fBexec\fR(2) (see \fBgetpagesize\fR(3C)). The
+preferred page size for all other anonymous segments is not inherited by
+children of the launched or target process(es).
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSetting the preferred heap and stack page size
+.sp
+.LP
+The following example sets the preferred heap page size to \fB4M\fR and the
+preferred stack page size to \fB512K\fR for all \fBora\fR\(emowned processes
+running commands that begin with \fBora\fR:
+
+.sp
+.in +2
+.nf
+example% \fBppgsz -o heap=4M,stack=512K -p `pgrep -u ora '^ora'`\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSetting the preferred anonymous page size
+.sp
+.LP
+The following example sets the preferred page size of existing qualifying
+anonymous segments to \fB512k\fR for process ID \fB953\fR:
+
+.sp
+.in +2
+.nf
+example% \fBppgsz -o anon=512k -p 953\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+If \fIcmd\fR is specified and successfully invoked (see \fBexec\fR(2)), the
+exit status of \fBppgsz\fR will be the exit status of \fIcmd\fR. Otherwise,
+\fBppgsz\fR will exit with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successfully set preferred page size(s) for processes in the pid list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB125\fR\fR
+.ad
+.RS 7n
+.rt
+An error occurred in \fBppgsz\fR. Errors include: invalid argument, invalid
+page size(s) specified, and failure to set preferred page size(s) for one or
+more processes in the pid list or \fIcmd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcmd\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 7n
+.rt
+\fIcmd\fR could not be found.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR \fR
+.ad
+.RS 29n
+.rt
+Process files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/ld/map.bssalign\fR \fR
+.ad
+.RS 29n
+.rt
+A template link-editor \fBmapfile\fR for aligning bss (see NOTES).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBld\fR(1), \fBmpss.so.1\fR(1), \fBpagesize\fR(1), \fBpgrep\fR(1),
+\fBpmap\fR(1), \fBproc\fR(1), \fBbrk\fR(2), \fBexec\fR(2), \fBfork\fR(2),
+\fBmemcntl\fR(2), \fBmmap\fR(2), \fBsbrk\fR(2), \fBgetpagesize\fR(3C),
+\fBproc\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
+.SH NOTES
+.sp
+.LP
+Due to resource constraints, the setting of the preferred page size does not
+necessarily guarantee that the target process(es) will get the preferred page
+size. Use \fBpmap\fR(1) to view the \fBactual\fR heap and stack page sizes of
+the target process(es) (see \fBpmap\fR \fB-s\fR option).
+.sp
+.LP
+Large pages are required to be mapped at addresses that are multiples of the
+size of the large page. Given that the heap is typically not large page
+aligned, the starting portions of the heap (below the first large page aligned
+address) are mapped with the system memory page size. See
+\fBgetpagesize\fR(3C).
+.sp
+.LP
+To provide a heap that will be mapped with a large page size, an application
+can be built using a link-editor (\fBld\fR(1)) \fBmapfile\fR containing the
+\fBbss\fR segment declaration directive. Refer to the section Mapfile Option in
+the \fILinker and Libraries Guide\fR for more details of this directive and the
+template \fBmapfile\fR provided in \fB/usr/lib/ld/map.bssalign\fR. Users are
+cautioned that an alignment specification may be machine-specific and may lose
+its benefit on different hardware platforms. A more flexible means of
+requesting the most optimal underlying page size may evolve in future releases.
+.sp
+.LP
+\fBmpss.so.1\fR(1), a preloadable shared object, can also be used to set the
+preferred stack and/or heap page sizes.
diff --git a/usr/src/man/man1/ppriv.1 b/usr/src/man/man1/ppriv.1
new file mode 100644
index 0000000000..0090f4d81d
--- /dev/null
+++ b/usr/src/man/man1/ppriv.1
@@ -0,0 +1,411 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ppriv 1 "24 Feb 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+ppriv \- inspect or modify process privilege sets and attributes
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ppriv\fR \fB-e\fR [\fB-D\fR | \fB-N\fR] [\fB-M\fR] [\fB-s\fR \fIspec\fR] \fIcommand\fR [\fIarg\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ppriv\fR [\fB-v\fR] [\fB-S\fR] [\fB-D\fR | \fB-N\fR] [\fB-s\fR \fIspec\fR]
+ [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ppriv\fR \fB-l\fR [\fB-v\fR] [\fIprivilege-specification\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The first invocation of the \fBppriv\fR command runs the \fIcommand\fR
+specified with the privilege sets and flags modified according to the arguments
+on the command line.
+.sp
+.LP
+The second invocation examines or changes the privilege state of running
+process and core files.
+.sp
+.LP
+The third invocation lists the privileges defined and information about
+specified privileges or privileges set specifications.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 11n
+.rt
+Turns on privilege debugging for the processes or command supplied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 11n
+.rt
+Interprets the remainder of the arguments as a command line and runs the
+command line with specified privilege attributes and sets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 11n
+.rt
+Lists all currently defined privileges on stdout.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.RS 11n
+.rt
+When a system is configured with Trusted Extensions, this option turns on the
+\fBNET_MAC_AWARE\fR and \fBNET_MAC_AWARE_INHERIT\fR process attributes.
+.sp
+A process with these attributes and the \fBnet_mac_aware\fR privilege can
+communicate with lower-level remote peers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR\fR
+.ad
+.RS 11n
+.rt
+Turns off privilege debugging for the processes or command supplied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIspec\fR\fR
+.ad
+.RS 11n
+.rt
+Modifies a process's privilege sets according to \fIspec\fR, a specification
+with the format \fB[AEILP][+-=]\fR\fIprivsetspec\fR, containing no spaces,
+where:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBAEILP\fR\fR
+.ad
+.RS 15n
+.rt
+Indicates one or more letters indicating which privilege sets to change. These
+are case insensitive, for example, either \fBa\fR or \fBA\fR indicates all
+privilege sets.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+-=\fR\fR
+.ad
+.RS 15n
+.rt
+Indicates a modifier to respectively add (\fB+\fR), remove (\fB-\fR), or assign
+(\fB=\fR) the listed privileges to the specified set(s) in \fIprivsetspec\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprivsetspec\fR\fR
+.ad
+.RS 15n
+.rt
+Indicates a comma-separated privilege set specification
+(\fBpriv1\fR,\fBpriv2\fR, and so on), as described in
+\fBpriv_str_to_set\fR(3C).
+.RE
+
+Modifying the same set with multiple \fB-s\fR options is possible as long as
+there is either precisely one assignment to an individual set or any number of
+additions and removals. That is, assignment and addition or removal for one set
+are mutually exclusive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 11n
+.rt
+Short. Reports the shortest possible output strings for sets. The default is
+portable output. See \fBpriv_str_to_set\fR(3C).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 11n
+.rt
+Verbose. Reports privilege sets using privilege names.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBppriv\fR utility examines processes and core files and prints or changes
+their privilege sets.
+.sp
+.LP
+\fBppriv\fR can run commands with privilege debugging on or off or with fewer
+privileges than the invoking process.
+.sp
+.LP
+When executing a sub process, the only sets that can be modified are \fBL\fR
+and \fBI\fR. Privileges can only be removed from \fBL\fR and \fBI\fR as
+\fBppriv\fR starts with \fBP=E=I\fR.
+.sp
+.LP
+\fBppriv\fR can also be used to remove privileges from processes or to convey
+privileges to other processes. In order to control a process, the effective set
+of the \fBppriv\fR utility must be a super set of the controlled process's
+\fBE\fR, \fBI\fR, and \fBP\fR. The utility's limit set must be a super set of
+the target's limit set. If the target's process uids do not match, the
+\fB{PRIV_PROC_OWNER}\fR privilege must be asserted in the utility's effective
+set. If the controlled processes have any uid with the value \fB0\fR, more
+restrictions might exist. See \fBprivileges\fR(5).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRObtaining the Process Privileges of the Current Shell
+.sp
+.LP
+The following example obtains the process privileges of the current shell:
+
+.sp
+.in +2
+.nf
+example$ \fBppriv $$\fR
+387: -sh
+flags = <none>
+ E: basic
+ I: basic
+ P: basic
+ L: all
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRRemoving a Privilege From Your Shell's Inheritable and
+Effective Set
+.sp
+.LP
+The following example removes a privilege from your shell's inheritable and
+effective set.
+
+.sp
+.in +2
+.nf
+example$ \fBppriv -s EI-proc_session $$\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The subprocess can still inspect the parent shell but it can no longer
+influence the parent because the parent has more privileges in its Permitted
+set than the \fBppriv\fR child process:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -p $$\fR
+truss: permission denied: 387
+
+example$ \fBppriv $$\fR
+387: -sh
+flags = <none>
+ E: basic,!proc_session
+ I: basic,!proc_session
+ P: basic
+ L: all
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRRunning a Process with Privilege Debugging
+.sp
+.LP
+The following example runs a process with privilege debugging:
+
+.sp
+.in +2
+.nf
+example$ \fBppriv -e -D cat /etc/shadow\fR
+cat[418]: missing privilege "file_dac_read" (euid = 21782),
+ needed at ufs_access+0x3c
+cat: cannot open /etc/shadow
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The privilege debugging error messages are sent to the controlling terminal of
+the current process. The \fBneeded at\fR address specification is an artifact
+of the kernel implementation and it can be changed at any time after a software
+update.
+
+.sp
+.LP
+The system call number can be mapped to a system call using
+\fB/etc/name_to_sysnum\fR.
+
+.LP
+\fBExample 4 \fRListing the Privileges Available in the Current Zone
+.sp
+.LP
+The following example lists the privileges available in the current zone (see
+\fBzones\fR(5)). When run in the global zone, all defined privileges are
+listed.
+
+.sp
+.in +2
+.nf
+example$ \fBppriv -l zone\fR
+ ... listing of all privileges elided ...
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRExamining a Privilege Aware Process
+.sp
+.LP
+The following example examines a privilege aware process:
+
+.sp
+.in +2
+.nf
+example$ \fBppriv -S `pgrep rpcbind`\fR
+
+
+928: /usr/sbin/rpcbind
+flags = PRIV_AWARE
+ E: net_privaddr,proc_fork,sys_nfs
+ I: none
+ P: net_privaddr,proc_fork,sys_nfs
+ L: none
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+See \fBsetpflags\fR(2) for explanations of the flags.
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error has occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 23n
+.rt
+Process files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/name_to_sysnum\fR\fR
+.ad
+.RS 23n
+.rt
+system call name to number mapping
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The invocation is Committed. The output is Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBgcore\fR(1), \fBtruss\fR(1), \fBsetpflags\fR(2), \fBpriv_str_to_set\fR(3C),
+\fBproc\fR(4), \fBattributes\fR(5), \fBprivileges\fR(5), \fBzones\fR(5)
diff --git a/usr/src/man/man1/pr.1 b/usr/src/man/man1/pr.1
new file mode 100644
index 0000000000..9b955e68b6
--- /dev/null
+++ b/usr/src/man/man1/pr.1
@@ -0,0 +1,492 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pr 1 "18 Mar 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+pr \- print files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/pr\fR [+ \fIpage\fR] [\fB-column\fR] [\fB-adFmrt\fR] [\fB-e\fR [\fIchar\fR] [\fIgap\fR]]
+ [\fB-h\fR \fIheader\fR] [\fB-i\fR [\fIchar\fR] [\fIgap\fR]] [\fB-l\fR \fIlines\fR]
+ [\fB-n\fR [\fIchar\fR] [\fIwidth\fR]] [\fB-o\fR \fIoffset\fR] [\fB-s\fR [\fIchar\fR]]
+ [\fB-w\fR \fIwidth\fR] [\fB-fp\fR] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/pr\fR [+ \fIpage\fR] [\fB-column\fR | \fB-c\fR \fIcolumn\fR] [\fB-adFmrt\fR]
+ [\fB-e\fR [\fIchar\fR] [\fIgap\fR]] [\fB-h\fR \fIheader\fR] [\fB-i\fR [\fIchar\fR] [\fIgap\fR]]
+ [\fB-l\fR \fIlines\fR] [\fB-n\fR [\fIchar\fR] [\fIwidth\fR]] [\fB-o\fR \fIoffset\fR]
+ [\fB-s\fR [\fIchar\fR]] [\fB-w\fR \fIwidth\fR] [\fB-fp\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpr\fR utility is a printing and pagination filter. If multiple input
+files are specified, each is read, formatted, and written to standard output.
+By default, the input is separated into 66-line pages, each with:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a 5-line header that includes the page number, date, time and the path name of
+the file
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a 5-line trailer consisting of blank lines
+.RE
+.sp
+.LP
+If standard output is associated with a terminal, diagnostic messages will be
+deferred until the \fBpr\fR utility has completed processing.
+.sp
+.LP
+When options specifying multi-column output are specified, output text columns
+will be of equal width; input lines that do not fit into a text column will be
+truncated. By default, text columns are separated with at least one blank
+character.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported. In the following option descriptions,
+\fIcolumn\fR, \fIlines\fR, \fIoffset\fR, \fIpage\fR, and \fIwidth\fR are
+positive decimal integers; \fIgap\fR is a non-negative decimal integer. Some of
+the option-arguments are optional, and some of the option-arguments cannot be
+specified as separate arguments from the preceding option letter. In
+particular, the \fB-s\fR option does not allow the option letter to be
+separated from its argument, and the options \fB-e\fR, \fB-i\fR, and \fB-n\fR
+require that both arguments, if present, not be separated from the option
+letter.
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/pr\fR and
+\fB/usr/xpg4/bin/pr\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIpage\fR\fR
+.ad
+.RS 29n
+.rt
+Begins output at page number \fIpage\fR of the formatted input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIcolumn\fR\fR
+.ad
+.RS 29n
+.rt
+Produces multi-column output that is arranged in \fIcolumn\fR columns (default
+is \fB1\fR) and is written down each column in the order in which the text is
+received from the input file. This option should not be used with \fB-m\fR. The
+\fB-e\fR and \fB-i\fR options will be assumed for multiple text-column output.
+Whether or not text columns are produced with identical vertical lengths is
+unspecified, but a text column will never exceed the length of the page (see
+the \fB-l\fR option). When used with \fB-t\fR, use the minimum number of lines
+to write the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 29n
+.rt
+Modifies the effect of the \fB-\fR\fIcolumn\fR option so that the columns are
+filled across the page in a round-robin order (for example, when \fIcolumn\fR
+is 2, the first input line heads column 1, the second heads column 2, the third
+is the second line in column 1, and so forth).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 29n
+.rt
+Produces output that is double-spaced; append an extra \fBNEWLINE\fR character
+following every \fBNEWLINE\fR character found in the input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-e\fR\fB\|[\|\fR\fIchar\fR\fB\|][\|\fR\fIgap\fR\fB\|]\fR\fR
+.ad
+.RS 29n
+.rt
+Expands each input \fBTAB\fR character to the next greater column position
+specified by the formula \fIn\fR \fI*gap+1\fR, where \fIn\fR is an integer
+\fB>0\fR. If \fIgap\fR is \fB0\fR or is omitted, it defaults to \fB8\fR. All
+\fBTAB\fR characters in the input will be expanded into the appropriate number
+of \fBSPACE\fR characters. If any non-digit character, \fIchar\fR, is
+specified, it will be used as the input tab character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 29n
+.rt
+Uses a \fBFORMFEED\fR character for new pages, instead of the default behavior
+that uses a sequence of \fBNEWLINE\fR characters. Pauses before beginning the
+first page if the standard output is associated with a terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIheader\fR\fR
+.ad
+.RS 29n
+.rt
+Uses the string \fIheader\fR to replace the contents of the \fIfile\fR operand
+in the page header.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlines\fR\fR
+.ad
+.RS 29n
+.rt
+Overrides the 66-line default and reset the page length to \fIlines\fR. If
+\fIlines\fR is not greater than the sum of both the header and trailer depths
+(in lines), \fBpr\fR will suppress both the header and trailer, as if the
+\fB-t\fR option were in effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 29n
+.rt
+Merges files. Standard output will be formatted so \fBpr\fR writes one line
+from each file specified by \fIfile\fR, side by side into text columns of equal
+fixed widths, in terms of the number of column positions. Implementations
+support merging of at least nine \fIfile\fRs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\|[\|\fR\fIchar\fR\fB\|][\|\fR\fIwidth\fR\fB\|]\fR\fR
+.ad
+.RS 29n
+.rt
+Provides \fIwidth\fR-digit line numbering (default for \fIwidth\fR is \fB5\fR).
+The number will occupy the first \fIwidth\fR column positions of each text
+column of default output or each line of \fB-m\fR output. If \fIchar\fR (any
+non-digit character) is given, it will be appended to the line number to
+separate it from whatever follows (default for \fIchar\fR is a \fBTAB\fR
+character).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoffset\fR\fR
+.ad
+.RS 29n
+.rt
+Each line of output will be preceded by offset <space>s. If the \fB-o\fR option
+is not specified, the default offset is \fB0\fR. The space taken will be in
+addition to the output line width (see \fB-w\fR option below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 29n
+.rt
+Pauses before beginning each page if the standard output is directed to a
+terminal (\fBpr\fR will write an \fBALERT\fR character to standard error and
+wait for a carriage-return character to be read on \fB/dev/tty\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 29n
+.rt
+Writes no diagnostic reports on failure to open files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fB[\fR\fIchar\fR\fB]\fR\fR
+.ad
+.RS 29n
+.rt
+Separates text columns by the single character \fIchar\fR instead of by the
+appropriate number of \fBSPACE\fR characters (default for \fIchar\fR is the
+\fBTAB\fR character).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 29n
+.rt
+Writes neither the five-line identifying header nor the five-line trailer
+usually supplied for each page. Quits writing after the last line of each file
+without spacing to the end of the page.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIwidth\fR\fR
+.ad
+.RS 29n
+.rt
+Sets the width of the line to \fIwidth\fR column positions for multiple
+text-column output only. If the \fB-w\fR option is not specified and the
+\fB-s\fR option is not specified, the default width is \fB72\fR. If the
+\fB-w\fR option is not specified and the \fB-s\fR option is specified, the
+default width is \fB512\fR.
+.sp
+For single column output, input lines will not be truncated.
+.RE
+
+.SS "/usr/bin/pr"
+.sp
+.LP
+The following options are supported for \fB/usr/bin/pr\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 27n
+.rt
+Folds the lines of the input file. When used in multi-column mode (with the
+\fB-a\fR or \fB-m\fR options), lines will be folded to fit the current column's
+width. Otherwise, they will be folded to fit the current line width (80
+columns).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-i\fR\fB\|[\|\fR\fIchar\fR\fB\|][\|\fR\fIgap\fR\fB\|]\fR\fR
+.ad
+.RS 27n
+.rt
+In output, replaces \fBSPACE\fR characters with \fBTAB\fR characters wherever
+one or more adjacent \fBSPACE\fR characters reach column positions \fIgap+1\fR,
+\fI2*gap+1\fR, \fI3*gap+1\fR, and so forth. If \fIgap\fR is \fB0\fR or is
+omitted, default \fBTAB\fR settings at every eighth column position are
+assumed. If any non-digit character, \fIchar\fR, is specified, it will be used
+as the output \fBTAB\fR character.
+.RE
+
+.SS "/usr/xpg4/bin/pr"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/pr\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 27n
+.rt
+Uses a \fBFORMFEED\fR character for new pages, instead of the default behavior
+that uses a sequence of \fBNEWLINE\fR characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-i\fR\fB\|[\|\fR\fIchar\fR\fB\|][\|\fR\fIgap\fR\fB\|]\fR\fR
+.ad
+.RS 27n
+.rt
+In output, replaces multiple \fBSPACE\fR characters with \fBTAB\fR characters
+wherever two or more adjacent \fBSPACE\fR characters reach column positions
+\fIgap+1\fR, \fI2*gap+1\fR, \fI3*gap+1\fR, and so forth. If \fIgap\fR is
+\fB0\fR or is omitted, default \fBTAB\fR settings at every eighth column
+position are assumed. If any non-digit character, \fIchar\fR, is specified, it
+will be used as the output \fBTAB\fR character.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be written. If no \fIfile\fR operands are specified,
+or if a \fIfile\fR operand is \fB\(mi\fR, the standard input will be used.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting a numbered list of all files in the current directory
+.sp
+.in +2
+.nf
+example% \fBls -a | pr -n -h "Files in $(pwd)."\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRPrinting files in columns
+.sp
+.LP
+This example prints \fBfile1\fR and \fBfile2\fR as a double-spaced,
+three-column listing headed by \fBfile list\fR:
+
+.sp
+.in +2
+.nf
+example% \fBpr -3d -h "file list" file1 file2\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRWriting files with expanded column tabs
+.sp
+.LP
+The following example writes \fBfile1\fR on \fBfile2\fR, expanding tabs to
+columns \fB10\fR, \fB19\fR, \fB28\fR, ...
+
+.sp
+.in +2
+.nf
+example% \fBpr -e9 -t <file1 >file2\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpr\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, \fBTZ\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/pr"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/pr"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBexpand\fR(1), \fBlp\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/praliases.1 b/usr/src/man/man1/praliases.1
new file mode 100644
index 0000000000..15e72e0152
--- /dev/null
+++ b/usr/src/man/man1/praliases.1
@@ -0,0 +1,162 @@
+'\" te
+.\" Copyright (c) 1983 Eric P. Allman
+.\" Copyright (c) 1988, 1993 The Regents of the University of California. All rights reserved.
+.\" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display
+.\" the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific
+.\" prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\" Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers. All rights reserved.
+.\" The following license terms and conditions apply, unless a different license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: Use, Modification and Redistribution
+.\" (including distribution of any modified or derived work) in source and binary forms is permitted only if each of the following conditions is met: 1. Redistributions qualify as "freeware" or "Open Source Software" under one of the following terms: (a) Redistributions are made at no charge
+.\" beyond the reasonable cost of materials and delivery. (b) Redistributions are accompanied by a copy of the Source Code or by an irrevocable offer to provide a copy of the Source Code for up to three years at the cost of materials and delivery. Such redistributions
+.\" must allow further use, modification, and redistribution of the Source Code under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete compilable and linkable source code of sendmail including all modifications.
+.\" 2. Redistributions of source code must retain the copyright notices as they appear in each source code file, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below. 3. Redistributions in binary form must reproduce the Copyright Notice, these license
+.\" terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: "Copyright (c) 1998-2004 Sendmail,
+.\" Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. The name "sendmail" is a trademark
+.\" of Sendmail, Inc. 5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, whose copyright notice and conditions for redistribution are as follows: (a) Copyright (c) 1988, 1993 The Regents of the University of California.
+.\" All rights reserved. (b) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (i) Redistributions of source code must retain the above copyright notice, this list of
+.\" conditions and the following disclaimer. (ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+.\" (iii) Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL,
+.\" INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.TH praliases 1 "29 Mar 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+praliases \- display system mail aliases
+.SH SYNOPSIS
+.LP
+.nf
+\fBpraliases\fR [\fB-C\fR \fIconfigfile\fR] [\fB-f\fR \fIaliasfile\fR] [\fIkey\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpraliases\fR utility displays system mail aliases. When no key is given,
+\fBpraliases\fR displays the current system aliases, one per line, in no
+particular order. The form is \fBkey:value\fR. If a key is given, only that key
+is looked up and the appropriate \fBkey:value\fR is displayed if found.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIconfigfile\fR\fR
+.ad
+.RS 17n
+.rt
+Specifies a \fBsendmail\fR configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIaliasfile\fR\fR
+.ad
+.RS 17n
+.rt
+Reads the specified file \fIaliasfile\fR instead of the default \fBsendmail\fR
+system aliases file.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIkey\fR\fR
+.ad
+.RS 7n
+.rt
+A specific alias key to look up.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/aliases\fR\fR
+.ad
+.RS 25n
+.rt
+Default \fBsendmail\fR system aliases file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/aliases.db\fR\fR
+.ad
+.RS 25n
+.rt
+Database versions of the \fB/etc/mail/aliases\fR file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/aliases.dir\fR\fR
+.ad
+.br
+.na
+\fB\fB/etc/mail/aliases.pag\fR\fR
+.ad
+.RS 25n
+.rt
+Database versions of the \fB/etc/mail/aliases\fR file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/mail/sendmail.cf\fR\fR
+.ad
+.RS 25n
+.rt
+Default \fBsendmail\fR configuration file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmailq\fR(1), \fBnewaliases\fR(1M), \fBsendmail\fR(1M), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/prctl.1 b/usr/src/man/man1/prctl.1
new file mode 100644
index 0000000000..e79a71ace5
--- /dev/null
+++ b/usr/src/man/man1/prctl.1
@@ -0,0 +1,606 @@
+'\" te
+.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH prctl 1 "25 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+prctl \- get or set the resource controls of running processes, tasks, and
+projects
+.SH SYNOPSIS
+.LP
+.nf
+\fBprctl\fR [\fB-P\fR] [\fB-t\fR [basic | privileged | system]]
+ [\fB-n\fR \fIname\fR [\fB-srx\fR] [\fB-v\fR \fIvalue\fR] [\fB-e\fR | \fB-d\fR \fIaction\fR] [\fB-p\fR \fIpid\fR]]
+ [\fB-i\fR \fIidtype\fR] \fIid\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBprctl\fR utility allows the examination and modification of the resource
+controls associated with an active process, task, or project on the system. It
+allows access to the basic and privileged limits and the current usage on
+the specified entity.
+.sp
+.LP
+See \fBresource_controls\fR(5) for a description of the resource controls
+supported in the current release of the Solaris operating system.
+.SH OPTIONS
+.sp
+.LP
+If none of the \fB-s\fR, \fB-r\fR, \fB-x\fR, \fB-v\fR, \fB-d\fR, or \fB-e\fR
+options are specified, the invocation is considered a get operation. Otherwise,
+it is considered a modify operation.
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR | \fB-e\fR \fIaction\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables (\fB-d\fR) or enables (\fB-e\fR) the specified \fIaction\fR on the
+resource control value specified by \fB-v\fR, \fB-t\fR, and \fB-p\fR. If any of
+the \fB-v\fR, \fB-t\fR, or \fB-p\fR options are unspecified, they match any
+value, privilege, or recipient pid. For example, specifying only \fB-v\fR
+modifies the first resource control with matching value, matching any privilege
+and recipient pid. If no matching resource control value is found, a new value
+is added as if \fB-s\fR were specified.
+.sp
+\fBActions:\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fBall\fR\fR
+.ad
+.RS 17n
+.rt
+This action is only available with \fB-d\fR. It disables all actions. This
+fails on resource control values that have the \fBdeny\fR global flag.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdeny\fR\fR
+.ad
+.RS 17n
+.rt
+Indicates that the resource control attempts to deny granting the resource to
+the process, task, project, or zone on a request for resources in excess of the
+resource control value. \fBdeny\fR actions can not be enabled if the resource
+control has the \fBno-deny\fR global flag. \fBdeny\fR actions can not be
+disabled if the resource control has the \fBdeny\fR global flag.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsignal\fR\fR
+.ad
+.RS 17n
+.rt
+This action is only available with \fB-d\fR. It deactivates the \fBsignal\fR
+action.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsignal\fR=\fIsignum\fR\fR
+.ad
+.RS 17n
+.rt
+In the \fBsignal=\fR\fIsignum\fR action, \fIsignum\fR is a signal number (or
+string representation of a signal). Setting a \fBsignal\fR action on a resource
+control with the \fBno-local-action\fR global flag fails. A limited set of
+signals can be sent. See \fBNOTES\fR for additional details.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIidtype\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the type of the id operands. Valid \fIidtype\fRs are \fBprocess\fR,
+\fBtask\fR, \fBproject\fR, or \fBzone\fR. Also allowed are \fBpid\fR,
+\fBtaskid\fR, \fBprojid\fR, and \fBzoneid\fR. The default id type, if the
+\fB-i\fR option is omitted, is \fBprocess\fR.
+.sp
+For a modify operation, the entity to which id operands are members is the
+target entity. For instance, setting a project resource control on an \fB-i\fR
+\fBprocess\fR sets the resource control on the project to which each given
+process argument is a member.
+.sp
+For a get operation, the resource controls are listed for all entities to which
+the id operands are members. For example, \fB-i\fR \fBtask\fR \fItaskid\fR
+lists the task, project, and zone resource controls for the task, and for the
+project and zone to which that task is a member.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIname\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the name of the resource control to get or set. If the \fIname\fR is
+unspecified, all resource controls are retrieved.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpid\fR\fR
+.ad
+.sp .6
+.RS 4n
+When manipulating (using \fB-s\fR, \fB-r\fR, \fB-x\fR, \fB-d\fR, or \fB-e\fR) a
+basic task project, or zone resource control values, a recipient \fIpid\fR can
+be specified using \fB-p\fR. When setting a new basic resource control or
+controls on a task, project, or zone, the \fB-p\fR option is required if the
+\fB-i\fR \fIidtype\fR option argument is not \fBprocess\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.sp .6
+.RS 4n
+Display resource control values in space delimited format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Replaces the first resource control value (matching with the \fB-t\fR
+\fBprivilege\fR) with the new value specified through the \fB-v\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set a new resource control value.
+.sp
+This option requires the \fB-v\fR option.
+.sp
+If you do not specify the \fB-t\fR option, basic privilege is used. If you want
+to set a basic task, process, or zone rctl, \fB-p\fR is required. If \fB-e\fR
+or \fB-d\fR are also specified, the action on the new \fBrctl\fR is set as
+well.
+.sp
+For compatibility with prior releases, this option is implied if \fB-v\fR is
+specified, without any of \fB-e\fR, \fB-d\fR, \fB-r\fR, or \fB-x\fR.
+.sp
+See \fBresource_controls\fR(5) for a description of unit modifiers and scaling
+factors you can use to express large values when setting a resource control
+value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR [ \fBbasic\fR | \fBprivileged\fR | \fBsystem\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Specifies which resource control type to set. Unless the "lowerable" flag is
+set for a resource control, only invocations by users (or setuid programs) who
+have privileges equivalent to those of root can modify privileged resource
+controls. See \fBrctlblk_set_value\fR(3C) for a description of the
+\fBRCTL_GLOBAL_LOWERABLE\fR flag. If the type is not specified, \fBbasic\fR is
+assumed. For a get operation, the values of all resource control types,
+including \fBsystem\fR, are displayed if no type is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR \fIvalue\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the value for the resource control for a set operation. If no
+\fIvalue\fR is specified, then the modification (deletion, action enabling or
+disabling) is carried out on the lowest-valued resource control with the given
+type.
+.sp
+See \fBresource_controls\fR(5) for a description of unit modifiers and scaling
+factors you can use to express large values when setting a resource control
+value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Deletes the specified resource control value. If the delete option is not
+provided, the default operation of \fBprctl\fR is to modify a resource control
+value of matching value and privilege, or insert a new value with the given
+privilege. The matching criteria are discussed more fully in \fBsetrctl\fR(2).
+.RE
+
+.sp
+.LP
+If none of the \fB-d\fR, \fB-e\fR, \fB-v\fR, or \fB-x\fR options is specified,
+the invocation is considered a get operation.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIid\fR\fR
+.ad
+.RS 6n
+.rt
+The \fBID\fR of the entity (\fBprocess\fR, \fBtask\fR, \fBproject\fR, or
+\fBzone\fR) to interrogate. If the invoking user's credentials are unprivileged
+and the entity being interrogated possesses different credentials, the
+operation fails. If no \fIid\fR is specified, an error message is returned.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying Current Resource Control Settings
+.sp
+.LP
+The following example displays current resource control settings for a task to
+which the current shell belongs:
+
+.sp
+.in +2
+.nf
+ example$ ps -o taskid -p $$
+TASKID
+8
+example$ prctl -i task 8
+136150: /bin/ksh
+NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
+task.max-cpu-time
+ usage 8s
+ system 18.4Es inf none -
+task.max-lwps
+ usage 39
+ system 2.15G max deny -
+project.max-contracts
+ privileged 10.0K - deny -
+project.max-locked-memory
+ usage 0B
+ privileged 508MB - deny -
+project.max-port-ids
+ privileged 8.19K - deny -
+project.max-shm-memory
+ privileged 508MB - deny -
+project.max-shm-ids
+ privileged 128 - deny -
+project.max-msg-ids
+ privileged 128 - deny -
+project.max-sem-ids
+ privileged 128 - deny -
+project.max-crypto-memory
+ usage 0B
+privileged 508MB - deny -
+project.max-tasks
+ usage 2
+ system 2.15G max deny -
+project.max-lwps
+ usage 39
+ system 2.15G max deny -
+project.cpu-shares
+ usage 1
+ privileged 1 - none -
+zone.max-shm-memory
+ system 16.0EB max deny -
+zone.max-shm-ids
+ system 16.8M max deny -
+zone.max-sem-ids
+ system 16.8M max deny -
+zone.max-msg-ids
+ system 16.8M max deny -
+zone.max-lwps
+ system 2.15G max deny -
+zone.cpu-shares
+ privileged 1 - none -
+zone.max-locked-memory
+ usage 0B
+ privileged 508MB - deny -
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRDisplaying, Replacing, and Verifying the Value of a Specific
+Control
+.sp
+.LP
+The following examples displays, replaces, and verifies the value of a specific
+control on an existing project:
+
+.sp
+.in +2
+.nf
+example# prctl -n project.cpu-shares -i project group.staff
+project: 10: group.staff
+NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
+project.cpu-shares
+ usage 1
+ privileged 1 - none -
+ system 65.5K max none -
+
+example# prctl -n project.cpu-shares -v 10 -r -i project group.staff
+example# prctl -n project.cpu-shares -i project group.staff
+project: 10: group.staff
+NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
+project.cpu-shares
+ usage 10
+ privileged 10 - none -
+ system 65.5K max none -
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRAdjusting Resources
+.sp
+.LP
+The following example uses the \fBproject.max-locked-memory\fR resource.
+
+.sp
+.LP
+First, use \fBid\fR \fB-p\fR to find out which project the current shell is a
+member of:
+
+.sp
+.in +2
+.nf
+/home/garfield> id -p
+ uid=77880(garfield) gid=10(staff) projid=10(group.staff)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Using the target project, identify the resource limit value before the change:
+
+.sp
+.in +2
+.nf
+/home/garfield> prctl -n project.max-locked-memory -i project \e
+ group.staff
+ project 10: group.staff
+ project.max-locked-memory
+ privileged 256MB - deny -
+ system 16.0EB max deny -
+
+current limit is 256 Megabytes.
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Next, adjust the \fBproject.max-locked-memory\fR limit to 300 Megabytes for the
+target project:
+
+.sp
+.in +2
+.nf
+# prctl -n project.max-locked-memory -v 300M -r -i project group.staff
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The resource limit value after the change shows a new value of 300 Megabytes:
+
+.sp
+.in +2
+.nf
+# prctl -n project.max-locked-memory -i project group.staff
+ project 10:group.staff
+ project.max-locked-memory
+ usage 200MG
+ privileged 300MB - deny -
+ system 16.0EB max deny -
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRModifying CPU Caps for a Project
+.sp
+.LP
+The \fBprctl\fR command can use the \fBproject.cpu-cap\fR resource control (see
+\fBresource_controls\fR(5)) to set and modify CPU caps for a project. (The same
+resource control can be used in the \fB/etc/project\fR file. See
+\fBproject\fR(4)) The following command modifies the CPU cap to limit
+\fBuser.smith\fR to three CPUs:
+
+.sp
+.in +2
+.nf
+# \fBprctl -r -t privileged -n project.cpu-cap -v 300 -i project user.smith\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBprctl\fR \fB-r\fR option, used above, is used to dynamically change a
+CPU cap for a project or zone. For example, the following command will change
+the cap set in the preceding command to 80 percent:
+
+.sp
+.in +2
+.nf
+# \fBprctl -r -t privileged -n project.cpu-cap -v 80 -i project user.smith\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To remove a CPU cap, enter:
+
+.sp
+.in +2
+.nf
+# \fBprctl -x -n project.cpu-cap $$\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRModifying CPU Caps for a Zone
+.sp
+.LP
+The \fBprctl\fR command can use the \fBzone.cpu-cap\fR resource control (see
+\fBresource_controls\fR(5)) to set and modify CPU caps for a zone. (The same
+resource control can be manipulated using the \fBzonecfg\fR(1M) command.) The
+following command modifies the CPU cap to limit the global zone to 80 percent
+of a CPU:
+
+.sp
+.in +2
+.nf
+# \fBprctl -t privileged -n zone.cpu-cap -v 80 -i zone global\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The cap can be lowered to 50% using:
+
+.sp
+.in +2
+.nf
+# \fBprctl -r -t privileged -n zone.cpu-cap -v 50 -i zone global\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Success.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Fatal error encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/pid/*\fR\fR
+.ad
+.RS 15n
+.rt
+Process information and control files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command-line syntax is Committed. The human-readable output is Uncommitted.
+The parseable output is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBrctladm\fR(1M), \fBzonecfg\fR(1M), \fBsetrctl\fR(2),
+\fBrctlblk_get_local_action\fR(3C), \fBproject\fR(4), \fBattributes\fR(5),
+\fBresource_controls\fR(5)
+.SH NOTES
+.sp
+.LP
+The valid signals that can be set on a resource control block allowing local
+actions are \fBSIGABRT\fR, \fBSIGXRES\fR, \fBSIGHUP\fR, \fBSIGSTOP\fR,
+\fBSIGTERM\fR, and \fBSIGKILL\fR. Additionally, CPU time related controls can
+issue the \fBSIGXCPU\fR signal, and file size related controls can send the
+\fBSIGXFSZ\fR signal.
diff --git a/usr/src/man/man1/preap.1 b/usr/src/man/man1/preap.1
new file mode 100644
index 0000000000..3bd075a612
--- /dev/null
+++ b/usr/src/man/man1/preap.1
@@ -0,0 +1,135 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH preap 1 "19 Jun 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+preap \- force a defunct process to be reaped by its parent
+.SH SYNOPSIS
+.LP
+.nf
+\fBpreap\fR [\fB-F\fR] \fIpid\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+A defunct (or zombie) process is one whose exit status has yet to be reaped by
+its parent. The exit status is reaped by way of the \fBwait\fR(3C),
+\fBwaitid\fR(2), or \fBwaitpid\fR(3C) system call. In the normal course of
+system operation, zombies can occur, but are typically short-lived. This can
+happen if a parent exits without having reaped the exit status of some or all
+of its children. In that case, those children are reparented to \fBPID 1\fR.
+See \fBinit\fR(1M), which periodically reaps such processes.
+.sp
+.LP
+An irresponsible parent process can not exit for a very long time and thus
+leave zombies on the system. Since the operating system destroys nearly all
+components of a process before it becomes defunct, such defunct processes do
+not normally impact system operation. However, they do consume a small amount
+of system memory.
+.sp
+.LP
+\fBpreap\fR forces the parent of the process specified by \fIpid\fR to
+\fBwaitid\fR(3C) for \fIpid\fR, if \fIpid\fR represents a defunct process.
+.sp
+.LP
+\fBpreap\fR attempts to prevent the administrator from unwisely reaping a child
+process which might soon be reaped by the parent, if:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The process is a child of \fBinit\fR(1M).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The parent process is stopped and might wait on the child when it is again
+allowed to run.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The process has been defunct for less than one minute.
+.RE
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Forces the parent to reap the child, overriding safety checks.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 7n
+.rt
+Process \fBID\fR list.
+.RE
+
+.SH USAGE
+.sp
+.LP
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only if the primary controlling process, typically a debugger, has
+stopped the victim process and the primary controlling process is doing nothing
+at the moment of application of the \fBproc\fR tool in question.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned by \fBpreap\fR, which prints the exit
+status of each target process reaped:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successfully operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+Failure, such as no such process, permission denied, or invalid option.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBproc\fR(1), \fBinit\fR(1M), \fBwaitid\fR(2), \fBwait\fR(3C),
+\fBwaitpid\fR(3C), \fBproc\fR(4), \fBattributes\fR(5)
+.SH WARNINGS
+.sp
+.LP
+\fBpreap\fR should be applied sparingly and only in situations in which the
+administrator or developer has confirmed that defunct processes are not reaped
+by the parent process. Otherwise, applying \fBpreap\fR can damage the parent
+process in unpredictable ways.
diff --git a/usr/src/man/man1/prex.1 b/usr/src/man/man1/prex.1
new file mode 100644
index 0000000000..755ab555c5
--- /dev/null
+++ b/usr/src/man/man1/prex.1
@@ -0,0 +1,1043 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH prex 1 "1 Mar 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+prex \- control tracing and manipulate probe points in a process or the kernel
+.SH SYNOPSIS
+.LP
+.nf
+\fBprex\fR [\fB-o\fR \fItrace_file_name\fR] [\fB-l\fR \fIlibraries\fR] [\fB-s\fR \fIkbytes_size\fR] \fIcmd\fR
+ [\fIcmd-args\fR]...
+.fi
+
+.LP
+.nf
+\fBprex\fR [\fB-o\fR \fItrace_file_name\fR] [\fB-l\fR \fIlibraries\fR] [\fB-s\fR \fIkbytes_size\fR] \fB-p\fR \fIpid\fR
+.fi
+
+.LP
+.nf
+\fBprex\fR \fB-k\fR [\fB-s\fR \fIkbytes_size\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBprex\fR command is the part of the Solaris tracing architecture that
+controls probes in a process or the kernel. See \fBtracing\fR(3TNF) for an
+overview of this tracing architecture, including example source code using it.
+.sp
+.LP
+\fBprex\fR is the application used for external control of probes. It
+automatically preloads the \fBlibtnfprobe\fR library. \fBprex\fR locates all
+the probes in a target executable or the kernel and provides an interface for
+the user to manipulate them. It allows a probe to be turned on for tracing,
+debugging, or both. Tracing generates a \fBTNF\fR (Trace Normal Form) trace
+file that can be converted to \fBASCII\fR by \fBtnfdump\fR(1) and used for
+performance analysis. Debugging generates a line to standard error whenever the
+probe is hit at run time.
+.sp
+.LP
+\fBprex\fR does not work on static executables. It only works on dynamic
+executables.
+.SS "Invoking prex"
+.sp
+.LP
+There are three ways to invoke \fBprex\fR:
+.RS +4
+.TP
+1.
+Use \fBprex\fR to start the target application \fIcmd\fR. In this case, the
+target application need not be built with a dependency on \fBlibtnfprobe\fR.
+See \fBTNF_PROBE\fR(3TNF). \fBprex\fR sets the environment variable
+\fBLD_PRELOAD\fR to load \fBlibtnfprobe\fR into the target process. See
+\fBld\fR(1). \fBprex\fR then uses the environment variable \fBPATH\fR to find
+the target application.
+.RE
+.RS +4
+.TP
+2.
+Attach \fBprex\fR to a running application. In this case, the running target
+application should have \fBlibtnfprobe\fR already linked in. Alternatively, the
+user may manually set \fBLD_PRELOAD\fR to include \fBlibtnfprobe.so.1\fR prior
+to invoking the target.
+.RE
+.RS +4
+.TP
+3.
+Use \fBprex\fR with the \fB-k\fR option to set \fBprex\fR to \fBkernel
+mode\fR. \fBprex\fR can then be used to control probes in the Solaris kernel.
+In kernel mode, additional commands are defined, and some commands that are
+valid in other modes are invalid. See \fBKernel\fR \fBMode\fR below.
+.RE
+.SS "Control File Format and Command Language"
+.sp
+.LP
+In a future release of \fBprex\fR, the command language may be moved to a
+syntax that is supported by an existing scripting language like \fBksh\fR(1).
+In the meantime, the interface to \fBprex\fR is uncommitted.
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Commands should be in \fBASCII\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each command is terminated with the NEWLINE character.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A command can be continued onto the next line by ending the previous line with
+the backslash ("\fB\e\fR") character.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Tokens in a command must be separated by whitespace (one or more spaces or
+tabs).
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The "\fB#\fR" character implies that the rest of the line is a comment.
+.RE
+.SS "Basic prex Commands"
+.sp
+
+.sp
+.TS
+tab();
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+CommandResult
+_
+% \fBprex a.out\fRT{
+Attaches \fBprex\fR to your program and starts \fBprex\fR.
+T}
+prex> \fBenable $all\fREnables all the probes.
+prex> \fBquit resume\fRT{
+Quits \fBprex\fR and resumes execution of program.
+T}
+.TE
+
+.SS "Control File Search Path"
+.sp
+.LP
+There are two different methods of communicating with \fBprex\fR:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+By specifications in a control file. During start-up, \fBprex\fR searches for a
+file named \fB\&.prexrc\fR in the directories specified below. \fBprex\fR does
+not stop at the first one it finds. This way a user can override any defaults
+that are set up. The search order is:
+.sp
+.in +2
+.nf
+$HOME/
+\&./
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+By typing commands at the \fBprex\fR prompt.
+.RE
+.sp
+.LP
+The command language for both methods is the same and is specified in USAGE.
+The commands that return output will not make sense in a control file. The
+output will go to standard output.
+.sp
+.LP
+When using \fBprex\fR on a target process, the target will be in one of two
+states, running or stopped. This can be detected by the presence or absence of
+the \fBprex>\fR prompt. If the prompt is absent, it means that the target
+process is running. Typing Control-C will stop the target pr ocess and return
+the user to the prompt. There is no guarantee that Control-C will return to a
+\fBprex\fR prompt immediately. For example, if the target process is stopped on
+a job control stop (\fBSIGSTOP\fR), then Control-C in \fBprex\fR will wait
+until the target has been continued (\fBSIGCONT\fR). See \fBSignals to Target
+Program\fR below for more information on signals and the target process.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 22n
+.rt
+\fBkernel mode\fR: \fBprex\fR is used to control probes in the Solaris kernel.
+In kernel mode, additional commands are defined, and some commands valid in
+other modes are invalid. See \fBKernel Mode\fR below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlibraries\fR\fR
+.ad
+.RS 22n
+.rt
+The \fIlibraries\fR mentioned are linked in to the target application using
+\fBLD_PRELOAD\fR (see \fBld\fR(1)). This option cannot be used when attaching
+to a running process. The argument to the \fB-l\fR option should be a
+space-separated string enclosed in double quotes. Each token in the string is a
+library name. It follows the \fBLD_PRELOAD\fR rules on how libraries should be
+specified and where they will be found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fItrace_file_name\fR\fR
+.ad
+.RS 22n
+.rt
+File to be used for the trace output. \fItrace_file_name\fR is assumed to be
+relative to the current working directory of \fBprex\fR (that is, the directory
+that the user was in when \fBprex\fR was started).
+.sp
+If \fBprex\fR attaches to a process that is already tracing, the new
+\fItrace_file_name\fR (if provided) will not be used. If no
+\fItrace_file_name\fR is specified, the default is
+\fB/$TMPDIR/trace-\fR\fIpid\fR where \fIpid\fR is the process id of the target
+program. If \fBTMPDIR\fR is not set, \fB/tmp\fR is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIkbytes_size\fR\fR
+.ad
+.RS 22n
+.rt
+Maximum size of the output trace file in Kbytes. The default size of the trace
+\fIkbytes_size\fR is \fB4096\fR (2^10) bytes or \fB4\fR Mbytes for normal
+usage, and \fB384\fR or \fB384\fR kbytes in kernel mode. The minimum size that
+can be specified is \fB128\fR Kbytes. The trace file can be thought of as a
+least recently used circular buffer. Once the file has been filled, newer
+events will overwrite the older ones.
+.RE
+
+.SH USAGE
+.sp
+.LP
+This section describes the usage of the \fBprex\fR utility.
+.SS "Grammar"
+.sp
+.LP
+Probes are specified by a list of space-separated selectors. Selectors are of
+the form:
+.sp
+.in +2
+.nf
+\fIattribute\fR=\fIvalue\fR
+.fi
+.in -2
+
+.sp
+.LP
+(See \fBTNF_PROBE\fR(3TNF)). The "\fIattribute\fR=" is optional. If it is not
+specified, it defaults to "\fBkeys=\fR".
+.sp
+.LP
+The \fIattribute\fR or \fIvalue\fR (generically called "spec") can be any of
+the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBIDENT\fR\fR
+.ad
+.RS 14n
+.rt
+Any sequence of letters, digits, _\|, \e\|, ., % not beginning with a digit.
+\fBIDENT\fR implies an exact match.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBQUOTED_STR\fR\fR
+.ad
+.RS 14n
+.rt
+Usually used to escape reserved words (any commands in the command language).
+\fBQUOTED_STR\fR implies an exact match and has to be enclosed in single quotes
+(' ').
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBREGEXP\fR\fR
+.ad
+.RS 14n
+.rt
+An \fBed\fR(1) regular expression pattern match. \fBREGEXP\fR has to be
+enclosed in slashes (/ /), A / can be included in a \fBREGEXP\fR by escaping it
+with a backslash \e\|.
+.RE
+
+.sp
+.LP
+The following grammar explains the syntax.
+.sp
+.in +2
+.nf
+selector_list ::= | /* empty */
+ \fIselector_list\fR \fIselector\fR
+selector ::= \fIspec\fR=\fIspec\fR | /* whitespace around `=' opt */
+ \fIspec\fR
+spec ::= IDENT |
+ QUOTED_STR |
+ REGEXP
+.fi
+.in -2
+
+.sp
+.LP
+The terminals in the above grammar are:
+.sp
+.in +2
+.nf
+IDENT = [a-zA-Z_\e.%]{[a-zA-Z0-9_\e.%]}+
+QUOTED_STR = '[^\en']*' /* any string in single quotes */
+REGEXP = /[^\en/]*/ /* regexp's have to be in / / */
+.fi
+.in -2
+
+.sp
+.LP
+This is a list of the remaining grammar that is needed to understand the syntax
+of the command language (defined in next subsection):
+.sp
+.in +2
+.nf
+filename ::= QUOTED_STR /* QUOTED_STR defined above */
+spec_list ::= /* empty */ |
+ \fIspec_list\fR \fIspec\fR /* \fIspec\fR defined above */
+fcn_handle ::= &IDENT /* IDENT defined above */
+set_name ::= $IDENT /* IDENT defined above */
+.fi
+.in -2
+
+.SS "Command Language"
+.RS +4
+.TP
+1.
+Set Creation and Set Listing
+.sp
+.in +2
+.nf
+\fBcreate $\fIset_name\fR \fIselector_list\fR
+list sets # list the defined sets\fR
+.fi
+.in -2
+.sp
+
+\fBcreate\fR can be used to define a set which contains probes that match the
+\fIselector_list\fR. The set \fB$all\fR is pre-defined as /.*/ and it matches
+all the probes.
+.RE
+.RS +4
+.TP
+2.
+Function Listing
+.sp
+.in +2
+.nf
+\fBlist fcns # list the available \fIfcn_handle\fR\fR
+.fi
+.in -2
+.sp
+
+The user can list the different functions that can be connected to probe
+points. Currently, only the debug function called \fB&debug\fR is available.
+.RE
+.RS +4
+.TP
+3.
+Commands to Connect and Disconnect Probe Functions
+.sp
+.in +2
+.nf
+\fBconnect &\fIfcn_handle\fR $\fIset_name\fR
+connect &\fIfcn_handle\fR \fIselector_list\fR
+clear $\fIset_name\fR
+clear \fIselector_list\fR\fR
+.fi
+.in -2
+.sp
+
+The \fBconnect\fR command is used to connect probe functions (which must be
+prefixed by `\fB&\fR\&') to probes. The probes are specified either as a single
+set (with a `\fB$\fR'), or by explicitly listing the probe selectors in the
+command. The probe function has to be one that is listed by the \fBlist fcns\fR
+command. This command does not enable the probes.
+.sp
+The \fBclear\fR command is used to disconnect all connected probe functions
+from the specified probes.
+.RE
+.RS +4
+.TP
+4.
+Commands to Toggle the Tracing Mode
+.sp
+.in +2
+.nf
+\fBtrace $\fIset_name\fR
+trace \fIselector_list\fR
+untrace $\fIset_name\fR
+untrace \fIselector_list\fR\fR
+.fi
+.in -2
+.sp
+
+The \fBtrace\fR and \fBuntrace\fR commands are used to toggle the tracing
+action of a probe point (that is, whether a probe will emit a trace record or
+not if it is hit). This command does not enable the probes specified. Probes
+have tracing on by default. The most efficient way to turn off tracing is by
+using the \fBdisable\fR command. \fBuntrace\fR is useful if you want debug
+output but no tracing. If so, set the state of the probe to enabled, untraced,
+and the debug function connected.
+.RE
+.RS +4
+.TP
+5.
+Commands to Enable and Disable Probes
+.sp
+.in +2
+.nf
+\fBenable $\fIset_name\fR
+enable \fIselector_list\fR
+disable $\fIset_name\fR
+disable \fIselector_list\fR\fR
+.fi
+.in -2
+.sp
+
+The \fBenable\fR and \fBdisable\fR commands are used to control whether the
+probes perform the action that they have been set up for. To trace a probe, it
+has to be both enabled and traced (using the \fBtrace\fR command). Probes are
+disabled by default. The \fBlist history\fR command is used to list the probe
+control commands issued: \fBconnect\fR, \fBclear\fR, \fBtrace\fR,
+\fBuntrace\fR, \fBenable\fR, and \fBdisable\fR. These are the commands that
+are executed whenever a new shared object is brought in to the target program
+by \fBdlopen\fR(3C). See the subsection, \fBdlopen'ed Libraries\fR, below for
+more information.
+.sp
+The following table shows the actions that result from specific combinations of
+tracing, enabling, and connecting:
+.sp
+.in +2
+.nf
+Enabled or Tracing State Debug State Results
+Disabled (On/Off) (Connected/Cleared) In
+------------------------------------------------------------
+Enabled On Connected Tracing and
+ Debugging
+
+Enabled On Cleared Tracing only
+
+Enabled Off Connected Debugging only
+
+Enabled Off Cleared Nothing
+
+Disabled On Connected Nothing
+
+Disabled On Cleared Nothing
+
+Disabled Off Connected Nothing
+
+Disabled Off Cleared Nothing
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+6.
+List History
+.sp
+.in +2
+.nf
+\fBlist history # lists probe control command history\fR
+.fi
+.in -2
+.sp
+
+The \fBlist history\fR command displays a list of the probe control commands
+previously issued in the tracing session, for example, \fBconnect\fR,
+\fBclear\fR, \fBtrace\fR, \fBdisable\fR. Commands in the history list are
+executed wherever a new shared object is brought into the target program by
+\fBdlopen\fR(3C).
+.RE
+.RS +4
+.TP
+7.
+Commands to List Probes, List Values, or List Trace File Name
+.sp
+.in +2
+.nf
+\fBlist \fIspec_list\fR probes $\fIset_name\fR # list probes $all
+list \fIspec_list\fR probes \fIselector_list\fR # list name probes file=test.c
+list values \fIspec_list\fR # list values keys given in \fIspec_list\fR
+list tracefile # list tracefile\fR
+.fi
+.in -2
+.sp
+
+The first two commands list the selected attributes and values of the specified
+probes. They can be used to check the state of a probe. The third command lists
+the various values associated with the selected attributes. The fourth command
+lists the current tracefile.
+.RE
+.RS +4
+.TP
+8.
+Help Command
+.sp
+.in +2
+.nf
+\fBhelp \fItopic\fR\fR
+.fi
+.in -2
+.sp
+
+To get a list of the help topics that are available, invoke the \fBhelp\fR
+command with no arguments. If a \fItopic\fR argument is specified, help is
+printed for that topic.
+.RE
+.RS +4
+.TP
+9.
+Source a File
+.sp
+.in +2
+.nf
+\fBsource \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+The \fBsource\fR command can be used to source a file of \fBprex\fR commands.
+\fBsource\fR can be nested (that is, a file can source another file).
+\fIfilename\fR is a quoted string.
+.RE
+.RS +4
+.TP
+10.
+Process Control
+.sp
+.in +2
+.nf
+\fBcontinue # resumes the target process
+quit kill # quit prex, kill target
+quit resume # quit prex, continue target
+quit suspend # quit prex, leave target suspended
+quit # quit prex (continue or kill target)\fR
+.fi
+.in -2
+.sp
+
+The default \fBquit\fR will continue the target process if \fBprex\fR attached
+to it. Instead, if \fBprex\fR had started the target program, \fBquit\fR will
+kill the target process.
+.RE
+.SS "dlopen'ed Libraries"
+.sp
+.LP
+Probes in shared objects that are brought in by \fBdlopen\fR(3C) are
+automatically set up according to the command history of \fBprex\fR. When a
+shared object is removed by a \fBdlclose\fR(3C), \fBprex\fR again needs to
+refresh its understanding of the probes in the target program. This implies
+that there is more work to do for \fBdlopen\fR(3C) and \fBdlclose\fR(3C) \(emso
+they will take slightly longer. If a user is not interested in this feature and
+doesn't want to interfere with \fBdlopen\fR(3C) and \fBdlclose\fR(3C), detach
+\fBprex\fR from the target to inhibit this feature.
+.SS "Signals to Target Program"
+.sp
+.LP
+\fBprex\fR does not interfere with signals that are delivered directly to the
+target program. However, \fBprex\fR receives all signals normally generated
+from the terminal, for example, Control-C (\fBSIGINT\fR), and Control-Z
+(\fBSIGSTOP\fR), and does not forward them to the target program. To signal the
+target program, use the \fBkill\fR(1) command from a shell.
+.SS "Interactions with Other Applications"
+.sp
+.LP
+Process managing applications like \fBdbx\fR, \fBtruss\fR(1), and \fBprex\fR
+cannot operate on the same target program simultaneously. \fBprex\fR will not
+be able to attach to a target which is being controlled by another application.
+A user can trace and debug a program serially by the following method: first
+attach \fBprex\fR to target (or start target through \fBprex\fR), set up the
+probes using the command language, and then type \fBquit suspend\fR. The user
+can then attach \fBdbx\fR to the suspended process and debug it. A user can
+also suspend the target by sending it a \fBSIGSTOP\fR signal, and then by
+typing \fBquit resume\fR to \fBprex\fR. In this case, the user should also send
+a \fBSIGCONT\fR signal after invoking \fBdbx\fR on the stopped process (else
+\fBdbx\fR will be hung).
+.SS "Failure of Event Writing Operations"
+.sp
+.LP
+There are a few failure points that are possible when writing out events to a
+trace file, for example, system call failures. These failures result in a
+failure code being set in the target process. The target process continues
+normally, but no trace records are written. Whenever a user enters Control-C to
+\fBprex\fR to get to a \fBprex\fR prompt, \fBprex\fR will check the failure
+code in the target and inform the user if there was a tracing failure.
+.SS "Target Executing a Fork or exec"
+.sp
+.LP
+If the target program does a \fBfork\fR(2), any probes that the child
+encounters will cause events to be logged to the same trace file. Events are
+annotated with a process id, so it will be possible to determine which process
+a particular event came from. In multi-threaded programs, there is a race
+condition with a thread doing a fork while the other threads are still running.
+For the trace file not to get corrupted, the user should either use
+\fBfork1\fR(2), or make sure that all other threads are quiescent when doing a
+\fBfork\fR(2),
+.sp
+.LP
+If the target program itself (not any children it may \fBfork\fR(2)) does an
+\fBexec\fR(2), \fBprex\fR detaches from the target and exits. The user can
+reconnect \fBprex\fR with \fBprex\fR \fB-p\fR \fIpid\fR.
+.sp
+.LP
+A \fBvfork\fR(2) is generally followed quickly by an \fBexec\fR(2) in the
+child, and in the interim, the child borrows the parent's process while the
+parent waits for the \fBexec\fR(2). Any events logged by the child from the
+parent process will appear to have been logged by the parent.
+.SS "Kernel Mode"
+.sp
+.LP
+Invoking \fBprex\fR with the \fB-k\fR flag causes \fBprex\fR to run in
+\fBkernel mode\fR. In kernel mode, \fBprex\fR controls probes in the Solaris
+kernel. See \fBtnf_kernel_probes\fR(4) for a list of available probes in the
+Solaris kernel. A few \fBprex\fR commands are unavailable in kernel mode; many
+other commands are valid in kernel mode only.
+.sp
+.LP
+The \fB-l\fR, \fB-o\fR, and \fB-p\fR command-line options are not valid in
+kernel mode (that is, they may not be combined with the \fB-k\fR flag).
+.sp
+.LP
+The rest of this section describes the differences in the \fBprex\fR command
+language when running \fBprex\fR in kernel mode.
+.RS +4
+.TP
+1.
+\fBprex\fR will not stop the kernel
+.sp
+When \fBprex\fR attaches to a running user program, it stops the user program.
+Obviously, it cannot do this when attaching to the kernel. Instead, \fBprex\fR
+provides a ``tracing master switch'': no probes will have any effect unless the
+tracing master switch is on. This allows the user to iteratively select probes
+to enable, then enable them all at once by turning on the master switch.
+.sp
+The command
+.sp
+.in +2
+.nf
+\fBktrace [ on | off ]\fR
+.fi
+.in -2
+.sp
+
+is used to inspect and set the value of the master switch. Without an argument,
+\fBprex\fR reports the current state of the master switch.
+.sp
+Since \fBprex\fR will not stop or kill the kernel, the
+.sp
+.in +2
+.nf
+\fBquit resume\fR
+.fi
+.in -2
+.sp
+
+and
+.sp
+.in +2
+.nf
+\fBquit kill\fR
+.fi
+.in -2
+.sp
+
+commands are not valid in kernel mode.
+.RE
+.RS +4
+.TP
+2.
+No functions may be attached to probes in the kernel
+.sp
+In particular, the debug function is unavailable in kernel mode.
+.RE
+.RS +4
+.TP
+3.
+Trace output is written to an in-core buffer
+.sp
+In kernel mode, a trace output file is not generated directly, in order to
+allow probes to be placed in time-critical code. Instead, trace output is
+written to an in-core buffer, and copied out by a separate program,
+\fBtnfxtract\fR(1).
+.sp
+The in-core buffer is not automatically created. The following \fBprex\fR
+command controls buffer allocation and deallocation:
+.sp
+.in +2
+.nf
+\fBbuffer [ alloc [ \fIsize\fR ] | dealloc ]\fR
+.fi
+.in -2
+.sp
+
+Without an argument, the \fBbuffer\fR command reports the size of the currently
+allocated buffer, if any. With an argument of \fBalloc\fR [\fIsize\fR],
+\fBprex\fR allocates a buffer of the given size. \fIsize\fR is in bytes, with
+an optional suffix of '\fBk\fR' or '\fBm\fR' specifying a multiplier of
+\fB1024\fR or \fB1048576\fR, respectively. If no \fIsize\fR is specified, the
+\fIsize\fR specified on the command line with the \fB-s\fR option is used as a
+default. If the \fB-s\fR command line option was not used, the ``default
+default'' is 384 kilobytes.
+.sp
+With an argument of \fBdealloc\fR, \fBprex\fR deallocates the trace buffer in
+the kernel.
+.sp
+\fBprex\fR will reject attempts to turn the tracing master switch on when no
+buffer is allocated, and to deallocate the buffer when the tracing master
+switch is on. \fBprex\fR will refuse to allocate a buffer when one is already
+allocated; use \fBbuffer dealloc\fR first.
+.sp
+\fBprex\fR will not allocate a buffer larger than one-half of a machine's
+physical memory.
+.RE
+.RS +4
+.TP
+4.
+\fBprex\fR supports per-process probe enabling in the kernel
+.sp
+In kernel mode, it is possible to select a set of processes for which probes
+are enabled. No trace output will be written when other processes traverse
+these probe points. This is called "process filter mode". By default, process
+filter mode is off, and all processes cause the generation of trace records
+when they hit an enabled probe.
+.sp
+Some kernel events such as interrupts cannot be associated with a particular
+user process. By convention, these events are considered to be generated by
+process id 0.
+.sp
+\fBprex\fR provides commands to turn process filter mode on and off, to get the
+current status of the process filter mode switch, to add and delete processes
+(by process id) from the process filter set, and to list the current process
+filter set.
+.sp
+The process filter set is maintained even when process filter mode is off, but
+has no effect unless process filter mode is on.
+.sp
+When a process in the process filter set exits, its process id is automatically
+deleted from the process filter set.
+.sp
+The command:
+.sp
+.in +2
+.nf
+\fBpfilter [ on | off | add \fIpidlist\fR | delete \fIpidlist\fR ]\fR
+.fi
+.in -2
+.sp
+
+controls the process filter switch, and process filter set membership. With no
+arguments, \fBpfilter\fR prints the current process filter set and the state of
+the process filter mode switch:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBon\fR or \fBoff\fR\fR
+.ad
+.RS 18n
+.rt
+set the state of the process filter mode switch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBadd\fR \fIpidlist\fR\fR
+.ad
+.br
+.na
+\fB\fBdelete\fR \fIpidlist\fR\fR
+.ad
+.RS 18n
+.rt
+add or delete processes from the process filter set. \fIpidlist\fR is a
+comma-separated list of one or more process ids.
+.RE
+
+.RE
+.SH EXAMPLES
+.sp
+.LP
+See \fBtracing\fR(3TNF) for complete examples showing, among other things, the
+use of \fBprex\fR to do simple probe control.
+.sp
+.LP
+When either the process or kernel is started, all probes are disabled.
+.LP
+\fBExample 1 \fRSet creation and set listing
+.sp
+.in +2
+.nf
+\fBcreate $out name=/out/ # $out = probes with "out" in
+ # value of "name" attribute
+create $foo /page/ name=biodone # $foo = union of
+ # probes with "page" in value of keys attribute
+ # probes with "biodone" as value of "name" attribute
+list sets # list the defined sets
+list fcns # list the defined probe fcns\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCommands to trace and connect probe functions
+.sp
+.in +2
+.nf
+\fBtrace foobar='on' # exact match on foobar attribute
+trace $all # trace all probes (predefined set $all)
+connect &debug $foo # connect debug func to probes in $foo\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRCommands to enable and disable probes
+.sp
+.in +2
+.nf
+\fBenable $all # enable all probes
+enable /vm/ name=alloc # enable the specified probes
+disable $foo # disable probes in set $foo
+list history # list probe control commands issued\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRProcess control
+.sp
+.in +2
+.nf
+\fBcontinue # resumes the target process
+^C # stop target; give control to prex
+quit resume # exit prex, leave process running
+ # and resume execution of program\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRKernel mode
+.sp
+.in +2
+.nf
+\fBbuffer alloc 2m # allocate a 2 Megabyte buffer
+enable $all # enable all probes
+trace $all # trace all probes
+ktrace on # turn tracing on
+ktrace off # turn tracing back off
+pfilter on # turn process filter mode on
+pfilter add 1379 # add pid 1379 to process filter
+ktrace on # turn tracing on
+ # (only pid 1379 will be traced)\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.prexrc\fR\fR
+.ad
+.RS 15n
+.rt
+local \fBprex\fR initialization file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.prexrc\fR\fR
+.ad
+.RS 15n
+.rt
+user's \fBprex\fR initialization file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/\fInnnnn\fR\fR\fR
+.ad
+.RS 15n
+.rt
+process files
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBed\fR(1), \fBkill\fR(1), \fBksh\fR(1), \fBld\fR(1), \fBtnfdump\fR(1),
+\fBtnfxtract\fR(1), \fBtruss\fR(1), \fBexec\fR(2), \fBfork\fR(2),
+\fBfork1\fR(2), \fBvfork\fR(2), \fBTNF_DECLARE_RECORD\fR(3TNF),
+\fBTNF_PROBE\fR(3TNF), \fBdlclose\fR(3C), \fBdlopen\fR(3C),
+\fBgethrtime\fR(3C), \fBlibtnfctl\fR(3TNF), \fBtnf_process_disable\fR(3TNF),
+\fBtracing\fR(3TNF), \fBtnf_kernel_probes\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+Currently, the only probe function that is available is the \fB&debug\fR
+function. When this function is executed, it prints out the arguments sent in
+to the probe as well as the value associated with the \fBsunw%debug\fR
+attribute in the detail field (if any) to \fBstderr\fR.
+.sp
+.LP
+For example, for the following probe point:
+.sp
+.in +2
+.nf
+TNF_PROBE_2(input_values, "testapp main",
+ "sunw%debug 'have read input values successfully'",
+ tnf_long, int_input, x,
+ tnf_string, string_input, input);
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If \fIx\fR was 100 and \fIinput\fR was the string "success", then the output of
+the debug probe function would be:
+.sp
+.in +2
+.nf
+probe input_values; sunw%debug "have read input values successfully";
+int_input=100; string_input="success";
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Some non-SPARC hardware lacks a true high-resolution timer, causing
+\fBgethrtime()\fR to return the same value multiple times in succession. This
+can lead to problems in how some tools interpret the trace file. This situation
+can be improved by interposing a version of \fBgethrtime()\fR, which causes
+these successive values to be artificially incremented by one nanosecond:
+.sp
+.in +2
+.nf
+hrtime_t
+gethrtime()
+{
+ static mutex_t lock;
+ static hrtime_t (*real_gethrtime)(void) = NULL;
+ static hrtime_t last_time = 0;
+
+ hrtime_t this_time;
+
+ if (real_gethrtime == NULL) {
+ real_gethrtime =
+ (hrtime_t (*)(void)) dlsym(RTLD_NEXT, "gethrtime");
+ }
+ this_time = real_gethrtime();
+
+ mutex_lock(&lock);
+ if (this_time <= last_time)
+ this_time = ++last_time;
+ else
+ last_time = this_time;
+ mutex_unlock(&lock);
+
+ return (this_time);
+}
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Of course, this does not increase the resolution of the timer, so timestamps
+for individual events are still relatively inaccurate. But this technique
+maintains ordering, so that if event A causes event B, B never appears to
+happen before or at the same time as A.
+.sp
+.LP
+\fBdbx\fR is available with the Sun Workshop Products.
+.SH BUGS
+.sp
+.LP
+\fBprex\fR should issue a notification when a process id has been automatically
+deleted from the filter set.
+.sp
+.LP
+There is a known bug in \fBprex\fR which can result in this message:
+.sp
+.in +2
+.nf
+Tracing shut down in target program due to an internal
+error - Please restart prex and target
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When \fBprex\fR runs as root, and the target process is not root, and the
+tracefile is placed in a directory where it cannot be removed and re-created (a
+directory with the sticky bit on, like \fB/tmp\fR),mm then the target process
+will not be able to open the tracefile when it needs to. This results in
+tracing being disabled.
+.sp
+.LP
+Changing any of the circumstances listed above should fix the problem. Either
+don't run \fBprex\fR as root, or run the target process as root, or specify the
+tracefile in a directory other than \fB/tmp\fR.
diff --git a/usr/src/man/man1/print.1 b/usr/src/man/man1/print.1
new file mode 100644
index 0000000000..294fce44b4
--- /dev/null
+++ b/usr/src/man/man1/print.1
@@ -0,0 +1,347 @@
+'\" te
+.\" Copyright (c) 2008 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH print 1 "27 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+print \- shell built-in function to output characters to the screen or window
+.SH SYNOPSIS
+.SS "ksh"
+.LP
+.nf
+\fBprint\fR [\fB-Rnprsu\fR [\fIn\fR]] [\fIarg\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBprint\fR [\fB-Renprs\fR] [\fB-f\fR \fIformat\fR] [\fB-u\fR \fIfd\fR] [\fIstring\fR...]
+.fi
+
+.SH DESCRIPTION
+.SS "ksh"
+.sp
+.LP
+The shell output mechanism. When no options are specified, or when an option
+followed by \fB\&'\fR a \fB\(mi\fR is specified, or when just \fB-\fR is
+specified, the arguments are printed on standard output as described by
+\fBecho\fR(1).
+.SS "ksh93"
+.sp
+.LP
+By default, \fBprint\fR writes each string operand to standard output and
+appends a NEWLINE character.
+.sp
+.LP
+Unless, the \fB-r\fR, \fB-R\fR, or \fB-f\fR option is speciifed, each \fB\e\fR
+character in each string operand is processed specially as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ea\fR\fR
+.ad
+.RS 8n
+.rt
+Alert character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eb\fR\fR
+.ad
+.RS 8n
+.rt
+Backspace character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ec\fR\fR
+.ad
+.RS 8n
+.rt
+Terminate output without appending NEWLINE. The remaining string operands are
+ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eE\fR\fR
+.ad
+.RS 8n
+.rt
+Escape character (\fBASCII\fR octal \fB033\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ef\fR\fR
+.ad
+.RS 8n
+.rt
+FORM FEED character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\en\fR\fR
+.ad
+.RS 8n
+.rt
+NEWLINE character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\et\fR\fR
+.ad
+.RS 8n
+.rt
+Tab character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ev\fR\fR
+.ad
+.RS 8n
+.rt
+Vertical tab character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\e\fR\fR
+.ad
+.RS 8n
+.rt
+Backslash character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e0\fR\fIx\fR\fR
+.ad
+.RS 8n
+.rt
+The 8-bit character whose \fBASCII\fR code is the \fB1\fR-, \fB2\fR-, or
+\fB3\fR-digit octal number \fIx\fR.
+.RE
+
+.SH OPTIONS
+.SS "ksh"
+.sp
+.LP
+The following options are supported by \fBksh\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 12n
+.rt
+Suppresses \fBnew-line\fR from being added to the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fB-R\fR\fR
+.ad
+.RS 12n
+.rt
+Raw mode. Ignore the escape conventions of \fBecho\fR. The \fB-R\fR option
+prints all subsequent arguments and options other than \fB-n\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 12n
+.rt
+Cause the arguments to be written onto the pipe of the process spawned with
+\fB|&\fR instead of standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 12n
+.rt
+Cause the arguments to be written onto the history file instead of standard
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR [ \fIn\fR ]\fR
+.ad
+.RS 12n
+.rt
+Specify a one digit file descriptor unit number \fIn\fR on which the output is
+placed. The default is 1.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fI\fR\fR
+.ad
+.RS 13n
+.rt
+Unless \fB-f\fR is specified, process \fB\e\fR sequences in each string operand
+as described above. This is the default behavior.
+.sp
+If both \fB-e\fR and \fB-r\fR are specified, the last one specified is the one
+that is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIformat\fR\fR
+.ad
+.RS 13n
+.rt
+Write the string arguments using the format string \fIformat\fR and do not
+append a NEWLINE. See \fBprintf\fR(1) for details on how to specify format.
+.sp
+When the \fB-f\fR option is specified and there are more string operands than
+format specifiers, the format string is reprocessed from the beginning. If
+there are fewer string operands than format specifiers, then outputting ends at
+the first unneeded format specifier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 13n
+.rt
+Do not append a NEWLINE character to the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 13n
+.rt
+Write to the current co-process instead of standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 13n
+.rt
+Do not process \fB\e\fR sequences in each string operand as described above.
+.sp
+If both \fB-e\fR and \fB-r\fR are specified, the last one specified is the one
+that is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Write the output as an entry in the shell history file instead of standard
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIfd\fR\fR
+.ad
+.RS 13n
+.rt
+Write to file descriptor number \fIfd\fR instead of standard output. The
+default value is \fB1\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+Output file is not open for writing.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBecho\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBprintf\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/printf.1 b/usr/src/man/man1/printf.1
new file mode 100644
index 0000000000..6c3cc5b476
--- /dev/null
+++ b/usr/src/man/man1/printf.1
@@ -0,0 +1,992 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH printf 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+printf \- write formatted output
+.SH SYNOPSIS
+.SS "/usr/bin/printf"
+.LP
+.nf
+\fBprintf\fR \fIformat\fR [\fIargument\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBprintf\fR \fIformat\fR [\fIstring\fR...]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/printf"
+.sp
+.LP
+The \fBprintf\fR utility writes each string operand to standard output using
+\fIformat\fR to control the output format.
+.SH OPERANDS
+.SS "/usr/bin/printf"
+.sp
+.LP
+The following operands are supported by \fB/usr/bin/printf\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIformat\fR\fR
+.ad
+.RS 12n
+.rt
+A string describing the format to use to write the remaining operands. The
+\fIformat\fR operand is used as the \fIformat\fR string described on the
+\fBformats\fR(5) manual page, with the following exceptions:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A \fBSPACE\fR character in the format string, in any context other than a flag
+of a conversion specification, is treated as an ordinary character that is
+copied to the output.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A character in the format string is treated as a character, not as a
+\fBSPACE\fR character.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+In addition to the escape sequences described on the \fBformats\fR(5) manual
+page (\fB\e\e\fR, \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR, \fB\er\fR,
+\fB\et\fR, \fB\ev\fR), \fB\e\fR\fIddd\fR, where \fIddd\fR is a one-, two- or
+three-digit octal number, is written as a byte with the numeric value specified
+by the octal number.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The program does not precede or follow output from the \fBd\fR or \fBu\fR
+conversion specifications with blank characters not specified by the
+\fIformat\fR operand.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The program does not precede output from the \fBo\fR conversion specification
+with zeros not specified by the \fIformat\fR operand.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+An additional conversion character, \fBb\fR, is supported as follows. The
+argument is taken to be a string that can contain backslash-escape sequences.
+The following backslash-escape sequences are supported:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the escape sequences listed on the \fBformats\fR(5) manual page (\fB\e\e\fR,
+\fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR, \fB\er\fR, \fB\et\fR, \fB\ev\fR),
+which are converted to the characters they represent
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fB\e0\fR\fIddd\fR, where \fIddd\fR is a zero-, one-, two- or three-digit octal
+number that is converted to a byte with the numeric value specified by the
+octal number
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fB\ec\fR, which is written and causes \fBprintf\fR to ignore any remaining
+characters in the string operand containing it, any remaining string operands
+and any additional characters in the \fIformat\fR operand.
+.RE
+.RE
+The interpretation of a backslash followed by any other sequence of characters
+is unspecified.
+.sp
+Bytes from the converted string are written until the end of the string or the
+number of bytes indicated by the precision specification is reached. If the
+precision is omitted, it is taken to be infinite, so all bytes up to the end of
+the converted string are written. For each specification that consumes an
+argument, the next argument operand is evaluated and converted to the
+appropriate type for the conversion as specified below. The \fIformat\fR
+operand is reused as often as necessary to satisfy the argument operands. Any
+extra \fBc\fR or \fBs\fR conversion specifications are evaluated as if a null
+string argument were supplied; other extra conversion specifications are
+evaluated as if a zero argument were supplied. If the \fIformat\fR operand
+contains no conversion specifications and \fIargument\fR operands are present,
+the results are unspecified. If a character sequence in the \fIformat\fR
+operand begins with a \fB%\fR character, but does not form a valid conversion
+specification, the behavior is unspecified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+The strings to be written to standard output, under the control of
+\fBformat\fR. The \fIargument\fR operands are treated as strings if the
+corresponding conversion character is \fBb\fR, \fBc\fR or \fBs\fR. Otherwise,
+it is evaluated as a C constant, as described by the ISO C standard, with the
+following extensions:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A leading plus or minus sign is allowed.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the leading character is a single- or double-quote, the value is the numeric
+value in the underlying codeset of the character following the single- or
+double-quote.
+.RE
+If an argument operand cannot be completely converted into an internal value
+appropriate to the corresponding conversion specification, a diagnostic message
+is written to standard error and the utility does not exit with a zero exit
+status, but continues processing any remaining operands and writes the value
+accumulated at the time the error was detected to standard output.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The \fIformat\fR operands support the full range of ANSI C/C99/XPG6 formatting
+specifiers as well as additional specifiers:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%b\fR\fR
+.ad
+.RS 6n
+.rt
+Each character in the string operand is processed specially, as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ea\fR\fR
+.ad
+.RS 8n
+.rt
+Alert character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eb\fR\fR
+.ad
+.RS 8n
+.rt
+Backspace character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ec\fR\fR
+.ad
+.RS 8n
+.rt
+Terminate output without appending NEWLINE. The remaining string operands are
+ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\eE\fR\fR
+.ad
+.RS 8n
+.rt
+Escape character (\fBASCII\fR octal \fB033\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ef\fR\fR
+.ad
+.RS 8n
+.rt
+FORM FEED character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\en\fR\fR
+.ad
+.RS 8n
+.rt
+NEWLINE character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\et\fR\fR
+.ad
+.RS 8n
+.rt
+TAB character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\ev\fR\fR
+.ad
+.RS 8n
+.rt
+Vertical tab character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\e\fR\fR
+.ad
+.RS 8n
+.rt
+Backslash character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e0\fR\fIx\fR\fR
+.ad
+.RS 8n
+.rt
+The 8-bit character whose \fBASCII\fR code is the \fB1\fR-, \fB2\fR-, or
+\fB3\fR-digit octal number \fIx\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%B\fR\fR
+.ad
+.RS 6n
+.rt
+Treat the argument as a variable name and output the value without converting
+it to a string. This is most useful for variables of type \fB-b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%H\fR\fR
+.ad
+.RS 6n
+.rt
+Output string with characters \fB<\fR, \fB&\fR, \fB>\fR, \fB"\fR, and
+non-printable characters, properly escaped for use in HTML and XML documents.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%P\fR\fR
+.ad
+.RS 6n
+.rt
+Treat \fIstring\fR as an extended regular expression and convert it to a shell
+pattern.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%q\fR\fR
+.ad
+.RS 6n
+.rt
+Output \fIstring\fR quoted in a manner that it can be read in by the shell to
+get back the same string. However, empty strings resulting from missing string
+operands are not quoted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%R\fR\fR
+.ad
+.RS 6n
+.rt
+Treat \fIstring\fR as an shell pattern expression and convert it to an extended
+regular expression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%T\fR\fR
+.ad
+.RS 6n
+.rt
+Treat \fIstring\fR as a date/time string and format it. The \fBT\fR can be
+preceded by (\fIdformat\fR), where \fIdformat\fR is a date format as defined by
+the \fBdate\fR(1) command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%Z\fR\fR
+.ad
+.RS 6n
+.rt
+Output a byte whose value is \fB0\fR.
+.RE
+
+.sp
+.LP
+When performing conversions of \fIstring\fR to satisfy a numeric format
+specifier, if the first character of \fIstring\fR is \fB"or'\fR, the value is
+the numeric value in the underlying code set of the character following the
+\fB"or'\fR. Otherwise, \fIstring\fR is treated like a shell arithmetic
+expression and evaluated.
+.sp
+.LP
+If a \fIstring\fR operand cannot be completely converted into a value
+appropriate for that format specifier, an error occurs, but remaining
+\fIstring\fR operands continue to be processed.
+.sp
+.LP
+In addition to the format specifier extensions, the following extensions of
+ANSI C/C99/XPG6 are permitted in format specifiers:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The escape sequences \fB\eE\fR and \fB\ee\fR expand to the escape character
+which is octal 033 in ASCII.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The escape sequence \fB\ecx\fR expands to CTRL-x.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The escape sequence \fB\eC[.\fR\fIname\fR\fB\&.]\fR expands to the collating
+element \fIname\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The escape sequence \fB\ex{hex}\fRexpands to the character corresponding to the
+hexadecimal value \fBhex\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The format modifier flag = can be used to center a field to a specified width.
+When the output is a terminal, the character width is used rather than the
+number of bytes.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each of the integral format specifiers can have a third modifier after width
+and precision that specifies the base of the conversion from 2 to 64. In this
+case, the \fB#\fR modifier causes \fIbase\fR\fB#\fR to be prepended to the
+value.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fB#\fR modifier can be used with the \fBd\fR specifier when no base is
+specified to cause the output to be written in units of 1000 with a suffix of
+one of \fBk M G T P E\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fB#\fR modifier can be used with the \fBi\fR specifier to cause the output
+to be written in units of \fB1024\fR with a suffix of one of \fBKi Mi Gi Ti Pi
+Ei\fR.
+.RE
+.sp
+.LP
+If there are more \fIstring\fR operands than format specifiers, the format
+string is reprocessed from the beginning. If there are fewer \fIstring\fR
+operands than format specifiers, then \fIstring\fR specifiers are treated as if
+empty strings were supplied, numeric conversions are treated as if \fB0\fR was
+supplied, and time conversions are treated as if \fBnow\fR was supplied.
+.sp
+.LP
+\fB/usr/bin/printf\fR is equivalent to \fBksh93\fR's \fBprintf\fR built-in and
+\fBprint -f\fR, which allows additional options to be specified.
+.SH USAGE
+.SS "/usr/bin/printf"
+.sp
+.LP
+The \fBprintf\fR utility, like the \fBprintf\fR(3C) function on which it is
+based, makes no special provision for dealing with multi-byte characters when
+using the \fB%c\fR conversion specification. Applications should be extremely
+cautious using either of these features when there are multi-byte characters in
+the character set.
+.sp
+.LP
+Field widths and precisions cannot be specified as \fB*\fR.
+.sp
+.LP
+The \fB%b\fR conversion specification is not part of the ISO C standard; it has
+been added here as a portable way to process backslash escapes expanded in
+string operands as provided by the \fBecho\fR utility. See also the USAGE
+section of the \fBecho\fR(1) manual page for ways to use \fBprintf\fR as a
+replacement for all of the traditional versions of the \fBecho\fR utility.
+.sp
+.LP
+If an argument cannot be parsed correctly for the corresponding conversion
+specification, the \fBprintf\fR utility reports an error. Thus, overflow and
+extraneous characters at the end of an argument being used for a numeric
+conversion are to be reported as errors.
+.sp
+.LP
+It is not considered an error if an argument operand is not completely used for
+a \fBc\fR or \fBs\fR conversion or if a string operand's first or second
+character is used to get the numeric value of a character.
+.SH EXAMPLES
+.SS "/usr/bin/printf"
+.LP
+\fBExample 1 \fRPrinting a Series of Prompts
+.sp
+.LP
+The following example alerts the user, then prints and reads a series of
+prompts:
+
+.sp
+.in +2
+.nf
+example% \fBprintf "\eaPlease fill in the following: \enName: "
+read name
+printf "Phone number: "
+read phone\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRPrinting a Table of Calculations
+.sp
+.LP
+The following example prints a table of calculations. It reads out a list of
+right and wrong answers from a file, calculates the percentage correctly, and
+prints them out. The numbers are right-justified and separated by a single tab
+character. The percentage is written to one decimal place of accuracy:
+
+.sp
+.in +2
+.nf
+example% \fBwhile read right wrong ; do
+ percent=$(echo "scale=1;($right*100)/($right+$wrong)" | bc)
+ printf "%2d right\et%2d wrong\et(%s%%)\en" \e
+ $right $wrong $percent
+done < database_file\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRPrinting number strings
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% \fBprintf "%5d%4d\en" 1 21 321 4321 54321\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+ 1 21
+ 3214321
+54321 0
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fIformat\fR operand is used three times to print all of the given strings
+and that a \fB0\fR was supplied by \fBprintf\fR to satisfy the last \fB%4d\fR
+conversion specification.
+
+.LP
+\fBExample 4 \fRTabulating Conversion Errors
+.sp
+.LP
+The following example tabulates conversion errors.
+
+.sp
+.LP
+The \fBprintf\fR utility tells the user when conversion errors are detected
+while producing numeric output. These results would be expected on an
+implementation with 32-bit twos-complement integers when \fB%d\fR is specified
+as the \fIformat\fR operand:
+
+.sp
+
+.sp
+.TS
+tab() box;
+cw(1.27i) cw(1.27i) cw(2.96i)
+lw(1.27i) lw(1.27i) lw(2.96i)
+.
+ArgumentsStandardDiagnostic
+5a5printf: 5a not completely converted
+99999999992147483647printf: 9999999999: Results too large
+-9999999999-2147483648printf: -9999999999: Results too large
+ABC0printf: ABC expected numeric value
+.TE
+
+.sp
+.LP
+The value shown on standard output is what would be expected as the return
+value from the function \fBstrtol\fR(3C). A similar correspondence exists
+between \fB%u\fR and \fBstrtoul\fR(3C), and \fB%e\fR, \fB%f\fR and \fB%g\fR and
+\fBstrtod\fR(3C).
+
+.LP
+\fBExample 5 \fRPrinting Output for a Specific Locale
+.sp
+.LP
+The following example prints output for a specific locale. In a locale using
+the ISO/IEC 646:1991 standard as the underlying codeset, the command:
+
+.sp
+.in +2
+.nf
+example% \fBprintf "%d\en" 3 +3 -3 \e'3 \e"+3 "'-3"\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+
+.sp
+.TS
+tab() box;
+lw(.5i) lw(5i)
+lw(.5i) lw(5i)
+.
+\fB3\fRNumeric value of constant 3
+\fB3\fRNumeric value of constant 3
+\fB\(mi3\fRNumeric value of constant \(mi3
+\fB51\fRT{
+Numeric value of the character `3' in the ISO/IEC 646:1991 standard codeset
+T}
+\fB43\fRT{
+Numeric value of the character `+' in the ISO/IEC 646:1991 standard codeset
+T}
+\fB45\fRT{
+Numeric value of the character `\(mi' in the SO/IEC 646:1991 standard codeset
+T}
+.TE
+
+.sp
+.LP
+In a locale with multi-byte characters, the value of a character is intended to
+be the value of the equivalent of the \fBwchar_t\fR representation of the
+character.
+
+.sp
+.LP
+If an argument operand cannot be completely converted into an internal value
+appropriate to the corresponding conversion specification, a diagnostic message
+is written to standard error and the utility does exit with a zero exit status,
+but continues processing any remaining operands and writes the value
+accumulated at the time the error was detected to standard output.
+
+.LP
+\fBExample 6 \fRAlternative floating point representation 1
+.sp
+.LP
+The \fBprintf\fR utility supports an alternative floating point representation
+(see \fBprintf\fR(3C) entry for the "\fB%a\fR"/"\fB%A\fR"), which allows the
+output of floating-point values in a format that avoids the usual base16 to
+base10 rounding errors.
+
+.sp
+.in +2
+.nf
+example% printf "%a\n" 2 3.1 NaN
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+0x1.0000000000000000000000000000p+01
+0x1.8ccccccccccccccccccccccccccdp+01
+nan
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRAlternative floating point representation 2
+.sp
+.LP
+The following example shows two different representations of the same
+floating-point value.
+
+.sp
+.in +2
+.nf
+example% x=2 ; printf "%f == %a\n" x x
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+2.000000 == 0x1.0000000000000000000000000000p+01
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fROutput of unicode values
+.sp
+.LP
+The following command will print the EURO unicode symbol (code-point 0x20ac).
+
+.sp
+.in +2
+.nf
+example% LC_ALL=en_US.UTF-8 printf "\u[20ac]\n"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+<euro>
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where "<euro>" represents the EURO currency symbol character.
+
+.LP
+\fBExample 9 \fRConvert unicode character to unicode code-point value
+.sp
+.LP
+The following command will print the hexadecimal value of a given character.
+
+.sp
+.in +2
+.nf
+example% export LC_ALL=en_US.UTF-8
+example% printf "%x\n" "'<euro>"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where "<euro>" represents the EURO currency symbol character (code-point
+0x20ac).
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+20ac
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 10 \fRPrint the numeric value of an ASCII character
+.sp
+.in +2
+.nf
+example% printf "%d\n" "'A"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces:
+
+.sp
+.in +2
+.nf
+65
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 11 \fRPrint the language-independent date and time format
+.sp
+.LP
+To print the language-independent date and time format, the following statement
+could be used:
+
+.sp
+.in +2
+.nf
+example% printf "format" weekday month day hour min
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+For example,
+
+.sp
+.in +2
+.nf
+$ printf format "Sunday" "July" 3 10 2
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+For American usage, format could be the string:
+
+.sp
+.in +2
+.nf
+"%s, %s %d, %d:%.2d\n"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+producing the message:
+
+.sp
+.in +2
+.nf
+Sunday, July 3, 10:02
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Whereas for EU usage, format could be the string:
+
+.sp
+.in +2
+.nf
+"%1$s, %3$d. %2$s, %4$d:%5$.2d\n"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Note that the '$' characters must be properly escaped, such as
+
+.sp
+.in +2
+.nf
+"%1\$s, %3\$d. %2\$s, %4\$d:%5\$.2d\n" in this case
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+producing the message:
+
+.sp
+.in +2
+.nf
+Sunday, 3. July, 10:02
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBprintf\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_NUMERIC\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/printf"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBawk\fR(1), \fBbc\fR(1), \fBdate\fR(1), \fBecho\fR(1), \fBksh93\fR(1),
+\fBprintf\fR(3C), \fBstrtod\fR(3C), \fBstrtol\fR(3C), \fBstrtoul\fR(3C),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBformats\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Using format specifiers (characters following '%') which are not listed in the
+\fBprintf\fR(3C) or this manual page will result in undefined behavior.
+.sp
+.LP
+Using escape sequences (the character following a backslash ('\')) which are
+not listed in the \fBprintf\fR(3C) or this manual page will result in undefined
+behavior.
+.sp
+.LP
+Floating-point values follow C99, XPG6 and IEEE 754 standard behavior and can
+handle values the same way as the platform's |\fBlong double\fR| datatype.
+.sp
+.LP
+Floating-point values handle the sign separately which allows signs for values
+like NaN (for example, -nan), Infinite (for example, -inf) and zero (for
+example, -0.0).
diff --git a/usr/src/man/man1/priocntl.1 b/usr/src/man/man1/priocntl.1
new file mode 100644
index 0000000000..9c9c829de0
--- /dev/null
+++ b/usr/src/man/man1/priocntl.1
@@ -0,0 +1,1111 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH priocntl 1 "1 Apr 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+priocntl \- display or set scheduling parameters of specified process(es)
+.SH SYNOPSIS
+.LP
+.nf
+\fBpriocntl\fR \fB-l\fR
+.fi
+
+.LP
+.nf
+\fBpriocntl\fR \fB-d\fR [\fB-i\fR \fIidtype\fR] [\fIidlist\fR]
+.fi
+
+.LP
+.nf
+\fBpriocntl\fR \fB-s\fR [\fB-c\fR \fIclass\fR] [\fIclass-specific\fR \fIoptions\fR]
+ [\fB-i\fR \fIidtype\fR] [\fIidlist\fR]
+.fi
+
+.LP
+.nf
+\fBpriocntl\fR \fB-e\fR [\fB-c\fR \fIclass\fR] [\fIclass-specific\fR \fIoptions\fR] \fIcommand\fR
+ [\fIargument(s)\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpriocntl\fR command displays or sets scheduling parameters of the
+specified process(es). It can also be used to display the current configuration
+information for the system's process scheduler or execute a command with
+specified scheduling parameters.
+.sp
+.LP
+Processes fall into distinct classes with a separate scheduling policy applied
+to each class. The process classes currently supported are the real-time class,
+time-sharing class, interactive class, fair-share class, and the fixed priority
+class. The characteristics of these classes and the class-specific options they
+accept are described below in the USAGE section under the headings \fBReal-Time
+Class\fR, \fBTime-Sharing Class\fR, \fBInter-Active Class\fR, \fBFair-Share
+Class\fR, and \fBFixed-Priority Class\fR. With appropriate permissions, the
+\fBpriocntl\fR command can change the class and other scheduling parameters
+associated with a running process.
+.sp
+.LP
+In the default configuration, a runnable real-time process runs before any
+other process. Therefore, inappropriate use of real-time processes can have a
+dramatic negative impact on system performance.
+.sp
+.LP
+If an \fIidlist\fR is present, it must appear last on the command line and the
+elements of the list must be separated by white space. If no \fIidlist\fR is
+present, an \fIidtype\fR argument of \fBpid\fR, \fBppid\fR, \fBpgid\fR,
+\fBsid\fR, \fBtaskid\fR, \fBclass\fR, \fBuid\fR, \fBgid\fR, \fBprojid\fR, or
+\fBzoneid\fR specifies the process \fBID\fR, parent process \fBID\fR, process
+group \fBID\fR, session \fBID\fR, task \fBID\fR, class, user \fBID\fR, group
+\fBID\fR, project \fBID\fR, or zone \fBID\fR, respectively, of the
+\fBpriocntl\fR command itself.
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBpriocntl -d [-i \fIidtype\fR] [\fIidlist\fR]\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+displays the class and class-specific scheduling parameters of the process(es)
+specified by \fIidtype\fR and \fIidlist\fR.
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBpriocntl -s [-c \fIclass\fR] [\fIclass-specific options\fR] \e
+ [-i \fIidtype\fR] [\fIidlist\fR]\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+sets the class and class-specific parameters of the specified processes to the
+values given on the command line. The \fB-c\fR \fIclass\fR option specifies the
+class to be set. (The valid \fIclass\fR arguments are \fBRT\fR for real-time,
+\fBTS\fR for time-sharing, \fBIA\fR for inter-active, \fBFSS\fR for fair-share,
+or \fBFX\fR for fixed-priority.)
+.sp
+.LP
+The class-specific parameters to be set are specified by the class-specific
+options as explained under the appropriate heading below. If the \fB-c\fR
+\fIclass\fR option is omitted, \fIidtype\fR and \fIidlist\fR must specify a set
+of processes which are all in the same class, otherwise an error results. If no
+class-specific options are specified, the process's class-specific parameters
+are set to the default values for the class specified by \fB-c\fR \fIclass\fR
+(or to the default parameter values for the process's current class if the
+\fB-c\fR \fIclass\fR option is also omitted).
+.sp
+.LP
+In order to change the scheduling parameters of a process using \fBpriocntl\fR
+the real or effective user \fBID\fR (respectively, groupID) of the user
+invoking \fBpriocntl\fR must match the real or effective user \fBID\fR
+(respectively, groupID) of the receiving process or the effective user \fBID\fR
+of the user must be super-user. These are the minimum permission requirements
+enforced for all classes. An individual class can impose additional permissions
+requirements when setting processes to that class or when setting
+class-specific scheduling parameters.
+.sp
+.LP
+When \fIidtype\fR and \fIidlist\fR specify a set of processes, \fBpriocntl\fR
+acts on the processes in the set in an implementation-specific order. If
+\fBpriocntl\fR encounters an error for one or more of the target processes, it
+can or cannot continue through the set of processes, depending on the nature of
+the error.
+.sp
+.LP
+If the error is related to permissions, \fBpriocntl\fR prints an error message
+and then continues through the process set, resetting the parameters for all
+target processes for which the user has appropriate permissions. If
+\fBpriocntl\fR encounters an error other than permissions, it does not continue
+through the process set but prints an error message and exits immediately.
+.sp
+.LP
+A special \fBsys\fR scheduling class exists for the purpose of scheduling the
+execution of certain special system processes (such as the swapper process). It
+is not possible to change the class of any process to \fBsys\fR. In addition,
+any processes in the \fBsys\fR class that are included in the set of processes
+specified by \fIidtype\fR and \fIidlist\fR are disregarded by \fBpriocntl\fR.
+For example, if \fIidtype\fR were \fBuid\fR, an \fIidlist\fR consisting of a
+zero would specify all processes with a \fBUID\fR of \fB0\fR, except processes
+in the \fBsys\fR class and (if changing the parameters using the \fB-s\fR
+option) the \fBinit\fR process.
+.sp
+.LP
+The \fBinit\fR process (process \fBID\fR \fB1\fR) is a special case. In order
+for the \fBpriocntl\fR command to change the class or other scheduling
+parameters of the \fBinit\fR process, \fIidtype\fR must be \fBpid\fR and
+\fIidlist\fR must be consist of only a \fB1\fR. The \fBinit\fR process can be
+assigned to any class configured on the system, but the time-sharing class is
+almost always the appropriate choice. Other choices can be highly undesirable;
+see the \fISystem Administration Guide: Basic Administration\fR for more
+information.
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBpriocntl -e [-c \fIclass\fR\fR\fB]\fR\fB [\fIclass-specific options\fR] \fIcommand\fR \e
+ [\fIargument...\fR]\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+executes the specified command with the class and scheduling parameters
+specified on the command line (\fIarguments\fR are the arguments to the
+command). If the \fB-c\fR \fIclass\fR option is omitted the command is run in
+the user's current class.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIclass\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies the \fIclass\fR to be set. (The valid \fIclass\fR arguments are
+\fBRT\fR for real-time, \fBTS\fR for time-sharing, \fBIA\fR for inter-active,
+\fBFSS\fR for fair-share, or \fBFX\fR for fixed-priority.) If the specified
+class is not already configured, it is automatically configured.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 13n
+.rt
+Displays the scheduling parameters associated with a set of processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 13n
+.rt
+Executes a specified command with the class and scheduling parameters
+associated with a set of processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIidtype\fR\fR
+.ad
+.RS 13n
+.rt
+This option, together with the \fIidlist\fR arguments (if any), specifies one
+or more processes to which the \fBpriocntl\fR command is to apply. The
+interpretation of \fIidlist\fR depends on the value of \fIidtype\fR. If the
+\fB-i\fR \fIidtype\fR option is omitted when using the \fB-d\fR or \fB-s\fR
+options the default \fIidtype\fR of \fBpid\fR is assumed.
+.sp
+The valid \fIidtype\fR arguments and corresponding interpretations of
+\fIidlist\fR are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBall\fR\fR
+.ad
+.RS 13n
+.rt
+The \fBpriocntl\fR command applies to all existing processes. No \fIidlist\fR
+should be specified (if one is specified, it is ignored). The permission
+restrictions described below still apply.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBctid\fR\fR
+.ad
+.RS 13n
+.rt
+idlist is a list of process contract IDs. The \fBpriocntl\fR command applies to
+all processes with a process contract ID equal to an ID from the list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBclass\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR consists of a single class name (\fBRT\fR for real-time, \fBTS\fR
+for time-sharing, \fBIA\fR for inter-active, \fBFSS\fR for fair-share, or
+\fBFX\fR for fixed-priority). The \fBpriocntl\fR command applies to all
+processes in the specified class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBgid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of group \fBID\fRs. The \fBpriocntl\fR command applies
+to all processes with an effective group \fBID\fR equal to an \fBID\fR from the
+list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBpgid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of process group \fBID\fRs. The \fBpriocntl\fR command
+applies to all processes in the specified process groups.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBpid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of process \fBID\fRs. The \fBpriocntl\fR command applies
+to the specified processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBppid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of parent process \fBID\fRs. The \fBpriocntl\fR command
+applies to all processes whose parent process \fBID\fR is in the list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBprojid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of project \fBID\fRs. The \fBpriocntl\fR command applies
+to all processes with an effective project \fBID\fR equal to an \fBID\fR from
+the list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBsid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of session \fBID\fRs. The \fBpriocntl\fR command applies
+to all processes in the specified sessions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBtaskid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of task \fBID\fRs. The \fBpriocntl\fR command applies to
+all processes in the specified tasks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBuid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of user \fBID\fRs. The \fBpriocntl\fR command applies to
+all processes with an effective user \fBID\fR equal to an \fBID\fR from the
+list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fBzoneid\fR\fR
+.ad
+.RS 13n
+.rt
+\fIidlist\fR is a list of zone \fBID\fRs. The \fBpriocntl\fR command applies to
+all processes with an effective zone \fBID\fR equal to an \fBID\fR from the
+list.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 13n
+.rt
+Displays a list of the classes currently configured in the system along with
+class-specific information about each class. The format of the class-specific
+information displayed is described under USAGE.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Sets the scheduling parameters associated with a set of processes.
+.RE
+
+.sp
+.LP
+The valid class-specific options for setting real-time parameters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIrtpri\fR\fR
+.ad
+.RS 21n
+.rt
+Sets the real-time priority of the specified process(es) to \fIrtpri\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItqntm\fR [\fB-r\fR \fIres\fR]\fR
+.ad
+.RS 21n
+.rt
+Sets the time quantum of the specified process(es) to \fItqntm\fR. You can
+optionally specify a resolution as explained below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR \fItqsig\fR\fR
+.ad
+.RS 21n
+.rt
+Sets the real-time time quantum signal of the specified process(es) to
+\fItqsig\fR.
+.RE
+
+.sp
+.LP
+The valid class-specific options for setting time-sharing parameters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fItsuprilim\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the user priority limit of the specified process(es) to \fItsuprilim\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fItsupri\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the user priority of the specified process(es) to \fItsupri\fR.
+.RE
+
+.sp
+.LP
+The valid class-specific options for setting inter-active parameters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIiauprilim\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the user priority limit of the specified process(es) to \fIiauprilim\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIiaupri\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the user priority of the specified process(es) to \fIiaupri\fR.
+.RE
+
+.sp
+.LP
+The valid class-specific options for setting fair-share parameters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIfssuprilim\fR\fR
+.ad
+.RS 17n
+.rt
+Sets the user priority limit of the specified process(es) to \fIfssuprilim\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIfssupri\fR\fR
+.ad
+.RS 17n
+.rt
+Sets the user priority of the specified process(es) to \fIfssupri\fR.
+.RE
+
+.sp
+.LP
+The valid class-specific options for setting fixed-priority parameters are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIfxuprilim\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the user priority limit of the specified process(es) to \fIfxuprilim\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIfxupri\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the user priority of the specified process(es) to \fIfxupri\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItqntm\fR\fR
+.ad
+.RS 16n
+.rt
+[\fB-r\fR \fIres\fR] Sets the time quantum of the specified process(es) to
+\fItqntm\fR. You can optionally specify a resolution as explained below.
+.RE
+
+.SH USAGE
+.SS "Real-Time Class"
+.sp
+.LP
+The real-time class provides a fixed priority preemptive scheduling policy for
+those processes requiring fast and deterministic response and absolute
+user/application control of scheduling priorities. If the real-time class is
+configured in the system, it should have exclusive control of the highest range
+of scheduling priorities on the system. This ensures that a runnable real-time
+process is given \fBCPU\fR service before any process belonging to any other
+class.
+.sp
+.LP
+The real-time class has a range of real-time priority (\fIrtpri\fR) values that
+can be assigned to processes within the class. Real-time priorities range from
+0 to \fIx\fR, where the value of \fIx\fR is configurable and can be displayed
+for a specific installation that has already configured a real-time scheduler,
+by using the command
+.sp
+.in +2
+.nf
+\fBpriocntl -l\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The real-time scheduling policy is a fixed priority policy. The scheduling
+priority of a real-time process never changes except as the result of an
+explicit request by the user/application to change the \fIrtpri\fR value of the
+process.
+.sp
+.LP
+For processes in the real-time class, the \fIrtpri\fR value is, for all
+practical purposes, equivalent to the scheduling priority of the process. The
+\fIrtpri\fR value completely determines the scheduling priority of a real-time
+process relative to other processes within its class. Numerically higher
+\fIrtpri\fR values represent higher priorities. Since the real-time class
+controls the highest range of scheduling priorities in the system, it is
+guaranteed that the runnable real-time process with the highest \fIrtpri\fR
+value is always selected to run before any other process in the system.
+.sp
+.LP
+In addition to providing control over priority, \fBpriocntl\fR provides for
+control over the length of the time quantum allotted to processes in the
+real-time class. The time quantum value specifies the maximum amount of time a
+process can run, assuming that it does not complete or enter a resource or
+event wait state (\fBsleep\fR). Notice that if another process becomes runnable
+at a higher priority, the currently running process can be preempted before
+receiving its full time quantum.
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBpriocntl -d [-i \fIidtype\fR] [\fIidlist\fR]\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+displays the real-time priority, time quantum (in millisecond resolution), and
+time quantum signal value for each real-time process in the set specified by
+\fIidtype\fR and \fIidlist\fR.
+.sp
+.LP
+Any combination of the \fB-p\fR, \fB-t\fR [\fB-r\fR], and \fB-q\fR options can
+be used with \fBpriocntl\fR \fB-s\fR or \fBpriocntl\fR \fB-e\fR for the
+real-time class. If an option is omitted and the process is currently
+real-time, the associated parameter is unaffected. If an option is omitted when
+changing the class of a process to real-time from some other class, the
+associated parameter is set to a default value. The default value for
+\fIrtpri\fR is \fB0\fR and the default for time quantum is dependent on the
+value of \fIrtpri\fR and on the system configuration; see \fBrt_dptbl\fR(4).
+.sp
+.LP
+When using the \fB-t\fR \fItqntm\fR option, you can optionally specify a
+resolution using the \fB-r\fR \fIres\fR option. (If no resolution is specified,
+millisecond resolution is assumed.) If \fIres\fR is specified, it must be a
+positive integer between \fB1\fR and \fB1,000,000,000\fR inclusively and the
+resolution used is the reciprocal of \fIres\fR in seconds. For example,
+specifying \fB-t\fR \fB10\fR \fB-r\fR \fB100\fR would set the resolution to
+hundredths of a second and the resulting time quantum length would be 10/100
+seconds (one tenth of a second). Although very fine (nanosecond) resolution can
+be specified, the time quantum length is rounded up by the system to the next
+integral multiple of the system clock's resolution. Requests for time quantums
+of zero or quantums greater than the (typically very large)
+implementation-specific maximum quantum result in an error.
+.sp
+.LP
+The real-time time quantum signal can be used to notify runaway real-time
+processes about the consumption of their time quantum. Those processes, which
+are monitored by the real-time time quantum signal, receive the configured
+signal in the event of time quantum expiration. The default value (\fB0\fR) of
+the time quantum signal \fItqsig\fR denotes no signal delivery. A positive
+value denotes the delivery of the signal specified by the value. Like
+\fBkill\fR(1) and other commands operating on signals, the \fB-q\fR \fItqsig\fR
+option is also able to handle symbolically named signals, like \fBXCPU\fR or
+\fBKILL\fR.
+.sp
+.LP
+In order to change the class of a process to real-time (from any other class),
+the user invoking \fBpriocntl\fR must have super-user privilege. In order to
+change the \fIrtpri\fR value or time quantum of a real-time process, the user
+invoking \fBpriocntl\fR must either be super-user, or must currently be in the
+real-time class (shell running as a real-time process) with a real or effective
+user \fBID\fR matching the real or effective user \fBID\fR of the target
+process.
+.sp
+.LP
+The real-time priority, time quantum, and time quantum signal are inherited
+across the \fBfork\fR(2) and \fBexec\fR(2) system calls. When using the time
+quantum signal with a user defined signal handler across the \fBexec\fR(2)
+system call, the new image must install an appropriate user defined signal
+handler before the time quantum expires. Otherwise, unpredicable behavior would
+result.
+.SS "Time-Sharing Class"
+.sp
+.LP
+The time-sharing scheduling policy provides for a fair and effective allocation
+of the \fBCPU\fR resource among processes with varying \fBCPU\fR consumption
+characteristics. The objectives of the time-sharing policy are to provide good
+response time to interactive processes and good throughput to \fBCPU\fR-bound
+jobs, while providing a degree of user/application control over scheduling.
+.sp
+.LP
+The time-sharing class has a range of time-sharing user priority (\fItsupri\fR)
+values that can be assigned to processes within the class. User priorities
+range from \(mi\fIx\fR to +\fIx\fR, where the value of \fIx\fR is configurable.
+The range for a specific installation can be displayed by using the command
+.sp
+.in +2
+.nf
+\fBpriocntl -l\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The purpose of the user priority is to provide some degree of user/application
+control over the scheduling of processes in the time-sharing class. Raising or
+lowering the \fItsupri\fR value of a process in the time-sharing class raises
+or lowers the scheduling priority of the process. It is not guaranteed,
+however, that a time-sharing process with a higher \fItsupri\fR value runs
+before one with a lower \fItsupri\fR value. This is because the \fItsupri\fR
+value is just one factor used to determine the scheduling priority of a
+time-sharing process. The system can dynamically adjust the internal scheduling
+priority of a time-sharing process based on other factors such as recent
+\fBCPU\fR usage.
+.sp
+.LP
+In addition to the system-wide limits on user priority (displayed with
+\fBpriocntl\fR \fB-l\fR), there is a per process user priority limit
+(\fItsuprilim\fR), which specifies the maximum \fItsupri\fR value that can be
+set for a given process.
+.sp
+.LP
+The command
+.sp
+.in +2
+.nf
+\fBpriocntl -d [-i \fIidtype\fR] [\fIidlist\fR]\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+displays the user priority and user priority limit for each time-sharing
+process in the set specified by \fIidtype\fR and \fIidlist\fR.
+.sp
+.LP
+Any time-sharing process can lower its own \fItsuprilim\fR (or that of another
+process with the same user \fBID\fR). Only a time-sharing process with
+super-user privilege can raise a \fItsuprilim\fR. When changing the class of a
+process to time-sharing from some other class, super-user privilege is required
+in order to set the initial \fItsuprilim\fR to a value greater than zero.
+.sp
+.LP
+Any time-sharing process can set its own \fItsupri\fR (or that of another
+process with the same user \fBID\fR) to any value less than or equal to the
+process's \fItsuprilim\fR. Attempts to set the \fItsupri\fR above the
+\fItsuprilim\fR (and/or set the \fItsuprilim\fR below the \fItsupri\fR) result
+in the \fItsupri\fR being set equal to the \fItsuprilim\fR.
+.sp
+.LP
+Any combination of the \fB-m\fR and \fB-p\fR options can be used with
+\fBpriocntl\fR \fB-s\fR or \fBpriocntl\fR \fB-e\fR for the time-sharing class.
+If an option is omitted and the process is currently time-sharing, the
+associated parameter is normally unaffected. The exception is when the \fB-p\fR
+option is omitted and \fB-m\fR is used to set a \fItsuprilim\fR below the
+current \fItsupri\fR. In this case, the \fItsupri\fR is set equal to the
+\fItsuprilim\fR which is being set. If an option is omitted when changing the
+class of a process to time-sharing from some other class, the associated
+parameter is set to a default value. The default value for \fItsuprilim\fR is
+\fB0\fR and the default for \fItsupri\fR is to set it equal to the
+\fItsuprilim\fR value which is being set.
+.sp
+.LP
+The time-sharing user priority and user priority limit are inherited across the
+\fBfork\fR(2) and \fBexec\fR(2) system calls.
+.SS "Inter-Active Class"
+.sp
+.LP
+The inter-active scheduling policy provides for a fair and effective allocation
+of the \fBCPU\fR resource among processes with varying \fBCPU\fR consumption
+characteristics while providing good responsiveness for user interaction. The
+objectives of the inter-active policy are to provide good response time to
+interactive processes and good throughput to \fBCPU\fR-bound jobs. The
+priorities of processes in the inter-active class can be changed in the same
+manner as those in the time-sharing class, though the modified priorities
+continue to be adjusted to provide good responsiveness for user interaction.
+.sp
+.LP
+The inter-active user priority limit, \fIiaupri\fR, is equivalent to
+\fItsupri\fR. The inter-active per process user priority, \fIiauprilim\fR, is
+equivalent to \fItsuprilim\fR.
+.sp
+.LP
+Inter-active class processes that have the \fIiamode\fR ("interactive mode")
+bit set are given a priority boost value of \fB10\fR, which is factored into
+the user mode priority of the process when that calculation is made, that is,
+every time a process's priority is adjusted. This feature is used by the X
+windowing system, which sets this bit for those processes that run inside of
+the current active window to give them a higher priority.
+.SS "Fair-Share Class"
+.sp
+.LP
+The fair-share scheduling policy provides a fair allocation of system \fBCPU\fR
+resources among projects, independent of the number of processes they own.
+Projects are given "shares" to control their entitlement to \fBCPU\fR
+resources. Resource usage is remembered over time, so that entitlement is
+reduced for heavy usage, and increased for light usage, with respect to other
+projects. \fBCPU\fR time is scheduled among processes according to their
+owner's entitlements, independent of the number of processes each project owns.
+.sp
+.LP
+The \fBFSS\fR scheduling class supports the notion of per-process user priority
+and user priority limit for compatibility with the time-share scheduler. The
+fair share scheduler attempts to provide an evenly graded effect across the
+whole range of user priorities. Processes with negative \fIfssupri\fR values
+receive time slices less frequently than normal, while processes with positive
+\fIfssupri\fR values receive time slices more frequently than normal. Notice
+that user priorities do not interfere with shares. That is, changing a
+\fIfssupri\fR value of a process is not going to affect its project's overall
+\fBCPU\fR usage which only relates to the amount of shares it is allocated
+compared to other projects.
+.sp
+.LP
+The priorities of processes in the fair-share class can be changed in the same
+manner as those in the time-share class.
+.SS "Fixed-Priority Class"
+.sp
+.LP
+The fixed-priority class provides a fixed priority preemptive scheduling policy
+for those processes requiring that the scheduling priorities do not get
+dynamically adjusted by the system and that the user/application have control
+of the scheduling priorities.
+.sp
+.LP
+The fixed-priority class shares the same range of scheduling priorities with
+the time-sharing class, by default. The fixed-priority class has a range of
+fixed-priority user priority (\fIfxupri\fR) values that can be assigned to
+processes within the class. User priorities range from 0 to \fIx\fR, where the
+value of \fIx\fR is configurable. The range for a specific installation can be
+displayed by using the command
+.sp
+.in +2
+.nf
+\fBpriocntl -l\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The purpose of the user priority is to provide user/application control over
+the scheduling of processes in the fixed-priority class. For processes in the
+fixed-priority class, the \fIfxupri\fR value is, for all practical purposes,
+equivalent to the scheduling priority of the process. The \fIfxupri\fR value
+completely determines the scheduling priority of a fixed-priority process
+relative to other processes within its class. Numerically higher \fIfxupri\fR
+values represent higher priorities.
+.sp
+.LP
+In addition to the system-wide limits on user priority (displayed with
+\fBpriocntl\fR \fB-l\fR), there is a per process user priority limit
+(\fIfxuprilim\fR), which specifies the maximum \fIfxupri\fR value that can be
+set for a given process.
+.sp
+.LP
+Any fixed-priority process can lower its own \fIfxuprilim\fR (or that of
+another process with the same user \fBID\fR). Only a process with super-user
+privilege can raise a \fIfxuprilim\fR. When changing the class of a process to
+fixed-priority from some other class, super-user privilege is required in order
+to set the initial \fIfxuprilim\fR to a value greater than zero.
+.sp
+.LP
+Any fixed-priority process can set its own \fIfxupri\fR (or that of another
+process with the same user \fBID\fR) to any value less than or equal to the
+process's \fIfxuprilim\fR. Attempts to set the \fIfxupri\fR above the
+\fIfxuprilim\fR (or set the \fIfxuprilim\fR below the \fIfxupri\fR) result in
+the \fIfxupri\fR being set equal to the \fIfxuprilim\fR.
+.sp
+.LP
+In addition to providing control over priority, \fBpriocntl\fR provides for
+control over the length of the time quantum allotted to processes in the
+fixed-priority class. The time quantum value specifies the maximum amount of
+time a process can run, before surrendering the \fBCPU\fR, assuming that it
+does not complete or enter a resource or event wait state (sleep). Notice that
+if another process becomes runnable at a higher priority, the currently running
+process can be preempted before receiving its full time quantum.
+.sp
+.LP
+Any combination of the \fB-m\fR, \fB-p\fR, and \fB-t\fR options can be used
+with \fBpriocntl\fR \fB-s\fR or \fBpriocntl\fR \fB-e\fR for the fixed-priority
+class. If an option is omitted and the process is currently fixed-priority, the
+associated parameter is normally unaffected. The exception is when the \fB-p\fR
+option is omitted and the \fB-m\fR option is used to set a \fIfxuprilim\fR
+below the current \fIfxupri\fR. In this case, the \fIfxupri\fR is set equal to
+the \fIfxuprilim\fR which is being set. If an option is omitted when changing
+the class of a process to fixed-priority from some other class, the associated
+parameter is set to a default value. The default value for \fIfxuprilim\fR is
+\fB0\fR. The default for \fIfxupri\fR is to set it equal to the \fIfxuprilim\fR
+value which is being set. The default for time quantum is dependent on the
+\fIfxupri\fR and on the system configuration. See \fBfx_dptbl\fR(4).
+.sp
+.LP
+The time quantum of processes in the fixed-priority class can be changed
+in the same manner as those in the real-time class.
+.sp
+.LP
+The fixed-priority user priority, user priority limit, and time quantum are
+inherited across the \fBfork\fR(2) and \fBexec\fR(2) system calls.
+.SH EXAMPLES
+.sp
+.LP
+The following are real-time class examples:
+.LP
+\fBExample 1 \fRSetting the Class
+.sp
+.LP
+The following example sets the class of any non-real-time processes selected by
+\fIidtype\fR and \fIidlist\fR to real-time and sets their real-time priority to
+the default value of \fB0\fR. The real-time priorities of any processes
+currently in the real-time class are unaffected. The time quantums of all of
+the specified processes are set to \fB1/10\fR seconds.
+
+.sp
+.in +2
+.nf
+example% \fBpriocntl -s -c RT -t 1 -r 10 -i \fIidtype idlist\fR\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRExecuting a Command in Real-time
+.sp
+.LP
+The following example executes \fIcommand\fR in the real-time class with a
+real-time priority of \fB15\fR and a time quantum of \fB20\fR milliseconds:
+
+.sp
+.in +2
+.nf
+example% \fBpriocntl -e -c RT -p 15 -t 20 \fIcommand\fR\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRExecuting a Command in Real-time with a Specified Quantum
+Signal
+.sp
+.LP
+The following example executes \fIcommand\fR in the real-time class with a
+real-time priority of \fB11\fR, a time quantum of \fB250\fR milliseconds, and
+where the specified real-time quantum signal is \fBSIGXCPU\fR:
+
+.sp
+.in +2
+.nf
+example% \fBpriocntl -e -c RT -p 11 -t 250 -q XCPU \fIcommand\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following are time-sharing class examples:
+.LP
+\fBExample 4 \fRSetting the Class of non-time-sharing Processes
+.sp
+.LP
+The following example sets the class of any non-time-sharing processes selected
+by \fIidtype\fR and \fIidlist\fR to time-sharing and sets both their user
+priority limit and user priority to \fB0\fR. Processes already in the
+time-sharing class are unaffected.
+
+.sp
+.in +2
+.nf
+example% \fBpriocntl -s -c TS -i \fIidtype idlist\fR\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRExecuting a Command in the Time-sharing Class
+.sp
+.LP
+The following example executes \fIcommand\fR with the arguments \fIarguments\fR
+in the time-sharing class with a user priority limit of \fB0\fR and a user
+priority of \fB\(mi15\fR:
+
+.sp
+.in +2
+.nf
+example% \fBpriocntl -e -c TS -m 0 -p \fR\fB-15\fR \fB\fIcommand\fR [\fIarguments\fR]\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRExecuting a Command in Fixed-Priority Class
+.sp
+.LP
+The following example executes a command in the fixed-priority class with a
+user priority limit of \fB20\fR and user priority of \fB10\fR and time quantum
+of \fB250\fR milliseconds:
+
+.sp
+.in +2
+.nf
+example% \fBpriocntl -e -c FX -m 20 -p 10 -t 250 command\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.LP
+For options \fB-d\fR, \fB-l\fR, and \fB-s\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Error condition.
+.RE
+
+.sp
+.LP
+For option \fB-e\fR:
+.sp
+.LP
+Return of the Exit Status of the executed command denotes successful operation.
+Otherwise,
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Command could not be executed at the specified priority.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkill\fR(1), \fBnice\fR(1), \fBps\fR(1), \fBdispadmin\fR(1M), \fBexec\fR(2),
+\fBfork\fR(2), \fBpriocntl\fR(2), \fBfx_dptbl\fR(4), \fBprocess\fR(4),
+\fBrt_dptbl\fR(4), \fBattributes\fR(5), \fBzones\fR(5), \fBFSS\fR(7)
+.sp
+.LP
+\fISystem Administration Guide: Basic Administration\fR
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBpriocntl\fR prints the following error messages:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBProcess(es) not found\fR\fR
+.ad
+.sp .6
+.RS 4n
+None of the specified processes exists.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSpecified processes from different classes\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fB-s\fR option is being used to set parameters, the \fB-c\fR \fIclass\fR
+option is not present, and processes from more than one class are specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBInvalid option or argument\fR\fR
+.ad
+.sp .6
+.RS 4n
+An unrecognized or invalid option or option argument is used.
+.RE
+
diff --git a/usr/src/man/man1/proc.1 b/usr/src/man/man1/proc.1
new file mode 100644
index 0000000000..233fb2c212
--- /dev/null
+++ b/usr/src/man/man1/proc.1
@@ -0,0 +1,648 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright 2008 Chad Mynhier
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH proc 1 "10 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+proc, pflags, pcred, pldd, psig, pstack, pfiles, pwdx, pstop, prun, pwait,
+ptime \- proc tools
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/pflags\fR [\fB-r\fR] \fIpid\fR | \fIcore\fR [/\fIlwp\fR] ...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pcred\fR [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pcred\fR [\fB-u\fR \fIuser/uid\fR] [\fB-g\fR \fIgroup/gid\fR] [\fB-G\fR \fIgrouplist\fR] pid...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pcred\fR \fB-l\fR \fIlogin\fR \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pldd\fR [\fB-Fl\fR] [\fIpid\fR | \fIcore\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/psig\fR [\fB-n\fR] \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pstack\fR [\fB-F\fR] \fIpid\fR | \fIcore\fR [/\fIlwp\fR] ...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pfiles\fR [\fB-Fn\fR] \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pwdx\fR \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pstop\fR \fIpid\fR[/\fIlwp\fR] ...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/prun\fR \fIpid\fR[/\fIlwp\fR] ...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/pwait\fR [\fB-v\fR] \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ptime\fR [\fB-Fm\fR] [\fB-p\fR] \fIpid\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/ptime\fR [\fB-m\fR]\fIcommand\fR [\fIarg\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The proc tools are utilities that exercise features of \fB/proc\fR (see
+\fBproc\fR(4)). Most of them take a list of process-ids (\fIpid\fR). The tools
+that do take process-ids also accept \fB/proc/\fR\fInnn\fR as a process-id, so
+the shell expansion \fB/proc/*\fR can be used to specify all processes in the
+system.
+.sp
+.LP
+Some of the proc tools can also be applied to core files (see \fBcore\fR(4)).
+The tools that apply to core files accept a list of either process \fBID\fRs or
+names of core files or both.
+.sp
+.LP
+Some of the \fBproc\fR tools can operate on individual threads. Users can
+examine only selected threads by appending \fI/thread-id\fR to the process-id
+or core. Multiple threads can be selected using the \fB-\fR and \fB,\fR
+delimiters. For example \fB/1,2,7-9\fR examines threads \fB1\fR, \fB2\fR,
+\fB7\fR, \fB8\fR, and \fB9\fR.
+.sp
+.LP
+See \fBWARNINGS\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpflags\fR\fR
+.ad
+.RS 10n
+.rt
+Print the \fB/proc\fR tracing flags, the pending and held signals, and other
+\fB/proc\fR status information for each process or specified lwps in each
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpcred\fR\fR
+.ad
+.RS 10n
+.rt
+Print or set the credentials (effective, real, saved \fBUID\fRs and \fBGID\fRs)
+of each process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpldd\fR\fR
+.ad
+.RS 10n
+.rt
+List the dynamic libraries linked into each process, including shared objects
+explicitly attached using \fBdlopen\fR(3C). See also \fBldd\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpsig\fR\fR
+.ad
+.RS 10n
+.rt
+List the signal actions and handlers of each process. See
+\fBsignal.h\fR(3HEAD).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpstack\fR\fR
+.ad
+.RS 10n
+.rt
+Print a hex+symbolic stack trace for each process or specified lwps in each
+process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpfiles\fR\fR
+.ad
+.RS 10n
+.rt
+Report \fBfstat\fR(2) and \fBfcntl\fR(2) information for all open files in each
+process. For network endpoints, the local (and peer if connected) address
+information is also provided. For sockets, the socket type, socket options and
+send and receive buffer sizes are also provided. In addition, a path to the
+file is reported if the information is available from \fB/proc/pid/path\fR.
+This is not necessarily the same name used to open the file. See \fBproc\fR(4)
+for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpwdx\fR\fR
+.ad
+.RS 10n
+.rt
+Print the current working directory of each process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpstop\fR\fR
+.ad
+.RS 10n
+.rt
+Stop each process or the specified lwps (\fBPR_REQUESTED\fR stop).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprun\fR\fR
+.ad
+.RS 10n
+.rt
+Set running each process or the specified lwps (the inverse of \fBpstop\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpwait\fR\fR
+.ad
+.RS 10n
+.rt
+Wait for all of the specified processes to terminate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBptime\fR\fR
+.ad
+.RS 10n
+.rt
+Time the \fIcommand\fR, like \fBtime\fR(1), but using microstate accounting for
+reproducible precision. Unlike \fBtime\fR(1), children of the command are not
+timed.
+.sp
+If the \fB-p\fR \fIpid\fR version is used, display a snapshot of timing
+statistics for the specified \fIpid\fR.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following general options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Force. Grabs the target process even if another process has control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+(\fBpsig\fR and \fBpfiles\fR only) Sets non-verbose mode. \fBpsig\fR displays
+signal handler addresses rather than names. \fBpfiles\fR does not display
+verbose information for each file descriptor. Instead, \fBpfiles\fR limits its
+output to the information that would be retrieved if the process applied
+\fBfstat\fR(2) to each of its file descriptors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+(\fBpflags\fR only) If the process is stopped, displays its machine registers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+(\fBpwait\fR only) Verbose. Reports terminations to standard output.
+.RE
+
+.sp
+.LP
+In addition to the general options, \fBpcred\fR supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIgroup/gid\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the real, effective, and saved group ids (\fBGID\fRs) of the target
+processes to the specified value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIgrouplist\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the supplementary \fBGID\fRs of the target process to the specified list
+of groups. The supplementary groups should be specified as a comma-separated
+list of group names ids. An empty list clears the supplementary group list of
+the target processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlogin\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the real, effective, and saved \fBUID\fRs of the target processes to the
+\fBUID\fR of the specified login. Sets the real, effective, and saved
+\fBGID\fRs of the target processes to the \fBGID\fR of the specified login.
+Sets the supplementary group list to the supplementary groups list of the
+specified login.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIuser/uid\fR\fR
+.ad
+.RS 16n
+.rt
+Sets the real, effective, and saved user ids (\fBUID\fRs) of the target
+processes to the specified value.
+.RE
+
+.sp
+.LP
+In addition to the general options, \fBpldd\fR supports the following option:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Shows unresolved dynamic linker map names.
+.RE
+
+.sp
+.LP
+In addition to the general options, \fBptime\fR supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 10n
+.rt
+Display the full set of microstate accounting statistics.
+.sp
+The displayed fields are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreal\fR\fR
+.ad
+.RS 8n
+.rt
+Wall clock time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuser\fR\fR
+.ad
+.RS 8n
+.rt
+User level CPU time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsys\fR\fR
+.ad
+.RS 8n
+.rt
+System call CPU time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrap\fR\fR
+.ad
+.RS 8n
+.rt
+Other system trap CPU time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtflt\fR\fR
+.ad
+.RS 8n
+.rt
+Text page fault sleep time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdflt\fR\fR
+.ad
+.RS 8n
+.rt
+Data page fault sleep time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkflt\fR\fR
+.ad
+.RS 8n
+.rt
+Kernel page fault sleep time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlock\fR\fR
+.ad
+.RS 8n
+.rt
+User lock wait sleep time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBslp\fR\fR
+.ad
+.RS 8n
+.rt
+All other sleep time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlat\fR\fR
+.ad
+.RS 8n
+.rt
+CPU latency (wait) time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR\fR
+.ad
+.RS 8n
+.rt
+Stopped time.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpid\fR\fR
+.ad
+.RS 10n
+.rt
+Displays a snapshot of timing statistics for the specified \fIpid\fR.
+.RE
+
+.sp
+.LP
+To set the credentials of another process, a process must have sufficient
+privilege to change its user and group ids to those specified according to the
+rules laid out in \fBsetuid\fR(2) and it must have sufficient privilege to
+control the target process.
+.SH USAGE
+.sp
+.LP
+These proc tools stop their target processes while inspecting them and
+reporting the results: \fBpfiles\fR, \fBpldd\fR, and \fBpstack\fR. A process
+can do nothing while it is stopped. Thus, for example, if the X server is
+inspected by one of these proc tools running in a window under the X server's
+control, the whole window system can become deadlocked because the proc tool
+would be attempting to print its results to a window that cannot be refreshed.
+Logging in from from another system using \fBrlogin\fR(1) and killing the
+offending proc tool would clear up the deadlock in this case.
+.sp
+.LP
+See \fBWARNINGS\fR.
+.sp
+.LP
+Caution should be exercised when using the \fB-F\fR flag. Imposing two
+controlling processes on one victim process can lead to chaos. Safety is
+assured only if the primary controlling process, typically a debugger, has
+stopped the victim process and the primary controlling process is doing nothing
+at the moment of application of the \fBproc\fR tool in question.
+.sp
+.LP
+Some of the proc tools can also be applied to core files, as shown by the
+synopsis above. A core file is a snapshot of a process's state and is produced
+by the kernel prior to terminating a process with a signal or by the
+\fBgcore\fR(1) utility. Some of the proc tools can need to derive the name of
+the executable corresponding to the process which dumped core or the names of
+shared libraries associated with the process. These files are needed, for
+example, to provide symbol table information for \fBpstack\fR(1). If the proc
+tool in question is unable to locate the needed executable or shared library,
+some symbol information is unavailable for display. Similarly, if a core file
+from one operating system release is examined on a different operating system
+release, the run-time link-editor debugging interface (\fBlibrtld_db\fR) cannot
+be able to initialize. In this case, symbol information for shared libraries is
+not available.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error has occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 11n
+.rt
+process files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Uncommitted. The options are Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBgcore\fR(1), \fBldd\fR(1), \fBpargs\fR(1), \fBpgrep\fR(1), \fBpkill\fR(1),
+\fBplimit\fR(1), \fBpmap\fR(1), \fBpreap\fR(1), \fBps\fR(1), \fBptree\fR(1),
+\fBppgsz\fR(1), \fBpwd\fR(1), \fBrlogin\fR(1), \fBtime\fR(1), \fBtruss\fR(1),
+\fBwait\fR(1), \fBfcntl\fR(2), \fBfstat\fR(2), \fBsetuid\fR(2),
+\fBdlopen\fR(3C), \fBsignal.h\fR(3HEAD), \fBcore\fR(4), \fBproc\fR(4),
+\fBprocess\fR(4), \fBattributes\fR(5), \fBzones\fR(5)
+.SH WARNINGS
+.sp
+.LP
+The following \fBproc\fR tools stop their target processes while inspecting
+them and reporting the results: \fBpfiles\fR, \fBpldd\fR, and \fBpstack\fR.
+However, even if \fBpstack\fR operates on an individual thread, it stops the
+whole process.
+.sp
+.LP
+A process or thread can do nothing while it is stopped. Stopping a heavily used
+process or thread in a production environment, even for a short amount of time,
+can cause severe bottlenecks and even hangs of these processes or threads,
+causing them to be unavailable to users. Some databases could also terminate
+abnormally. Thus, for example, a database server under heavy load could hang
+when one of the database processes or threads is traced using the above
+mentioned \fBproc\fR tools. Because of this, stopping a UNIX process or thread
+in a production environment should be avoided.
+.sp
+.LP
+A process or thread being stopped by these tools can be identified by issuing
+\fB/usr/bin/ps\fR \fB-eflL\fR and looking for "\fBT\fR" in the first column.
+Notice that certain processes, for example "\fBsched\fR", can show the
+"\fBT\fR" status by default most of the time.
+.sp
+.LP
+The process ID returned for locked files on network file systems might not be
+meaningful.
diff --git a/usr/src/man/man1/prof.1 b/usr/src/man/man1/prof.1
new file mode 100644
index 0000000000..c403e52e4f
--- /dev/null
+++ b/usr/src/man/man1/prof.1
@@ -0,0 +1,374 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH prof 1 "25 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+prof \- display profile data
+.SH SYNOPSIS
+.LP
+.nf
+\fBprof\fR [\fB-ChsVz\fR] [\fB-a\fR | c | n | t] [\fB-o\fR | x] [\fB-g\fR | l] [\fB-m\fR \fImdata\fR]
+ [\fIprog\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBprof\fR command interprets a profile file produced by the \fBmonitor\fR
+function. The symbol table in the object file \fIprog\fR (\fBa.out\fR by
+default) is read and correlated with a profile file (\fBmon.out\fR by default).
+For each external text symbol the percentage of time spent executing between
+the address of that symbol and the address of the next is printed, together
+with the number of times that function was called and the average number of
+milliseconds per call.
+.SH OPTIONS
+.sp
+.LP
+The mutually exclusive options \fB-a\fR, \fB-c\fR, \fB-n\fR, and \fB-t\fR
+determine the type of sorting of the output lines:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Sort by increasing symbol address.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Sort by decreasing number of calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Sort lexically by symbol name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Sort by decreasing percentage of total time (default).
+.RE
+
+.sp
+.LP
+The mutually exclusive options \fB-o\fR and \fB-x\fR specify the printing of
+the address of each symbol monitored:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Print each symbol address (in octal) along with the symbol name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Print each symbol address (in hexadecimal) along with the symbol name.
+.RE
+
+.sp
+.LP
+The mutually exclusive options \fB-g\fR and \fB-l\fR control the type of
+symbols to be reported. The \fB-l\fR option must be used with care; it applies
+the time spent in a static function to the preceding (in memory) global
+function, instead of giving the static function a separate entry in the report.
+If all static functions are properly located, this feature can be very useful.
+If not, the resulting report may be misleading.
+.sp
+.LP
+Assume that \fBA\fR and \fBB\fR are global functions and only \fBA\fR calls
+static function \fBS\fR. If \fBS\fR is located immediately after A in the
+source code (that is, if \fBS\fR is properly located), then, with the
+\fB-l\fR option, the amount of time spent in \fBA\fR can easily be determined,
+including the time spent in \fBS\fR. If, however, both \fBA\fR and \fBB\fR
+call \fBS\fR, then, if the \fB-l\fR option is used, the report will be
+misleading; the time spent during \fBB\fR's call to \fBS\fR will be
+attributed to \fBA\fR, making it appear as if more time had been spent in
+\fBA\fR than really had. In this case, function \fBS\fR cannot be properly
+located.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 6n
+.rt
+List the time spent in static (non-global) functions separately. The \fB-g\fR
+option function is the opposite of the \fB-l\fR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Suppress printing statically declared functions. If this option is given, time
+spent executing in a static function is allocated to the closest global
+function loaded before the static function in the executable. This option is
+the default. It is the opposite of the \fB-g\fR function and should be used
+with care.
+.RE
+
+.sp
+.LP
+The following options may be used in any combination:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 12n
+.rt
+Demangle C++ symbol names before printing them out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 12n
+.rt
+Suppress the heading normally printed on the report. This is useful if the
+report is to be processed further.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImdata\fR\fR
+.ad
+.RS 12n
+.rt
+Use file \fImdata\fR instead of \fBmon.out\fR as the input profile file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 12n
+.rt
+Print a summary of several of the monitoring parameters and statistics on the
+standard error output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 12n
+.rt
+Print \fBprof\fR version information on the standard error output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.RS 12n
+.rt
+Include all symbols in the profile range, even if associated with zero number
+of calls and zero time.
+.RE
+
+.sp
+.LP
+A single function may be split into subfunctions for profiling by means of the
+\fBMARK\fR macro. See \fBprof\fR(5).
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPROFDIR\fR\fR
+.ad
+.RS 11n
+.rt
+The name of the file created by a profiled program is controlled by the
+environment variable \fBPROFDIR\fR. If \fBPROFDIR\fR is not set, \fBmon.out\fR
+is produced in the directory current when the program terminates. If
+\fBPROFDIR\fR=\fIstring\fR, \fIstring\fR\fB/\fR\fIpid\fR\fB\&.\fR\fIprogname\fR
+is produced, where \fIprogname\fR consists of \fBargv[0]\fR with any path
+prefix removed, and \fIpid\fR is the process ID of the program. If
+\fBPROFDIR\fR is set, but null, no profiling output is produced.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmon.out\fR\fR
+.ad
+.RS 11n
+.rt
+default profile file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBa.out\fR\fR
+.ad
+.RS 11n
+.rt
+default namelist (object) file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBgprof\fR(1), \fBexit\fR(2), \fBpcsample\fR(2), \fBprofil\fR(2),
+\fBmalloc\fR(3C), \fBmalloc\fR(3MALLOC), \fBmonitor\fR(3C),
+\fBattributes\fR(5), \fBprof\fR(5)
+.SH NOTES
+.sp
+.LP
+If the executable image has been stripped and does not have the \fB\&.symtab\fR
+symbol table, \fBgprof\fR reads the global dynamic symbol tables
+\fB\&.dynsym\fR and \fB\&.SUNW_ldynsym\fR, if present. The symbols in the
+dynamic symbol tables are a subset of the symbols that are found in
+\fB\&.symtab\fR. The \fB\&.dynsym\fR symbol table contains the global symbols
+used by the runtime linker. \fB\&.SUNW_ldynsym\fR augments the information in
+\fB\&.dynsym\fR with local function symbols. In the case where \fB\&.dynsym\fR
+is found and \fB\&.SUNW_ldynsym\fR is not, only the information for the global
+symbols is available. Without local symbols, the behavior is as described for
+the \fB-a\fR option.
+.sp
+.LP
+The times reported in successive identical runs may show variances because of
+varying cache-hit ratios that result from sharing the cache with other
+processes. Even if a program seems to be the only one using the machine, hidden
+background or asynchronous processes may blur the data. In rare cases, the
+clock ticks initiating recording of the program counter may \fBbeat\fR with
+loops in a program, grossly distorting measurements. Call counts are always
+recorded precisely, however.
+.sp
+.LP
+Only programs that call \fBexit\fR or return from \fBmain\fR are guaranteed
+to produce a profile file, unless a final call to \fBmonitor\fR is explicitly
+coded.
+.sp
+.LP
+The times for static functions are attributed to the preceding external text
+symbol if the \fB-g\fR option is not used. However, the call counts for the
+preceding function are still correct; that is, the static function call counts
+are not added to the call counts of the external function.
+.sp
+.LP
+If more than one of the options \fB-t\fR, \fB-c\fR, \fB-a\fR, and \fB-n\fR
+is specified, the last option specified is used and the user is warned.
+.sp
+.LP
+\fBLD_LIBRARY_PATH\fR must not contain \fB/usr/lib\fR as a component when
+compiling a program for profiling. If \fBLD_LIBRARY_PATH\fR contains
+\fB/usr/lib\fR, the program will not be linked correctly with the profiling
+versions of the system libraries in \fB/usr/lib/libp\fR. See \fBgprof\fR(1).
+.sp
+.LP
+Functions such as \fBmcount()\fR, \fB_mcount()\fR, \fBmoncontrol()\fR,
+\fB_moncontrol()\fR, \fBmonitor()\fR, and \fB_monitor()\fR may appear in the
+\fBprof\fR report. These functions are part of the profiling implementation
+and thus account for some amount of the runtime overhead. Since these
+functions are not present in an unprofiled application, time accumulated and
+call counts for these functions may be ignored when evaluating the performance
+of an application.
+.SS "64-bit profiling"
+.sp
+.LP
+64-bit profiling may be used freely with dynamically linked executables, and
+profiling information is collected for the shared objects if the objects are
+compiled for profiling. Care must be applied to interpret the profile output,
+since it is possible for symbols from different shared objects to have the same
+name. If duplicate names are seen in the profile output, it is better to use
+the \fB-s\fR (summary) option, which prefixes a module id before each symbol
+that is duplicated. The symbols can then be mapped to appropriate modules by
+looking at the modules information in the summary.
+.sp
+.LP
+If the \fB-a\fR option is used with a dynamically linked executable, the
+sorting occurs on a per-shared-object basis. Since there is a high likelihood
+of symbols from differed shared objects to have the same value, this results in
+an output that is more understandable. A blank line separates the symbols from
+different shared objects, if the \fB-s\fR option is given.
+.SS "32-bit profiling"
+.sp
+.LP
+32-bit profiling may be used with dynamically linked executables, but care must
+be applied. In 32-bit profiling, shared objects cannot be profiled with
+\fBprof\fR. Thus, when a profiled, dynamically linked program is executed, only
+the \fBmain\fR portion of the image is sampled. This means that all time spent
+outside of the \fBmain\fR object, that is, time spent in a shared object, will
+not be included in the profile summary; the total time reported for the program
+may be less than the total time used by the program.
+.sp
+.LP
+Because the time spent in a shared object cannot be accounted for, the use of
+shared objects should be minimized whenever a program is profiled with
+\fBprof\fR. If desired, the program should be linked to the profiled version of
+a library (or to the standard archive version if no profiling version is
+available), instead of the shared object to get profile information on the
+functions of a library. Versions of profiled libraries may be supplied with the
+system in the \fB/usr/lib/libp\fR directory. Refer to compiler driver
+documentation on profiling.
+.sp
+.LP
+Consider an extreme case. A profiled program dynamically linked with the shared
+C library spends 100 units of time in some \fBlibc\fR routine, say,
+\fBmalloc()\fR. Suppose \fBmalloc()\fR is called only from routine \fBB\fR
+and \fBB\fR consumes only 1 unit of time. Suppose further that routine \fBA\fR
+consumes 10 units of time, more than any other routine in the \fBmain\fR
+(profiled) portion of the image. In this case, \fBprof\fR will conclude that
+most of the time is being spent in \fBA\fR and almost no time is being spent
+in \fBB\fR. From this it will be almost impossible to tell that the greatest
+improvement can be made by looking at routine \fBB\fR and not routine
+\fBA\fR. The value of the profiler in this case is severely degraded; the
+solution is to use archives as much as possible for profiling.
diff --git a/usr/src/man/man1/profiles.1 b/usr/src/man/man1/profiles.1
new file mode 100644
index 0000000000..97ffd7f14d
--- /dev/null
+++ b/usr/src/man/man1/profiles.1
@@ -0,0 +1,141 @@
+'\" te
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH profiles 1 "11 Feb 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+profiles \- print execution profiles for a user
+.SH SYNOPSIS
+.LP
+.nf
+\fBprofiles\fR [\fB-l\fR] [ \fIuser\fR ]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBprofiles\fR command prints on standard output the names of the execution
+profiles that have been assigned to you or to the optionally-specified user or
+role name. Profiles are a bundling mechanism used to enumerate the commands and
+authorizations needed to perform a specific function. Along with each listed
+executable are the process attributes, such as the effective user and group
+\fBID\fRs, with which the process runs when started by a privileged command
+interpreter. The profile shells are \fBpfcsh\fR, \fBpfksh\fR, and \fBpfexec\fR.
+See the \fBpfexec\fR(1) man page. Profiles can contain other profiles defined
+in \fBprof_attr\fR(4).
+.sp
+.LP
+Multiple profiles can be combined to construct the appropriate access control.
+When profiles are assigned, the authorizations are added to the existing set.
+If the same command appears in multiple profiles, the first occurrence, as
+determined by the ordering of the profiles, is used for process-attribute
+settings. For convenience, a wild card can be specified to match all commands.
+.sp
+.LP
+When profiles are interpreted, the profile list is loaded from
+\fBuser_attr\fR(4). If any default profile is defined in
+\fB/etc/security/policy.conf\fR (see \fBpolicy.conf\fR(4)), the list of default
+profiles are added to the list loaded from \fBuser_attr\fR(4). Matching entries
+in \fBprof_attr\fR(4) provide the authorizations list, and matching entries in
+\fBexec_attr\fR(4) provide the commands list.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Lists the commands in each profile followed by the special process attributes
+such as user and group \fBID\fRs.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSample Output
+.sp
+.LP
+The output of the \fBprofiles\fR command has the following form:
+
+.sp
+.in +2
+.nf
+example% \fBprofiles tester01 tester02\fRtester01 : Audit Management, All Commands
+tester02 : Device Management, All Commands
+example%
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing the \fBlist\fR Option
+.sp
+.in +2
+.nf
+example% \fBprofiles -l tester01 tester02\fRtester01 :
+ Audit Management:
+ /usr/sbin/audit euid=root
+ /usr/sbin/auditconfig euid=root egid=sys
+ All Commands:
+ *
+tester02 :
+ Device Management:
+ /usr/bin/allocate: euid=root
+ /usr/bin/deallocate: euid=root
+ All Commands
+ *
+example%
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/security/exec_attr\fR
+.sp
+.LP
+\fB/etc/security/prof_attr\fR
+.sp
+.LP
+\fB/etc/user_attr\fR
+.sp
+.LP
+\fB/etc/security/policy.conf\fR
+.SH SEE ALSO
+.sp
+.LP
+\fBauths\fR(1), \fBpfexec\fR(1), \fBroles\fR(1), \fBgetprofattr\fR(3SECDB),
+\fBexec_attr\fR(4), \fBpolicy.conf\fR(4), \fBprof_attr\fR(4),
+\fBuser_attr\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/projects.1 b/usr/src/man/man1/projects.1
new file mode 100644
index 0000000000..3cd7cc3e2f
--- /dev/null
+++ b/usr/src/man/man1/projects.1
@@ -0,0 +1,179 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH projects 1 "13 May 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+projects \- print project membership of user
+.SH SYNOPSIS
+.LP
+.nf
+\fBprojects\fR [\fB-dv\fR] [ \fIuser\fR]
+.fi
+
+.LP
+.nf
+\fBprojects\fR \fB-l\fR [\fIprojectname\fR [\fIprojectname\fR]...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBprojects\fR command prints on standard output the projects to which the
+invoking user or an optionally specified user belongs. Each user belongs to
+some set of projects specified in the \fBproject\fR(4) file and possibly in the
+associated \fBNIS\fR maps and \fBLDAP\fR databases for project information.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Prints only default project.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Prints verbose info on each project projectname. If no projectnames are given,
+info on all projects is printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Prints project descriptions along with project names.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIprojectname\fR\fR
+.ad
+.RS 15n
+.rt
+Display information for the specified project.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuser\fR\fR
+.ad
+.RS 15n
+.rt
+Displays project memberships for the specified user.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying Membership for a Specified User
+.sp
+.in +2
+.nf
+example$ \fBprojects paul\fR
+default beatles wings
+example$ \fBprojects ringo\fR
+default beatles
+example$ \fBprojects -d paul\fR
+beatles
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+A fatal error occurred during execution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 6n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/project\fR\fR
+.ad
+.RS 16n
+.rt
+Local database containing valid project definitions for this machine.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for a description of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+StabilitySee below.
+.TE
+
+.sp
+.LP
+The invocation is Evolving. The human-readable output is Unstable.
+.SH SEE ALSO
+.sp
+.LP
+\fBgetdefaultproj\fR(3PROJECT), \fBgetprojent\fR(3PROJECT), \fBproject\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ps.1 b/usr/src/man/man1/ps.1
new file mode 100644
index 0000000000..53591ed29d
--- /dev/null
+++ b/usr/src/man/man1/ps.1
@@ -0,0 +1,1523 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ps 1 "16 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ps \- report process status
+.SH SYNOPSIS
+.LP
+.nf
+\fBps\fR [\fB-aAcdefjHlLPyZ\fR] [\fB-g\fR \fIgrplist\fR] [\fB-h\fR \fIlgrplist\fR]
+ [\fB-n\fR \fInamelist\fR] [\fB-o\fR \fIformat\fR]... [\fB-p\fR \fIproclist\fR]
+ [\fB-s\fR \fIsidlist\fR] [\fB-t\fR \fIterm\fR] [\fB-u\fR \fIuidlist\fR] [\fB-U\fR \fIuidlist\fR]
+ [\fB-G\fR \fIgidlist\fR] [\fB-z\fR \fIzonelist\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBps\fR command prints information about active processes. Without
+options, \fBps\fR prints information about processes that have the same
+effective user \fBID\fR and the same controlling terminal as the invoker. The
+output contains only the process \fBID\fR, terminal identifier, cumulative
+execution time, and the command name. Otherwise, the information that is
+displayed is controlled by the options.
+.sp
+.LP
+Some options accept lists as arguments. Items in a list can be either separated
+by commas or else enclosed in quotes and separated by commas or spaces. Values
+for \fIproclist\fR and \fIgrplist\fR must be numeric.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information about \fBa\fRll processes most frequently requested: all
+those except session leaders and processes not associated with a terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information for all processes. Identical to \fB-e\fR, below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 15n
+.rt
+Prints information in a format that reflects scheduler properties as described
+in \fBpriocntl\fR(1). The \fB-c\fR option affects the output of the \fB-f\fR
+and \fB-l\fR options, as described below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information about all processes except session leaders.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information about \fBe\fRvery process now running.
+.sp
+When the \fB-e\fRoption is specified, options \fB-z\fR, \fB-t\fR, \fB-u\fR,
+\fB-U\fR, \fB-g\fR, \fB-G\fR, \fB-p\fR, \fB-g\fR, \fB-s\fR and \fB-a\fR options
+have no effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Generates a \fBf\fRull listing. (See below for significance of columns in a
+full listing.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIgrplist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists only process data whose group leader's \fBID\fR number(s) appears in
+\fIgrplist\fR. (A group leader is a process whose process \fBID\fR number is
+identical to its process group \fBID\fR number.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIgidlist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information for processes whose real group ID numbers are given in
+\fIgidlist\fR. The \fIgidlist\fR must be a single argument in the form of a
+blank- or comma-separated list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIlgrplist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists only the processes homed to the specified \fIlgrplist\fR. Nothing is
+listed for any invalid group specified in \fIlgrplist\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 15n
+.rt
+Prints the home lgroup of the process under an additional column header, LGRP.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR\fR
+.ad
+.RS 15n
+.rt
+Prints session \fBID\fR and process group \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 15n
+.rt
+Generates a \fBl\fRong listing. (See below.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 15n
+.rt
+Prints information about each light weight process (\fIlwp\fR) in each selected
+process. (See below.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInamelist\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies the name of an alternative system \fInamelist\fR file in place of the
+default. This option is accepted for compatibility, but is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIformat\fR\fR
+.ad
+.RS 15n
+.rt
+Prints information according to the format specification given in \fIformat\fR.
+This is fully described in \fBDISPLAY FORMATS\fR. Multiple \fB-o\fR options can
+be specified; the format specification is interpreted as the
+space-character-separated concatenation of all the \fIformat\fR
+option-arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIproclist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists only process data whose process \fBID\fR numbers are given in
+\fIproclist\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.RS 15n
+.rt
+Prints the number of the processor to which the process or lwp is bound, if
+any, under an additional column header, \fBPSR\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsidlist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information on all session leaders whose \fBID\fRs appear in
+\fIsidlist\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIterm\fR\fR
+.ad
+.RS 15n
+.rt
+Lists only process data associated with \fIterm\fR. Terminal identifiers are
+specified as a device file name, and an identifier. For example, \fBterm/a\fR,
+or \fBpts/0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIuidlist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists only process data whose effective user \fBID\fR number or login name is
+given in \fIuidlist\fR. In the listing, the numerical user \fBID\fR is printed
+unless you give the \fB-f\fR option, which prints the login name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR \fIuidlist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists information for processes whose real user \fBID\fR numbers or login names
+are given in \fIuidlist\fR. The \fIuidlist\fR must be a single argument in the
+form of a blank- or comma-separated list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 15n
+.rt
+Under a long listing (\fB-l\fR), omits the obsolete \fBF\fR and \fBADDR\fR
+columns and includes an \fBRSS\fR column to report the resident set size of the
+process. Under the \fB-y\fR option, both \fBRSS\fR and \fBSZ\fR (see below) is
+reported in units of kilobytes instead of pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzonelist\fR\fR
+.ad
+.RS 15n
+.rt
+Lists only processes in the specified zones. Zones can be specified either by
+name or ID. This option is only useful when executed in the global zone.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.RS 15n
+.rt
+Prints the name of the zone with which the process is associated under an
+additional column header, \fBZONE\fR. The \fBZONE\fR column width is limited to
+8 characters. Use \fBps\fR \fB-eZ\fR for a quick way to see information about
+every process now running along with the associated zone name. Use
+.sp
+.in +2
+.nf
+ps -eo zone,uid,pid,ppid,time,comm,...
+.fi
+.in -2
+.sp
+
+to see zone names wider than 8 characters.
+.RE
+
+.sp
+.LP
+Many of the options shown are used to select processes to list. If any are
+specified, the default list is ignored and \fBps\fR selects the processes
+represented by the inclusive OR of all the selection-criteria options.
+.SH DISPLAY FORMATS
+.sp
+.LP
+Under the \fB-f\fR option, \fBps\fR tries to determine the command name and
+arguments given when the process was created by examining the user block.
+Failing this, the command name is printed, as it would have appeared without
+the \fB-f\fR option, in square brackets.
+.sp
+.LP
+The column headings and the meaning of the columns in a \fBps\fR listing are
+given below; the letters \fBf\fR and \fBl\fR indicate the option (f\fBull\fR or
+\fBl\fRong, respectively) that causes the corresponding heading to appear;
+\fBall\fR means that the heading always appears. \fBNote:\fR These two options
+determine only what information is provided for a process; they do not
+determine which processes are listed.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR(l)\fR
+.ad
+.RS 14n
+.rt
+Flags (hexadecimal and additive) associated with the process. These flags are
+available for historical purposes; no meaning should be currently ascribed to
+them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS\fR (l)\fR
+.ad
+.RS 14n
+.rt
+The state of the process:
+.sp
+.ne 2
+.mk
+.na
+\fBO\fR
+.ad
+.RS 5n
+.rt
+Process is running on a processor.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBS\fR
+.ad
+.RS 5n
+.rt
+Sleeping: process is waiting for an event to complete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBR\fR
+.ad
+.RS 5n
+.rt
+Runnable: process is on run queue.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBT\fR
+.ad
+.RS 5n
+.rt
+Process is stopped, either by a job control signal or because it is being
+traced.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBW\fR
+.ad
+.RS 5n
+.rt
+Waiting: process is waiting for CPU usage to drop to the CPU-caps enforced
+limits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBZ\fR
+.ad
+.RS 5n
+.rt
+Zombie state: process terminated and parent not waiting.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBUID\fR (f,l)\fR
+.ad
+.RS 14n
+.rt
+The effective user \fBID\fR number of the process (the login name is printed
+under the \fB-f\fR option).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPID\fR(all)\fR
+.ad
+.RS 14n
+.rt
+The process \fBID\fR of the process (this datum is necessary in order to kill a
+process).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPPID\fR(f,l)\fR
+.ad
+.RS 14n
+.rt
+The process \fBID\fR of the parent process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBC\fR(f,l)\fR
+.ad
+.RS 14n
+.rt
+Processor utilization for scheduling (obsolete). Not printed when the \fB-c\fR
+option is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCLS\fR(f,l)\fR
+.ad
+.RS 14n
+.rt
+Scheduling class. Printed only when the \fB-c\fR option is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPRI\fR(l)\fR
+.ad
+.RS 14n
+.rt
+The priority of the process. Without the \fB-c\fR option, higher numbers mean
+lower priority. With the \fB-c\fR option, higher numbers mean higher priority.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNI\fR(l)\fR
+.ad
+.RS 14n
+.rt
+Nice value, used in priority computation. Not printed when the \fB-c\fR option
+is used. Only processes in the certain scheduling classes have a nice value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBADDR\fR(l)\fR
+.ad
+.RS 14n
+.rt
+The memory address of the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSZ\fR(l)\fR
+.ad
+.RS 14n
+.rt
+The total size of the process in virtual memory, including all mapped files and
+devices, in pages. See \fBpagesize\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBWCHAN\fR(l)\fR
+.ad
+.RS 14n
+.rt
+The address of an event for which the process is sleeping (if blank, the
+process is running).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSTIME\fR(f)\fR
+.ad
+.RS 14n
+.rt
+The starting time of the process, given in hours, minutes, and seconds. (A
+process begun more than twenty-four hours before the \fBps\fR inquiry is
+executed is given in months and days.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTTY\fR(all)\fR
+.ad
+.RS 14n
+.rt
+The controlling terminal for the process (the message, \fB?\fR, is printed when
+there is no controlling terminal).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTIME\fR(all)\fR
+.ad
+.RS 14n
+.rt
+The cumulative execution time for the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLTIME\fR(all)\fR
+.ad
+.RS 14n
+.rt
+The execution time for the lwp being reported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCMD\fR(all)\fR
+.ad
+.RS 14n
+.rt
+The command name (the full command name and its arguments, up to a limit of 80
+characters, are printed under the \fB-f\fR option).
+.RE
+
+.sp
+.LP
+The following two additional columns are printed when the \fB-j\fR option is
+specified:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPGID\fR\fR
+.ad
+.RS 8n
+.rt
+The process ID of the process group leader.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSID\fR\fR
+.ad
+.RS 8n
+.rt
+The process ID of the session leader.
+.RE
+
+.sp
+.LP
+The following two additional columns are printed when the \fB-L\fR option is
+specified:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLWP\fR\fR
+.ad
+.RS 8n
+.rt
+The lwp ID of the lwp being reported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNLWP\fR\fR
+.ad
+.RS 8n
+.rt
+The number of lwps in the process (if \fB-f\fR is also specified).
+.RE
+
+.sp
+.LP
+Under the \fB-L\fR option, one line is printed for each lwp in the process and
+the time-reporting fields \fBSTIME\fR and \fBLTIME\fR show the values for the
+lwp, not the process. A traditional single-threaded process contains only one
+lwp.
+.sp
+.LP
+A process that has exited and has a parent, but has not yet been waited for by
+the parent, is marked \fB<defunct>\fR\&.
+.SS "\fB-o\fR format"
+.sp
+.LP
+The \fB-o\fR option allows the output format to be specified under user
+control.
+.sp
+.LP
+The format specification must be a list of names presented as a single
+argument, blank- or comma-separated. Each variable has a default header. The
+default header can be overridden by appending an equals sign and the new text
+of the header. The rest of the characters in the argument is used as the header
+text. The fields specified are written in the order specified on the command
+line, and should be arranged in columns in the output. The field widths are
+selected by the system to be at least as wide as the header text (default or
+overridden value). If the header text is null, such as \fB-o\fR \fIuser=,\fR
+the field width is at least as wide as the default header text. If all header
+text fields are null, no header line is written.
+.sp
+.LP
+The following names are recognized in the POSIX locale:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuser\fR\fR
+.ad
+.RS 10n
+.rt
+The effective user \fBID\fR of the process. This is the textual user \fBID\fR,
+if it can be obtained and the field width permits, or a decimal representation
+otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBruser\fR\fR
+.ad
+.RS 10n
+.rt
+The real user \fBID\fR of the process. This is the textual user \fBID\fR, if it
+can be obtained and the field width permits, or a decimal representation
+otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgroup\fR\fR
+.ad
+.RS 10n
+.rt
+The effective group \fBID\fR of the process. This is the textual group
+\fBID,\fR if it can be obtained and the field width permits, or a decimal
+representation otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrgroup\fR\fR
+.ad
+.RS 10n
+.rt
+The real group \fBID\fR of the process. This is the textual group \fBID,\fR if
+it can be obtained and the field width permits, or a decimal representation
+otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpid\fR\fR
+.ad
+.RS 10n
+.rt
+The decimal value of the process \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBppid\fR\fR
+.ad
+.RS 10n
+.rt
+The decimal value of the parent process \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpgid\fR\fR
+.ad
+.RS 10n
+.rt
+The decimal value of the process group \fBID.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpcpu\fR\fR
+.ad
+.RS 10n
+.rt
+The ratio of CPU time used recently to CPU time available in the same period,
+expressed as a percentage. The meaning of ``recently'' in this context is
+unspecified. The CPU time available is determined in an unspecified manner.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvsz\fR\fR
+.ad
+.RS 10n
+.rt
+The total size of the process in virtual memory, in kilobytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnice\fR\fR
+.ad
+.RS 10n
+.rt
+The decimal value of the system scheduling priority of the process. See
+\fBnice\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBetime\fR\fR
+.ad
+.RS 10n
+.rt
+In the POSIX locale, the elapsed time since the process was started, in the
+form:
+.sp
+\fB[[\fR\fIdd\fR-\fB]\fR\fIhh\fR:\fB]\fR\fImm\fR:\fIss\fR
+.sp
+where
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdd\fR\fR
+.ad
+.RS 6n
+.rt
+is the number of days
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhh\fR\fR
+.ad
+.RS 6n
+.rt
+is the number of hours
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR\fR
+.ad
+.RS 6n
+.rt
+is the number of minutes
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIss\fR\fR
+.ad
+.RS 6n
+.rt
+is the number of seconds
+.RE
+
+The \fIdd\fR field is a decimal integer. The \fIhh\fR, \fImm\fR and \fIss\fR
+fields is two-digit decimal integers padded on the left with zeros.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtime\fR\fR
+.ad
+.RS 10n
+.rt
+In the POSIX locale, the cumulative CPU time of the process in the form:
+.sp
+\fB[\fR\fIdd\fR-\fB]\fR\fIhh\fR:\fImm\fR:\fIss\fR
+.sp
+The \fIdd\fR, \fIhh\fR, \fImm\fR, and \fIss\fR fields is as described in the
+\fBetime\fR specifier.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtty\fR\fR
+.ad
+.RS 10n
+.rt
+The name of the controlling terminal of the process (if any) in the same format
+used by the \fBwho\fR(1) command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcomm\fR\fR
+.ad
+.RS 10n
+.rt
+The name of the command being executed (\fBargv[0]\fR value) as a string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBargs\fR\fR
+.ad
+.RS 10n
+.rt
+The command with all its arguments as a string. The implementation might
+truncate this value to the field width; it is implementation-dependent whether
+any further truncation occurs. It is unspecified whether the string represented
+is a version of the argument list as it was passed to the command when it
+started, or is a version of the arguments as they might have been modified by
+the application. Applications cannot depend on being able to modify their
+argument list and having that modification be reflected in the output of
+\fBps\fR. The Solaris implementation limits the string to 80 bytes; the string
+is the version of the argument list as it was passed to the command when it
+started.
+.RE
+
+.sp
+.LP
+The following names are recognized in the Solaris implementation:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fR\fR
+.ad
+.RS 11n
+.rt
+Flags (hexadecimal and additive) associated with the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 11n
+.rt
+The state of the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.RS 11n
+.rt
+Processor utilization for scheduling (obsolete).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuid\fR\fR
+.ad
+.RS 11n
+.rt
+The effective user \fBID\fR number of the process as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBruid\fR\fR
+.ad
+.RS 11n
+.rt
+The real user \fBID\fR number of the process as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgid\fR\fR
+.ad
+.RS 11n
+.rt
+The effective group \fBID\fR number of the process as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrgid\fR\fR
+.ad
+.RS 11n
+.rt
+The real group \fBID\fR number of the process as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprojid\fR\fR
+.ad
+.RS 11n
+.rt
+The project \fBID\fR number of the process as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBproject\fR\fR
+.ad
+.RS 11n
+.rt
+The project \fBID\fR of the process as a textual value if that value can be
+obtained; otherwise, as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBzoneid\fR\fR
+.ad
+.RS 11n
+.rt
+The zone \fBID\fR number of the process as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBzone\fR\fR
+.ad
+.RS 11n
+.rt
+The zone \fBID\fR of the process as a textual value if that value can be
+obtained; otherwise, as a decimal integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsid\fR\fR
+.ad
+.RS 11n
+.rt
+The process ID of the session leader.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtaskid\fR\fR
+.ad
+.RS 11n
+.rt
+The task \fBID\fR of the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclass\fR\fR
+.ad
+.RS 11n
+.rt
+The scheduling class of the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpri\fR\fR
+.ad
+.RS 11n
+.rt
+The priority of the process. Higher numbers mean higher priority.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBopri\fR\fR
+.ad
+.RS 11n
+.rt
+The obsolete priority of the process. Lower numbers mean higher priority.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlwp\fR\fR
+.ad
+.RS 11n
+.rt
+The decimal value of the lwp \fBID\fR. Requesting this formatting option causes
+one line to be printed for each lwp in the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnlwp\fR\fR
+.ad
+.RS 11n
+.rt
+The number of lwps in the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpsr\fR\fR
+.ad
+.RS 11n
+.rt
+The number of the processor to which the process or lwp is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpset\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBID\fR of the processor set to which the process or lwp is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBaddr\fR\fR
+.ad
+.RS 11n
+.rt
+The memory address of the process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBosz\fR\fR
+.ad
+.RS 11n
+.rt
+The total size of the process in virtual memory, in pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwchan\fR\fR
+.ad
+.RS 11n
+.rt
+The address of an event for which the process is sleeping (if \(mi, the process
+is running).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstime\fR\fR
+.ad
+.RS 11n
+.rt
+The starting time or date of the process, printed with no blanks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrss\fR\fR
+.ad
+.RS 11n
+.rt
+The resident set size of the process, in kilobytes. The \fBrss\fR value
+reported by \fBps\fR is an estimate provided by \fBproc\fR(4) that might
+underestimate the actual resident set size. Users who wish to get more accurate
+usage information for capacity planning should use \fBpmap\fR(1) \fB-x\fR
+instead.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpmem\fR\fR
+.ad
+.RS 11n
+.rt
+The ratio of the process's resident set size to the physical memory on the
+machine, expressed as a percentage.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfname\fR\fR
+.ad
+.RS 11n
+.rt
+The first 8 bytes of the base name of the process's executable file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBctid\fR\fR
+.ad
+.RS 11n
+.rt
+The contract ID of the process contract the process is a member of as a decimal
+integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlgrp\fR\fR
+.ad
+.RS 11n
+.rt
+The home lgroup of the process.
+.RE
+
+.sp
+.LP
+Only \fBcomm\fR and \fBargs\fR are allowed to contain blank characters; all
+others, including the Solaris implementation variables, are not.
+.sp
+.LP
+The following table specifies the default header to be used in the POSIX locale
+corresponding to each format specifier.
+.sp
+
+.sp
+.TS
+tab() box;
+cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i)
+cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i)
+.
+FormatDefaultFormatDefault
+SpecifierHeaderSpecifierHeader
+_
+argsCOMMANDppidPPID
+commCOMMANDrgroupRGROUP
+etimeELAPSEDruserRUSER
+groupGROUPtimeTIME
+niceNIttyTT
+pcpu%CPUuserUSER
+pgidPGIDvszVSZ
+pidPID
+.TE
+
+.sp
+.LP
+The following table lists the Solaris implementation format specifiers and the
+default header used with each.
+.sp
+
+.sp
+.TS
+tab() box;
+cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i)
+cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i)
+.
+FormatDefaultFormatDefault
+SpecifierHeaderSpecifierHeader
+_
+addrADDRprojidPROJID
+cCprojectPROJECT
+classCLSpsrPSR
+fFrgidRGID
+fnameCOMMANDrssRSS
+gidGIDruidRUID
+lgrpLGRPsS
+lwpLWPsidSID
+nlwpNLWPstimeSTIME
+opriPRItaskidTASKID
+oszSZuidUID
+pmem%MEMwchanWCHAN
+priPRIzoneZONE
+ctidCTIDzoneidZONEID
+.TE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBps\fR Command
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% \fBps -o user,pid,ppid=MOM -o args\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+writes the following in the POSIX locale:
+
+.sp
+.in +2
+.nf
+ USER PID MOM COMMAND
+helene 34 12 ps -o uid,pid,ppid=MOM -o args
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The contents of the \fBCOMMAND\fR field need not be the same due to possible
+truncation.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBps\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCOLUMNS\fR\fR
+.ad
+.RS 11n
+.rt
+Override the system-selected horizontal screen size, used to determine the
+number of text columns to display.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/pts/*\fR\fR
+.ad
+.RS 15n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/term/*\fR\fR
+.ad
+.RS 15n
+.rt
+terminal (``tty'') names searcher files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+\fBUID\fR information supplier
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 15n
+.rt
+process control files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled (see USAGE)
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBkill\fR(1), \fBlgrpinfo\fR(1), \fBnice\fR(1), \fBpagesize\fR(1),
+\fBpmap\fR(1), \fBpriocntl\fR(1), \fBwho\fR(1), \fBgetty\fR(1M), \fBproc\fR(4),
+\fBttysrch\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBresource_controls\fR(5), \fBstandards\fR(5), \fBzones\fR(5)
+.SH NOTES
+.sp
+.LP
+Things can change while \fBps\fR is running. The snapshot it gives is true only
+for a split-second, and it might not be accurate by the time you see it. Some
+data printed for defunct processes is irrelevant.
+.sp
+.LP
+If no options to select processes are specified, \fBps\fR reports all processes
+associated with the controlling terminal. If there is no controlling terminal,
+there is no report other than the header.
+.sp
+.LP
+\fBps\fR \fB-ef\fR or \fBps\fR \fB-o\fR \fBstime\fR might not report the actual
+start of a tty login session, but rather an earlier time, when a getty was last
+respawned on the tty line.
+.sp
+.LP
+\fBps\fR is \fBCSI\fR-enabled except for login names (usernames).
diff --git a/usr/src/man/man1/ptree.1 b/usr/src/man/man1/ptree.1
new file mode 100644
index 0000000000..11179dd66d
--- /dev/null
+++ b/usr/src/man/man1/ptree.1
@@ -0,0 +1,182 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ptree 1 "11 Oct 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+ptree \- print process trees
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/ptree\fR [\fB-a\fR] [\fB-c\fR] [\fB-z\fR \fIzone\fR] [\fIpid\fR | \fIuser\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBptree\fR utility prints the process trees containing the specified
+\fIpid\fRs or \fIuser\fRs, with child processes indented from their respective
+parent processes. An argument of all digits is taken to be a process-ID,
+otherwise it is assumed to be a user login name. The default is all processes.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 11n
+.rt
+All. Print all processes, including children of process 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 11n
+.rt
+Contracts. Print process contract memberships in addition to parent-child
+relationships. See \fBprocess\fR(4). This option implies the \fB-a\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIzone\fR\fR
+.ad
+.RS 11n
+.rt
+Zones. Print only processes in the specified \fIzone\fR. Each zone \fBID\fR can
+be specified as either a zone name or a numerical zone \fBID\fR.
+.sp
+This option is only useful when executed in the global zone.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 8n
+.rt
+Process-id or a list of process-ids. \fBptree\fR also accepts
+\fB/proc/\fR\fInnn\fR as a process-id, so the shell expansion \fB/proc/*\fR can
+be used to specify all processes in the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuser\fR\fR
+.ad
+.RS 8n
+.rt
+Username or list of usernames. Processes whose effective user IDs match those
+given are displayed.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing ptree
+.sp
+.LP
+The following example prints the process tree (including children of process 0)
+for processes which match the command name \fBssh\fR:
+
+.sp
+.in +2
+.nf
+$ ptree -a `pgrep ssh`
+ 1 /sbin/init
+ 100909 /usr/lib/ssh/sshd
+ 569150 /usr/lib/ssh/sshd
+ 569157 /usr/lib/ssh/sshd
+ 569159 -ksh
+ 569171 bash
+ 569173 /bin/ksh
+ 569193 bash
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnon-zero\fR
+.ad
+.RS 12n
+.rt
+An error has occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 11n
+.rt
+process files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The human readable output is Unstable. The options are Evolving.
+.SH SEE ALSO
+.sp
+.LP
+\fBgcore\fR(1), \fBldd\fR(1), \fBpargs\fR(1), \fBpgrep\fR(1), \fBpkill\fR(1),
+\fBplimit\fR(1), \fBpmap\fR(1), \fBpreap\fR(1), \fBproc\fR(1), \fBps\fR(1),
+\fBppgsz\fR(1), \fBpwd\fR(1), \fBrlogin\fR(1), \fBtime\fR(1), \fBtruss\fR(1),
+\fBwait\fR(1), \fBfcntl\fR(2), \fBfstat\fR(2), \fBsetuid\fR(2),
+\fBdlopen\fR(3C), \fBsignal.h\fR(3HEAD), \fBcore\fR(4), \fBproc\fR(4),
+\fBprocess\fR(4), \fBattributes\fR(5), \fBzones\fR(5)
diff --git a/usr/src/man/man1/pvs.1 b/usr/src/man/man1/pvs.1
new file mode 100644
index 0000000000..154638b843
--- /dev/null
+++ b/usr/src/man/man1/pvs.1
@@ -0,0 +1,446 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pvs 1 "25 Sep 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+pvs \- display the internal version information of dynamic objects
+.SH SYNOPSIS
+.LP
+.nf
+\fBpvs\fR [\fB-Cdlnorsv\fR] [\fB-I\fR \fIindex-expr\fR] [\fB-N\fR \fIname\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpvs\fR utility displays any internal version information contained
+within an \fBELF\fR file. Commonly, these files are dynamic executables and
+shared objects, and possibly relocatable objects. This version information can
+fall into one of two categories:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+version definitions
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+version dependencies
+.RE
+.sp
+.LP
+Version \fIdefinitions\fR describe the interfaces that are made available by an
+\fBELF\fR file. Each version definition is associated to a set of global
+symbols provided by the file. Version definitions can be assigned to a file
+during its creation by the link-editor using the \fB-M\fR option and the
+associated \fImapfile\fR directives. See the \fILinker and Libraries Guide\fR
+for more details.
+.sp
+.LP
+Version \fIdependencies\fR describe the binding requirements of dynamic objects
+on the version definitions of any shared object dependencies. When a dynamic
+object is built with a shared object, the link-editor records information
+within the dynamic object indicating that the shared object is a dependency.
+This dependency must be satisfied at runtime. If the shared object also
+contains version \fIdefinitions\fR, then those version definitions that satisfy
+the global symbol requirements of the dynamic object are also recorded in the
+dynamic object being created. At process initialization, the runtime linker
+uses any version \fIdependencies\fR as a means of validating the interface
+requirements of the dynamic objects used to construct the process.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported. If neither the \fB-d\fR or \fB-r\fR
+options are specified, both are enabled.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 18n
+.rt
+Demangles C++ symbol names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 18n
+.rt
+Prints version definition information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIindex-expr\fR\fR
+.ad
+.RS 18n
+.rt
+Qualifies the versions to examine with a specific version index or index range.
+For example, the version with index 3 in an object can be displayed using:
+.sp
+.in +2
+.nf
+example% \fBpvs -I 3 \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+An \fIindex-expr\fR can be a single non-negative integer value that specifies a
+specific version, as shown in the previous example. Alternatively, an
+\fIindex-expr\fR can consist of two such values separated by a colon (:),
+indicating a range of versions. The following example displays the versions 3,
+4, and 5 in a file:
+.sp
+.in +2
+.nf
+example% \fBpvs -I 3:5 \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+When specifying an index range, the second value can be omitted to indicate the
+final item in the file. For example, the following statement lists all versions
+from the tenth to the end:
+.sp
+.in +2
+.nf
+example% \fBpvs -I 10: \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+Prints any symbols that have been reduced from global to local binding due to
+versioning. By convention, these symbol entries are located in the
+\fI\&.symtab\fR section, and fall between the \fIFILE\fR symbol representing
+the output file, and the \fIFILE\fR symbol representing the first input file
+used to generate the output file. These reduced symbol entries are assigned
+the fabricated version definition \fB_LOCAL_\fR. No reduced symbols will be
+printed if the file has been stripped (see \fBstrip\fR(1)), or if the symbol
+entry convention cannot be determined.
+.sp
+Use of the \fB-l\fR option implicitly enables the \fB-s\fR option
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 18n
+.rt
+Normalizes version definition information. By default, all version definitions
+within the object are displayed. However, version definitions can inherit other
+version definitions. Under normalization, only the head of each inheritance
+list is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIname\fR\fR
+.ad
+.RS 18n
+.rt
+When used with the \fB-d\fR option, \fB-N\fR prints only the information for
+the given version definition \fIname\fR and any of its inherited version
+definitions.
+.sp
+When used with the \fB-r\fR option, \fB-N\fR prints only the information for
+the given dependency file \fIname\fR. It is possible to qualify a specific
+version from the dependency file by including the version in parenthesis
+following the file name:
+.sp
+.in +2
+.nf
+example% \fBpvs -N 'dependency (version)' \fIfilename\fR\fR
+.fi
+.in -2
+.sp
+
+See Matching Options for additional information about the matching options
+(\fB-I\fR, \fB-N\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 18n
+.rt
+Creates one-line version definition output. By default, file, version
+definitions, and any symbol output is indented to ease human inspection. This
+option prefixes each output line with the file and version definition name and
+can be more useful for analysis with automated tools.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 18n
+.rt
+Prints version dependency (requirements) information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the symbols associated with each version definition. Any data symbols
+from versions defined by the object are accompanied with the size, in bytes, of
+the data item.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Verbose output. Indicates any weak version definitions, and any version
+definition inheritance. When used with the \fB-N\fR and \fB-d\fR options, the
+inheritance of the base version definition is also shown. When used with the
+\fB-s\fR option, the version symbol definition is also shown.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported.
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+The \fBELF\fR file about which internal version information is displayed.
+.RE
+
+.SH USAGE
+.SS "Matching Options"
+.sp
+.LP
+The \fB-I\fR and \fB-N\fR options are collectively referred to as the
+\fBmatching options\fR. These options are used to narrow the range of versions
+to examine, by index or by name.
+.sp
+.LP
+Any number and type of matching option can be mixed in a given invocation of
+\fBpvs\fR. In this case, \fBpvs\fR displays the superset of all versions
+matched by any of the matching options used. This feature allows for the
+selection of complex groupings of items using the most convenient form for
+specifying each item.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying version definitions
+.sp
+.LP
+The following example displays the version definitions of \fBlibelf.so.1\fR:
+
+.sp
+.in +2
+.nf
+% \fBpvs -d /lib/libelf.so.1\fR
+ libelf.so.1;
+ SUNW_1.1
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCreating a one-liner display
+.sp
+.LP
+A normalized, one-liner display, suitable for creating a \fImapfile\fR version
+control directive, can be created using the \fB-n\fR and \fB-o\fR options:
+
+.sp
+.in +2
+.nf
+% \fBpvs -don /lib/libelf.so.1\fR
+/lib/libelf.so.1 - SUNW_1.1;
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDisplaying version requirements
+.sp
+.LP
+The following example displays the version requirements of \fBldd\fR and
+\fBpvs\fR:
+
+.sp
+.in +2
+.nf
+% \fBpvs -r /usr/bin/ldd /usr/bin/pvs\fR
+/usr/bin/ldd:
+ libelf.so.1 (SUNW_1.1);
+ libc.so.1 (SUNW_1.1);
+/usr/bin/pvs:
+ libelf.so.1 (SUNW_1.1);
+ libc.so.1 (SUNW_1.1);
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRDetermining a dependency symbol version
+.sp
+.LP
+The following example displays the shared object from which the \fBldd\fR
+command expects to find the printf function at runtime, as well as the version
+it belongs to:
+
+.sp
+.in +2
+.nf
+% \fBpvs -ors /usr/bin/ldd | grep ' printf'\fR
+/usr/bin/ldd - libc.so.1 (SYSVABI_1.3): printf;
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRDetermine all dependency symbols from a specific version
+.sp
+.LP
+The \fB-N\fR option can be used to obtain a list of all the symbols from a
+dependency that belong to a specific version. To determine the symbols that
+\fBldd\fR will find from version \fBSYSVABI_1.3\fR of \fBlibc.so.1\fR:
+
+.sp
+.in +2
+.nf
+% \fBpvs -s -N 'libc.so.1 (SYSVABI_1.3)' /usr/bin/ldd\fR
+
+ libc.so.1 (SYSVABI_1.3):
+ _exit;
+ strstr;
+ printf;
+ __fpstart;
+ strncmp;
+ lseek;
+ strcmp;
+ getopt;
+ execl;
+ close;
+ fflush;
+ wait;
+ strerror;
+ putenv;
+ sprintf;
+ getenv;
+ open;
+ perror;
+ fork;
+ strlen;
+ geteuid;
+ access;
+ setlocale;
+ atexit;
+ fprintf;
+ exit;
+ read;
+ malloc;
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Note that the specific list of symbols used by \fBldd\fR may change between
+Solaris releases.
+
+.LP
+\fBExample 6 \fRDisplay base defined version by index
+.sp
+.LP
+By convention, the base global version defined by an object has the name of the
+object. For example, the base version of \fBpvs\fR is named \fB\&'pvs'\fR. The
+base version of any object is always version index 1. Therefore, the \fB-I\fR
+option can be used to display the base version of any object without having to
+specify its name:
+
+.sp
+.in +2
+.nf
+% \fBpvs -v -I 1 /usr/bin/pvs\fR
+ pvs [BASE];
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+If the requested version information is not found, a non-zero value is
+returned. Otherwise, a \fB0\fR value is returned.
+.sp
+.LP
+Version information is determined not found when any of the following is true:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the \fB-d\fR option is specified and no version definitions are found.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the \fB-r\fR option is specified and no version requirements are found.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+neither the \fB-d\fR nor \fB-r\fR option is specified and no version
+definitions or version requirements are found.
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBelfdump\fR(1), \fBld\fR(1), \fBldd\fR(1), \fBstrip\fR(1), \fBelf\fR(3ELF),
+\fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/pwd.1 b/usr/src/man/man1/pwd.1
new file mode 100644
index 0000000000..d2bcd30207
--- /dev/null
+++ b/usr/src/man/man1/pwd.1
@@ -0,0 +1,105 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH pwd 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+pwd \- return working directory name
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/pwd\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBpwd\fR utility writes an absolute path name of the current working
+directory to standard output.
+.sp
+.LP
+Both the Bourne shell, \fBsh\fR(1), and the Korn shells, \fBksh\fR(1) and
+\fBksh93\fR(1), also have a built-in \fBpwd\fR command.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBpwd\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+If an error is detected, output will not be written to standard output, a
+diagnostic message will be written to standard error, and the exit status will
+not be \fB0\fR.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcd\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1),
+\fBshell_builtins\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+``\fBCannot open ..\fR'' and ``\fBRead error in ..\fR'' indicate possible file
+system trouble and should be referred to a UNIX system administrator.
+.SH NOTES
+.sp
+.LP
+If you move the current directory or one above it, \fBpwd\fR may not give the
+correct response. Use the \fBcd\fR(1) command with a full path name to correct
+this situation.
diff --git a/usr/src/man/man1/ranlib.1 b/usr/src/man/man1/ranlib.1
new file mode 100644
index 0000000000..5709bca24b
--- /dev/null
+++ b/usr/src/man/man1/ranlib.1
@@ -0,0 +1,34 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ranlib 1 "28 Jun 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+ranlib \- convert archives to random libraries
+.SH SYNOPSIS
+.LP
+.nf
+\fBranlib\fR \fIarchive\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBranlib\fR utility was used in SunOS 4.\fIx\fR to add a table of contents
+to archive libraries, which converted each archive to a form that could be
+linked more rapidly. This is no longer needed, as the \fBar\fR(1) command
+automatically provides all the functionality \fBranlib\fR used to provide.
+.sp
+.LP
+This script is provided as a convenience for software developers who need to
+maintain Makefiles that are portable across a variety of operating systems.
+.SH EXIT STATUS
+.sp
+.LP
+\fBranlib\fR has exit status \fB0\fR.
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBar.h\fR(3HEAD), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/rcapstat.1 b/usr/src/man/man1/rcapstat.1
new file mode 100644
index 0000000000..3d1b66a6bd
--- /dev/null
+++ b/usr/src/man/man1/rcapstat.1
@@ -0,0 +1,423 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rcapstat 1 "16 Jun 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+rcapstat \- report resource cap enforcement daemon statistics
+.SH SYNOPSIS
+.LP
+.nf
+\fBrcapstat\fR [\fB-g\fR] [\fB-p | -z\fR] [\fB-T\fR u | d ] [\fIinterval\fR [\fIcount\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrcapstat\fR command reports on the projects or zones capped by
+\fBrcapd\fR(1M). Each report contains statistics that pertain to the project or
+zone and paging statistics. Paging refers to the act of relocating portions of
+memory, called pages, to or from physical memory. \fBrcapd\fR pages out the
+most infrequently used pages.
+.sp
+.LP
+The paging statistics in the first report issued show the activity since the
+daemon was started. Subsequent reports reflect the activity since the last
+report was issued.
+.sp
+.LP
+Reports are issued every \fIinterval\fR seconds up to the quantity specified by
+\fIcount\fR, or forever if \fIcount\fR is not specified.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 12n
+.rt
+Global statistics. Reports the minimum memory utilization for memory cap
+enforcement (see \fBrcapadm\fR(1M)) and reports current memory utilization as a
+percentage of installed physical memory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 12n
+.rt
+Report statistics for capped projects. This is the default if no option is
+specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fBu\fR | \fBd\fR\fR
+.ad
+.RS 12n
+.rt
+Display a time stamp.
+.sp
+Specify \fBu\fR for a printed representation of the internal representation of
+time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
+\fBdate\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.RS 12n
+.rt
+Report statistics for capped zones.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+The following list defines the column headings in the \fBrcapstat\fR report and
+provides information about how to interpret the report.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBid\fR\fR
+.ad
+.RS 11n
+.rt
+The project ID or zone \fBID\fR of the capped project or zone.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBproject\fR\fR
+.ad
+.RS 11n
+.rt
+The project name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBzone\fR\fR
+.ad
+.RS 11n
+.rt
+The zone name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnproc\fR\fR
+.ad
+.RS 11n
+.rt
+The number of processes in the project or zone since the last report.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvm\fR\fR
+.ad
+.RS 11n
+.rt
+The total virtual memory size of the project or zone's processes, including all
+mapped files and devices, in kilobytes (\fBK\fR), megabytes (\fBM\fR), or
+gigabytes (\fBG\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrss\fR\fR
+.ad
+.RS 11n
+.rt
+The total resident set size (\fBRSS\fR) of the project or zone's processes, in
+kilobytes (\fBK\fR), megabytes (\fBM\fR), or gigabytes (\fBG\fR). The count
+does not account for shared pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcap\fR\fR
+.ad
+.RS 11n
+.rt
+The \fBRSS\fR cap for the project or zone. See \fBrcapd\fR(1M) for information
+about how to specify memory caps.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBat\fR\fR
+.ad
+.RS 11n
+.rt
+The total amount of memory that \fBrcapd\fR attempted to page out.
+.sp
+Paging refers to the act of relocating portions of memory, called pages, to or
+from physical memory. \fBrcapd\fR pages out the most infrequently used pages.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBavgat\fR\fR
+.ad
+.RS 11n
+.rt
+The average amount of memory that \fBrcapd\fR attempted to page out during
+each sample cycle. The rate at which \fBrcapd\fR samples \fBRSS\fR can be set
+with \fBrcapadm\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpg\fR\fR
+.ad
+.RS 11n
+.rt
+An estimate of the total amount of memory that \fBrcapd\fR successfully paged
+out.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBavgpg\fR\fR
+.ad
+.RS 11n
+.rt
+An estimate of the average amount of memory that \fBrcapd\fR successfully paged
+out during each sample cycle. The rate at which \fBrcapd\fR samples process
+\fBRSS\fR sizes can be set with \fBrcapadm\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinterval\fR\fR
+.ad
+.RS 12n
+.rt
+Specifies the reporting interval in seconds. The default interval is 5 seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcount\fR\fR
+.ad
+.RS 12n
+.rt
+Specifies the number of reports to produce. By default, \fBrcapstat\fR reports
+statistics until a termination signal is received or until the \fBrcapd\fR
+process exits.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBrcapstat\fR to Report Cap and Project Information
+.sp
+.LP
+Caps are defined for two projects associated with two users. \fBuser1\fR has a
+cap of 50 megabytes and \fBuser2\fR has a cap of 10 megabytes.
+
+.sp
+.LP
+The following command produces five reports at 5-second sampling intervals.
+
+.sp
+.in +2
+.nf
+example# \fBrcapstat 5 5\fR
+ id project nproc vm rss cap at avgat pg avgpg
+112270 user1 24 123M 35M 50M 50M 0K 3312K 0K
+ 78194 user2 1 2368K 1856K 10M 0K 0K 0K 0K
+ id project nproc vm rss cap at avgat pg avgpg
+112270 user1 24 123M 35M 50M 0K 0K 0K 0K
+ 78194 user2 1 2368K 1856K 10M 0K 0K 0K 0K
+ id project nproc vm rss cap at avgat pg avgpg
+112270 user1 24 123M 35M 50M 0K 0K 0K 0K
+ 78194 user2 1 2368K 1928K 10M 0K 0K 0K 0K
+ id project nproc vm rss cap at avgat pg avgpg
+112270 user1 24 123M 35M 50M 0K 0K 0K 0K
+ 78194 user2 1 2368K 1928K 10M 0K 0K 0K 0K
+ id project nproc vm rss cap at avgat pg avgpg
+112270 user1 24 123M 35M 50M 0K 0K 0K 0K
+ 78194 user2 1 2368K 1928K 10M 0K 0K 0K 0K
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The first three lines of output constitute the first report, which contains the
+cap and project information for the two projects and paging statistics since
+\fBrcapd\fR was started. The \fBat\fR and \fBpg\fR columns are a number greater
+than zero for \fBuser1\fR and zero for \fBuser2\fR, which indicates that at
+some time in the daemon's history, \fBuser1\fR exceeded its cap but \fBuser2\fR
+did not.
+
+.sp
+.LP
+The subsequent reports show no significant activity.
+
+.LP
+\fBExample 2 \fRUsing \fBrcapstat\fR to Monitor the RSS of a Project
+.sp
+.in +2
+.nf
+example% \fBrcapstat 5 5\fR
+ id project nproc vm rss cap at avgat pg avgpg
+376565 user1 57 209M 46M 10M 440M 220M 5528K 2764K
+376565 user1 57 209M 44M 10M 394M 131M 4912K 1637K
+376565 user1 56 207M 43M 10M 440M 147M 6048K 2016K
+376565 user1 56 207M 42M 10M 522M 174M 4368K 1456K
+376565 user1 56 207M 44M 10M 482M 161M 3376K 1125K
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The project \fBuser1\fR has an \fBRSS\fR in excess of its physical memory cap.
+The nonzero values in the \fBpg\fR column indicate that \fBrcapd\fR is
+consistently paging out memory as it attempts to meet the cap by lowering the
+physical memory utilization of the project's processes. However, \fBrcapd\fR is
+unsuccessful, as indicated by the varying \fBrss\fR values that do not show a
+corresponding decrease. This means that the application's resident memory is
+being actively used, forcing \fBrcapd\fR to affect the working set. Under this
+condition, the system continues to experience high page fault rates, and
+associated I/O, until the working set size (\fBWSS\fR) is reduced, the cap is
+raised, or the application changes its memory access pattern. Notice that a
+page fault occurs when either a new page must be created, or the system must
+copy in a page from the swap device.
+
+.LP
+\fBExample 3 \fRDetermining the Working Set Size of a Project
+.sp
+.LP
+This example is a continuation of \fBExample 1\fR, and it uses the same
+project.
+
+.sp
+.in +2
+.nf
+example% \fBrcapstat 5 5\fR
+ id project nproc vm rss cap at avgat pg avgpg
+376565 user1 56 207M 44M 10M 381M 191M 15M 7924K
+376565 user1 56 207M 46M 10M 479M 160M 2696K 898K
+376565 user1 56 207M 46M 10M 424M 141M 7280K 2426K
+376565 user1 56 207M 43M 10M 401M 201M 4808K 2404K
+376565 user1 56 207M 43M 10M 456M 152M 4800K 1600K
+376565 user1 56 207M 44M 10M 486M 162M 4064K 1354K
+376565 user1 56 207M 52M 100M 191M 95M 1944K 972K
+376565 user1 56 207M 55M 100M 0K 0K 0K 0K
+376565 user1 56 207M 56M 100M 0K 0K 0K 0K
+376565 user1 56 207M 56M 100M 0K 0K 0K 0K
+376565 user1 56 207M 56M 100M 0K 0K 0K 0K
+376565 user1 56 207M 56M 100M 0K 0K 0K 0K
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+By inhibiting cap enforcement, either by raising the cap of a project or by
+changing the minimum physical memory utilization for cap enforcement (see
+\fBrcapadm\fR(1M)), the resident set can become the working set. The \fBrss\fR
+column might stabilize to show the project \fBWSS\fR, as shown in the previous
+example. The \fBWSS\fR is the minimum cap value that allows the project's
+processes to operate without perpetually incurring page faults.
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command-line options were specified.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBrcapadm\fR(1M), \fBrcapd\fR(1M), \fBattributes\fR(5)
+.sp
+.LP
+\fIPhysical Memory Control Using the Resource Capping Daemon\fR in \fISystem
+Administration Guide: Resource Management\fR
+.SH NOTES
+.sp
+.LP
+If the interval specified to \fBrcapstat\fR is shorter than the reporting
+interval specified to \fBrcapd\fR (with \fBrcapadm\fR(1M)), the output for some
+intervals can be zero. This is because \fBrcapd\fR does not update statistics
+more frequently than the interval specified with \fBrcapadm\fR, and this
+interval is independent of (and less precise than) the sampling interval used
+by \fBrcapstat\fR.
diff --git a/usr/src/man/man1/rcp.1 b/usr/src/man/man1/rcp.1
new file mode 100644
index 0000000000..5ba516393e
--- /dev/null
+++ b/usr/src/man/man1/rcp.1
@@ -0,0 +1,362 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rcp 1 "23 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+rcp \- remote file copy
+.SH SYNOPSIS
+.LP
+.nf
+\fBrcp\fR [\fB-p\fR] [\fB-a\fR] [\fB-K\fR] [\fB-x\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-k\fR \fIrealm\fR] \fIfilename1\fR \fIfilename2\fR
+.fi
+
+.LP
+.nf
+\fBrcp\fR [\fB-pr\fR] [\fB-a\fR] [\fB-K\fR] [\fB-x\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-k\fR \fIrealm\fR] \fIfilename\fR... \fIdirectory\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrcp\fR command copies files between machines. Each \fIfilename\fR or
+\fIdirectory\fR argument is either a remote file name of the form:
+.sp
+.in +2
+.nf
+\fIhostname\fR\fB:\fR\fIpath\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or a local file name (containing no \fB:\fR (colon) characters, or \fB/\fR
+(backslash) before any \fB:\fR (colon) characters).
+.sp
+.LP
+The \fIhostname\fR can be an IPv4 or IPv6 address string. See \fBinet\fR(7P)
+and \fBinet6\fR(7P). Since IPv6 addresses already contain colons, the
+\fIhostname\fR should be enclosed in a pair of square brackets when an IPv6
+address is used. Otherwise, the first occurrence of a colon can be interpreted
+as the separator between \fIhostname\fR and \fIpath\fR. For example,
+.sp
+.in +2
+.nf
+[1080::8:800:200C:417A]:tmp/file
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If a \fIfilename\fR is not a full path name, it is interpreted relative to your
+home directory on \fIhostname\fR. A \fIpath\fR on a remote host can be quoted
+using \fB\e\|\fR, \fB"\|\fR, or \fB\&'\|\fR, so that the metacharacters are
+interpreted remotely. Please notice that the kerberized versions of \fBrcp\fR
+are not IPv6-enabled.
+.sp
+.LP
+\fBrcp\fR does not prompt for passwords. It either uses Kerberos authentication
+which is enabled through command-line options or your current local user name
+must exist on \fIhostname\fR and allow remote command execution by
+\fBrsh\fR(1).
+.sp
+.LP
+The \fBrcp\fR session can be kerberized using any of the following Kerberos
+specific options : \fB-a\fR, \fB-PN\fR or \fB-PO\fR, \fB-x\fR, and \fB-k\fR
+\fIrealm\fR. Some of these options (\fB-a\fR, \fB-x\fR and \fB-PN\fR or
+\fB-PO\fR) can also be specified in the \fB[appdefaults]\fR section of
+\fBkrb5.conf\fR(4). The usage of these options and the expected behavior is
+discussed in the OPTIONS section below. If Kerberos authentication is used,
+authorization to the account is controlled by rules in
+\fBkrb5_auth_rules\fR(5). If this authorization fails, fallback to normal
+\fBrcp\fR using rhosts occurs only if the \fB-PO\fR option is used explicitly
+on the command line or is specified in \fBkrb5.conf\fR(4). If authorization
+succeeds, remote copy succeeds without any prompting of password. Also notice
+that the \fB-PN\fR or \fB-PO\fR, \fB-x\fR, and \fB-k\fR \fIrealm\fR options are
+just supersets of the \fB-a\fR option.
+.sp
+.LP
+\fBrcp\fR handles third party copies, where neither source nor target files are
+on the current machine. Hostnames can also take the form
+.sp
+.in +2
+.nf
+\fIusername\fR\fB@\fR\fIhostname\fR\fB:\fR\fIfilename\fR
+.fi
+.in -2
+
+.sp
+.LP
+to use \fIusername\fR rather than your current local user name as the user name
+on the remote host. \fBrcp\fR also supports Internet domain addressing of the
+remote host, so that:
+.sp
+.in +2
+.nf
+\fIusername\fR\fB@\fR\fIhost\fR\fB\&.\fR\fIdomain\fR\fB:\fR\fIfilename\fR
+.fi
+.in -2
+
+.sp
+.LP
+specifies the username to be used, the hostname, and the domain in which that
+host resides. File names that are not full path names are interpreted relative
+to the home directory of the user named \fIusername\fR, on the remote host.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 12n
+.rt
+This option explicitly enables Kerberos authentication and trusts the
+\fB\&.k5login\fR file for access-control. If the authorization check by
+\fBin.rshd\fR(1M) on the server-side succeeds and if the \fB\&.k5login\fR file
+permits access, the user is allowed to carry out the \fBrcp\fR transfer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIrealm\fR\fR
+.ad
+.RS 12n
+.rt
+Causes \fBrcp\fR to obtain tickets for the remote host in \fIrealm\fR instead
+of the remote host's realm as determined by \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR \fIrealm\fR\fR
+.ad
+.RS 12n
+.rt
+This option explicitly disables Kerberos authentication. It canbe used to
+override the \fBautologin\fR variable in\fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 12n
+.rt
+Attempts to give each copy the same modification times, access times, modes,
+and \fBACL\fRs if applicable as the original file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-PO\fR\fR
+.ad
+.br
+.na
+\fB\fB-PN\fR\fR
+.ad
+.RS 12n
+.rt
+Explicitly requests new (\fB-PN\fR) or old (\fB-PO\fR) version of the Kerberos
+"\fBrcmd\fR" protocol. The new protocol avoids many security problems prevalant
+in the old one and is regarded much more secure, but is not interoperable with
+older (MIT/SEAM) servers. The new protocol is used by default, unless
+explicitly specified using these options or through \fBkrb5.conf\fR(4). If
+Kerberos authorization fails when using the old "\fBrcmd\fR" protocol, there is
+fallback to regular, non-kerberized \fBrcp\fR. This is not the case when the
+new, more secure "\fBrcmd\fR" protocol is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 12n
+.rt
+Copies each subtree rooted at \fIfilename\fR; in this case the destination must
+be a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 12n
+.rt
+Causes the information transferred between hosts to be encrypted. Notice that
+the command is sent unencrypted to the remote system. All subsequent transfers
+are encrypted.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBrcp\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.sp
+.LP
+The \fBrcp\fR command is IPv6-enabled. See \fBip6\fR(7P). \fBIPv6\fR is not
+currently supported with Kerberos V5 authentication.
+.sp
+.LP
+For the kerberized \fBrcp\fR session, each user can have a private
+authorization list in a file \fB\&.k5login\fR in their home directory. Each
+line in this file should contain a Kerberos principal name of the form
+\fIprincipal\fR/\fIinstance\fR@\fIrealm\fR. If there is a \fB~/.k5login\fR
+file, then access is granted to the account if and only if the originater user
+is authenticated to one of the principals named in the \fB~/.k5login\fR file.
+Otherwise, the originating user is granted access to the account if and only if
+the authenticated principal name of the user can be mapped to the local account
+name using the \fIauthenticated-principal-name\fR \(-> \fIlocal-user-name\fR
+mapping rules. The \fB\&.k5login\fR file (for access control) comes into play
+only when Kerberos authentication is being done.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All files were copied successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+See the NOTES section for caveats on the exit code.
+.SH FILES
+.sp
+.LP
+\fB$HOME/.profile\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.k5login\fR\fR
+.ad
+.RS 23n
+.rt
+File containing Kerberos principals that are allowed access
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.conf\fR\fR
+.ad
+.RS 23n
+.rt
+Kerberos configuration file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcpio\fR(1), \fBftp\fR(1), \fBrlogin\fR(1), \fBrsh\fR(1), \fBsetfacl\fR(1),
+\fBtar\fR(1), \fBtar\fR(1), \fBin.rshd\fR(1M), \fBhosts.equiv\fR(4),
+\fBkrb5.conf\fR(4), \fBattributes\fR(5), \fBlargefile\fR(5),
+\fBkrb5_auth_rules\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P), \fBip6\fR(7P)
+.SH NOTES
+.sp
+.LP
+\fBrcp\fR is meant to copy between different hosts. Attempting to \fBrcp\fR a
+file onto itself, as with:
+.sp
+.in +2
+.nf
+example% \fBrcp tmp/file myhost:/tmp/file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+results in a severely corrupted file.
+.sp
+.LP
+\fBrcp\fR might not correctly fail when the target of a copy is a file instead
+of a directory.
+.sp
+.LP
+\fBrcp\fR can become confused by output generated by commands in a
+\fB$HOME/.profile\fR on the remote host.
+.sp
+.LP
+\fBrcp\fR requires that the source host have permission to execute commands on
+the remote host when doing third-party copies.
+.sp
+.LP
+\fBrcp\fR does not properly handle symbolic links. Use \fBtar\fR or \fBcpio\fR
+piped to \fBrsh\fR to obtain remote copies of directories containing symbolic
+links or named pipes. See \fBtar\fR(1) and \fBcpio\fR(1).
+.sp
+.LP
+If you forget to quote metacharacters intended for the remote host, you get an
+incomprehensible error message.
+.sp
+.LP
+\fBrcp\fR fails if you copy \fBACL\fRs to a file system that does not support
+\fBACL\fRs.
+.sp
+.LP
+\fBrcp\fR is \fBCSI\fR-enabled except for the handling of username, hostname,
+and domain.
+.sp
+.LP
+When \fBrcp\fR is used to perform third-party copies where either of the remote
+machines is not running Solaris, the exit code cannot be relied upon. That is,
+errors could occur when success is reflected in the exit code, or the copy
+could be completely successful even though an error is reflected in the exit
+code.
diff --git a/usr/src/man/man1/rdist.1 b/usr/src/man/man1/rdist.1
new file mode 100644
index 0000000000..b51e7c667d
--- /dev/null
+++ b/usr/src/man/man1/rdist.1
@@ -0,0 +1,649 @@
+'\" te
+.\" Copyright (c) 1985 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.TH rdist 1 "23 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+rdist \- remote file distribution program
+.SH SYNOPSIS
+.LP
+.nf
+\fBrdist\fR [\fB-b\fR] [\fB-D\fR] [\fB-h\fR] [\fB-i\fR] [\fB-n\fR] [\fB-q\fR] [\fB-R\fR] [\fB-a\fR] [\fB-K\fR] [\fB-x\fR]
+ [\fB-PN\fR | \fB-PO\fR] [\fB-k\fR \fIrealm\fR] [\fB-v\fR] [\fB-w\fR] [\fB-y\fR]
+ [\fB-d\fR \fImacro\fR \fI=\fR \fIvalue\fR] [\fB-f\fR \fIdistfile\fR] [\fB-m\fR \fIhost\fR]...
+.fi
+
+.LP
+.nf
+\fBrdist\fR [\fB-b\fR] [\fB-D\fR] [\fB-h\fR] [\fB-i\fR] [\fB-n\fR] [\fB-q\fR] [\fB-R\fR] [\fB-a\fR] [\fB-K\fR] [\fB-x\fR]
+ [\fB-PN\fR | \fB-PO\fR] [\fB-k\fR \fIrealm\fR] [\fB-v\fR] [\fB-w\fR] [\fB-y\fR] \fB-c\fR \fIpathname\fR...
+ [\fIlogin\fR @] \fIhostname\fR [: \fIdestpath\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrdist\fR utility maintains copies of files on multiple hosts. It
+preserves the owner, group, mode, and modification time of the master copies,
+and can update programs that are executing. (\fBrdist\fR does not propagate
+ownership or mode changes when the file contents have not changed.) Normally, a
+copy on a remote host is updated if its size or modification time differs from
+the original on the local host. With the \fB-y\fR option (younger mode), only
+the modification times are checked, not the size. See \fBOPTIONS\fR below.
+.sp
+.LP
+There are two forms of the \fBrdist\fR command. In the first form shown in the
+\fBSYNOPSIS\fR section above, \fBrdist\fR reads the indicated \fIdistfile\fR
+for instructions on updating files and/or directories. If \fIdistfile\fR is
+`\fB\(mi\fR\&', the standard input is used. If no \fB-f\fR option is present,
+\fBrdist\fR first looks in its working directory for \fBdistfile\fR, and then
+for \fBDistfile\fR, for instructions.
+.sp
+.LP
+The second form shown in \fBSYNOPSIS\fR uses the \fB-c\fR option and specifies
+paths as command line options.
+.sp
+.LP
+The user can opt for a secure session of \fBrdist\fR which uses Kerberos V5 for
+authentication. Encryption of the data being transferred is also possible. The
+\fBrdist\fR session can be kerberized using any of the following Kerberos
+specific options : \fB-a\fR, \fB-PN\fR or \fB-PO\fR, \fB-x\fR, and \fB-k\fR
+\fIrealm\fR. Some of these options (\fB-a\fR, \fB-x\fR, \fB-PN\fR or \fB-PO\fR,
+and \fB-f\fR or \fB-F\fR) can also be specified in the \fB[appdefaults]\fR
+section of \fBkrb5.conf\fR(4). The usage of these options and the expected
+behavior is discussed in the OPTIONS section below. If Kerberos authentication
+is used, authorization to the account is controlled by rules in
+\fBkrb5_auth_rules\fR(5). If this authorization fails, fallback to normal
+\fBrdist\fR using rhosts occurs only if the \fB-PO\fR option is used explicitly
+on the command line or is specified in \fBkrb5.conf\fR(4). Also notice that the
+\fB-PN\fR or \fB-PO\fR, \fB-x\fR, and \fB-k\fR \fIrealm\fR options are just
+supersets of the \fB-a\fR option. In order to use the non-secure version of
+\fBrdist\fR across machines, each host machine must have a
+\fB/etc/host.equiv\fR file, or the user must have an entry in the
+\fB\&.rhosts\fR file in the home directory. See \fBhosts.equiv\fR(4) for more
+information.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option explicitly enables Kerberos authentication and trusts the
+\fB\&.k5login\fR file for access-control. If the authorization check by
+\fBin.rshd\fR(1M) on the server-side succeeds and if the \fB\&.k5login\fR file
+permits access, the user is allowed to carry out the \fBrdist\fR transfer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.sp .6
+.RS 4n
+Binary comparison. Performs a binary comparison and updates files if they
+differ, rather than merely comparing dates and sizes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR
+\fIpathname\fR .\|.\|.[\fIlogin\|\fR\fB@\fR]\fIhostname\fR[\fB:\fR\fIdestpath\|\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Copies each \fIpathname\fR to the named host; if \fIdestpath\fR is specified,
+it does not update any \fIpathname\fR on the named host. (Relative filenames
+are taken as relative to your home directory.) If the `\fIlogin\fR\fB\|@\fR\&'
+prefix is given, the update is performed with the user \fBID\fR of \fIlogin\fR.
+If the `\fB:\fR\fIdestpath\fR' is given, the remote file is installed as that
+pathname.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fImacro\fR\fB=\fR\fIvalue\fR\fR
+.ad
+.sp .6
+.RS 4n
+Defines \fImacro\fR to have \fIvalue\fR. This option is used to define or
+override macro definitions in the distfile. \fIvalue\fR can be the empty
+string, one name, or a list of names surrounded by parentheses and separated by
+white space.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables debugging.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIdistfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the description file \fIdistfile\fR. A `\fB\(mi\fR\&' as the
+\fIdistfile\fR argument denotes the standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follows symbolic links. Copies the file that the link points to rather than the
+link itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ignores unresolved links. \fBrdist\fR normally tries to maintain the link
+structure of files being transferred and warn the user if all the links cannot
+be found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIrealm\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes \fBrdist\fR to obtain tickets for the remote host in \fIrealm\fR instead
+of the remote host's realm as determined by \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR\fR
+.ad
+.sp .6
+.RS 4n
+This option explicitly disables Kerberos authentication. It can be used to
+override the \fBautologin\fR variable in \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIhost\fR\fR
+.ad
+.sp .6
+.RS 4n
+Limits which machines are to be updated. Multiple \fB-m\fR arguments can be
+given to limit updates to a subset of the hosts listed in the distfile.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints the commands without executing them. This option is useful for debugging
+a distfile.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-PO\fR\fR
+.ad
+.br
+.na
+\fB\fB-PN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Explicitly requests new (\fB-PN\fR) or old (\fB-PO\fR) version of the Kerberos
+"\fBrcmd\fR" protocol. The new protocol avoids many security problems prevalant
+in the old one and is regarded much more secure, but is not interoperable with
+older (MIT/SEAM) servers. The new protocol is used by default, unless
+explicitly specified using these options or through \fBkrb5.conf\fR(4). If
+Kerberos authorization fails when using the old "\fBrcmd\fR" protocol, there is
+fallback to regular, non-kerberized \fBrdist\fR. This is not the case when the
+new, more secure "\fBrcmd\fR" protocol is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.sp .6
+.RS 4n
+Quiet mode. Does not display the files being updated on the standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.sp .6
+.RS 4n
+Removes extraneous files. If a directory is being updated, removes files on the
+remote host that do not correspond to those in the master (local) directory.
+This is useful for maintaining truly identical copies of directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Verifies that the files are up to date on all the hosts. Any files that are out
+of date are displayed, but no files are updated, nor is any mail sent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.sp .6
+.RS 4n
+Whole mode. The whole file name is appended to the destination directory name.
+Normally, only the last component of a name is used when renaming files. This
+preserves the directory structure of the files being copied, instead of
+flattening the directory structure. For instance, renaming a list of files such
+as \fBdir1/dir2\fR to \fBdir3\fR would create files \fBdir3/dir1\fR and
+\fBdir3/dir2\fR instead of \fBdir3\fR and \fBdir3\fR. When the \fB-w\fR option
+is used with a filename that begins with \fB~\fR, everything except the home
+directory is appended to the destination name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Causes the information transferred between hosts to be encrypted. Notice that
+the command is sent unencrypted to the remote system. All subsequent transfers
+are encrypted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.sp .6
+.RS 4n
+Younger mode. Does not update remote copies that are younger than the master
+copy, but issues a warning message instead. Only modification times are
+checked. No comparison of size is made.
+.RE
+
+.SH USAGE
+.SS "White Space Characters"
+.sp
+.LP
+NEWLINE, TAB, and SPACE characters are all treated as white space; a mapping
+continues across input lines until the start of the next mapping: either a
+single \fIfilename\fR followed by a `\fB->\fR' or the opening parenthesis of a
+filename list.
+.SS "Comments"
+.sp
+.LP
+Comments begin with \fB#\fR and end with a NEWLINE.
+.SS "Distfiles"
+.sp
+.LP
+The distfile contains a sequence of entries that specify the files to be
+copied, the destination files to be copied, the destination hosts, and what
+operations to perform to do the updating. Each entry has one of the following
+formats:
+.sp
+.in +2
+.nf
+\fIvariable_name\fR '=' \fIname_list\fR
+[ label: ] \fIsource_list\fR '\fB->\fR' \fIdestination_list\fR \fIcommand_list\fR
+[ label: ] \fIsource_list\fR '\fB::\fR' \fItime_stamp_file\fR \fIcommand_list\fR
+.fi
+.in -2
+
+.sp
+.LP
+The first format is used for defining variables. The second format is used for
+distributing files to other hosts. The third format is used for making lists of
+files that have been changed since some given date. The source list specifies a
+list of files and/or directories on the local host that are to be used as the
+master copy for distribution. The destination list is the list of hosts to
+which these files are to be copied. Each file in the source list is added to a
+list of changes if the file is out of date on the host that is being updated
+(second format) or if the file is newer than the time stamp file (third
+format). Labels are optional. They are used to identify a command for partial
+updates. The colon (\fB:\fR) is used after an optional label, while the double
+colon (\fB::\fR) is used for making lists of files that have been changed since
+a certain date (specified by the date/time of the \fItime_stamp\fR file).
+Typically, only \fBnotify\fR is used with the '\fB::\fR' format of the command
+line.
+.SS "Macros"
+.sp
+.LP
+\fBrdist\fR has a limited macro facility. Macros are only expanded in filename
+or hostname lists, and in the argument lists of certain primitives. Macros
+cannot be used to stand for primitives or their options, or the `\fB->\fR' or
+`\fB::\fR' symbols.
+.sp
+.LP
+A macro definition is a line of the form:
+.sp
+.in +2
+.nf
+\fImacro\fR \fB=\fR \fIvalue\fR
+.fi
+.in -2
+
+.sp
+.LP
+A macro reference is a string of the form:
+.sp
+.in +2
+.nf
+\fB${\fR\fImacro\fR\fB}\fR
+.fi
+.in -2
+
+.sp
+.LP
+although (as with \fBmake\fR(1S)) the braces can be omitted if the macro name
+consists of just one character.
+.SS "Kerberos Access-Control file"
+.sp
+.LP
+For the kerberized \fBrdist\fR session, each user might have a private
+authorization list in a file \fB\&.k5login\fR in their home directory. Each
+line in this file should contain a Kerberos principal name of the form
+\fIprincipal\fR/\fIinstance\fR@\fIrealm\fR. If there is a \fB~/.k5login\fR
+file, then access is granted to the account if and only if the originater user
+is authenticated to one of the principals named in the \fB~/.k5login\fR file.
+Otherwise, the originating user is granted access to the account if and only if
+the authenticated principal name of the user can be mapped to the local account
+name using the \fIauthenticated-principal-name\fR \(-> \fIlocal-user-name\fR
+mapping rules. The \fB\&.k5login\fR file (for access control) comes into play
+only when Kerberos authentication is being done.
+.SS "Metacharacters"
+.sp
+.LP
+The shell meta-characters: \fB[\fR, \fB]\fR, \fB{\fR, \fB}\fR, \fB*\fR and
+\fB?\fR are recognized and expanded (on the local host only) just as they are
+with \fBcsh\fR(1). Metacharacters can be escaped by prepending a backslash.
+.sp
+.LP
+The \fB~\fR character is also expanded in the same way as with \fBcsh\fR;
+however, it is expanded separately on the local and destination hosts.
+.SS "Filenames"
+.sp
+.LP
+File names that do not begin with `\fB\|/\|\fR\&' or `\fB\|~\|\fR\&' are taken
+to be relative to user's home directory on each destination host; they are
+\fInot\fR relative to the current working directory. Multiple file names must
+be enclosed within parentheses.
+.SS "Primitives"
+.sp
+.LP
+The following primitives can be used to specify actions \fBrdist\fR is to take
+when updating remote copies of each file.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinstall\fR [\fB-b\fR] [\fB-h\fR] [\fB-i\fR] [\fB-R\fR] [\fB-v\fR]
+[\fB-w\fR] [\fB-y\fR] [\fInewname\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Copy out of date files and directories (recursively). If no \fInewname\fR
+operand is given, the name of the local file is given to the remote host's
+copy. If absent from the remote host, parent directories in a filename's path
+are created. To help prevent disasters, a non-empty directory on a target host
+is not replaced with a regular file or a symbolic link by \fBrdist\fR. However,
+when using the \fB-R\fR option, a non-empty directory is removed if the
+corresponding filename is completely absent on the master host.
+.sp
+The options for \fBinstall\fR have the same semantics as their command line
+counterparts, but are limited in scope to a particular map. The login name used
+on the destination host is the same as the local host unless the destination
+name is of the format \fIlogin@host\fR. In that case, the update is performed
+under the username \fIlogin\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnotify\fR \fIaddress.\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send mail to the indicated email \fIaddress\fR of the form:
+.sp
+\fIuser@host\fR
+.sp
+that lists the files updated and any errors that might have occurred. If an
+address does not contain a `\fB@\fR\fIhost\|\fR' suffix, \fBrdist\fR uses the
+name of the destination host to complete the address.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexcept\fR \fIfilename .\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Omit from updates the files named as arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexcept_pat\fR \fIpattern .\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Omit from updates the filenames that match each regular-expression
+\fIpattern\fR (see \fBed\fR(1) for more information on regular expressions).
+Note that \fB`\e'\fR and \fB`$'\fR characters must be escaped in the distfile.
+Shell variables can also be used within a pattern, however shell filename
+expansion is not supported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBspecial\fR [\fIfilename\fR] .\|.\|. \fB"\fR\fIcommand-line\|\fR\fB"\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specify a Bourne shell, \fBsh\fR(1) command line to execute on the remote host
+after each named file is updated. If no \fIfilename\fR argument is present, the
+\fIcommand-line\fR is performed for every updated file, with the shell variable
+\fBFILE\fR set to the file's name on the local host. The quotation marks allow
+\fIcommand-line\fR to span input lines in the distfile; multiple shell commands
+must be separated by semicolons (\fB;\fR).
+.sp
+The default working directory for the shell executing each \fIcommand-line\fR
+is the user's home directory on the remote host.
+.RE
+
+.SS "IPv6"
+.sp
+.LP
+The \fBrdist\fR command is IPv6-enabled. See \fBip6\fR(7P). \fBIPv6\fR is not
+currently supported with Kerberos V5 authentication.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRA Sample distfile
+.sp
+.LP
+The following sample distfile instructs \fBrdist\fR to maintain identical
+copies of a shared library, a shared-library initialized data file, several
+include files, and a directory, on hosts named \fBhermes\fR and \fBmagus\fR. On
+\fBmagus\fR, commands are executed as super-user. \fBrdist\fR notifies
+\fBmerlin@druid\fR whenever it discovers that a local file has changed relative
+to a timestamp file. (Parentheses are used when the source or destination list
+contains zero or more names separated by white-space.)
+
+.sp
+.in +2
+.nf
+\fBHOSTS = ( hermes root@magus )
+
+FILES = ( /usr/local/lib/libcant.so.1.1
+ /usrlocal/lib/libcant.sa.1.1 /usr/local/include/{*.h}
+ /usr/local/bin )
+
+(${FILES}) -> (${HOSTS})
+ install \(miR ;
+${FILES} :: /usr/local/lib/timestamp
+ notify merlin@druid ;\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.rhosts\fR\fR
+.ad
+.RS 23n
+.rt
+User's trusted hosts and users
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/host.equiv\fR\fR
+.ad
+.RS 23n
+.rt
+system trusted hosts and users
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/rdist*\fR\fR
+.ad
+.RS 23n
+.rt
+Temporary file for update lists
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.k5login\fR\fR
+.ad
+.RS 23n
+.rt
+File containing Kerberos principals that are allowed access
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.conf\fR\fR
+.ad
+.RS 23n
+.rt
+Kerberos configuration file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBed\fR(1), \fBmake\fR(1S), \fBsh\fR(1), \fBin.rshd\fR(1M),
+\fBstat\fR(2), \fBhosts.equiv\fR(4), \fBkrb5.conf\fR(4), \fBattributes\fR(5),
+\fBkrb5_auth_rules\fR(5), \fBip6\fR(7P)
+.SH DIAGNOSTICS
+.sp
+.LP
+A complaint about mismatch of \fBrdist\fR version numbers might really stem
+from some problem with starting your shell, for example, you are in too many
+groups.
+.SH WARNINGS
+.sp
+.LP
+The super-user does not have its accustomed access privileges on \fBNFS\fR
+mounted file systems. Using \fBrdist\fR to copy to such a file system might
+fail, or the copies might be owned by user "nobody".
+.SH BUGS
+.sp
+.LP
+Source files must reside or be mounted on the local host.
+.sp
+.LP
+There is no easy way to have a special command executed only once after all
+files in a directory have been updated.
+.sp
+.LP
+Variable expansion only works for name lists; there should be a general macro
+facility.
+.sp
+.LP
+\fBrdist\fR aborts on files that have a negative modification time (before Jan
+1, 1970).
+.sp
+.LP
+There should be a "force" option to allow replacement of non-empty directories
+by regular files or symlinks. A means of updating file modes and owners of
+otherwise identical files is also needed.
diff --git a/usr/src/man/man1/read.1 b/usr/src/man/man1/read.1
new file mode 100644
index 0000000000..1e443939f0
--- /dev/null
+++ b/usr/src/man/man1/read.1
@@ -0,0 +1,433 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH read 1 "18 Dec 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+read \- read a line from standard input
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/read\fR [\fB-r\fR] \fIvar\fR...
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBread\fR \fIname\fR...
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBset\fR \fIvariable\fR= $<
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBread\fR [\fB-prsu\fR [\fIn\fR]] [\fIname\fR ? \fIprompt\fR] [\fIname\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBread\fR [\fB-Aprs\fR] [\fB-d\fR \fIdelim\fR] [\fB-n\fR \fInsize\fR] [\fB-N\fR \fInsize\fR] [\fB-t\fR \fItimeout\fR][\fB-u\fR \fIunit\fR] [\fIvname\fR\fB?\fR\fIprompt\fR] [\fIvname\fR... ]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/read"
+.sp
+.LP
+The \fBread\fR utility reads a single line from standard input.
+.sp
+.LP
+By default, unless the \fB-r\fR option is specified, backslash (\fB\e\fR) acts
+as an escape character. If standard input is a terminal device and the invoking
+shell is interactive, \fBread\fR prompts for a continuation line when:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The shell reads an input line ending with a backslash, unless the \fB-r\fR
+option is specified.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+A here-document is not terminated after a \fBNEWLINE\fR character is entered.
+.RE
+.sp
+.LP
+The line is split into fields as in the shell. The first field is assigned to
+the first variable \fIvar\fR, the second field to the second variable
+\fIvar\fR, and so forth. If there are fewer \fIvar\fR operands specified than
+there are fields, the leftover fields and their intervening separators is
+assigned to the last \fIvar\fR. If there are fewer fields than \fIvar\fRs, the
+remaining \fIvar\fRs is set to empty strings.
+.sp
+.LP
+The setting of variables specified by the \fIvar\fR operands affects the
+current shell execution environment. If it is called in a sub-shell or separate
+utility execution environment, such as one of the following:
+.sp
+.in +2
+.nf
+\fB(read foo)
+nohup read ...
+find . -exec read ... \e;\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+it does not affect the shell variables in the caller's environment.
+.sp
+.LP
+The standard input must be a text file.
+.SS "sh"
+.sp
+.LP
+One line is read from the standard input and, using the internal field
+separator, \fBIFS\fR (normally space or tab), to delimit word boundaries, the
+first word is assigned to the first \fIname\fR, the second word to the second
+\fIname\fR, and so on, with leftover words assigned to the last \fIname\fR.
+Lines can be continued using \fB\enewline\fR\&. Characters other than
+\fBNEWLINE\fR can be quoted by preceding them with a backslash. These
+backslashes are removed before words are assigned to \fInames\fR, and no
+interpretation is done on the character that follows the backslash. The return
+code is \fB0\fR, unless an end-of-file is encountered.
+.SS "csh"
+.sp
+.LP
+The notation:
+.sp
+.in +2
+.nf
+set \fIvariable\fR \fB= $<\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+loads one line of standard input as the value for \fIvariable\fR. (See
+\fBcsh\fR(1)).
+.SS "ksh"
+.sp
+.LP
+The shell input mechanism. One line is read and is broken up into fields using
+the characters in \fBIFS\fR as separators. The escape character, \fB(\e)\fR, is
+used to remove any special meaning for the next character and for line
+continuation. In raw mode, the \fB-r\fR, the \fB,\fR and the \fB\e\fR character
+are not treated specially. The first field is assigned to the first \fIname\fR,
+the second field to the second \fIname\fR, and so on, with leftover fields
+assigned to the last \fIname\fR. The \fB-p\fR option causes the input line to
+be taken from the input pipe of a process spawned by the shell using \fB|&\fR.
+If the \fB-s\fR flag is present, the input is saved as a command in the history
+file. The flag \fB-u\fR can be used to specify a one digit file descriptor unit
+\fIn\fR to read from. The file descriptor can be opened with the \fBexec\fR
+special command. The default value of \fIn\fR is \fB0\fR. If \fIname\fR is
+omitted, \fBREPLY\fR is used as the default \fIname\fR. The exit status is
+\fB0\fR unless the input file is not open for reading or an end-of-file is
+encountered. An end-of-file with the \fB-p\fR option causes cleanup for this
+process so that another can be spawned. If the first argument contains a
+\fB?\fR, the remainder of this word is used as a \fIprompt\fR on standard error
+when the shell is interactive. The exit status is \fB0\fR unless an end-of-file
+is encountered.
+.SS "ksh93"
+.sp
+.LP
+\fBread\fR reads a line from standard input and breaks it into fields using the
+characters in the value of the \fBIFS\fR variable as separators. The escape
+character, \fB\e\fR, is used to remove any special meaning for the next
+character and for line continuation unless the \fB-r\fR option is specified.
+.sp
+.LP
+If there are more variables than fields, the remaining variables are set to
+empty strings. If there are fewer variables than fields, the leftover fields
+and their intervening separators are assigned to the last variable. If no
+\fIvar\fR is specified, the variable \fBREPLY\fR is used.
+.sp
+.LP
+When \fIvar\fR has the binary attribute and \fB-n\fR or \fB-N\fR is specified,
+the bytes that are read are stored directly into \fIvar\fR.
+.sp
+.LP
+If you specify \fB?\fR\fIprompt\fR after the first \fIvar\fR, \fBread\fR
+displays a prompt on standard error when standard input is a terminal or pipe.
+.SH OPTIONS
+.SS "/usr/bin/read, ksh"
+.sp
+.LP
+The following option is supported by \fB/usr/bin/read\fR and \fBksh\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Do not treat a backslash character in any special way. Considers each backslash
+to be part of the input line.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 14n
+.rt
+Unset \fIvar\fR, and create an indexed array containing each field in the line
+starting at index \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdelim\fR\fR
+.ad
+.RS 14n
+.rt
+Read until delimiter \fIdelim\fR instead of to the end of line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInsize\fR\fR
+.ad
+.RS 14n
+.rt
+Read at most \fInsize\fR bytes. Binary field size is in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fInsize\fR\fR
+.ad
+.RS 14n
+.rt
+Read exactly \fInsize\fR bytes. Binary field size is in bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 14n
+.rt
+Read from the current co-process instead of standard input. An end of file
+causes \fBread\fR to disconnect the co-process so that another can be created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 14n
+.rt
+Do not treat \fB\e\fR specially when processing the input line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 14n
+.rt
+Save a copy of the input as an entry in the shell history file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItimeout\fR\fR
+.ad
+.RS 14n
+.rt
+Specify a \fItimeout\fR in seconds when reading from a terminal or pipe.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIfd\fR\fR
+.ad
+.RS 14n
+.rt
+Read from file descriptor number \fIfd\fR instead of standard input. The
+default value is \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 14n
+.rt
+When reading from a terminal, display the value of the first variable and use
+it as a default value.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIvar\fR\fR
+.ad
+.RS 7n
+.rt
+The name of an existing or non-existing shell variable.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fBread\fR Command
+.sp
+.LP
+The following example for \fB/usr/bin/read\fR prints a file with the first
+field of each line moved to the end of the line:
+
+.sp
+.in +2
+.nf
+example% \fBwhile read -r xx yy
+do
+ printf "%s %s\en" "$yy" "$xx"
+done < input_file\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBread\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBIFS\fR\fR
+.ad
+.RS 7n
+.rt
+Determines the internal field separators used to delimit fields.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPS2\fR\fR
+.ad
+.RS 7n
+.rt
+Provides the prompt string that an interactive shell writes to standard error
+when a line ending with a backslash is read and the \fB-r\fR option was not
+specified, or if a here-document is not terminated after a NEWLINE character is
+entered.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+End-of-file was detected or an error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/read, csh, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBline\fR(1), \fBset\fR(1),
+\fBsh\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/readonly.1 b/usr/src/man/man1/readonly.1
new file mode 100644
index 0000000000..8fab089559
--- /dev/null
+++ b/usr/src/man/man1/readonly.1
@@ -0,0 +1,212 @@
+'\" te
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH readonly 1 "2 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+readonly \- shell built-in function to protect the value of the given variable
+from reassignment
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBreadonly\fR [\fIname\fR]...
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fB**readonly\fR [\fIname\fR [= \fIvalue\fR]]...
+.fi
+
+.LP
+.nf
+\fB**readonly\fR \fB-p\fR
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB++readonly\fR [\fB-p\fR] [\fIname\fR [= \fIvalue\fR]]...
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+The given \fIname\fRs are marked \fBreadonly\fR and the values of the these
+\fIname\fRs may not be changed by subsequent assignment. If no arguments are
+given, a list of all \fBreadonly\fR names is printed.
+.SS "ksh"
+.sp
+.LP
+The given \fIname\fRs are marked \fBreadonly\fR and these names cannot be
+changed by subsequent assignment.
+.sp
+.LP
+When \fB-p\fR is specified, \fBreadonly\fR writes to the standard output the
+names and values of all read-only variables, in the following format:
+.sp
+.in +2
+.nf
+"readonly %s=%s\en", \fIname\fR, \fIvalue\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+if \fIname\fR is set, and:
+.sp
+.in +2
+.nf
+"readonly $s\en", \fIname\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+if \fIname\fR is unset.
+.sp
+.LP
+The shell formats the output, including the proper use of quoting, so that it
+is suitable for reinput to the shell as commands that achieve the same value
+and \fBreadonly\fR attribute-setting results in a shell execution environment
+in which:
+.RS +4
+.TP
+1.
+Variables with values set at the time they were output do not have the
+\fBreadonly\fR attribute set.
+.RE
+.RS +4
+.TP
+2.
+Variables that were unset at the time they were output do not have a value
+at the time at which the saved output is re-input to the shell.
+.RE
+.sp
+.LP
+On this manual page, \fBksh\fR(1) commands that are preceded by one or two
+\fB**\fR (asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by \fB**\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+\fBreadonly\fR sets the \fBreadonly\fR attribute on each of the variables
+specified by name which prevents their values from being changed. If
+\fB=\fR\fIvalue\fR is specified, the variable name is set to \fIvalue\fR before
+the variable is made \fBreadonly\fR.
+.sp
+.LP
+If no names are specified then the names and values of all \fBreadonly\fR
+variables are written to standard output.
+.sp
+.LP
+\fBreadonly\fR is built-in to the shell as a declaration command so that field
+splitting and pathname expansion are not performed on the arguments. Tilde
+expansion occurs on value.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the output to be in a form of \fBreadonly\fR commands that can be used
+as input to the shell to recreate the current set of \fBreadonly\fR variables.
+.RE
+
+.sp
+.LP
+On this manual page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR symbols are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.SH EXIT STATUS
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1), \fBtypeset\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/refer.1 b/usr/src/man/man1/refer.1
new file mode 100644
index 0000000000..0977e24854
--- /dev/null
+++ b/usr/src/man/man1/refer.1
@@ -0,0 +1,187 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH refer 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+refer \- expand and insert references from a bibliographic database
+.SH SYNOPSIS
+.LP
+.nf
+\fBrefer\fR [\fB-ben\fR] [\fB-a\fR\fIr\fR] [\fB-c\fR\fIstring\fR] [\fB-k\fR\fIx\fR] [\fB-l\fR\fIm,n\fR] [\fB-p\fR \fIfilename\fR]
+ [\fB-s\fR\fIkeys\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBrefer\fR is a preprocessor for \fBnroff\fR(1), or \fBtroff\fR(1), that finds
+and formats references. The input files (standard input by default) are copied
+to the standard output, except for lines between `\fB\&.\|[\fR' and
+`\fB\&.\|]\fR' command lines, Such lines are assumed to contain keywords as for
+\fBlookbib\fR(1), and are replaced by information from a bibliographic data
+base. The user can avoid the search, override fields from it, or add new
+fields. The reference data, from whatever source, is assigned to a set of
+\fBtroff\fR strings. Macro packages such as \fBms\fR(5) print the finished
+reference text from these strings. A flag is placed in the text at the point
+of reference. By default, the references are indicated by numbers.
+.sp
+.LP
+When \fBrefer\fR is used with \fBeqn\fR(1), \fBneqn\fR, or \fBtbl\fR(1),
+\fBrefer\fR should be used first in the sequence, to minimize the volume of
+data passed through pipes.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 15n
+.rt
+Bare mode \(em do not put any flags in text (neither numbers or labels).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 15n
+.rt
+Accumulate references instead of leaving the references where encountered,
+until a sequence of the form:
+.sp
+.in +2
+.nf
+\fB\&.[
+$LIST$
+\&.]\fR
+.fi
+.in -2
+.sp
+
+is encountered, and then write out all references collected so far. Collapse
+references to the same source.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+Do not search the default file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fIr\fR\fR
+.ad
+.RS 15n
+.rt
+Reverse the first \fIr\fR author names (Jones, J. A. instead of J. A. Jones).
+If \fIr\fR is omitted, all author names are reversed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fIstring\fR\fR
+.ad
+.RS 15n
+.rt
+Capitalize (with SMALL CAPS) the fields whose key-letters are in \fIstring\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fIx\fR\fR
+.ad
+.RS 15n
+.rt
+Instead of numbering references, use labels as specified in a reference data
+line beginning with the characters \fI%x\fR; By default, \fIx\fR is \fBL\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fIm,n\fR\fR
+.ad
+.RS 15n
+.rt
+Instead of numbering references, use labels from the senior author's last name
+and the year of publication. Only the first \fIm\fR letters of the last name
+and the last \fIn\fR digits of the date are used. If either of \fIm\fR or
+\fIn\fR is omitted, the entire name or date, respectively, is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fI filename\fR\fR
+.ad
+.RS 15n
+.rt
+Take the next argument as a file of references to be searched. The default
+file is searched last.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIkeys\fR\fR
+.ad
+.RS 15n
+.rt
+Sort references by fields whose key-letters are in the \fIkeys\fR string, and
+permute reference numbers in the text accordingly. Using this option implies
+the \fB-e\fR option. The key-letters in \fIkeys\fR may be followed by a number
+indicating how many such fields are used, with a \fB+\fR sign taken as a very
+large number. The default is \fB\fR\fBAD\fR\fB,\fR which sorts on the senior
+author and date. To sort on all authors and then the date, for instance, use
+the options `\fB-sA+T\fR'.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/refer\fR\fR
+.ad
+.RS 25n
+.rt
+directory of programs
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/refer/papers\fR\fR
+.ad
+.RS 25n
+.rt
+directory of default publication lists and indexes
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaddbib\fR(1), \fBeqn\fR(1), \fBindxbib\fR(1), \fBlookbib\fR(1),
+\fBnroff\fR(1), \fBroffbib\fR(1), \fBsortbib\fR(1), \fBtbl\fR(1),
+\fBtroff\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/regcmp.1 b/usr/src/man/man1/regcmp.1
new file mode 100644
index 0000000000..0089b4e8c1
--- /dev/null
+++ b/usr/src/man/man1/regcmp.1
@@ -0,0 +1,144 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH regcmp 1 "Dec 20 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+regcmp \- regular expression compile
+.SH SYNOPSIS
+.LP
+.nf
+\fBregcmp\fR [\fB-\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBregcmp\fR command performs a function similar to \fBregcmp\fR and, in
+most cases, precludes the need for calling \fBregcmp\fR from C programs.
+Bypassing \fBregcmp\fR saves on both execution time and program size. The
+command \fBregcmp\fR compiles the regular expressions in \fIfilename\fR and
+places the output in \fIfilename\fR\fB\&.i\fR.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR \fR
+.ad
+.RS 9n
+.rt
+If the \fB\(mi\fR option is used, the output is placed in
+\fIfilename\fR\fB\&.c\fR. The format of entries in \fIfilename\fR is a name (C
+variable) followed by one or more blanks followed by one or more regular
+expressions enclosed in double quotes. The output of \fBregcmp\fR is C source
+code. Compiled regular expressions are represented as \fBextern char\fR
+vectors. \fIfilename\fR\fB\&.i\fR files may thus be \fB#include\fRd in C
+programs, or \fIfilename\fR\fB\&.c\fR files may be compiled and later loaded.
+In the C program that uses the \fBregcmp\fR output, \fBregex(abc,line)\fR
+applies the regular expression named \fBabc\fR to \fBline\fR. Diagnostics are
+self-explanatory.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of the \fBregcmp\fR command.
+.sp
+.ne 2
+.mk
+.na
+\fBname \fR
+.ad
+.RS 9n
+.rt
+\fB"([A\(miZa\(miz][A\(miZa\(miz0\(mi9_]*)$0"\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBtelno\fR
+.ad
+.RS 9n
+.rt
+\fB"\|\e({0,1}([2\(mi9][01][1\(mi9])$0\e){0,1} *"\fR
+.sp
+\fB"([2\(mi9][0\(mi9]{2})$1[ \(mi]{0,1}"\fR
+.sp
+\fB"([0\(mi9]{4})$2"\fR
+.RE
+
+.sp
+.LP
+The three arguments to \fBtelno\fR shown above must all be entered on one line.
+
+.sp
+.LP
+In the C program that uses the \fBregcmp\fR output,
+
+.sp
+.in +2
+.nf
+ regex(telno, line, area, exch, rest)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+applies the regular expression named \fBtelno\fR to \fBline\fR.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+A general description of the usage of the \fBLC_*\fR environmental variables
+can be found in \fBenviron\fR(5).
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR \fR
+.ad
+.RS 16n
+.rt
+Determines how \fBregcmp\fR handles characters. When \fBLC_CTYPE\fR is set to a
+valid value, \fBregcmp\fR can display and handle text and filenames containing
+valid characters for that locale.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_MESSAGES\fR \fR
+.ad
+.RS 16n
+.rt
+Determines how diagnostic and informative messages are presented. This includes
+the language and style of the messages, and the correct form of affirmative and
+negative responses. In the "C" locale, the messages are presented in the
+default form found in the program itself (in most cases, U.S. English).
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBregcmp\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5)
diff --git a/usr/src/man/man1/renice.1 b/usr/src/man/man1/renice.1
new file mode 100644
index 0000000000..e1b70dbc61
--- /dev/null
+++ b/usr/src/man/man1/renice.1
@@ -0,0 +1,356 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH renice 1 "9 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+renice \- alter priority of running processes
+.SH SYNOPSIS
+.LP
+.nf
+\fBrenice\fR [\fB-n\fR \fIincrement\fR] [\fB-i\fR \fIidtype\fR] \fIID\fR...
+.fi
+
+.LP
+.nf
+\fBrenice\fR [\fB-n\fR \fIincrement\fR] [\fB-g\fR | \fB-p\fR | \fB-u\fR] \fIID\fR...
+.fi
+
+.LP
+.nf
+\fBrenice\fR \fIpriority\fR [\fB-p\fR] \fIpid\fR... [\fB-g\fR \fIgid\fR]... [\fB-p\fR \fIpid\fR]...
+ [\fB-u\fR \fIuser\fR]...
+.fi
+
+.LP
+.nf
+\fBrenice\fR \fIpriority\fR \fB-g\fR \fIgid\fR... [\fB-g\fR \fIgid\fR]... [\fB-p\fR \fIpid\fR]...
+ [\fB-u\fR \fIuser\fR]...
+.fi
+
+.LP
+.nf
+\fBrenice\fR \fIpriority\fR \fB-u\fR \fIuser\fR... [\fB-g\fR \fIgid\fR]... [\fB-p\fR \fIpid\fR]...
+ [\fB-u\fR \fIuser\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrenice\fR command alters the scheduling priority of one or more running
+processes. By default, the processes to be affected are specified by their
+process \fBID\fRs.
+.sp
+.LP
+If the first operand is a number within the valid range of priorities
+(\fB\(mi20\fR to \fB20\fR), \fBrenice\fR will treat it as a \fIpriority\fR (as
+in all but the first synopsis form). Otherwise, \fBrenice\fR will treat it as
+an \fIID\fR (as in the first synopsis form).
+.SS "Altering Process Priority"
+.sp
+.LP
+Users other than the privileged user may only alter the priority of processes
+they own, and can only monotonically increase their "nice value" within the
+range \fB0\fR to \fB19\fR. This prevents overriding administrative fiats. The
+privileged user may alter the priority of any process and set the priority to
+any value in the range \fB\(mi20\fR to \fB19\fR. Useful priorities are:
+\fB19\fR (the affected processes will run only when nothing else in the system
+wants to); \fB0\fR (the "base" scheduling priority),; and any negative value
+(to make things go very fast). \fB20\fR is an acceptable nice value, but will
+be rounded down to \fB19\fR.
+.SH OPTIONS
+.sp
+.LP
+\fBrenice\fR supports the following option features:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The first operand, \fIpriority\fR, must precede the options and can have the
+appearance of a multi-digit option.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fB-g\fR, \fB-p\fR, and \fB-u\fR options can each take multiple
+option-arguments.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fIpid\fR option-argument can be used without its \fB-p\fR option.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The \fB-i\fR option can be used to specify the \fIID\fR type for the \fBID\fR
+list. This is preferred in specifying \fIID\fR type over the use of the
+\fB-g\fR | \fB-p\fR | \fB-u\fR syntax, which is now obsolete. See NOTES.
+.RE
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 16n
+.rt
+Interprets all operands or just the \fIgid\fR arguments as unsigned decimal
+integer process group IDs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 16n
+.rt
+This option, together with the \fIID\fR list arguments, specifies a class of
+processes to which the \fBrenice\fR command is to apply. The interpretation of
+the \fBID\fR list depends on the value of \fIidtype\fR. The valid \fIidtype\fR
+arguments are: \fBpid\fR, \fBpgid\fR, \fBuid\fR, \fBgid\fR, \fBsid\fR,
+\fBtaskid\fR, \fBprojid\fR, and \fBzoneid\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIincrement\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies how the system scheduling priority of the specified process or
+processes is to be adjusted. The \fIincrement\fR option-argument is a positive
+or negative decimal integer that will be used to modify the system scheduling
+priority of the specified process or processes. Positive \fIincrement\fR values
+cause a lower system scheduling priority. Negative \fIincrement\fR values may
+require appropriate privileges and will cause a higher system scheduling
+priority.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 16n
+.rt
+Interprets all operands or just the \fIpid\fR arguments as unsigned decimal
+integer process \fBID\fRs. The \fB-p\fR option is the default if no options are
+specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 16n
+.rt
+Interprets all operands or just the \fIuser\fR argument as users. If a user
+exists with a user name equal to the operand, then the user \fBID\fR of that
+user will be used in further processing. Otherwise, if the operand represents
+an unsigned decimal integer, it will be used as the numeric user \fBID\fR of
+the user.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIID\fR\fR
+.ad
+.RS 12n
+.rt
+A process \fBID\fR, process group \fBID\fR, or user name/user \fBID\fR,
+depending on the option selected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpriority\fR\fR
+.ad
+.RS 12n
+.rt
+The value specified is taken as the actual system scheduling priority, rather
+than as an increment to the existing system scheduling priority. Specifying a
+scheduling priority higher than that of the existing process may require
+appropriate privileges.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAdjusting the scheduling priority of process IDs
+.sp
+.LP
+Adjust the system scheduling priority so that process \fBID\fRs \fB987\fR and
+\fB32\fR would have a lower scheduling priority:
+
+.sp
+.in +2
+.nf
+example% \fBrenice -n 5 -p 987 32\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRAdjusting the scheduling priority of group IDs
+.sp
+.LP
+Adjust the system scheduling priority so that group \fBID\fRs \fB324\fR and
+\fB76\fR would have a higher scheduling priority, if the user has the
+appropriate privileges to do so:
+
+.sp
+.in +2
+.nf
+example% \fBrenice -n -4 -g 324 76\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRAdjusting the scheduling priority of a user ID and user name
+.sp
+.LP
+Adjust the system scheduling priority so that numeric user ID \fB8\fR and user
+\fBsas\fR would have a lower scheduling priority:
+
+.sp
+.in +2
+.nf
+example% \fBrenice -n 4 -u 8 sas\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBrenice\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+map user names to user \fBID\fRs
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBnice\fR(1), \fBpasswd\fR(1), \fBpriocntl\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBrenice\fR syntax
+.sp
+.in +2
+.nf
+\fBrenice [-n \fIincrement\fR] [-i \fIidtype\fR] \fIID\fR ...\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+is preferred over the old syntax
+.sp
+.in +2
+.nf
+\fBrenice [-n \fIincrement\fR] [-g | -p| -u] \fIID\fR ...\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+which is now obsolete.
+.sp
+.LP
+If you make the priority very negative, then the process cannot be interrupted.
+.sp
+.LP
+To regain control you must make the priority greater than \fB0\fR.
+.sp
+.LP
+Users other than the privileged user cannot increase scheduling priorities of
+their own processes, even if they were the ones that decreased the priorities
+in the first place.
+.sp
+.LP
+The \fBpriocntl\fR command subsumes the function of \fBrenice\fR.
diff --git a/usr/src/man/man1/rev.1 b/usr/src/man/man1/rev.1
new file mode 100644
index 0000000000..3bc23eb1a9
--- /dev/null
+++ b/usr/src/man/man1/rev.1
@@ -0,0 +1,111 @@
+'\" te
+.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.TH rev 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+rev \- reverse the characters or lines of one or more files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/rev\fR [\fB-l\fR] [\fIfile\fR...]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+rev [-\fBl\fR] [\fIfile\fR...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBrev\fR copies one or more files to standard output, reversing the order of
+characters on every line of the file, or reversing the order of lines of the
+file if \fB-l\fR is specified
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--line\fR\fR
+.ad
+.RS 10n
+.rt
+Reverse the order of the lines of the file, instead of characters.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+Specifies the name of the file to use as input.
+.sp
+If \fIfile\fR is not specified, or if \fIfile\fR is a \fB-\fR, \fBrev\fR copies
+from standard input starting at the current offset.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All files copied successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+One or more files did not copy.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBksh93\fR(1), \fBtail\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/rlogin.1 b/usr/src/man/man1/rlogin.1
new file mode 100644
index 0000000000..5fd3e724fa
--- /dev/null
+++ b/usr/src/man/man1/rlogin.1
@@ -0,0 +1,450 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rlogin 1 "23 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+rlogin \- remote login
+.SH SYNOPSIS
+.LP
+.nf
+\fBrlogin\fR [\fB-8EL\fR] [\fB-e\fIc\fR\fR ] [\fB-A\fR] [\fB-K\fR] [\fB-x\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-f\fR | \fB-F\fR] [\fB-a\fR]
+ [\fB-l\fR \fIusername\fR] [\fB-k\fR \fIrealm\fR] \fIhostname\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrlogin\fR utility establishes a remote login session from your terminal
+to the remote machine named \fIhostname\fR. The user can choose to kerberize
+the rlogin session using Kerberos V5 and also protect the data being
+transferred.
+.sp
+.LP
+Hostnames are listed in the \fIhosts\fR database, which can be contained in the
+\fB/etc/hosts\fR file, the Network Information Service (\fBNIS\fR) \fBhosts\fR
+map, the Internet domain name server, or a combination of these. Each host has
+one official name (the first name in the database entry), and optionally one or
+more nicknames. Either official hostnames or nicknames can be specified in
+\fIhostname\fR.
+.sp
+.LP
+The user can opt for a secure rlogin session which uses Kerberos V5 for
+authentication. Encryption of the session data is also possible. The rlogin
+session can be kerberized using any of the following Kerberos specific options:
+\fB-A\fR, \fB-PN\fR or \fB-PO\fR, \fB-x\fR, \fB-f\fR or \fB-F\fR, and \fB-k\fR
+\fIrealm\fR. Some of these options (\fB-A\fR, \fB-x\fR, \fB-PN\fR or \fB-PO\fR,
+and \fB-f\fR or \fB-F\fR) can also be specified in the \fB[appdefaults]\fR
+section of \fBkrb5.conf\fR(4). The usage of these options and the expected
+behavior is discussed in the OPTIONS section below. If Kerberos authentication
+is used, authorization to the account is controlled through rules in
+\fBkrb5_auth_rules\fR(5). If this authorization fails, fallback to normal
+\fBrlogin\fR using \fBrhosts\fR occurs only if the \fB-PO\fR option is used
+explicitly on the command line or is specified in \fBkrb5.conf\fR(4). Also
+notice that the \fB-PN\fR or \fB-PO\fR, \fB-x\fR, \fB-f\fR or \fB-F\fR, and
+\fB-k\fR \fIrealm\fR options are just supersets of the \fB-A\fR option.
+.sp
+.LP
+The remote terminal type is the same as your local terminal type, as given in
+your environment \fBTERM\fR variable. The terminal or window size is also
+copied to the remote system if the server supports the option. Changes in size
+are reflected as well. All echoing takes place at the remote site, so that
+(except for delays) the remote login is transparent. Flow control using
+Control-S and Control-Q and flushing of input and output on interrupts are
+handled properly.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-8\fR\fR
+.ad
+.RS 15n
+.rt
+Passes eight-bit data across the net instead of seven-bit data.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Forces the remote machine to ask for a password by sending a null local
+username.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 15n
+.rt
+Explicitly enables Kerberos authentication and trusts the \fB\&.k5login\fR file
+for access-control. If the authorization check by \fBin.rlogind\fR(1M) on the
+server-side succeeds and if the \fB\&.k5login\fR file permits access, the user
+is allowed to login without supplying a password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fIc\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies a different escape character, \fIc\fR, for the line used to
+disconnect from the remote host.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.RS 15n
+.rt
+Stops any character from being recognized as an escape character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Forwards a copy of the local credentials (Kerberos Ticket Granting Ticket) to
+the remote system. This is a non-forwardable ticket granting ticket. You must
+forward a ticket granting ticket if you need to authenticate yourself to other
+Kerberized network services on the remote host. An example is if your home
+directory on the remote host is \fBNFS\fR mounted via Kerberos V5. If your
+local credentials are not forwarded in this case, you can not access your home
+directory. This option is mutually exclusive with the \fB-F\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 15n
+.rt
+Forwards a forwardable copy of the local credentials (Kerberos Ticket Granting
+Ticket) to the remote system. The \fB-F\fR option provides a superset of the
+functionality offered by the \fB-f\fR option. For example, with the \fB-f\fR
+option, after you connected to the remote host, any attempt to invoke
+\fB/usr/bin/ftp\fR, \fB/usr/bin/telnet\fR, \fB/usr/bin/rlogin\fR, or
+\fB/usr/bin/rsh\fR with the \fB-f\fR or \fB-F\fR options would fail. Thus, you
+would be unable to push your single network sign on trust beyond one system.
+This option is mutually exclusive with the \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIrealm\fR\fR
+.ad
+.RS 15n
+.rt
+Causes \fBrlogin\fR to obtain tickets for the remote host in \fIrealm\fR
+instead of the remote host's realm as determined by \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR\fR
+.ad
+.RS 15n
+.rt
+This option explicitly disables Kerberos authentication. It can be used to
+override the \fBautologin\fR variable in \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIusername\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies a different \fIusername\fR for the remote login. If you do not use
+this option, the remote username used is the same as your local username.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 15n
+.rt
+Allows the rlogin session to be run in "\fBlitout\fR" mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-PN\fR\fR
+.ad
+.br
+.na
+\fB\fB-PO\fR\fR
+.ad
+.RS 15n
+.rt
+Explicitly requests the new (\fB-PN\fR) or old (\fB-PO\fR) version of the
+Kerberos `\fBrcmd\fR' protocol. The new protocol avoids many security problems
+prevalant in the old one and is considered much more secure, but is not
+interoperable with older (MIT/SEAM) servers. The new protocol is used by
+default, unless explicitly specified using these options or by using
+\fBkrb5.conf\fR(4). If Kerberos authorization fails when using the old
+`\fBrcmd\fR' protocol, there is fallback to regular, non-kerberized
+\fBrlogin\fR. This is not the case when the new, more secure `\fBrcmd\fR'
+protocol is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Turns on \fBDES\fR encryption for all data passed through the rlogin session.
+This reduces response time and increases \fBCPU\fR utilization.
+.RE
+
+.SS "Escape Sequences"
+.sp
+.LP
+Lines that you type which start with the tilde character (\fB~\fR) are "escape
+sequences." The escape character can be changed using the \fB-e\fR option.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~.\fR\fR
+.ad
+.RS 10n
+.rt
+Disconnects from the remote host. This is not the same as a logout, because the
+local host breaks the connection with no warning to the remote end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~susp\fR\fR
+.ad
+.RS 10n
+.rt
+Suspends the login session, but only if you are using a shell with Job Control.
+\fBsusp\fR is your "suspend" character, usually Control-Z. See \fBtty\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~dsusp\fR\fR
+.ad
+.RS 10n
+.rt
+Suspends the input half of the login, but output is still able to be seen (only
+if you are using a shell with Job Control). \fBdsusp\fR is your "deferred
+suspend" character, usually Control-Y. See \fBtty\fR(1).
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhostname\fR\fR
+.ad
+.RS 12n
+.rt
+The remote machine on which \fIrlogin\fR establishes the remote login session.
+.RE
+
+.SH USAGE
+.sp
+.LP
+For the kerberized rlogin session, each user can have a private authorization
+list in a file, \fB\&.k5login\fR, in his home directory. Each line in this file
+should contain a Kerberos principal name of the form
+\fIprincipal\fR/\fIinstance@realm\fR. If there is a \fB~/.k5login\fR file,
+access is granted to the account if and only if the originating user is
+authenticated to one of the principals named in the \fB~/.k5login\fR file.
+Otherwise, the originating user is granted access to the account if and only if
+the authenticated principal name of the user can be mapped to the local account
+name using the \fIauthenticated-principal-name\fR \(-> \fIlocal-user-name\fR
+mapping rules. The \fB\&.k5login\fR file (for access control) comes into play
+only when Kerberos authentication is being done.
+.sp
+.LP
+For the non-secure rlogin session, each remote machine can have a file named
+\fB/etc/hosts.equiv\fR containing a list of trusted host names with which it
+shares user names. Users with the same user name on both the local and remote
+machine can \fBrlogin\fR from the machines listed in the remote machine's
+\fB/etc/hosts.equiv\fR file without supplying a password. Individual users
+camayn set up a similar private equivalence list with the file \fB\&.rhosts\fR
+in their home directories. Each line in this file contains two names, that is,
+a host name and a user name, separated by a space. An entry in a remote user's
+\fB\&.rhosts\fR file permits the user named \fIusername\fR who is logged into
+\fIhostname\fR to log in to the remote machine as the remote user without
+supplying a password. If the name of the local host is not found in the
+\fB/etc/hosts.equiv\fR file on the remote machine, and the local user name and
+host name are not found in the remote user's .\fBrhosts\fR file, then the
+remote machine prompts for a password. Host names listed in the
+\fB/etc/hosts.equiv\fR and \fB\&.rhosts\fR files must be the official host
+names listed in the \fBhosts\fR database. Nicknames can not be used in either
+of these files.
+.sp
+.LP
+For security reasons, the \fB\&.rhosts\fR file must be owned by either the
+remote user or by root.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 23n
+.rt
+Contains information about users' accounts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/hosts/*\fR\fR
+.ad
+.RS 23n
+.rt
+For \fIhostname\fR version of the command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hosts.equiv\fR\fR
+.ad
+.RS 23n
+.rt
+List of trusted hostnames with shared user names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/nologin\fR\fR
+.ad
+.RS 23n
+.rt
+Message displayed to users attempting to login during machine shutdown.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.rhosts\fR\fR
+.ad
+.RS 23n
+.rt
+Private list of trusted hostname/username combinations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.k5login\fR\fR
+.ad
+.RS 23n
+.rt
+File containing Kerberos principals that are allowed access.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.conf\fR\fR
+.ad
+.RS 23n
+.rt
+Kerberos configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hosts\fR\fR
+.ad
+.RS 23n
+.rt
+Hosts database.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBrsh\fR(1), \fBstty\fR(1), \fBtty\fR(1), \fBin.rlogind\fR(1M),
+\fBhosts\fR(4),\fBhosts.equiv\fR(4), \fBkrb5.conf\fR(4), \fBnologin\fR(4),
+\fBattributes\fR(5), \fBkrb5_auth_rules\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+The following message indicates that the machine is in the process of being
+shutdown and logins have been disabled:
+.sp
+.in +2
+.nf
+NO LOGINS: System going down in \fIN\fR \fBminutes\fR
+.fi
+.in -2
+.sp
+
+.SH NOTES
+.sp
+.LP
+When a system is listed in \fBhosts.equiv\fR, its security must be as good as
+local security. One insecure system listed in \fBhosts.equiv\fR can compromise
+the security of the entire system.
+.sp
+.LP
+The Network Information Service (\fBNIS\fR) was formerly known as Sun Yellow
+Pages (\fBYP\fR.) The functionality of the two remains the same. Only the name
+has changed.
+.sp
+.LP
+This implementation can only use the \fBTCP\fR network service.
diff --git a/usr/src/man/man1/rm.1 b/usr/src/man/man1/rm.1
new file mode 100644
index 0000000000..97261f57a6
--- /dev/null
+++ b/usr/src/man/man1/rm.1
@@ -0,0 +1,532 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rm 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+rm, rmdir \- remove directory entries
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/rm\fR [\fB-f\fR] [\fB-i\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/rm\fR \fB-rR\fR [\fB-f\fR] [\fB-i\fR] \fIdirname\fR... [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/rm\fR [\fB-fiRr\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/rmdir\fR [\fB-ps\fR] \fIdirname\fR...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB/usr/bin/rmdir\fR [\fB-eps\fR] \fIdirname\fR...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/rm /usr/xpg4/bin/rm"
+.sp
+.LP
+The \fBrm\fR utility removes the directory entry specified by each \fIfile\fR
+argument. If a file has no write permission and the standard input is a
+terminal, the full set of permissions (in octal) for the file are printed
+followed by a question mark. This is a prompt for confirmation. If the answer
+is affirmative, the file is deleted, otherwise the file remains.
+.sp
+.LP
+If \fIfile\fR is a symbolic link, the link is removed, but the file or
+directory to which it refers is not deleted. Users do not need write permission
+to remove a symbolic link, provided they have write permissions in the
+directory.
+.sp
+.LP
+If multiple \fIfile\fRs are specified and removal of a \fIfile\fR fails for any
+reason, \fBrm\fR writes a diagnostic message to standard error, do nothing more
+to the current \fIfile\fR, and go on to any remaining \fIfile\fRs.
+.sp
+.LP
+If the standard input is not a terminal, the utility operates as if the
+\fB-f\fR option is in effect.
+.SS "/usr/bin/rmdir"
+.sp
+.LP
+The \fBrmdir\fR utility removes the directory entry specified by each
+\fIdirname\fR operand, which must refer to an empty directory.
+.sp
+.LP
+Directories are processed in the order specified. If a directory and a
+subdirectory of that directory are specified in a single invocation of
+\fBrmdir\fR, the subdirectory must be specified before the parent directory so
+that the parent directory is empty when \fBrmdir\fR tries to remove it.
+.SS "ksh93"
+.sp
+.LP
+The \fBrmdir\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBrmdir\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/rmdir\fR or
+\fB/usr/bin/rmdir\fR executable.
+.sp
+.LP
+\fBrmdir\fR deletes each given directory. The directory must be empty and
+contain no entries other than \fB\&.\fR or \fB\&..\fR. If a directory and a
+subdirectory of that directory are specified as operands, the subdirectory must
+be specified before the parent, so that the parent directory is empty when
+\fBrmdir\fR attempts to remove it.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for \fB/usr/bin/rm\fR and
+\fB/usr/xpg4/bin/rm\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Recursively removes directories and subdirectories in the argument list. The
+directory is emptied of files and removed. The user is normally prompted for
+removal of any write-protected files which the directory contains. The
+write-protected files are removed without prompting, however, if the \fB-f\fR
+option is used, or if the standard input is not a terminal and the \fB-i\fR
+option is not used.
+.sp
+Symbolic links that are encountered with this option is not traversed.
+.sp
+If the removal of a non-empty, write-protected directory is attempted, the
+utility always fails (even if the \fB-f\fR option is used), resulting in an
+error message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Same as \fB-r\fR option.
+.RE
+
+.SS "/usr/bin/rm"
+.sp
+.LP
+The following options are supported for \fB/usr/bin/rm\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Removes all files (whether write-protected or not) in a directory without
+prompting the user. In a write-protected directory, however, files are never
+removed (whatever their permissions are), but no messages are displayed. If the
+removal of a write-protected directory is attempted, this option does not
+suppress an error message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Interactive. With this option, \fBrm\fR prompts for confirmation before
+removing any files. It overrides the \fB-f\fR option and remains in effect even
+if the standard input is not a terminal.
+.RE
+
+.SS "/usr/xpg4/bin/rm"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/rm\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Does not prompt for confirmation. Does not write diagnostic messages or modify
+the exit status in the case of non-existent operands. Any previous occurrences
+of the \fB-i\fR option is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Prompts for confirmation. Any occurrences of the \fB-f\fR option is ignored.
+.RE
+
+.SS "/usr/bin/rmdir"
+.sp
+.LP
+The following options are supported for \fB/usr/bin/rmdir\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Allows users to remove the directory \fIdirname\fR and its parent directories
+which become empty. A message is printed to standard error if all or part of
+the path could not be removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses the message printed on the standard error when \fB-p\fR is in
+effect.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported for the \fBrmdir\fR built-in for
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.br
+.na
+\fB\fB--ignore-fail-on-non-empty\fR\fR
+.ad
+.RS 30n
+.rt
+Ignore each non-empty directory failure.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.br
+.na
+\fB\fB--parents\fR\fR
+.ad
+.RS 30n
+.rt
+Remove each explicit directory argument directory that becomes empty after its
+child directories are removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--suppress\fR\fR
+.ad
+.RS 30n
+.rt
+Suppress the message printed on the standard error when \fB-p\fR is in effect.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies the pathname of a directory entry to be removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdirname\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies the pathname of an empty directory to be removed.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBrm\fR and
+\fBrmdir\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
+bytes).
+.SH EXAMPLES
+.sp
+.LP
+The following examples are valid for the commands shown.
+.SS "/usr/bin/rm, /usr/xpg4/bin/rm"
+.LP
+\fBExample 1 \fRRemoving Directories
+.sp
+.LP
+The following command removes the directory entries \fBa.out\fR and \fBcore\fR:
+
+.sp
+.in +2
+.nf
+example% \fBrm a.out core\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRRemoving a Directory without Prompting
+.sp
+.LP
+The following command removes the directory \fBjunk\fR and all its contents,
+without prompting:
+
+.sp
+.in +2
+.nf
+example% \fBrm -rf junk\fR
+.fi
+.in -2
+.sp
+
+.SS "/usr/bin/rmdir"
+.LP
+\fBExample 3 \fRRemoving Empty Directories
+.sp
+.LP
+If a directory \fBa\fR in the current directory is empty, except that it
+contains a directory \fBb\fR, and \fBa/b\fR is empty except that it contains a
+directory \fBc\fR, the following command removes all three directories:
+
+.sp
+.in +2
+.nf
+example% \fBrmdir -p a/b/c\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBrm\fR and \fBrmdir\fR: \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+If the \fB-f\fR option was not specified, all the named directory entries were
+removed; otherwise, all the existing named directory entries were removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion. All directories deleted successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred. One or more directories could not be deleted.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/rm, /usr/bin/rmdir"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/rm"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBrmdir\fR(2), \fBrmdir\fR(2), \fBunlink\fR(2),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+All messages are generally self-explanatory.
+.sp
+.LP
+It is forbidden to remove the files "\fB\&.\fR" and "\fB\&..\fR" in order to
+avoid the consequences of inadvertently doing something like the following:
+.sp
+.in +2
+.nf
+example% \fBrm -r .*\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+It is forbidden to remove the file "\fB/\fR" in order to avoid the consequences
+of inadvertently doing something like:
+.sp
+.in +2
+.nf
+example% \fBrm -rf $x/$y\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+or
+.sp
+.in +2
+.nf
+example% \fBrm -rf /$y\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+when \fB$x\fR and \fB$y\fR expand to empty strings.
+.SH NOTES
+.sp
+.LP
+A \fB\(mi\fR permits the user to mark explicitly the end of any command line
+options, allowing \fBrm\fR to recognize file arguments that begin with a
+\fB\(mi\fR\&. As an aid to BSD migration, \fBrm\fR accepts \fB\(mi\|\(mi\fR as
+a synonym for \fB\(mi\fR\&. This migration aid may disappear in a future
+release. If a \fB\(mi\|\(mi\fR and a \fB\(mi\fR both appear on the same command
+line, the second is interpreted as a file.
diff --git a/usr/src/man/man1/rmformat.1 b/usr/src/man/man1/rmformat.1
new file mode 100644
index 0000000000..d2f5452380
--- /dev/null
+++ b/usr/src/man/man1/rmformat.1
@@ -0,0 +1,563 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rmformat 1 "19 Feb 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+rmformat \- removable rewritable media format utility
+.SH SYNOPSIS
+.LP
+.nf
+\fBrmformat\fR [\fB-DeHUv\fR] [\fB-b\fR \fIlabel\fR] [\fB-c\fR \fIblockno\fR]
+ [\fB-F\fRquick | long | force ] [\fB-s\fR \fIfilename\fR] [\fIdevname\fR]
+.fi
+
+.LP
+.nf
+\fBrmformat\fR \fB-V\fR read | write \fIdevname\fR
+.fi
+
+.LP
+.nf
+\fBrmformat\fR \fB-l\fR [\fIdevname\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrmformat\fR utility is used to format, label, partition, and perform
+other miscellaneous functions on removable, rewritable media that include
+floppy drives, and the \fBPCMCIA\fR memory and \fBata\fR cards. The
+\fBrmformat\fR utility should also be used with all USB mass storage devices,
+including USB hard drives. This utility can also be used for the verification
+and surface analysis and for repair of the bad sectors found during
+verification if the drive or the driver supports bad block management.
+.sp
+.LP
+After formatting, \fBrmformat\fR writes the label, which covers the full
+capacity of the media as one slice on floppy and \fBPCMCIA\fR memory cards to
+maintain compatibility with the behavior of \fBfdformat\fR. The partition
+information can be changed with the help of other options provided by
+\fBrmformat\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIlabel\fR\fR
+.ad
+.sp .6
+.RS 4n
+Labels the media with a SUNOS label. A SUNOS volume label name is restricted to
+8 characters. For media size greater than 1 TB, an EFI label is created. For
+writing a \fBDOS\fR Volume label, the user should use \fBmkfs_pcfs\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIblockno\fR\fR
+.ad
+.sp .6
+.RS 4n
+Corrects and repairs the given block. This correct and repair option may not be
+applicable to all devices supported by \fBrmformat\fR, as some devices may have
+a drive with bad block management capability and others may have this option
+implemented in the driver. If the drive or driver supports bad block
+management, a best effort is made to rectify the bad block. If the bad block
+still cannot be rectified, a message is displayed to indicate the failure to
+repair. The block number can be provided in decimal, octal, or hexadecimal
+format.
+.sp
+The normal floppy and \fBPCMCIA\fR memory and ata cards do not support bad
+block management.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.sp .6
+.RS 4n
+Formats a 720KB (3.5 inch) double density diskette. This is the default for
+double density type drives. This option is needed if the drive is a high or
+extended-density type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ejects the media upon completion. This feature may not be available if the
+drive does not support motorized eject.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR quick | long | force\fR
+.ad
+.sp .6
+.RS 4n
+Formats the media.
+.sp
+The \fBquick\fR option starts a format without certification or format with
+limited certification of certain tracks on the media.
+.sp
+The \fBlong\fR option starts a complete format. For some devices this might
+include the certification of the whole media by the drive itself.
+.sp
+The \fBforce\fR option to format is provided to start a long format without
+user confirmation before the format is started.
+.sp
+In legacy media such as floppy drives, all options start a long format
+depending on the mode (Extended Density mode, High Density mode, or Double
+Density mode) with which the floppy drive operates by default. On \fBPCMCIA\fR
+memory cards, all options start a long format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.sp .6
+.RS 4n
+Formats a 1.44 MB (3.5 inch) high density diskette. This is the default for
+high density type drives. It is needed if the drive is the Extended Density
+type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists all removable devices. By default, without any options, \fBrmformat\fR
+also lists all removable devices. If the \fBdev_name\fR is given,
+\fBrmformat\fR lists the device associated with the \fBdev_name\fR. The output
+shows the device pathname, vendor information, and the device type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIfilename\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables the user to lay out the partition information in the SUNOS label.
+.sp
+The user should provide a file as input with information about each slice in a
+format providing byte offset, size required, tags, and flags, as follows:
+.sp
+.in +2
+.nf
+slices: \fIn\fR = \fIoffset\fR, \fIsize\fR [, \fIflags\fR, \fItags\fR]
+.fi
+.in -2
+.sp
+
+where \fIn\fR is the slice number, \fIoffset\fR is the byte offset at which the
+slice \fIn\fR starts, and \fIsize\fR is the required size for slice \fIn\fR.
+Both \fIoffset\fR and \fIsize\fR must be a multiple of 512 bytes. These numbers
+can be represented as decimal, hexadecimal, or octal numbers. No floating point
+numbers are accepted. Details about maximum number of slices can be obtained
+from the \fISystem Administration Guide: Basic Administration\fR.
+.sp
+To specify the \fIsize\fR or \fIoffset\fR in kilobytes, megabytes, or
+gigabytes, add \fBKB\fR, \fBMB\fR, \fBGB\fR, respectively. A number without a
+suffix is assumed to be a byte offset. The flags are represented as follows:
+.sp
+.in +2
+.nf
+\fBwm\fR = read-write, mountable
+\fBwu\fR = read-write, unmountable
+\fBru\fR = read-only, unmountable
+.fi
+.in -2
+.sp
+
+The tags are represented as follows: \fBunassigned\fR, \fBboot\fR, \fBroot\fR,
+\fBswap\fR, \fBusr\fR, \fBbackup\fR, \fBstand\fR, \fBvar\fR, \fBhome\fR,
+\fBalternates\fR.
+.sp
+The tags and flags can be omitted from the four tuple when finer control on
+those values is not required. It is required to omit both or include both. If
+the tags and flags are omitted from the four tuple for a particular slice, a
+default value for each is assumed. The default value for flags is \fBwm\fR and
+for tags is \fBunassigned\fR.
+.sp
+Either full tag names can be provided or an abbreviation for the tags can be
+used. The abbreviations can be the first two or more letters from the standard
+tag names. \fBrmformat\fR is case insensitive in handling the defined tags &
+flags.
+.sp
+Slice specifications are separated by :
+.sp
+For example:
+.sp
+.in +2
+.nf
+slices: 0 = 0, 30MB, "wm", "home" :
+ 1 = 30MB, 51MB :
+ 2 = 0, 100MB, "wm", "backup" :
+ 6 = 81MB, 19MB
+.fi
+.in -2
+.sp
+
+\fBrmformat\fR does the necessary checking to detect any overlapping partitions
+or illegal requests to addresses beyond the capacity of the media under
+consideration. There can be only one slice information entry for each slice
+\fIn\fR. If multiple slice information entries for the same slice \fIn\fR are
+provided, an appropriate error message is displayed. The slice \fB2\fR is the
+backup slice covering the whole disk capacity. The pound sign character,
+\fB#\fR, can be used to describe a line of comments in the input file. If the
+line starts with \fB#\fR, then \fBrmformat\fR ignores all the characters
+following \fB#\fR until the end of the line.
+.sp
+Partitioning some of the media with very small capacity is permitted, but be
+cautious in using this option on such devices.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fR
+.ad
+.sp .6
+.RS 4n
+Performs \fBumount\fR on any file systems and then formats. See
+\fBmount\fR(1M). This option unmounts all the mounted slices and issues a long
+format on the device requested.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR read | write\fR
+.ad
+.sp .6
+.RS 4n
+Verifies each block of media after format. The write verification is a
+destructive mechanism. The user is queried for confirmation before the
+verification is started. The output of this option is a list of block numbers,
+which are identified as bad.
+.sp
+The read verification only verifies the blocks and report the blocks which are
+prone to errors.
+.sp
+The list of block numbers displayed can be used with the \fB-c\fR option for
+repairing.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevname\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fIdevname\fR can be provided as absolute device pathname or relative pathname
+for the device from the current working directory or the nickname, such as
+\fBcdrom\fR or \fBrmdisk\fR.
+.sp
+For floppy devices, to access the first drive use \fB/dev/rdiskette0\fR (for
+systems without volume management) or \fBfloppy0\fR (for systems with volume
+management). Specify \fB/dev/rdiskette1\fR (for systems without volume
+management) or \fBfloppy1\fR (for systems with volume management) to use the
+second drive.
+.sp
+For systems without volume management running, the user can also provide the
+absolute device pathname as \fB/dev/rdsk/c\fI?\fRt\fI?\fRd\fI?\fRs\fI?\fR\fR or
+the appropriate relative device pathname from the current working directory.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRFormatting a Diskette
+.sp
+.in +2
+.nf
+example$ \fBrmformat -F quick /dev/rdiskette\fR
+Formatting will erase all the data on disk.
+Do you want to continue? (y/n)\fBy\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRFormatting a Diskette for a UFS File System
+.sp
+.LP
+The following example formats a diskette and creates a UFS file system:
+
+.sp
+.in +2
+.nf
+example$ \fBrmformat -F quick /dev/aliases/floppy0\fR
+Formatting will erase all the data on disk.
+Do you want to continue? (y/n)\fBy\fR
+example$ \fBsu\fR
+# \fB/usr/sbin/newfs /dev/aliases/floppy0\fR
+newfs: construct a new file system /dev/rdiskette: (y/n)? \fBy\fR
+/dev/rdiskette: 2880 sectors in 80 cylinders of 2 tracks, 18 sectors
+ 1.4MB in 5 cyl groups (16 c/g, 0.28MB/g, 128 i/g)
+ super-block backups (for fsck -F ufs -o b=#) at:
+ 32, 640, 1184, 1792, 2336,
+#
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRFormatting Removable Media for a PCFS File System
+.sp
+.LP
+The following example shows how to create an alternate \fBfdisk\fR partition:
+
+.sp
+.in +2
+.nf
+example$ \fBrmformat -F quick /dev/rdsk/c0t4d0s2:c\fR
+Formatting will erase all the data on disk.
+Do you want to continue? (y/n)\fBy\fR
+example$ \fBsu\fR
+# \fBfdisk /dev/rdsk/c0t4d0s2:c\fR
+# \fBmkfs -F pcfs /dev/rdsk/c0t4d0s2:c\fR
+Construct a new FAT file system on /dev/rdsk/c0t4d0s2:c: (y/n)? \fBy\fR
+#
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following example describes how to create a \fBPCFS\fR file system
+\fBwithout\fR an \fBfdisk\fR partition:
+
+.sp
+.in +2
+.nf
+example$ \fBrmformat -F quick /dev/rdiskette\fR
+Formatting will erase all the data on disk.
+Do you want to continue? (y/n)\fBy\fR
+example$ \fBsu\fR
+# \fBmkfs -F pcfs -o nofdisk,size=2 /dev/rdiskette\fR
+Construct a new FAT file system on /dev/rdiskette: (y/n)? \fBy\fR
+#
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRListing All Removable Devices
+.sp
+.LP
+The following example shows how to list removable devices. This output shows a
+long listing of such devices.
+
+.sp
+.in +2
+.nf
+example$ rmformat -l
+Looking for devices...
+Logical Node: /dev/rdsk/c5t0d0s2
+Physical Node: /pci@1e,600000/usb@b/hub@2/storage@4/disk@0,0
+Connected Device: TEAC FD-05PUB 1026
+Device Type: Floppy drive
+Bus: USB
+Size: 1.4 MB
+Label: floppy
+Access permissions: Medium is not write protected.
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/diskette0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing block device access for the media in floppy drive 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rdiskette0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing character device access for the media in floppy drive 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/aliases\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing symbolic links to the character devices for the different
+media under the control of volume management using appropriate alias.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/aliases/floppy0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Symbolic link to the character device for the media in floppy drive 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rdiskette\fR\fR
+.ad
+.sp .6
+.RS 4n
+Symbolic link providing character device access for the media in the primary
+floppy drive, usually drive 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/dsk\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing block device access for the \fBPCMCIA\fR memory and ata
+cards and removable media devices.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rdsk\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing character device access for the \fBPCMCIA\fR memory and ata
+cards and removable media devices.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/aliases/pcmemS\fR\fR
+.ad
+.sp .6
+.RS 4n
+Symbolic link to the character device for the \fBPCMCIA\fR memory card in
+socket S, where S represents a \fBPCMCIA\fR socket number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/aliases/rmdisk0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Symbolic link to the generic removable media device that is not a \fBCD-ROM\fR,
+floppy, \fBDVD-ROM\fR, \fBPCMCIA\fR memory card, and so forth.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rdsk\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing character device access for the \fBPCMCIA\fR memory and ata
+cards and other removable devices.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/dsk\fR\fR
+.ad
+.sp .6
+.RS 4n
+Directory providing block device access for the \fBPCMCIA\fR memory and ata
+cards and other removable media devices.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcpio\fR(1), \fBeject\fR(1), \fBfdformat\fR(1), \fBtar\fR(1),
+\fBvolcheck\fR(1), \fBvolrmmount\fR(1), \fBformat\fR(1M), \fBmkfs_pcfs\fR(1M),
+\fBmount\fR(1M), \fBnewfs\fR(1M), \fBprtvtoc\fR(1M), \fBrmmount\fR(1M),
+\fBrpc.smserverd\fR(1M), \fBattributes\fR(5), \fBscsa2usb\fR(7D), \fBsd\fR(7D),
+\fBpcfs\fR(7FS), \fBudfs\fR(7FS)
+.sp
+.LP
+\fISystem Administration Guide: Basic Administration\fR
+.SH NOTES
+.sp
+.LP
+A rewritable media or \fBPCMCIA\fR memory card or \fBPCMCIA\fR ata card
+containing a \fBufs\fR file system created on a SPARC-based system (using
+\fBnewfs\fR(1M)) is not identical to a rewritable media or \fBPCMCIA\fR memory
+card containing a \fBufs\fR file system created on an x86 based system. Do not
+interchange any removable media containing \fBufs\fR between these platforms;
+use \fBcpio\fR(1) or \fBtar\fR(1) to transfer files on diskettes or memory
+cards between them. For interchangeable filesystems refer to \fBpcfs\fR(7FS)
+and \fBudfs\fR(7FS).
+.sp
+.LP
+\fBrmformat\fR might not list all removable devices in virtualization
+environments.
+.SH BUGS
+.sp
+.LP
+Currently, bad sector mapping is not supported on floppy diskettes or
+\fBPCMCIA\fR memory cards. Therefore, a diskette or memory card is unusable if
+\fBrmformat\fR finds an error (\fBbad sector\fR).
diff --git a/usr/src/man/man1/rmmount.1 b/usr/src/man/man1/rmmount.1
new file mode 100644
index 0000000000..ab568518ca
--- /dev/null
+++ b/usr/src/man/man1/rmmount.1
@@ -0,0 +1,224 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rmmount 1 "18 Sep 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+rmmount, rmumount \- mounts and unmounts removable media
+.SH SYNOPSIS
+.LP
+.nf
+\fBrmmount\fR [\fB-u\fR] [\fB-o\fR \fIoptions\fR] [\fInickname\fR | \fIdevice\fR] [\fImount_point\fR]
+.fi
+
+.LP
+.nf
+\fBrmmount\fR [\fB-d\fR] [\fB-l\fR]
+.fi
+
+.LP
+.nf
+\fBrmumount\fR [\fInickname\fR | \fImount_point\fR | \fIdevice\fR]
+.fi
+
+.LP
+.nf
+\fBrmumount\fR [\fB-d\fR] [\fB-l\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrmmount\fR and \fBrmumount\fR utilities mount and unmount removable or
+hot-pluggable volumes. The optional argument can identify the volume by its
+volume label, mount point or block device path.
+.sp
+.LP
+\fBrmmount\fR can also take additional mount options if the user has sufficient
+privileges to override the default mount options.
+.sp
+.LP
+Unmounting removable media does not result in its ejection. Use \fBeject\fR(1)
+to optionally unmount and eject the media.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for \fBrmmount\fR and \fBrmumount\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Display the device path of the default device. This device is used if no
+arguments are supplied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Display the paths and nicknames of mountable devices.
+.RE
+
+.sp
+.LP
+The following options are supported for \fBrmmount\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoptions\fR\fR
+.ad
+.RS 14n
+.rt
+Display mount options. This option can only be used by users that have
+privileges to override the system default options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 14n
+.rt
+Unmounts the volume as opposed to mounting it.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIdevice\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies which device to mount or unmount, by the name it appears in the
+directory \fB/dev\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImount_point\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies which device to mount or unmount, by the name it appears in the
+directory \fB/dev\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fInickname\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies which device to mount or unmount, by its nickname as known to this
+command.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRMounting a USB disk
+.sp
+.LP
+The following example mounts a USB disk with a volume label of \fBPHOTOS\fR:
+
+.sp
+.in +2
+.nf
+example% rmmount PHOTOS
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUnmounting a \fBpcfs\fR Volume
+.sp
+.LP
+The following example unmounts a \fBpcfs\fR volume by device path:
+
+.sp
+.in +2
+.nf
+example% rmumount /dev/dsk/c4t0d0p0:1
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB>\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/media\fR\fR
+.ad
+.RS 10n
+.rt
+Default mount root.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBeject\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/roffbib.1 b/usr/src/man/man1/roffbib.1
new file mode 100644
index 0000000000..ce6aa27276
--- /dev/null
+++ b/usr/src/man/man1/roffbib.1
@@ -0,0 +1,191 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH roffbib 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+roffbib \- format and print a bibliographic database
+.SH SYNOPSIS
+.LP
+.nf
+\fBroffbib\fR [\fB-e\fR] [\fB-h\fR] [\fB-m\fR \fIfilename\fR] [\fB-n\fR\fIp\fR] [\fB-o\fR\fIlist\fR] [\fB-Q\fR] [\fB-r\fR\fIaN\fR]
+ [\fB-s\fR\fIN\fR] [\fB-T\fR\fIterm\fR] [\fB-V\fR] [\fB-x\fR] [\fIfilename\fR] ...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBroffbib\fR prints out all records in a bibliographic database, in
+bibliography format rather than as footnotes or endnotes. Generally it is used
+in conjunction with \fBsortbib\fR(1):
+.sp
+.LP
+\fBexample%\fR \fBsortbib\fR \fBdatabase\fR \fB|\fR \fBroffbib\fR
+.SH OPTIONS
+.sp
+.LP
+\fBroffbib\fR accepts all options understood by \fBnroff\fR(1) except \fB-i\fR
+and \fB-q\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 15n
+.rt
+Produce equally-spaced words in adjusted lines using full terminal resolution.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 15n
+.rt
+Use output tabs during horizontal spacing to speed output and reduce output
+character count. \fBTAB\fR settings are assumed to be every 8 nominal character
+widths.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI filename\fR\fR
+.ad
+.RS 15n
+.rt
+Prepend the macro file \fB/usr/share/lib/tmac/tmac.name\fR to the input files.
+There should be a space between the \fB-m\fR and the macro filename. This set
+of macros will replace the ones defined in \fB/usr/share/lib/tmac/tmac.bib\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fIp\fR\fR
+.ad
+.RS 15n
+.rt
+Number first generated page \fIp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fIlist\fR\fR
+.ad
+.RS 15n
+.rt
+Print only page numbers that appear in the comma-separated \fIlist\fR of
+numbers and ranges. A range \fIN\fR\fB\(mi\fR\fIM\fR means pages \fIN\fR
+through \fIM\fR; an initial \fB-\fR\fIN\fR means from the beginning to page
+\fIN\fR; a final \fIN\fR\fB\(mi\fR means from page \fIN\fR to end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR\fR
+.ad
+.RS 15n
+.rt
+Queue output for the phototypesetter. Page offset is set to 1 inch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fIaN\fR\fR
+.ad
+.RS 15n
+.rt
+Set register \fIa\fR (one-character) to \fIN\fR. The command-line argument
+\fB-rN1\fR will number the references starting at 1.
+.sp
+Four command-line registers control formatting style of the bibliography, much
+like the number registers of \fBms\fR(5). The flag \fB-rV2\fR will double space
+the bibliography, while \fB-rV1\fR will double space references but single
+space annotation paragraphs. The line length can be changed from the default
+6.5 inches to 6 inches with the \fB-rL6i\fR argument, and the page offset can
+be set from the default of 0 to one inch by specifying \fB-rO1i\fR (capital O,
+not zero).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIN\fR\fR
+.ad
+.RS 15n
+.rt
+Halt prior to every \fIN\fR pages for paper loading or changing (default
+\fIN\fR\|=1). To resume, enter \fBNEWLINE\fR or \fBRETURN.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fIterm\fR\fR
+.ad
+.RS 15n
+.rt
+Specify \fIterm\fR as the terminal type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 15n
+.rt
+Send output to the Versatec. Page offset is set to 1 inch.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+If abstracts or comments are entered following the \fB%X\fR field key,
+\fBroffbib\fR will format them into paragraphs for an annotated bibliography.
+Several \fB%X\fR fields may be given if several annotation paragraphs are
+desired.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/tmac.bib\fR\fR
+.ad
+.sp .6
+.RS 4n
+file of macros used by \fBnroff/troff\fR
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaddbib\fR(1), \fBindxbib\fR(1), \fBlookbib\fR(1), \fBnroff\fR(1)
+\fBrefer\fR(1), \fBsortbib\fR(1), \fBtroff\fR(1), \fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+Users have to rewrite macros to create customized formats.
diff --git a/usr/src/man/man1/roles.1 b/usr/src/man/man1/roles.1
new file mode 100644
index 0000000000..b1629c39ae
--- /dev/null
+++ b/usr/src/man/man1/roles.1
@@ -0,0 +1,109 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH roles 1 "14 Feb 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+roles \- print roles granted to a user
+.SH SYNOPSIS
+.LP
+.nf
+\fBroles\fR [ \fIuser\fR ]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The command \fBroles\fR prints on standard output the roles that you or the
+optionally-specified user have been granted. Roles are special accounts that
+correspond to a functional responsibility rather than to an actual person
+(referred to as a normal user).
+.sp
+.LP
+Each user may have zero or more roles. Roles have most of the attributes of
+normal users and are identified like normal users in \fBpasswd\fR(4) and
+\fBshadow\fR(4). Each role must have an entry in the \fBuser_attr\fR(4) file
+that identifies it as a role. Roles can have their own authorizations and
+profiles. See \fBauths\fR(1) and \fBprofiles\fR(1).
+.sp
+.LP
+Roles are not allowed to log into a system as a primary user. Instead, a user
+must log in as him\(em or herself and assume the role. The actions of a role
+are attributable to the normal user. When auditing is enabled, the audited
+events of the role contain the audit \fBID\fR of the original user who assumed
+the role.
+.sp
+.LP
+A role may not assume itself or any other role. Roles are not hierarchical.
+However, rights profiles (see \fBprof_attr\fR(4)) are hierarchical and can be
+used to achieve the same effect as hierarchical roles.
+.sp
+.LP
+Roles must have valid passwords and one of the shells that interprets profiles:
+either \fBpfcsh\fR, \fBpfksh\fR, or \fBpfsh\fR. See \fBpfexec\fR(1).
+.sp
+.LP
+Role assumption may be performed using \fBsu\fR(1M), \fBrlogin\fR(1), or some
+other service that supports the \fBPAM_RUSER\fR variable. Successful assumption
+requires knowledge of the role's password and membership in the role. Role
+assignments are specified in \fBuser_attr\fR(4).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSample output
+.sp
+.LP
+The output of the \fBroles\fR command has the following form:
+
+.sp
+.in +2
+.nf
+example% \fBroles tester01 tester02\fRtester01 : admin
+tester02 : secadmin, root
+example%
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+\fB/etc/user_attr\fR
+.sp
+.LP
+\fB/etc/security/auth_attr\fR
+.sp
+.LP
+\fB/etc/security/prof_attr\fR
+.SH SEE ALSO
+.sp
+.LP
+\fBauths\fR(1), \fBpfexec\fR(1), \fBprofiles\fR(1), \fBrlogin\fR(1),
+\fBsu\fR(1M), \fBgetauusernam\fR(3BSM), \fBauth_attr\fR(4), \fBpasswd\fR(4),
+\fBprof_attr\fR(4), \fBshadow\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/rpcgen.1 b/usr/src/man/man1/rpcgen.1
new file mode 100644
index 0000000000..4bb9eb97e3
--- /dev/null
+++ b/usr/src/man/man1/rpcgen.1
@@ -0,0 +1,663 @@
+'\" te
+.\" Copyright (C) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rpcgen 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+rpcgen \- an RPC protocol compiler
+.SH SYNOPSIS
+.LP
+.nf
+\fBrpcgen\fR \fIinfile\fR
+.fi
+
+.LP
+.nf
+\fBrpcgen\fR [\fB-a\fR] [\fB-A\fR] [\fB-b\fR] [\fB-C\fR] [\fB-D\fR \fIname\fR [= \fIvalue\fR]] [\fB-i\fR \fIsize\fR]
+ [\fB-I\fR [\fB-K\fR \fIseconds\fR]] [\fB-L\fR] [\fB-M\fR] [\fB-N\fR] [\fB- T\fR] [\fB-v\fR]
+ [\fB-Y\fR \fIpathname\fR] \fIinfile\fR
+.fi
+
+.LP
+.nf
+\fBrpcgen\fR [\fB-c\fR | \fB-h\fR | \fB-l\fR | \fB-m\fR | \fB-t\fR | \fB-Sc\fR | \fB-Ss\fR | \fB-Sm\fR]
+ [\fB-o\fR \fIoutfile\fR] [\fIinfile\fR]
+.fi
+
+.LP
+.nf
+\fBrpcgen\fR [\fB-s\fR \fInettype\fR] [\fB-o\fR \fIoutfile\fR] [\fIinfile\fR]
+.fi
+
+.LP
+.nf
+\fBrpcgen\fR [\fB-n\fR \fInetid\fR] [\fB-o\fR \fIoutfile\fR] [\fIinfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrpcgen\fR utility is a tool that generates C code to implement an
+\fBRPC\fR protocol. The input to \fBrpcgen\fR is a language similar to C known
+as \fBRPC\fR Language (Remote Procedure Call Language).
+.sp
+.LP
+The \fBrpcgen\fR utility is normally used as in the first synopsis where it
+takes an input file and generates three output files. If the \fIinfile\fR is
+named \fBproto.x\fR, then \fBrpcgen\fR generates a header in \fBproto.h\fR,
+\fBXDR\fR routines in \fBproto_xdr.c\fR, server-side stubs in
+\fBproto_svc.c\fR, and client-side stubs in \fBproto_clnt.c\fR. With the
+\fB-T\fR option, it also generates the \fBRPC\fR dispatch table in
+\fBproto_tbl.i\fR.
+.sp
+.LP
+\fBrpcgen\fR can also generate sample client and server files that can be
+customized to suit a particular application. The \fB-Sc\fR, \fB-Ss\fR, and
+\fB-Sm\fR options generate sample client, server and makefile, respectively.
+The \fB-a\fR option generates all files, including sample files. If the infile
+is \fBproto.x\fR, then the client side sample file is written to
+\fBproto_client.c\fR, the server side sample file to \fBproto_server.c\fR and
+the sample makefile to \fBmakefile.proto\fR.
+.sp
+.LP
+The server created can be started both by the port monitors (for example,
+\fBinetd\fR or \fBlisten\fR) or by itself. When it is started by a port
+monitor, it creates servers only for the transport for which the file
+descriptor \fB0\fR was passed. The name of the transport must be specified by
+setting up the environment variable \fBPM_TRANSPORT\fR. When the server
+generated by \fBrpcgen\fR is executed, it creates server handles for all the
+transports specified in the \fBNETPATH\fR environment variable, or if it is
+unset, it creates server handles for all the visible transports from the
+\fB/etc/netconfig\fR file. Note: the transports are chosen at run time and not
+at compile time. When the server is self-started, it backgrounds itself by
+default. A special define symbol \fBRPC_SVC_FG\fR can be used to run the server
+process in foreground.
+.sp
+.LP
+The second synopsis provides special features which allow for the creation of
+more sophisticated \fBRPC\fR servers. These features include support for
+user-provided \fB#defines\fR and \fBRPC\fR dispatch tables. The entries in the
+\fBRPC\fR dispatch table contain:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+pointers to the service routine corresponding to that procedure
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+a pointer to the input and output arguments
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the size of these routines
+.RE
+.sp
+.LP
+A server can use the dispatch table to check authorization and then to execute
+the service routine. A client library can use the dispatch table to deal with
+the details of storage management and \fBXDR\fR data conversion.
+.sp
+.LP
+The other three synopses shown above are used when one does not want to
+generate all the output files, but only a particular one. See the EXAMPLES
+section below for examples of \fBrpcgen\fR usage. When \fBrpcgen\fR is executed
+with the \fB-s\fR option, it creates servers for that particular class of
+transports. When executed with the \fB-n\fR option, it creates a server for the
+transport specified by \fInetid\fR. If \fIinfile\fR is not specified,
+\fBrpcgen\fR accepts the standard input.
+.sp
+.LP
+All the options mentioned in the second synopsis can be used with the other
+three synopses, but the changes are made only to the specified output file.
+.sp
+.LP
+The C preprocessor \fBcc\fR \fB-E\fR is run on the input file before it is
+actually interpreted by \fBrpcgen\fR. For each type of output file,
+\fBrpcgen\fR defines a special preprocessor symbol for use by the \fBrpcgen\fR
+programmer:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRPC_HDR\fR\fR
+.ad
+.RS 12n
+.rt
+defined when compiling into headers
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRPC_XDR\fR\fR
+.ad
+.RS 12n
+.rt
+defined when compiling into \fBXDR\fR routines
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRPC_SVC\fR\fR
+.ad
+.RS 12n
+.rt
+defined when compiling into server-side stubs
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRPC_CLNT\fR\fR
+.ad
+.RS 12n
+.rt
+defined when compiling into client-side stubs
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBRPC_TBL\fR\fR
+.ad
+.RS 12n
+.rt
+defined when compiling into \fBRPC\fR dispatch tables
+.RE
+
+.sp
+.LP
+Any line beginning with ``\fB%\fR'' is passed directly into the output file,
+uninterpreted by \fBrpcgen\fR, except that the leading ``\fB%\fR" is stripped
+off. To specify the path name of the C preprocessor, use the \fB-Y\fR flag.
+.sp
+.LP
+For every data type referred to in \fIinfile\fR, \fBrpcgen\fR assumes that
+there exists a routine with the string \fBxdr_\fR prepended to the name of the
+data type. If this routine does not exist in the \fBRPC\fR/\fBXDR\fR library,
+it must be provided. Providing an undefined data type allows customization of
+\fBXDR\fR routines.
+.SS "Server Error Reporting"
+.sp
+.LP
+By default, errors detected by \fBproto_svc.c\fR is reported to standard error
+and/or the system log.
+.sp
+.LP
+This behavior can be overridden by compiling the file with a definition of
+\fBRPC_MSGOUT\fR, for example, \fB-DRPC_MSGOUT=mymsgfunc\fR. The function
+specified is called to report errors. It must conform to the following
+\fBprintf\fR-like signature:
+.sp
+.in +2
+.nf
+extern void RPC_MSGOUT(const char *fmt, ...);
+.fi
+.in -2
+.sp
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 18n
+.rt
+Generates all files, including sample files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 18n
+.rt
+Enables the Automatic \fBMT\fR mode in the server main program. In this mode,
+the \fBRPC\fR library automatically creates threads to service client requests.
+This option generates multithread-safe stubs by implicitly turning on the
+\fB-M\fR option. Server multithreading modes and parameters can be set using
+the \fBrpc_control\fR(3NSL) call. \fBrpcgen\fR generated code does not change
+the default values for the Automatic \fBMT\fR mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 18n
+.rt
+Backward compatibility mode. Generates transport-specific \fBRPC\fR code for
+older versions of the operating system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into \fBXDR\fR routines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 18n
+.rt
+Generates header and stub files which can be used with ANSI C compilers.
+Headers generated with this flag can also be used with C++ programs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR\fR
+.ad
+.RS 18n
+.rt
+Defines a symbol \fIname\fR. Equivalent to the \fB#define\fR directive in the
+source. If no \fIvalue\fR is given, \fIvalue\fR is defined as \fB1\fR. This
+option can be specified more than once.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into \fBC\fR data-definitions (a header). The \fB-T\fR option can be
+used in conjunction to produce a header which supports \fBRPC\fR dispatch
+tables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIsize\fR\fR
+.ad
+.RS 18n
+.rt
+Size at which to start generating inline code. This option is useful for
+optimization. The default \fIsize\fR is 5.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles support for \fBinetd\fR(1M) in the server side stubs. Such servers can
+be self-started or can be started by \fBinetd\fR. When the server is
+self-started, it backgrounds itself by default. A special define symbol
+\fBRPC_SVC_FG\fR can be used to run the server process in foreground, or the
+user can simply compile without the \fB-I\fR option.
+.sp
+If there are no pending client requests, the \fBinetd\fR servers exit after 120
+seconds (default). The default can be changed with the \fB-K\fR option. All of
+the error messages for \fBinetd\fR servers are always logged with
+\fBsyslog\fR(3C).
+.sp
+\fBNote:\fR This option is supported for backward compatibility only. It should
+always be used in conjunction with the \fB-b\fR option which generates backward
+compatibility code. By default (that is, when \fB-b\fR is not specified),
+\fBrpcgen\fR generates servers that can be invoked through portmonitors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR \fIseconds\fR\fR
+.ad
+.RS 18n
+.rt
+By default, services created using \fBrpcgen\fR and invoked through port
+monitors wait 120 seconds after servicing a request before exiting. That
+interval can be changed using the \fB-K\fR flag. To create a server that exits
+immediately upon servicing a request, use \fB-K\fR \fB0\fR. To create a server
+that never exits, the appropriate argument is \fB-K\fR \fB\(mi1\fR\&.
+.sp
+When monitoring for a server, some portmonitors, like \fBlisten\fR(1M),
+\fBalways\fR spawn a new process in response to a service request. If it is
+known that a server are used with such a monitor, the server should exit
+immediately on completion. For such servers, \fBrpcgen\fR should be used with
+\fB-K\fR \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into client-side stubs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 18n
+.rt
+When the servers are started in foreground, uses \fBsyslog\fR(3C) to log the
+server errors instead of printing them on the standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into server-side stubs, but do not generate a "main" routine. This
+option is useful for doing callback-routines and for users who need to write
+their own "main" routine to do initialization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.RS 18n
+.rt
+Generates multithread-safe stubs for passing arguments and results between
+\fBrpcgen\fR-generated code and user written code. This option is useful for
+users who want to use threads in their code.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR\fR
+.ad
+.RS 18n
+.rt
+This option allows procedures to have multiple arguments. It also uses the
+style of parameter passing that closely resembles C. So, when passing an
+argument to a remote procedure, you do not have to pass a pointer to the
+argument, but can pass the argument itself. This behavior is different from the
+old style of \fBrpcgen\fR-generated code. To maintain backward compatibility,
+this option is not the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInetid\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into server-side stubs for the transport specified by \fInetid\fR.
+There should be an entry for \fInetid\fR in the \fBnetconfig\fR database. This
+option can be specified more than once, so as to compile a server that serves
+multiple transports.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutfile\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies the name of the output file. If none is specified, standard output is
+used (\fB-c\fR, \fB-h\fR, \fB-l\fR, \fB-m\fR, \fB-n\fR, \fB-s\fR, \fB-Sc\fR,
+\fB-Sm\fR, \fB-Ss\fR, and \fB-t\fR modes only).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fInettype\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into server-side stubs for all the transports belonging to the class
+\fInettype\fR. The supported classes are \fBnetpath\fR, \fBvisible\fR,
+\fBcircuit_n\fR, \fBcircuit_v\fR, \fBdatagram_n\fR, \fBdatagram_v\fR,
+\fBtcp\fR, and \fBudp\fR (see \fBrpc\fR(3NSL) for the meanings associated with
+these classes). This option can be specified more than once. \fBNote:\fR The
+transports are chosen at run time and not at compile time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Sc\fR\fR
+.ad
+.RS 18n
+.rt
+Generates sample client code that uses remote procedure calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Sm\fR\fR
+.ad
+.RS 18n
+.rt
+Generates a sample Makefile which can be used for compiling the application.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Ss\fR\fR
+.ad
+.RS 18n
+.rt
+Generates sample server code that uses remote procedure calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles into \fBRPC\fR dispatch table.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.RS 18n
+.rt
+Generates the code to support \fBRPC\fR dispatch tables.
+.sp
+The options \fB-c\fR, \fB-h\fR, \fB-l\fR, \fB-m\fR, \fB-s\fR, \fB-Sc\fR,
+\fB-Sm\fR, \fB-Ss\fR, and \fB-t\fR are used exclusively to generate a
+particular type of file, while the options \fB-D\fR and \fB-T\fR are global and
+can be used with the other options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Displays the version number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Y\fR \fIpathname\fR\fR
+.ad
+.RS 18n
+.rt
+Gives the name of the directory where \fBrpcgen\fR starts looking for the C
+preprocessor.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinfile\fR\fR
+.ad
+.RS 10n
+.rt
+input file
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRGenerating the output files and dispatch table
+.sp
+.LP
+The following entry
+
+.sp
+.in +2
+.nf
+example% \fBrpcgen -T prot.x\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+generates all the five files: \fBprot.h\fR, \fBprot_clnt.c\fR,
+\fBprot_svc.c\fR, \fBprot_xdr.c\fR, and \fBprot_tbl.i\fR.
+
+.LP
+\fBExample 2 \fRSending headers to standard output
+.sp
+.LP
+The following example sends the C data-definitions (header) to the standard
+output:
+
+.sp
+.in +2
+.nf
+example% \fBrpcgen -h prot.x\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSending a test version
+.sp
+.LP
+To send the test version of the \fB-DTEST\fR, server side stubs for all the
+transport belonging to the class \fBdatagram_n\fR to standard output, use:
+
+.sp
+.in +2
+.nf
+example% \fBrpcgen -s datagram_n -DTEST prot.x\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRCreating server side stubs
+.sp
+.LP
+To create the server side stubs for the transport indicated by \fInetid\fR
+\fBtcp\fR, use:
+
+.sp
+.in +2
+.nf
+example% \fBrpcgen -n tcp -o prot_svc.c prot.x\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBinetd\fR(1M), \fBlisten\fR(1M), \fBrpc\fR(3NSL), \fBrpc_control\fR(3NSL),
+\fBrpc_svc_calls\fR(3NSL), \fBsyslog\fR(3C), \fBnetconfig\fR(4),
+\fBattributes\fR(5)
+.sp
+.LP
+The \fBrpcgen\fR chapter in the \fIONC+ Developer\&'s Guide\fR manual.
diff --git a/usr/src/man/man1/rsh.1 b/usr/src/man/man1/rsh.1
new file mode 100644
index 0000000000..410d26e1bc
--- /dev/null
+++ b/usr/src/man/man1/rsh.1
@@ -0,0 +1,510 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rsh 1 "23 Dec 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+rsh, remsh, remote_shell \- remote shell
+.SH SYNOPSIS
+.LP
+.nf
+\fBrsh\fR [\fB-n\fR] [\fB-a\fR] [\fB-K\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-x\fR] [\fB-f\fR | \fB-F\fR] [\fB-l\fR \fIusername\fR]
+ [\fB-k\fR \fIrealm\fR] \fIhostname\fR \fIcommand\fR
+.fi
+
+.LP
+.nf
+\fBrsh\fR \fIhostname\fR [\fB-n\fR] [\fB-a\fR] [\fB-K\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-x\fR] [\fB-f\fR | \fB-F\fR]
+ [\fB-l\fR \fIusername\fR] [\fB-k\fR \fIrealm\fR] \fIcommand\fR
+.fi
+
+.LP
+.nf
+\fBremsh\fR [\fB-n\fR] [\fB-a\fR] [\fB-K\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-x\fR] [\fB-f\fR | \fB-F\fR] [\fB-l\fR \fIusername\fR]
+ [\fB-k\fR \fIrealm\fR] \fIhostname\fR \fIcommand\fR
+.fi
+
+.LP
+.nf
+\fBremsh\fR \fIhostname\fR [\fB-n\fR] [\fB-a\fR] [\fB-K\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-x\fR] [\fB-f\fR | \fB-F\fR]
+ [\fB-l\fR \fIusername\fR] [\fB-k\fR \fIrealm\fR] \fIcommand\fR
+.fi
+
+.LP
+.nf
+ \fIhostname\fR [\fB-n\fR] [\fB-a\fR] [\fB-PN\fR | \fB-PO\fR] [\fB-x\fR] [\fB-f\fR | \fB-F\fR]
+ [\fB-l\fR \fIusername\fR] [\fB-k\fR \fIrealm\fR] \fIcommand\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrsh\fR utility connects to the specified \fIhostname\fR and executes the
+specified \fIcommand\fR. \fBrsh\fR copies its standard input to the remote
+command, the standard output of the remote command to its standard output, and
+the standard error of the remote command to its standard error. Interrupt,
+quit, and terminate signals are propagated to the remote command. \fBrsh\fR
+normally terminates when the remote command does.
+.sp
+.LP
+The user can opt for a secure session of \fBrsh\fR which uses Kerberos V5 for
+authentication. Encryption of the network session traffic is also possible. The
+\fBrsh\fR session can be kerberized using any of the following Kerberos
+specific options: \fB-a\fR, \fB-PN\fR or \fB-PO\fR, \fB-x\fR, \fB-f\fR or
+\fB-F\fR, and \fB-k\fR \fIrealm\fR. Some of these options (\fB-a\fR, \fB-x\fR,
+\fB-PN\fR or \fB-PO\fR, and \fB-f\fR or \fB-F\fR) can also be specified in the
+\fB[appdefaults]\fR section of \fBkrb5.conf\fR(4). The usage of these options
+and the expected behavior is discussed in the OPTIONS section below. If
+Kerberos authentication is used, authorization to the account is controlled by
+rules in \fBkrb5_auth_rules\fR(5). If this authorization fails, fallback to
+normal \fBrsh\fR using \fBrhosts\fR occurs only if the \fB-PO\fR option is used
+explicitly on the command line or is specified in \fBkrb5.conf\fR(4). Also, the
+\fB-PN\fR or \fB-PO\fR, \fB-x\fR, \fB-f\fR or \fB-F\fR, and \fB-k\fR
+\fIrealm\fR options are just supersets of the \fB-a\fR option.
+.sp
+.LP
+If you omit \fIcommand\fR, instead of executing a single command, \fBrsh\fR
+logs you in on the remote host using \fBrlogin\fR(1).
+.sp
+.LP
+\fBrsh\fR does not return the exit status code of \fIcommand\fR.
+.sp
+.LP
+Shell metacharacters which are not quoted are interpreted on the local machine,
+while quoted metacharacters are interpreted on the remote machine. See
+EXAMPLES.
+.sp
+.LP
+If there is no locale setting in the initialization file of the login shell
+(\fB\&.cshrc\fR, . . .) for a particular user, \fBrsh\fR always executes the
+command in the "C" locale instead of using the default locale of the remote
+machine.
+.sp
+.LP
+The command is sent unencrypted to the remote system. All subsequent network
+session traffic is encrypted. See \fB-x\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Explicitly enable Kerberos authentication and trusts the \fB\&.k5login\fR file
+for access-control. If the authorization check by \fBin.rshd\fR(1M) on the
+server-side succeeds and if the \fB\&.k5login\fR file permits access, the user
+is allowed to carry out the command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Forward a copy of the local credentials (Kerberos Ticket Granting Ticket) to
+the remote system. This is a non-forwardable ticket granting ticket. Forward a
+ticket granting ticket if you need to authenticate yourself to other Kerberized
+network services on the remote host. An example would be if your home directory
+on the remote host is \fBNFS\fR mounted by way of Kerberos V5. If your local
+credentials are not forwarded in this case, you cannot access your home
+directory. This option is mutually exclusive with the \fB-F\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 15n
+.rt
+Forward a forwardable copy of the local credentials (Kerberos Ticket Granting
+Ticket) to the remote system. The \fB-F\fR option provides a superset of the
+functionality offered by the \fB-f\fR option. For example, with the \fB-f\fR
+option, if, after you connected to the remote host, your remote command
+attempted to invoke \fB/usr/bin/ftp\fR, \fB/usr/bin/telnet\fR,
+\fB/usr/bin/rlogin\fR, or \fB/usr/bin/rsh\fR, with the \fB-f\fR or \fB-F\fR
+options, the attempt would fail. Thus, you would be unable to push your single
+network sign on trust beyond one system. This option is mutually exclusive with
+the \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIrealm\fR\fR
+.ad
+.RS 15n
+.rt
+Causes \fBrsh\fR to obtain tickets for the remote host in \fIrealm\fR instead
+of the remote host's realm as determined by \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR\fR
+.ad
+.RS 15n
+.rt
+This option explicitly disables Kerberos authentication. It can be used to
+override the \fBautologin\fR variable in \fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-l\fR \fIusername\fR\fR
+.ad
+.RS 15n
+.rt
+Uses \fIusername\fR as the remote username instead of your local username. In
+the absence of this option, the remote username is the same as your local
+username.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+Redirect the input of \fBrsh\fR to \fB/dev/null\fR. You sometimes need this
+option to avoid unfortunate interactions between \fBrsh\fR and the shell which
+invokes it. For example, if you are running \fBrsh\fR and invoke a \fBrsh\fR in
+the background without redirecting its input away from the terminal, it blocks
+even if no reads are posted by the remote command. The \fB-n\fR option prevents
+this.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-PO\fR\fR
+.ad
+.br
+.na
+\fB\fB-PN\fR\fR
+.ad
+.RS 15n
+.rt
+Explicitly request new (\fB-PN\fR) or old (\fB-PO\fR) version of the Kerberos
+"\fBrcmd\fR" protocol. The new protocol avoids many security problems prevalant
+in the old one and is regarded much more secure, but is not interoperable with
+older (MIT/SEAM) servers. The new protocol is used by default, unless
+explicitly specified using these options or through \fBkrb5.conf\fR(4). If
+Kerberos authorization fails when using the old "\fBrcmd\fR" protocol, there is
+fallback to regular, non-kerberized \fBrsh\fR. This is not the case when the
+new, more secure "\fBrcmd\fR" protocol is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Cause the network session traffic to be encrypted. See \fBDESCRIPTION\fR.
+.RE
+
+.sp
+.LP
+The type of remote shell (\fBsh\fR, \fBrsh\fR, or other) is determined by the
+user's entry in the file \fB/etc/passwd\fR on the remote system.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 11n
+.rt
+The command to be executed on the specified \fIhostname\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBrsh\fR and
+\fBremsh\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
+bytes).
+.sp
+.LP
+The \fBrsh\fR and \fBremsh\fR commands are IPv6-enabled. See \fBip6\fR(7P).
+\fBIPv6\fR is not currently supported with Kerberos V5 authentication.
+.sp
+.LP
+Hostnames are given in the \fIhosts\fR database, which can be contained in the
+\fB/etc/hosts\fR file, the Internet domain name database, or both. Each host
+has one official name (the first name in the database entry) and optionally one
+or more nicknames. Official hostnames or nicknames can be given as
+\fIhostname\fR.
+.sp
+.LP
+If the name of the file from which \fBrsh\fR is executed is anything other than
+\fBrsh\fR, \fBrsh\fR takes this name as its \fIhostname\fR argument. This
+allows you to create a symbolic link to \fBrsh\fR in the name of a host which,
+when executed, invokes a remote shell on that host. By creating a directory and
+populating it with symbolic links in the names of commonly used hosts, then
+including the directory in your shell's search path, you can run \fBrsh\fR by
+typing \fIhostname\fR to your shell.
+.sp
+.LP
+If \fBrsh\fR is invoked with the basename \fBremsh\fR, \fBrsh\fR checks for the
+existence of the file \fB/usr/bin/remsh\fR. If this file exists, \fBrsh\fR
+behaves as if \fBremsh\fR is an alias for \fBrsh\fR. If \fB/usr/bin/remsh\fR
+does not exist, \fBrsh\fR behaves as if \fBremsh\fR is a host name.
+.sp
+.LP
+For the kerberized \fBrsh\fR session, each user can have a private
+authorization list in a file \fB\&.k5login\fR in their home directory. Each
+line in this file should contain a Kerberos principal name of the form
+\fIprincipal\fR/\fIinstance\fR@\fIrealm\fR. If there is a \fB~/.k5login\fR
+file, then access is granted to the account if and only if the originater user
+is authenticated to one of the principals named in the \fB~/.k5login\fR file.
+Otherwise, the originating user is granted access to the account if and only if
+the authenticated principal name of the user can be mapped to the local account
+name using the \fIauthenticated-principal-name\fR \(-> \fIlocal-user-name\fR
+mapping rules. The \fB\&.k5login\fR file (for access control) comes into play
+only when Kerberos authentication is being done.
+.sp
+.LP
+For the non-secure \fBrsh\fR session, each remote machine can have a file named
+\fB/etc/hosts.equiv\fR containing a list of trusted hostnames with which it
+shares usernames. Users with the same username on both the local and remote
+machine can run \fBrsh\fR from the machines listed in the remote machine's
+\fB/etc/hosts.equiv\fR file. Individual users can set up a similar private
+equivalence list with the file .rhosts in their home directories. Each line in
+this file contains two names: a hostname and a username separated by a space.
+The entry permits the user named username who is logged into hostname to use
+rsh to access the remote machine as the remote user. If the name of the local
+host is not found in the \fB/etc/hosts.equiv\fR file on the remote machine, and
+the local username and hostname are not found in the remote user's
+\fB\&.rhosts\fR file, then the access is denied. The hostnames listed in the
+\fB/etc/hosts.equiv\fR and \fB\&.rhosts\fR files must be the official hostnames
+listed in the \fBhosts\fR database; nicknames can not be used in either of
+these files.
+.sp
+.LP
+You cannot log in using \fBrsh\fR as a trusted user from a trusted hostname if
+the trusted user account is locked.
+.sp
+.LP
+\fBrsh\fR does not prompt for a password if access is denied on the remote
+machine unless the \fIcommand\fR argument is omitted.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing rsh to Append Files
+.sp
+.LP
+The following command appends the remote file \fBlizard.file\fR from the
+machine called \fBlizard\fR to the file called \fBexample.file\fR on the
+machine called \fBexample\fR:
+
+.sp
+.in +2
+.nf
+example% \fBrsh lizard cat lizard.file >> example.file\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command appends the file \fBlizard.file\fR on the machine called
+\fBlizard\fR to the file \fBlizard.file2\fR which also resides on the machine
+called \fBlizard\fR:
+
+.sp
+.in +2
+.nf
+example% \fBrsh lizard cat lizard.file ">>" lizard.file2\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hosts\fR\fR
+.ad
+.RS 23n
+.rt
+Internet host table
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hosts.equiv\fR\fR
+.ad
+.RS 23n
+.rt
+Trusted remote hosts and users
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 23n
+.rt
+System password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.k5login\fR\fR
+.ad
+.RS 23n
+.rt
+File containing Kerberos principals that are allowed access
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/krb5/krb5.conf\fR\fR
+.ad
+.RS 23n
+.rt
+Kerberos configuration file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBon\fR(1), \fBrlogin\fR(1), \fBssh\fR(1), \fBtelnet\fR(1), \fBvi\fR(1),
+\fBin.rshd\fR(1M), \fBhosts\fR(4), \fBhosts.equiv\fR(4), \fBkrb5.conf\fR(4),
+\fBattributes\fR(5), \fBkrb5_auth_rules\fR(5), \fBlargefile\fR(5),
+\fBip6\fR(7P)
+.SH NOTES
+.sp
+.LP
+When a system is listed in \fBhosts.equiv\fR, its security must be as good as
+local security. One insecure system listed in \fBhosts.equiv\fR can compromise
+the security of the entire system.
+.sp
+.LP
+You cannot run an interactive command (such as \fBvi\fR(1)). Use \fBrlogin\fR
+if you wish to do this.
+.sp
+.LP
+Stop signals stop the local \fBrsh\fR process only. This is arguably wrong, but
+currently hard to fix for reasons too complicated to explain here.
+.sp
+.LP
+The current local environment is not passed to the remote shell.
+.sp
+.LP
+Sometimes the \fB-n\fR option is needed for reasons that are less than obvious.
+For example, the command:
+.sp
+.in +2
+.nf
+example% \fBrsh somehost dd if=/dev/nrmt0 bs=20b | tar xvpBf \(mi\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+puts your shell into a strange state. Evidently, the \fBtar\fR process
+terminates before the \fBrsh\fR process. The \fBrsh\fR command then tries to
+write into the ``broken pipe'' and, instead of terminating neatly, proceeds to
+compete with your shell for its standard input. Invoking \fBrsh\fR with the
+\fB-n\fR option avoids such incidents.
+.sp
+.LP
+This bug occurs only when \fBrsh\fR is at the beginning of a pipeline and is
+not reading standard input. Do not use the \fB-n\fR option if \fBrsh\fR
+actually needs to read standard input. For example:
+.sp
+.in +2
+.nf
+example% \fBtar cf \(mi . | rsh sundial dd of=/dev/rmt0 obs=20b\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+does not produce the bug. If you were to use the \fB-n\fR option in a case like
+this, \fBrsh\fR would incorrectly read from \fB/dev/null\fR instead of from the
+pipe.
+.sp
+.LP
+For most purposes, \fBssh\fR(1) is preferred over \fBrsh\fR.
diff --git a/usr/src/man/man1/runat.1 b/usr/src/man/man1/runat.1
new file mode 100644
index 0000000000..795e97b688
--- /dev/null
+++ b/usr/src/man/man1/runat.1
@@ -0,0 +1,345 @@
+'\" te
+.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH runat 1 "22 Jun 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+runat \- execute command in extended attribute name space
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/runat\fR \fIfile\fR [\fIcommand\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrunat\fR utility is used to execute shell commands in a file's hidden
+attribute directory. Effectively, this utility changes the current working
+directory to be the hidden attribute directory associated with the file
+argument and then executes the specified command in the bourne shell
+(\fB/bin/sh\fR). If no command argument is provided, an interactive shell is
+spawned. The environment variable $\fBSHELL\fR defines the shell to be spawned.
+If this variable is undefined, the default shell, \fB/bin/sh\fR, is used.
+.sp
+.LP
+The file argument can be any file, including a directory, that can support
+extended attributes. It is not necessary that this file have any attributes, or
+be prepared in any way, before invoking the \fBrunat\fR command.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 12n
+.rt
+Any file, including a directory, that can support extended attributes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR \fR
+.ad
+.RS 12n
+.rt
+The command to be executed in an attribute directory.
+.RE
+
+.SH ERRORS
+.sp
+.LP
+A non-zero exit status will be returned if \fBrunat\fR cannot access the
+\fIfile\fR argument, or the \fIfile\fR argument does not support extended
+attributes.
+.SH USAGE
+.sp
+.LP
+See \fBfsattr\fR(5) for a detailed description of extended file attributes.
+.sp
+.LP
+The process context created by the \fBrunat\fR command has its current working
+directory set to the hidden directory containing the file's extended
+attributes. The parent of this directory (the "\fB\&..\fR" entry) always refers
+to the file provided on the command line. As such, it may not be a directory.
+Therefore, commands (such as \fBpwd\fR) that depend upon the parent entry being
+well-formed (that is, referring to a directory) may fail.
+.sp
+.LP
+In the absence of the \fIcommand\fR argument, \fBrunat\fR will spawn a new
+interactive shell with its current working directory set to be the provided
+file's hidden attribute directory. Notice that some shells (such as \fBzsh\fR
+and \fBtcsh\fR) are not well behaved when the directory parent is not a
+directory, as described above. These shells should not be used with
+\fBrunat\fR.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing runat to list extended attributes on a file
+.sp
+.in +2
+.nf
+example% \fBrunat file.1 ls -l\fR
+example% \fBrunat file.1 ls\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRCreating extended attributes
+.sp
+.in +2
+.nf
+example% \fBrunat file.2 cp /tmp/attrdata attr.1\fR
+example% \fBrunat file.2 cat /tmp/attrdata > attr.1\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRCopying an attribute from one file to another
+.sp
+.in +2
+.nf
+example% \fBrunat file.2 cat attr.1 | runat file.1 "cat > attr.1"\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRUsing runat to spawn an interactive shell
+.sp
+.in +2
+.nf
+example% \fBrunat file.3 /bin/sh\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This spawns a new shell in the attribute directory for \fBfile.3\fR. Notice
+that the shell will not be able to determine what your current directory is. To
+leave the attribute directory, either exit the spawned shell or change
+directory (\fBcd\fR) using an absolute path.
+
+.sp
+.LP
+Recommended methods for performing basic attribute operations:
+
+.sp
+.ne 2
+.mk
+.na
+\fBdisplay\fR
+.ad
+.RS 22n
+.rt
+\fBrunat \fIfile\fR ls [\fIoptions\fR]\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread\fR
+.ad
+.RS 22n
+.rt
+\fBrunat \fIfile\fR cat \fIattribute\fR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBcreate/modify\fR
+.ad
+.RS 22n
+.rt
+\fBrunat \fIfile\fR cp \fIabsolute-file-path\fR \fIattribute\fR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBdelete\fR
+.ad
+.RS 22n
+.rt
+\fBrunat \fIfile\fR rm \fIattribute\fR\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpermission changes\fR
+.ad
+.RS 22n
+.rt
+.sp
+.in +2
+.nf
+\fBrunat \fIfile\fR chmod \fImode attribute\fR
+runat \fIfile\fR chgrp \fIgroup attribute\fR
+runat \fIfile\fR chown \fIowner attribute\fR\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBinteractive shell\fR
+.ad
+.RS 22n
+.rt
+.LP
+.nf
+\fBrunat \fIfile\fR /bin/sh\fR or set your $SHELL to /bin/sh and \fBrunat \fIfile\fR\fR
+.fi
+
+.RE
+
+.sp
+.LP
+The above list includes commands that are known to work with \fBrunat\fR. While
+many other commands may work, there is no guarantee that any beyond this list
+will work. Any command that relies on being able to determine its current
+working directory is likely to fail. Examples of such commands follow:
+.LP
+\fBExample 5 \fRUsing man in an attribute directory
+.sp
+.in +2
+.nf
+example% \fBrunat file.1 man runat\fR
+>getcwd: Not a directory
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRSpawning a tcsh shell in an attribute directory
+.sp
+.in +2
+.nf
+example% \fBrunat file.3 /usr/bin/tcsh\fR
+tcsh: Not a directory
+tcsh: Trying to start from "/home/\fIuser\fR"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+A new tcsh shell has been spawned with the current working directory set to the
+user's home directory.
+
+.LP
+\fBExample 7 \fRSpawning a zsh shell in an attribute directory
+.sp
+.in +2
+.nf
+example% \fBrunat file.3 /usr/bin/zsh\fR
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+While the command appears to have worked, \fBzsh\fR has actually just changed
+the current working directory to '/'. This can be seen by using \fB/bin/pwd\fR:
+
+.sp
+.in +2
+.nf
+example% \fB/bin/pwd\fR
+/
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 9n
+.rt
+Specifies the command shell to be invoked by \fBrunat\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB125\fR \fR
+.ad
+.RS 8n
+.rt
+The attribute directory of the file referenced by the \fIfile\fR argument
+cannot be accessed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR \fR
+.ad
+.RS 8n
+.rt
+The exec of the provided \fIcommand\fR argument failed.
+.RE
+
+.sp
+.LP
+Otherwise, the exit status returned is the exit status of the shell invoked to
+execute the provided command.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBopen\fR(2), \fBattributes\fR(5), \fBfsattr\fR(5)
+.SH NOTES
+.sp
+.LP
+It is not always obvious why a command fails in \fBrunat\fR when it is unable
+to determine the current working directory. The errors resulting can be
+confusing and ambiguous (see the \fBtcsh\fR and \fBzsh\fR examples above).
diff --git a/usr/src/man/man1/rup.1 b/usr/src/man/man1/rup.1
new file mode 100644
index 0000000000..a123607aba
--- /dev/null
+++ b/usr/src/man/man1/rup.1
@@ -0,0 +1,85 @@
+'\" te
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rup 1 "7 Mar 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+rup \- show host status of remote machines (RPC version)
+.SH SYNOPSIS
+.LP
+.nf
+\fBrup\fR [\fB-hlt\fR]
+.fi
+
+.LP
+.nf
+\fBrup\fR [\fIhost\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBrup\fR gives a status similar to \fBuptime\fR for remote machines. It
+broadcasts on the local network, and displays the responses it receives.
+.sp
+.LP
+Normally, the listing is in the order that responses are received, but this
+order can be changed by specifying one of the options listed below.
+.sp
+.LP
+When \fIhost\fR arguments are given, rather than broadcasting \fBrup\fR will
+only query the list of specified hosts.
+.sp
+.LP
+A remote host will only respond if it is running the \fBrstatd\fR daemon, which
+is normally started up from \fBinetd\fR(1M).
+.sp
+.LP
+In the absence of a name service, such as LDAP or NIS, \fBrup\fR displays host
+names as numeric IP addresses.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Sort the display alphabetically by host name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Sort the display by load average.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Sort the display by up time.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBruptime\fR(1), \fBinetd\fR(1M), \fBattributes\fR(5)
+.sp
+.LP
+\fISolaris Express Installation Guide: Basic Installations\fR
+.SH BUGS
+.sp
+.LP
+Broadcasting does not work through gateways.
diff --git a/usr/src/man/man1/ruptime.1 b/usr/src/man/man1/ruptime.1
new file mode 100644
index 0000000000..fdcc81ed02
--- /dev/null
+++ b/usr/src/man/man1/ruptime.1
@@ -0,0 +1,118 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ruptime 1 "6 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+ruptime \- show host status of local machines
+.SH SYNOPSIS
+.LP
+.nf
+\fBruptime\fR [\fB-ar\fR] [\fB-l\fR | \fB-t\fR | \fB-u\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBruptime\fR utility gives a status line like \fBuptime\fR (see
+\fBuptime\fR(1)) for each machine on the local network; these are formed from
+packets broadcast by each host on the network approximately every three
+minutes.
+.sp
+.LP
+Machines for which no status report has been received for 11 minutes are shown
+as being down.
+.sp
+.LP
+Normally, the listing is sorted by host name, but this order can be changed by
+specifying one of the options listed below.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 16n
+.rt
+Counts even those users who have been idle for an hour or more.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 16n
+.rt
+Reverses the sorting order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR | \fB-t\fR | \fB-u\fR\fR
+.ad
+.RS 16n
+.rt
+These options are mutually exclusive. The use of one overrides the previous
+one(s).
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Sorts the display by load average.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Sorts the display by up time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Sorts the display by number of users.
+.RE
+
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/rwho/whod.*\fR\fR
+.ad
+.RS 26n
+.rt
+data files
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBuptime\fR(1), \fBrwho\fR(1), \fBin.rwhod\fR(1M), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/rusers.1 b/usr/src/man/man1/rusers.1
new file mode 100644
index 0000000000..1549ffb0df
--- /dev/null
+++ b/usr/src/man/man1/rusers.1
@@ -0,0 +1,107 @@
+'\" te
+.\" Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rusers 1 "7 Mar 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+rusers \- who is logged in on remote machines
+.SH SYNOPSIS
+.LP
+.nf
+\fBrusers\fR [\fB-ahilu\fR] \fIhost\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrusers\fR command produces output similar to \fBwho\fR(1), but for
+remote machines. The listing is in the order that responses are received, but
+this order can be changed by specifying one of the options listed below.
+.sp
+.LP
+The default is to print out the names of the users logged in. When the \fB-l\fR
+flag is given, additional information is printed for each user:
+.sp
+.in +2
+.nf
+\fIuserid hostname\fR\fB:\fR\fIterminal login_date login_time idle_time login_host\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If \fIhostname\fR and \fIlogin\fR \fIhost\fR are the same value, the
+\fIlogin_host\fR field is not displayed. Likewise, if \fIhostname\fR is not
+idle, the \fIidle_time\fR is not displayed.
+.sp
+.LP
+A remote host will only respond if it is running the \fBrusersd\fR daemon,
+which may be started up from \fBinetd\fR(1M) or \fBlisten\fR(1M).
+.sp
+.LP
+In the absence of a name service, such as LDAP or NIS, \fBrusers\fR displays
+host names as numeric IP addresses.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Give a report for a machine even if no users are logged on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Sort alphabetically by host name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Sort by idle time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Give a longer listing in the style of \fBwho\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Sort by number of users.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBwho\fR(1), \fBinetd\fR(1M), \fBlisten\fR(1M), \fBpmadm\fR(1M),
+\fBsacadm\fR(1M), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/rwho.1 b/usr/src/man/man1/rwho.1
new file mode 100644
index 0000000000..5083de256b
--- /dev/null
+++ b/usr/src/man/man1/rwho.1
@@ -0,0 +1,73 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH rwho 1 "6 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+rwho \- who is logged in on local machines
+.SH SYNOPSIS
+.LP
+.nf
+\fBrwho\fR [\fB-a\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBrwho\fR command produces output similar to \fBwho\fR(1), but for all
+machines on your network. If no report has been received from a machine for 5
+minutes, \fBrwho\fR assumes the machine is down, and does not report users last
+known to be logged into that machine.
+.sp
+.LP
+If a user has not typed to the system for a minute or more, \fBrwho\fR reports
+this idle time. If a user has not typed to the system for an hour or more, the
+user is omitted from the output of \fBrwho\fR unless the \fB-a\fR flag is
+given.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Report all users whether or not they have typed to the system in the past hour.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/rwho/whod.*\fR\fR
+.ad
+.RS 26n
+.rt
+information about other machines
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBfinger\fR(1), \fBruptime\fR(1), \fBwho\fR(1), \fBin.rwhod\fR(1M),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBrwho\fR does not work through gateways.
+.sp
+.LP
+The directory \fB/var/spool/rwho\fR must exist on the host from which
+\fBrwho\fR is run.
+.sp
+.LP
+This service takes up progressively more network bandwith as the number of
+hosts on the local net increases. For large networks, the cost becomes
+prohibitive.
+.sp
+.LP
+The \fBrwho\fR service daemon, \fBin.rwhod\fR(1M), must be enabled for this
+command to return useful results.
diff --git a/usr/src/man/man1/sar.1 b/usr/src/man/man1/sar.1
new file mode 100644
index 0000000000..c5f4ae5444
--- /dev/null
+++ b/usr/src/man/man1/sar.1
@@ -0,0 +1,796 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sar 1 "24 Jul 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+sar \- system activity reporter
+.SH SYNOPSIS
+.LP
+.nf
+\fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-o\fR \fIfilename\fR] \fIt\fR [\fIn\fR]
+.fi
+
+.LP
+.nf
+\fBsar\fR [\fB-aAbcdgkmpqruvwy\fR] [\fB-e\fR \fItime\fR] [\fB-f\fR \fIfilename\fR] [\fB-i\fR \fIsec\fR]
+ [\fB-s\fR \fItime\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+In the first instance, the \fBsar\fR utility samples cumulative activity
+counters in the operating system at \fIn\fR intervals of \fIt\fR seconds, where
+\fIt\fR should be \fB5\fR or greater. If \fIt\fR is specified with more than
+one option, all headers are printed together and the output can be difficult to
+read. (If the sampling interval is less than \fB5\fR, the activity of \fBsar\fR
+itself can affect the sample.) If the \fB-o\fR option is specified, it saves
+the samples in \fIfilename\fR in binary format. The default value of \fIn\fR is
+\fB1\fR.
+.sp
+.LP
+In the second instance, no sampling interval is specified. \fBsar\fR extracts
+data from a previously recorded \fIfilename\fR, either the one specified by the
+\fB-f\fR option or, by default, the standard system activity daily data file
+\fB/var/adm/sa/sa\fIdd\fR\fR for the current day \fIdd\fR. The starting and
+ending times of the report can be bounded using the \fB-e\fR and \fB-s\fR
+arguments with \fItime\fR specified in the form \fIhh\fR[:\fImm\fR[:\fIss\fR]].
+The \fB-i\fR option selects records at \fIsec\fR second intervals. Otherwise,
+all intervals found in the data file are reported.
+.SH OPTIONS
+.sp
+.LP
+The following options modify the subsets of information reported by \fBsar\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Reports use of file access system routines: iget/s, namei/s, dirblk/s
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 15n
+.rt
+Reports all data. Equivalent to \fB-abcdgkmpqruvwy\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 15n
+.rt
+Reports buffer activity:
+.sp
+.ne 2
+.mk
+.na
+\fBbread/s, bwrit/s\fR
+.ad
+.RS 20n
+.rt
+transfers per second of data between system buffers and disk or other block
+devices.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBlread/s, lwrit/s\fR
+.ad
+.RS 20n
+.rt
+accesses of system buffers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%rcache, %wcache\fR
+.ad
+.RS 20n
+.rt
+cache hit ratios, that is, (1\(mibread/lread) as a percentage.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpread/s, pwrit/s\fR
+.ad
+.RS 20n
+.rt
+transfers using raw (physical) device mechanism.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 15n
+.rt
+Reports system calls:
+.sp
+.ne 2
+.mk
+.na
+\fBscall/s\fR
+.ad
+.sp .6
+.RS 4n
+system calls of all types.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBsread/s, swrit/s, fork/s, exec/s\fR
+.ad
+.sp .6
+.RS 4n
+specific system calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBrchar/s, wchar/s\fR
+.ad
+.sp .6
+.RS 4n
+characters transferred by read and write system calls. No incoming or outgoing
+\fBexec\fR(2) and \fBfork\fR(2) calls are reported.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 15n
+.rt
+Reports activity for each block device (for example, disk or tape drive) with
+the exception of \fBXDC\fR disks and tape drives. When data is displayed, the
+device specification \fIdsk-\fR is generally used to represent a disk drive.
+The device specification used to represent a tape drive is machine dependent.
+The activity data reported is:
+.sp
+.ne 2
+.mk
+.na
+\fB%busy, avque\fR
+.ad
+.RS 27n
+.rt
+portion of time device was busy servicing a transfer request, average number of
+requests outstanding during that time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBread/s, write/s, blks/s\fR
+.ad
+.RS 27n
+.rt
+number of read/write transfers from or to device, number of bytes transferred
+in 512-byte units.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBavwait\fR
+.ad
+.RS 27n
+.rt
+average wait time in milliseconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBavserv\fR
+.ad
+.RS 27n
+.rt
+average service time in milliseconds.
+.RE
+
+For more general system statistics, use \fBiostat\fR(1M), \fBsar\fR(1M), or
+\fBvmstat\fR(1M).
+.sp
+See \fISystem Administration Guide: Advanced Administration\fR for naming
+conventions for disks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fItime\fR\fR
+.ad
+.RS 15n
+.rt
+Selects data up to \fBtime\fR. Default is \fB18:00\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+Uses \fIfilename\fR as the data source for \fBsar\fR. Default is the current
+daily data file \fB/var/adm/sa/sa\fR\fIdd.\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 15n
+.rt
+Reports paging activities:
+.sp
+.ne 2
+.mk
+.na
+\fBpgout/s\fR
+.ad
+.RS 12n
+.rt
+page-out requests per second.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBppgout/s\fR
+.ad
+.RS 12n
+.rt
+pages paged-out per second.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpgfree/s\fR
+.ad
+.RS 12n
+.rt
+pages per second placed on the free list by the page stealing daemon.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpgscan/s\fR
+.ad
+.RS 12n
+.rt
+pages per second scanned by the page stealing daemon.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB%ufs_ipf\fR
+.ad
+.RS 12n
+.rt
+the percentage of \fBUFS\fR inodes taken off the freelist by iget which had
+reusable pages associated with them. These pages are flushed and cannot be
+reclaimed by processes. Thus, this is the percentage of igets with page
+flushes.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIsec\fR\fR
+.ad
+.RS 15n
+.rt
+Selects data at intervals as close as possible to \fIsec\fR seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 15n
+.rt
+Reports kernel memory allocation (KMA) activities:
+.sp
+.ne 2
+.mk
+.na
+\fBsml_mem, alloc, fail\fR
+.ad
+.RS 24n
+.rt
+information about the memory pool reserving and allocating space for small
+requests: the amount of memory in bytes \fBKMA\fR has for the small pool, the
+number of bytes allocated to satisfy requests for small amounts of memory, and
+the number of requests for small amounts of memory that were not satisfied
+(failed).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBlg_mem, alloc, fail\fR
+.ad
+.RS 24n
+.rt
+information for the large memory pool (analogous to the information for the
+small memory pool).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBovsz_alloc, fail\fR
+.ad
+.RS 24n
+.rt
+the amount of memory allocated for oversize requests and the number of oversize
+requests which could not be satisfied (because oversized memory is allocated
+dynamically, there is not a pool).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 15n
+.rt
+Reports message and semaphore activities:
+.sp
+.ne 2
+.mk
+.na
+\fBmsg/s, sema/s\fR
+.ad
+.RS 17n
+.rt
+primitives per second.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+Saves samples in file, \fIfilename\fR, in binary format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 15n
+.rt
+Reports paging activities:
+.sp
+.ne 2
+.mk
+.na
+\fBatch/s\fR
+.ad
+.RS 11n
+.rt
+page faults per second that are satisfied by reclaiming a page currently in
+memory (attaches per second).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpgin/s\fR
+.ad
+.RS 11n
+.rt
+page-in requests per second.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBppgin/s\fR
+.ad
+.RS 11n
+.rt
+pages paged-in per second.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpflt/s\fR
+.ad
+.RS 11n
+.rt
+page faults from protection errors per second (illegal access to page) or
+"copy-on-writes".
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBvflt/s\fR
+.ad
+.RS 11n
+.rt
+address translation page faults per second (valid page not in memory).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBslock/s\fR
+.ad
+.RS 11n
+.rt
+faults per second caused by software lock requests requiring physical
+\fBI/O\fR.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 15n
+.rt
+Reports average queue length while occupied, and percent of time occupied:
+.sp
+.ne 2
+.mk
+.na
+\fBrunq-sz, %runocc\fR
+.ad
+.RS 20n
+.rt
+Run queue of kernel threads in memory and runnable
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBswpq-sz, %swpocc\fR
+.ad
+.RS 20n
+.rt
+Swap queue of processes
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 15n
+.rt
+Reports unused memory pages and disk blocks:
+.sp
+.ne 2
+.mk
+.na
+\fBfreemem\fR
+.ad
+.RS 12n
+.rt
+average pages available to user processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBfreeswap\fR
+.ad
+.RS 12n
+.rt
+disk blocks available for page swapping.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fItime\fR\fR
+.ad
+.RS 15n
+.rt
+Selects data later than \fBtime\fR in the form \fIhh\fR[:\fImm\fR]. Default is
+\fB08:00\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 15n
+.rt
+Reports \fBCPU\fR utilization (the default):
+.sp
+.ne 2
+.mk
+.na
+\fB%usr, %sys, %wio, %idle\fR
+.ad
+.RS 27n
+.rt
+portion of time running in user mode, running in system mode, idle with some
+process waiting for block \fBI/O\fR, and otherwise idle.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 15n
+.rt
+Reports status of process, i-node, file tables:
+.sp
+.ne 2
+.mk
+.na
+\fBproc-sz, inod-sz, file-sz, lock-sz\fR
+.ad
+.sp .6
+.RS 4n
+entries/size for each table, evaluated once at sampling point.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBov\fR
+.ad
+.sp .6
+.RS 4n
+overflows that occur between sampling points for each table.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 15n
+.rt
+Reports system swapping and switching activity:
+.sp
+.ne 2
+.mk
+.na
+\fBswpin/s, swpot/s, bswin/s, bswot/s\fR
+.ad
+.sp .6
+.RS 4n
+number of transfers and number of 512-byte units transferred for swapins and
+swapouts (including initial loading of some programs).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpswch/s\fR
+.ad
+.sp .6
+.RS 4n
+process switches.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 15n
+.rt
+Reports TTY device activity:
+.sp
+.ne 2
+.mk
+.na
+\fBrawch/s, canch/s, outch/s\fR
+.ad
+.RS 29n
+.rt
+input character rate, input character rate processed by canon, output character
+rate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBrcvin/s, xmtin/s, mdmin/s\fR
+.ad
+.RS 29n
+.rt
+receive, transmit and modem interrupt rates.
+.RE
+
+If run in a non-global zone and the pools facility is active, these values
+reflect activity on the processors of the processor set of the pool to which
+the zone is bound.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRViewing System Activity
+.sp
+.LP
+The following example displays today's \fBCPU\fR activity so far:
+
+.sp
+.in +2
+.nf
+example% sar
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRWatching System Activity Evolve
+.sp
+.LP
+To watch \fBCPU\fR activity evolve for 10 minutes and save data:
+
+.sp
+.in +2
+.nf
+example% sar -o temp 60 10
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRReviewing Disk and Tape Activity
+.sp
+.LP
+To later review disk and tape activity from that period:
+
+.sp
+.in +2
+.nf
+example% sar -d -f temp
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/sa/sa\fIdd\fR\fR\fR
+.ad
+.RS 20n
+.rt
+daily data file, where \fIdd\fR are digits representing the day of the month
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsag\fR(1), \fBiostat\fR(1M), \fBsar\fR(1M), \fBvmstat\fR(1M), \fBexec\fR(2),
+\fBfork\fR(2), \fBattributes\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Advanced Administration\fR
+.SH NOTES
+.sp
+.LP
+The sum of CPU utilization might vary slightly from 100 because of rounding
+errors in the production of a percentage figure.
diff --git a/usr/src/man/man1/scp.1 b/usr/src/man/man1/scp.1
new file mode 100644
index 0000000000..d065f4d7b4
--- /dev/null
+++ b/usr/src/man/man1/scp.1
@@ -0,0 +1,278 @@
+'\" te
+.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
+.\" installed location.
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.TH scp 1 "22 Jun 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+scp \- secure copy (remote file copy program)
+.SH SYNOPSIS
+.LP
+.nf
+\fBscp\fR [\fB-pqrvBC46\fR] [\fB-F\fR \fIssh_config\fR] [\fB-S\fR \fIprogram\fR] [\fB-P\fR \fIport\fR]
+ [\fB-c\fR \fIcipher\fR] [\fB-i\fR \fIidentity_file\fR] [\fB-o\fR \fIssh_option\fR]
+ [ [\fIuser\fR@]\fIhost1\fR:]\fIfile1\fR []... [ [\fIuser\fR@]\fIhost2\fR:]\fIfile2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBscp\fR utility copies files between hosts on a network. It uses
+\fBssh\fR(1) for data transfer, and uses the same authentication and provides
+the same security as \fBssh\fR(1). Unlike \fBrcp\fR(1), \fBscp\fR will ask for
+passwords or passphrases if they are needed for authentication.
+.sp
+.LP
+Any file name may contain a host and user specification to indicate that the
+file is to be copied to/from that host. Copies between two remote hosts are
+permitted.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-4\fR\fR
+.ad
+.RS 20n
+.rt
+Forces \fBscp\fR to use IPv4 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-6\fR\fR
+.ad
+.RS 20n
+.rt
+Forces \fBscp\fR to use IPv6 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 20n
+.rt
+Selects batch mode. (Prevents asking for passwords or passphrases.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcipher\fR\fR
+.ad
+.RS 20n
+.rt
+Selects the cipher to use for encrypting the data transfer. This option is
+directly passed to \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 20n
+.rt
+Compression enable. Passes the \fB-C\fR flag to \fBssh\fR(1) to enable
+compression.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIssh_config\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies an alternative per-user configuration file for \fBssh\fR(1.).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIidentity_file\fR\fR
+.ad
+.RS 20n
+.rt
+Selects the file from which the identity (private key) for \fBRSA\fR
+authentication is read. This option is directly passed to \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIssh_option\fR\fR
+.ad
+.RS 20n
+.rt
+The given option is directly passed to \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 20n
+.rt
+Preserves modification times, access times, and modes from the original file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIport\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the port to connect to on the remote host. Notice that this option is
+written with a capital `P', because \fB-p\fR is already reserved for preserving
+the times and modes of the file in \fBrcp\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 20n
+.rt
+Disables the progress meter.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 20n
+.rt
+Recursively copies entire directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIprogram\fR\fR
+.ad
+.RS 20n
+.rt
+Specifies the name of the program to use for the encrypted connection. The
+program must understand \fBssh\fR(1) options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 20n
+.rt
+Verbose mode. Causes \fBscp\fR and \fBssh\fR(1) to print debugging messages
+about their progress. This is helpful in debugging connection, authentication,
+and configuration problems.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhost1, host2,\fR...\fR
+.ad
+.RS 20n
+.rt
+The name(s) of the host from or to which the file is to be copied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1, file2,\fR...\fR
+.ad
+.RS 20n
+.rt
+The file(s) to be copied.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBrcp\fR(1), \fBssh\fR(1), \fBssh-add\fR(1), \fBssh-agent\fR(1),
+\fBssh-keygen\fR(1), \fBsshd\fR(1M), \fBssh_config\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+Generally, use of \fBscp\fR with password or keyboard-interactive
+authentication method and two remote hosts does not work. It does work with
+either the \fBpubkey\fR, \fBhostbased\fR or \fBgssapi-keyex\fR authentication
+method. For the \fBpubkey\fR authentication method, either private keys not
+protected by a passphrase, or an explicit \fBssh\fR agent forwarding have to
+be used. The \fBgssapi-keyex\fR authentication method works with the
+\fBkerberos_v5\fR GSS-API mechanism, but only if the
+\fBGSSAPIDelegateCredentials\fR option is enabled.
diff --git a/usr/src/man/man1/script.1 b/usr/src/man/man1/script.1
new file mode 100644
index 0000000000..e7f655998f
--- /dev/null
+++ b/usr/src/man/man1/script.1
@@ -0,0 +1,73 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH script 1 "30 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+script \- make record of a terminal session
+.SH SYNOPSIS
+.LP
+.nf
+\fBscript\fR [\fB-a\fR] [\fIfilename\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBscript\fR utility makes a record of everything printed on your screen.
+The record is written to \fIfilename\fR. If no file name is given, the record
+is saved in the file \fBtypescript\fR. See WARNINGS.
+.sp
+.LP
+The \fBscript\fR command forks and creates a sub-shell, according to the value
+of \fB$SHELL\fR, and records the text from this session. The script ends when
+the forked shell exits or when Control-d is typed.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Appends the session record to \fIfilename\fR, rather than overwriting it.
+.RE
+
+.SH NOTES
+.sp
+.LP
+\fBscript\fR places everything that appears on the screen in \fIfilename\fR,
+including prompts.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
+.SH WARNINGS
+.sp
+.LP
+\fBscript\fR can pose a security risk when used in directories that are
+writable by other users (for example, \fB/tmp\fR), especially when run by a
+privileged user, that is, root. Be sure that \fBtypescript\fR is not a link
+before running \fBscript\fR.
diff --git a/usr/src/man/man1/sdiff.1 b/usr/src/man/man1/sdiff.1
new file mode 100644
index 0000000000..d4804e0af8
--- /dev/null
+++ b/usr/src/man/man1/sdiff.1
@@ -0,0 +1,246 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sdiff 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+sdiff \- print differences between two files side-by-side
+.SH SYNOPSIS
+.LP
+.nf
+\fBsdiff\fR [\fB-l\fR] [\fB-s\fR] [\fB-o\fR \fIoutput\fR] [\fB-w\fR \fIn\fR] \fIfilename1\fR \fIfilename2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsdiff\fR uses the output of the \fBdiff\fR command to produce a side-by-side
+listing of two files indicating lines that are different. Lines of the two
+files are printed with a blank gutter between them if the lines are identical,
+a \fB<\fR in the gutter if the line appears only in \fIfilename1\fR, a \fB>\fR
+in the gutter if the line appears only in \fIfilename2\fR, and a \fB|\fR for
+lines that are different. (See the \fBEXAMPLES\fR section below.)
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 14n
+.rt
+Print only the left side of any lines that are identical.to
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 14n
+.rt
+Do not print identical lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI output\fR \fR
+.ad
+.RS 14n
+.rt
+Use the argument \fIoutput\fR as the name of a third file that is created as a
+user-controlled merge of \fIfilename1\fR and \fIfilename2\fR. Identical lines
+of \fIfilename1\fR and \fIfilename2\fR are copied to \fIoutput\fR. Sets of
+differences, as produced by \fBdiff\fR, are printed; where a set of differences
+share a common gutter character. After printing each set of differences,
+\fBsdiff\fR prompts the user with a \fB%\fR and waits for one of the following
+user-typed commands:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.RS 7n
+.rt
+Append the left column to the output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.RS 7n
+.rt
+Append the right column to the output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBs\fR\fR
+.ad
+.RS 7n
+.rt
+Turn on silent mode; do not print identical lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fR\fR
+.ad
+.RS 7n
+.rt
+Turn off silent mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe l\fR\fR
+.ad
+.RS 7n
+.rt
+Call the editor with the left column.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe r\fR\fR
+.ad
+.RS 7n
+.rt
+Call the editor with the right column.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe b\fR\fR
+.ad
+.RS 7n
+.rt
+Call the editor with the concatenation of left and right.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.RS 7n
+.rt
+Call the editor with a zero length file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.RS 7n
+.rt
+Exit from the program.
+.RE
+
+On exit from the editor, the resulting file is concatenated to the end of the
+\fIoutput\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fI n\fR \fR
+.ad
+.RS 14n
+.rt
+Use the argument \fIn\fR as the width of the output line. The default line
+length is 130 characters.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBsdiff\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example of the \fBsdiff\fR command.
+.sp
+.LP
+A sample output of \fBsdiff\fR follows.
+
+.sp
+.in +2
+.nf
+x | y
+a a
+b <
+c <
+d d
+ > c
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+If any of the \fBLC_*\fR variables ( \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+\fBLC_TIME\fR, \fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR ) (see
+\fBenviron\fR(5)) are not set in the environment, the operational behavior of
+\fBsdiff\fR for each corresponding locale category is determined by the value
+of the \fBLANG\fR environment variable. If \fBLC_ALL\fR is set, its contents
+are used to override both the \fBLANG\fR and the other \fBLC_*\fR variables.
+If none of the above variables is set in the environment, the "C" locale
+determines how \fBsdiff\fR behaves.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR \fR
+.ad
+.RS 13n
+.rt
+Determines how \fBsdiff\fR handles characters. When \fBLC_CTYPE\fR is set to a
+valid value, \fBsdiff\fR can display and handle text and filenames containing
+valid characters for that locale.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+lw(2.75i) lw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+\fBATTRIBUTE TYPE\fR\fBATTRIBUTE VALUE\fR
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdiff\fR(1), \fBed\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5)
diff --git a/usr/src/man/man1/sed.1 b/usr/src/man/man1/sed.1
new file mode 100644
index 0000000000..3b69a70403
--- /dev/null
+++ b/usr/src/man/man1/sed.1
@@ -0,0 +1,545 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sed 1 "23 Jul 1998" "SunOS 5.11" "User Commands"
+.SH NAME
+sed \- stream editor
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/sed\fR [\fB-n\fR] \fIscript\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/bin/sed\fR [\fB-n\fR] [\fB-e\fR \fIscript\fR]... [\fB-f\fR \fIscript_file\fR]...
+ [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/sed\fR [\fB-n\fR] \fIscript\fR [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/sed\fR [\fB-n\fR] [\fB-e\fR \fIscript\fR]... [\fB-f\fR \fIscript_file\fR]...
+ [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsed\fR utility is a stream editor that reads one or more text files,
+makes editing changes according to a script of editing commands, and writes the
+results to standard output. The script is obtained from either the \fIscript\fR
+operand string, or a combination of the option-arguments from the \fB-e\fR
+\fIscript\fR and \fB-f\fR \fIscript_file\fR options.
+.sp
+.LP
+The \fBsed\fR utility is a text editor. It cannot edit binary files or files
+containing ASCII NUL (\e0) characters or very long lines.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIscript\fR \fR
+.ad
+.RS 19n
+.rt
+\fIscript\fR is an edit command for \fBsed\fR. See USAGE below for more
+information on the format of \fIscript\fR. If there is just one \fB-e\fR option
+and no \fB-f\fR options, the flag \fB-e\fR may be omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIscript_file\fR \fR
+.ad
+.RS 19n
+.rt
+Takes the script from \fIscript_file\fR. \fIscript_file\fR consists of editing
+commands, one per line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fR
+.ad
+.RS 19n
+.rt
+Suppresses the default output.
+.RE
+
+.sp
+.LP
+Multiple \fB-e\fR and \fB-f\fR options may be specified. All commands are added
+to the script in the order specified, regardless of their origin.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 11n
+.rt
+A path name of a file whose contents will be read and edited. If multiple
+\fIfile\fR operands are specified, the named files will be read in the order
+specified and the concatenation will be edited. If no \fIfile\fR operands are
+specified, the standard input will be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIscript\fR \fR
+.ad
+.RS 11n
+.rt
+A string to be used as the script of editing commands. The application must not
+present a \fIscript\fR that violates the restrictions of a text file except
+that the final character need not be a \fBNEWLINE\fR character.
+.RE
+
+.SH USAGE
+.sp
+.LP
+A script consists of editing commands, one per line, of the following form:
+.sp
+.LP
+[ \|\fIaddress\fR \|[ \|, \|\fIaddress\fR \|] \|] \|\fIcommand\fR \|[
+\|\fIarguments\fR \|]
+.sp
+.LP
+Zero or more blank characters are accepted before the first address and before
+\fIcommand\fR. Any number of semicolons are accepted before the first address.
+.sp
+.LP
+In normal operation, \fBsed\fR cyclically copies a line of input (less its
+terminating \fBNEWLINE\fR character) into a \fIpattern space\fR (unless there
+is something left after a \fBD\fR command), applies in sequence all commands
+whose \fIaddresses\fR select that pattern space, and copies the resulting
+pattern space to the standard output (except under \fB-n\fR) and deletes the
+pattern space. Whenever the pattern space is written to standard output or a
+named file, \fBsed\fR will immediately follow it with a \fINEWLINE\fR
+character.
+.sp
+.LP
+Some of the commands use a \fIhold space\fR to save all or part of the
+\fIpattern space\fR for subsequent retrieval. The \fIpattern\fR and \fIhold
+spaces\fR will each be able to hold at least \fB8192\fR bytes.
+.SS "sed Addresses"
+.sp
+.LP
+An \fIaddress\fR is either empty, a decimal number that counts input lines
+cumulatively across files, a \fB$\fR that addresses the last line of input, or
+a context address, which consists of a \fB/\fR\fIregular expression\fR\fB/\fR
+as described on the \fBregexp\fR(5) manual page.
+.sp
+.LP
+A command line with no addresses selects every pattern space.
+.sp
+.LP
+A command line with one address selects each pattern space that matches the
+address.
+.sp
+.LP
+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 address. Thereafter the process is repeated, looking
+again for the first address. (If the second address is a number less than or
+equal to the line number selected by the first address, only the line
+corresponding to the first address is selected.)
+.sp
+.LP
+Typically, address are separated from each other by a comma (,). They may also
+be separated by a semicolon (;).
+.SS "sed Regular Expressions"
+.sp
+.LP
+\fBsed\fR supports the basic regular expressions described on the
+\fBregexp\fR(5) manual page, with the following additions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fI\ecREc\fR \fR
+.ad
+.RS 11n
+.rt
+In a context address, the construction \fI\ecREc\fR, where \fIc\fR is any
+character other than a backslash or \fBNEWLINE\fR character, is identical to
+/\fIRE\fR/. If the character designated by \fIc\fR appears following a
+backslash, then it is considered to be that literal character, which does not
+terminate the RE. For example, in the context address \fB\exabc\exdefx\fR, the
+second \fBx\fR stands for itself, so that the regular expression is
+\fBabcxdef\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\en\fR \fR
+.ad
+.RS 11n
+.rt
+The escape sequence \fB\en\fR matches a \fINEWLINE\fR character embedded in the
+pattern space. A literal \fBNEWLINE\fR character must not be used in the
+regular expression of a context address or in the substitute command.
+.RE
+
+.sp
+.LP
+Editing commands can be applied only to non-selected pattern spaces by use of
+the negation command \fB!\fR (described below).
+.SS "sed Editing Commands"
+.sp
+.LP
+In the following list of functions the maximum number of permissible addresses
+for each function is indicated.
+.sp
+.LP
+The \fBr\fR and \fBw\fR commands take an optional \fIrfile\fR (or \fIwfile\fR)
+parameter, separated from the command letter by one or more blank characters.
+.sp
+.LP
+Multiple commands can be specified by separating them with a semicolon
+(\fB;\fR) on the same command line.
+.sp
+.LP
+The \fItext\fR argument consists of one or more lines, all but the last of
+which end with \fB\e\fR to hide the \fBNEWLINE\fR. Each embedded \fBNEWLINE\fR
+character in the text must be preceded by a backslash. Other backslashes in
+text are removed and the following character is treated literally. Backslashes
+in text are treated like backslashes in the replacement string of an \fBs\fR
+command, and may be used to protect initial blanks and tabs against the
+stripping that is done on every script line. The \fIrfile\fR or \fIwfile\fR
+argument must terminate the command line and must be preceded by exactly one
+blank. The use of the \fIwfile\fR parameter causes that file to be initially
+created, if it does not exist, or will replace the contents of an existing
+file. There can be at most 10 distinct \fIwfile\fR arguments.
+.sp
+.LP
+Regular expressions match entire strings, not just individual lines, but a
+\fBNEWLINE\fR character is matched by \fB\en\fR in a \fBsed\fR RE. A
+\fBNEWLINE\fR character is not allowed in an RE. Also notice that \fB\en\fR
+cannot be used to match a \fBNEWLINE\fR character at the end of an input line;
+\fBNEWLINE\fR characters appear in the pattern space as a result of the \fBN\fR
+editing command.
+.sp
+.LP
+Two of the commands take a \fIcommand-list\fR, which is a list of \fBsed\fR
+commands separated by \fBNEWLINE\fR characters, as follows:
+.sp
+.in +2
+.nf
+{ \fIcommand\fR
+\fIcommand\fR
+}
+.fi
+.in -2
+
+.sp
+.LP
+The \fB{\fR can be preceded with blank characters and can be followed with
+white space. The \fIcommands\fR can be preceded by white space. The terminating
+\fB}\fR must be preceded by a \fBNEWLINE\fR character and can be preceded or
+followed by <blank>s. The braces may be preceded or followed by <blank>s. The
+command may be preceded by <blank>s, but may not be followed by <blank>s.
+.sp
+.LP
+The following table lists the functions, with the maximum number of permissible
+addresses.
+.sp
+
+.sp
+.TS
+tab() box;
+cw(.92i) |cw(1.38i) |cw(3.21i)
+lw(.92i) |lw(1.38i) |lw(3.21i)
+.
+Max AddressCommandDescription
+_
+1\fBa\e\fR \fItext\fRT{
+Append by executing \fBN\fR command or beginning a new cycle. Place \fItext\fR on the output before reading the next input line.
+T}
+_
+2\fBb\fR \fIlabel\fRT{
+Branch to the \fB:\fR command bearing the \fIlabel \fR. If \fIlabel\fR is empty, branch to the end of the script. Labels are recognized unique up to eight characters.
+T}
+_
+2\fBc\e\fR \fItext\fRT{
+Change. Delete the pattern space. Place \fItext\fR on the output. Start the next cycle.
+T}
+2\fBd\fRT{
+Delete the pattern space. Start the next cycle.
+T}
+_
+2\fBD\fRT{
+Delete the initial segment of the pattern space through the first new-line. Start the next cycle. (See the \fBN\fR command below.)
+T}
+_
+2\fBg\fRT{
+Replace the contents of the pattern space by the contents of the hold space.
+T}
+_
+2\fBG\fRT{
+Append the contents of the hold space to the pattern space.
+T}
+_
+2\fBh\fRT{
+Replace the contents of the hold space by the contents of the pattern space.
+T}
+_
+2\fBH\fRT{
+Append the contents of the pattern space to the hold space.
+T}
+_
+1\fBi\e\fR \fItext\fRT{
+Insert. Place \fItext\fR on the standard output.
+T}
+_
+2\fBl\fRT{
+\fB/usr/bin/sed\fR: List the pattern space on the standard output in an unambiguous form. Non-printable characters are displayed in octal notation and long lines are folded.
+T}
+_
+T{
+\fB/usr/xpg4/bin/sed\fR: List the pattern space on the standard output in an unambiguous form. Non-printable characters are displayed in octal notation and long lines are folded. The characters (\fB\e\e\fR, \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\er\fR, \fB\et\fR, and \fB\ev\fR) are written as the corresponding escape sequences. Non-printable characters not in that table will be written as one three-digit octal number (with a preceding backslash character) for each byte in the character (most significant byte first). If the size of a byte on the system is greater than nine bits, the format used for non-printable characters is implementation dependent.
+T}
+T{
+Long lines are folded, with the point of folding indicated by writing a backslash followed by a \fBNEWLINE\fR; the length at which folding occurs is unspecified, but should be appropriate for the output device. The end of each line is marked with a \fB$\fR.
+T}
+_
+2\fBn\fRT{
+Copy the pattern space to the standard output if default output is not suppressed. Replace the pattern space with the next line of input.
+T}
+_
+2\fBN\fRT{
+Append the next line of input to the pattern space with an embedded new-line. (The current line number changes.) If no next line of input is available, the \fBN\fR command verb shall branch to the end of the script and quit without starting a new cycle and without writing the pattern space.
+T}
+_
+2\fBp\fRT{
+Print. Copy the pattern space to the standard output.
+T}
+_
+2\fBP\fRT{
+Copy the initial segment of the pattern space through the first new-line to the standard output.
+T}
+_
+1\fBq\fRT{
+Quit. Branch to the end of the script. Do not start a new cycle.
+T}
+_
+2\fBr\fR \fIrfile\fRT{
+Read the contents of \fI rfile\fR. Place them on the output before reading the next input line. If \fIrfile\fR does not exist or cannot be read, it is treated as if it were an empty file, causing no error condition.
+T}
+_
+2\fBt\fR \fIlabel\fRT{
+Test. Branch to the \fB:\fR command bearing the \fIlabel\fR if any substitutions have been made since the most recent reading of an input line or execution of a \fBt\fR. If \fIlabel\fR is empty, branch to the end of the script.
+T}
+_
+2\fBw\fR \fIwfile\fRT{
+Write. Append the pattern space to \fIwfile\fR. The first occurrence of \fBw\fR will cause \fIwfile\fR to be cleared. Subsequent invocations of \fBw\fR will append. Each time the \fBsed\fR command is used, \fIwfile\fR is overwritten.
+T}
+_
+2\fBx\fRT{
+Exchange the contents of the pattern and hold spaces.
+T}
+_
+2\fB!\fR \fIcommand\fRT{
+Don't. Apply the \fIcommand\fR (or group, if \fIcommand\fR is \fB{\|\fR) only to lines \fInot\fR selected by the address(es).
+T}
+_
+0\fB:\fR \fIlabel\fRT{
+This command does nothing; it bears a \fIlabel\fR for \fBb\fR and \fBt\fR commands to branch to.
+T}
+_
+1\fB=\fRT{
+Place the current line number on the standard output as a line.
+T}
+_
+2\fB{\fR\fIcommand-list\fR\fB}\fRT{
+Execute \fIcommand-list\fR only when the pattern space is selected.
+T}
+0An empty command is ignored.
+_
+0\fB#\fRT{
+If a \fB#\fR appears as the first character on a line of a script file, then that entire line is treated as a comment, with one exception: if a \fB#\fR appears on the first line and the character after the \fB#\fR is an \fBn\fR, then the default output will be suppressed. The rest of the line after \fB#n\fR is also ignored. A script file must contain at least one non-comment line.
+T}
+.TE
+
+.sp
+
+.sp
+.TS
+tab() box;
+cw(.92i) |cw(4.58i)
+lw(.92i) |lw(4.58i)
+.
+Max AddrCommand (Using \fIstrings\fR) and Description
+_
+2\fBs\fR/\fIregular expression\fR/\fIreplacement\fR/\fIflags\fR
+T{
+Substitute the \fIreplacement\fR string for instances of the \fIregular expression\fR in the pattern space. Any character other than backslash or newline can be used instead of a slash to delimit the RE and the replacement. Within the RE and the replacement, the RE delimiter itself can be used as a literal character if it is preceded by a backslash.
+T}
+T{
+An ampersand (\fB&\fR) appearing in the \fIreplacement\fR will be replaced by the string matching the RE. The special meaning of \fB&\fR in this context can be suppressed by preceding it by backslash. The characters \fB\e\fR\fIn\fR, where \fIn\fR is a digit, will be replaced by the text matched by the corresponding backreference expression. For each backslash (\e) encountered in scanning \fIreplacement\fR from beginning to end, the following character loses its special meaning (if any). It is unspecified what special meaning is given to any character other than &, \e or digits.
+T}
+T{
+A line can be split by substituting a \fBNEWLINE \fRcharacter into it. The application must escape the \fBNEWLINE \fRcharacter in the \fIreplacement\fR by preceding it with backslash. A substitution is considered to have been performed even if the replacement string is identical to the string that it replaces.
+T}
+\fIflags\fR is zero or more of:
+T{
+\fIn\fR \fIn\fR= 1 - 512. Substitute for just the \fI n\fRth occurrence of the \fIregular expression.\fR
+T}
+T{
+\fBg\fR Global. Substitute for all nonoverlapping instances of the \fIregular expression\fR rather than just the first one. If both \fIg\fR and \fIn\fR are specified, the results are unspecified.
+T}
+_
+T{
+\fBp\fR Print the pattern space if a replacement was made.
+T}
+T{
+\fBP\fR Copy the initial segment of the pattern space through the first new-line to the standard output.
+T}
+T{
+\fBw\fR \fIwfile\fR Write. Append the pattern space to \fIwfile\fR if a replacement was made. The first occurrence of \fBw\fR will cause \fIwfile\fR to be cleared. Subsequent invocations of \fBw\fR will append. Each time the \fBsed\fR command is used, \fIwfile\fR is overwritten.
+T}
+_
+2\fBy\fR/ \fIstring1\fR / \fIstring2\fR /
+T{
+Transform. Replace all occurrences of characters in \fI string1\fR with the corresponding characters in \fIstring2\fR. \fIstring1\fR and \fIstring2\fR must have the same number of characters, or if any of the characters in \fIstring1 \fR appear more than once, the results are undefined. Any character other than backslash or \fBNEWLINE\fR can be used instead of slash to delimit the strings. Within \fIstring1\fR and \fIstring2\fR, the delimiter itself can be used as a literal character if it is preceded by a backslash. For example, \fBy\fR/abc/ABC/ replaces a with A, b with B, and c with C.
+T}
+.TE
+
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBsed\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example sed script
+.sp
+.LP
+This \fBsed\fR script simulates the \fBBSD \fR\fBcat\fR \fB-s\fR command,
+squeezing excess blank lines from standard input.
+
+.sp
+.in +2
+.nf
+sed \(min '
+# Write non-empty lines.
+/./ {
+ p
+ d
+ }
+# Write a single empty line, then look for more empty lines.
+/^$/ p
+# Get next line, discard the held <newline> (empty line),
+# and look for more empty lines.
+:Empty
+/^$/ {
+ N
+ s/.//
+ b Empty
+ }
+# Write the non-empty line before going back to search
+# for the first in a set of empty lines.
+ p
+\&'
+.fi
+.in -2
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBsed\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/sed"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSINot enabled
+.TE
+
+.SS "/usr/xpg4/bin/sed"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBawk\fR(1), \fBed\fR(1), \fBgrep\fR(1), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBregexp\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/set.1 b/usr/src/man/man1/set.1
new file mode 100644
index 0000000000..069440b63a
--- /dev/null
+++ b/usr/src/man/man1/set.1
@@ -0,0 +1,1681 @@
+'\" te
+.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH set 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+set, unset, setenv, unsetenv, export \- shell built-in functions to determine
+the characteristics for environmental variables of the current shell and its
+descendents
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBset\fR [\fB--aefhkntuvx\fR [\fIargument\fR]]...
+.fi
+
+.LP
+.nf
+\fBunset\fR [\fIname\fR]...
+.fi
+
+.LP
+.nf
+\fBexport\fR [\fIname\fR]...
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBset\fR [\fIvar\fR [= \fIvalue\fR]]
+.fi
+
+.LP
+.nf
+\fBset\fR \fIvar\fR [\fIn\fR] = \fIword\fR
+.fi
+
+.LP
+.nf
+\fBunset\fR \fIpattern\fR
+.fi
+
+.LP
+.nf
+\fBsetenv\fR [\fIVAR\fR [\fIword\fR]]
+.fi
+
+.LP
+.nf
+\fBunsetenv\fR \fIvariable\fR
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBset\fR [\(+-abCefhkmnopstuvx] [\(+-o \fIoption\fR]... [\(+-A \fIname\fR]
+ [\fIarg\fR]...
+.fi
+
+.LP
+.nf
+\fBunset\fR [\fB-f\fR] \fIname\fR...
+.fi
+
+.LP
+.nf
+\fB**export\fR [\fIname\fR [=\fIvalue\fR]]...
+.fi
+
+.LP
+.nf
+\fB**export\fR [\fB-p\fR]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB+set\fR [\(+-abCefGhkmnoprstuvx] [\(+-o \fIoption\fR]... [\(+-A \fIvname\fR]
+ [\fIarg\fR]...
+.fi
+
+.LP
+.nf
+\fB+unset\fR [\fB-fnv\fR] \fIvname\fR...
+.fi
+
+.LP
+.nf
+\fB++export\fR [\fB-p\fR] [\fIname\fR[=\fIvalue\fR]]...
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+The \fBset\fR built-in command has the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--\fR\fR
+.ad
+.RS 6n
+.rt
+Does not change any of the flags. This option is useful in setting \fB$1\fR to
+\fB\(mi\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Marks variables which are modified or created for export.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Exits immediately if a command exits with a non-zero exit status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Disables file name generation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Locates and remembers function commands as functions are defined. Function
+commands are normally located when the function is executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+All keyword arguments are placed in the environment for a command, not just
+those that precede the command name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Reads commands but does not execute them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Exits after reading and executing one command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Treats unset variables as an error when substituting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Prints shell input lines as they are read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Prints commands and their arguments as they are executed.
+.RE
+
+.sp
+.LP
+Using \fB+\fR rather than \fB\(mi\fR causes these flags to be turned off. These
+flags can also be used upon invocation of the shell. The current set of flags
+can be found in \fB$\(mi\fR. The remaining \fIargument\fRs are positional
+parameters and are assigned, in order, to \fB$1\fR, \fB$2\fR,
+\fB\&.\|.\|.\|.\fR If no \fIargument\fRs are specified the values of all names
+are printed.
+.sp
+.LP
+For each \fIname\fR, \fBunset\fR removes the corresponding variable or function
+value. The variables \fBPATH\fR, \fBPS1\fR, \fBPS2\fR, \fBMAILCHECK\fR, and
+\fBIF\fR cannot be unset.
+.sp
+.LP
+With the \fBexport\fR built-in, the specified \fIname\fRs are marked for
+automatic export to the \fIenvironment\fR of subsequently executed commands. If
+no arguments are specified, variable names that have been marked for export
+during the current shell's execution are listed. Function names are \fBnot\fR
+exported.
+.SS "csh"
+.sp
+.LP
+With no arguments, \fBset\fR displays the values of all shell variables.
+Multiword values are displayed as a parenthesized list. With the \fIvar\fR
+argument alone, \fBset\fR assigns an empty (null) value to the variable
+\fIvar\fR. With arguments of the form \fIvar\fR \fB=\fR \fIvalue\fR \fBset\fR
+assigns \fIvalue\fR to \fIvar\fR, where \fIvalue\fR is one of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIword\fR\fR
+.ad
+.RS 14n
+.rt
+A single word (or quoted string).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB(\fR\fIwordlist\fR\fB)\fR\fR
+.ad
+.RS 14n
+.rt
+A space-separated list of words enclosed in parentheses.
+.RE
+
+.sp
+.LP
+Values are command and filename expanded before being assigned. The form
+\fBset\fR \fIvar\fR\fB[\fR\fIn\fR\fB]=\fR\fIword\fR replaces the \fIn\fR'th
+word in a multiword value with \fIword\fR.
+.sp
+.LP
+\fBunset\fR removes variables whose names match (filename substitution)
+\fIpattern\fR. All variables are removed by `\fBunset *\fR'.
+.sp
+.LP
+With no arguments, \fBsetenv\fR displays all environment variables. With the
+\fIVAR\fR argument, \fBsetenv\fR sets the environment variable
+\fB\fR\fIVAR\fR\fB \fR to an empty (null) value. (By convention, environment
+variables are normally specified upper-case names.) With both \fIVAR\fR and
+\fIword\fR arguments specified, \fBsetenv\fR sets \fIVAR\fR to \fIword\fR,
+which must be either a single word or a quoted string. The \fBPATH\fR variable
+can take multiple \fIword\fR arguments, separated by colons (see EXAMPLES). The
+most commonly used environment variables, \fBUSER\fR, \fBTERM\fR, and
+\fBPATH\fR, are automatically imported to and exported from the \fBcsh\fR
+variables \fBuser\fR, \fBterm\fR, and \fBpath\fR. Use \fBsetenv\fR if you need
+to change these variables. In addition, the shell sets the \fBPWD\fR
+environment variable from the \fBcsh\fR variable \fBcwd\fR whenever the latter
+changes.
+.sp
+.LP
+The environment variables \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR,
+\fBLC_COLLATE\fR, \fBLC_NUMERIC\fR, and \fBLC_MONETARY\fR take immediate effect
+when changed within the C shell. See \fBenviron\fR(5) for descriptions of these
+environment variables.
+.sp
+.LP
+\fBunsetenv\fR removes \fIvariable\fR from the environment. As with
+\fBunset\fR, pattern matching is not performed.
+.SS "ksh"
+.sp
+.LP
+The flags for the \fBset\fR built-in have meaning as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 13n
+.rt
+Array assignment. Unsets the variable \fIname\fR and assigns values
+sequentially from the list \fIarg\fR. If \fB+A\fR is used, the variable
+\fIname\fR is not unset first.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 13n
+.rt
+All subsequent variables that are defined are automatically exported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 13n
+.rt
+Causes the shell to notify the user asynchronously of background job
+completions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 13n
+.rt
+Prevents existing files from being overwritten by the shell's \fB>\fR
+redirection operator. The \fB>|\fR redirection operator overrides this
+noclobber option for an individual file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 13n
+.rt
+If a command has a non-zero exit status, executes the \fBERR\fR trap, if set,
+and exits. This mode is disabled while reading profiles.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 13n
+.rt
+Disables file name generation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 13n
+.rt
+Each command becomes a tracked alias when first encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 13n
+.rt
+All variable assignment arguments are placed in the environment for a command,
+not just those that precede the command name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 13n
+.rt
+Background jobs run in a separate process group and a line prints upon
+completion. The exit status of background jobs is reported in a completion
+message. On systems with job control, this flag is turned on automatically for
+interactive shells.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 13n
+.rt
+Reads commands and checks them for syntax errors, but does not execute them.
+Ignored for interactive shells.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+o\fR\fR
+.ad
+.RS 13n
+.rt
+Writes the current option stettings to standard output in a format that is
+suitable for reinput to the shell as commands that achieve the same option
+settings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR\fR
+.ad
+.RS 13n
+.rt
+The \fIoption\fR argument can be one of the following option names:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBallexport\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerrexit\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-e\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbgnice\fR\fR
+.ad
+.RS 14n
+.rt
+All background jobs are run at a lower priority. This is the default mode.
+\fBemacs\fR Puts you in an \fBemacs\fR style in-line editor for command entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgmacs\fR\fR
+.ad
+.RS 14n
+.rt
+Puts you in a \fBgmacs\fR style in-line editor for command entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignoreeof\fR\fR
+.ad
+.RS 14n
+.rt
+The shell does not exit on end-of-file. The command \fBexit\fR must be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyword\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-k\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmarkdirs\fR\fR
+.ad
+.RS 14n
+.rt
+All directory names resulting from file name generation have a trailing \fB/\fR
+appended.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmonitor\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-m\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoclobber\fR\fR
+.ad
+.RS 14n
+.rt
+Prevents redirection operator \fB>\fR from truncating existing files. Requires
+the \fB>|\fR operator to truncate a file when turned on. Same as \fB-C\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoexec\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-n\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoglob\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-f\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnolog\fR\fR
+.ad
+.RS 14n
+.rt
+Does not save function definitions in history file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnotify\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnounset\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-u\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprivileged\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-v\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrackall\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-h\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvi\fR\fR
+.ad
+.RS 14n
+.rt
+Puts you in insert mode of a \fBvi\fR style in-line editor until you hit escape
+character \fB033\fR. This puts you in control mode. A return sends the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBviraw\fR\fR
+.ad
+.RS 14n
+.rt
+Each character is processed as it is typed in \fBvi\fR mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxtrace\fR\fR
+.ad
+.RS 14n
+.rt
+Same as \fB-x\fR.
+.RE
+
+.RE
+
+.sp
+.LP
+If no option name is supplied then the current option settings are printed.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 8n
+.rt
+Disables processing of the \fB$HOME/.profile\fR file and uses the file
+\fB/etc/suid_profile\fR instead of the \fBENV\fR file. This mode is on whenever
+the effective uid is not equal to the real uid, or when the effective gid is
+not equal to the real gid. Turning this off causes the effective uid and gid to
+be set to the real uid and gid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 8n
+.rt
+Sorts the positional parameters lexicographically.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 8n
+.rt
+Exits after reading and executing one command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 8n
+.rt
+Treats unset parameters as an error when substituting.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 8n
+.rt
+Prints shell input lines as they are read.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 8n
+.rt
+Prints commands and their arguments as they are executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fR
+.ad
+.RS 8n
+.rt
+Turns off \fB-x\fR and \fB-v\fR flags and stops examining arguments for flags.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fR
+.ad
+.RS 8n
+.rt
+Does not change any of the flags. This option is useful in setting \fB$1\fR to
+a value beginning with \fB\(mi\fR\&. If no arguments follow this flag then the
+positional parameters are unset.
+.RE
+
+.sp
+.LP
+Using \fB+\fR rather than \fB\(mi\fR causes these flags to be turned off. These
+flags can also be used upon invocation of the shell. The current set of flags
+can be found in \fB$\(mi\fR. Unless \fB-A\fR is specified, the remaining
+arguments are positional parameters and are assigned, in order, to \fB$1\fR
+\fB$2\fR .\|.\|.. If no arguments are specified then the names and values of
+all variables are printed on the standard output.
+.sp
+.LP
+The variables specified by the list of \fIname\fRs are unassigned, that is,
+their values and attributes are erased. \fBreadonly\fR variables cannot be
+unset. If the \fB-f\fR flag is set, then the names refer to \fBfunction\fR
+names. Unsetting \fBERRNO\fR, \fBLINENO\fR, \fBMAILCHECK\fR, \fBOPTARG\fR,
+\fBOPTIND\fR, \fBRANDOM\fR, \fBSECONDS\fR, \fBTMOUT\fR, and \fB_\fR removes
+their special meaning even if they are subsequently assigned.
+.sp
+.LP
+When using \fBunset\fR, the variables specified by the list of \fIname\fRs are
+unassigned, i.e., their values and attributes are erased. \fBreadonly\fR
+variables cannot be unset. If the \fB-f\fR, flag is set, then the names refer
+to \fBfunction\fR names. Unsetting \fBERRNO\fR, \fBLINENO\fR, \fBMAILCHECK\fR,
+\fBOPTARG\fR, \fBOPTIND\fR, \fBRANDOM\fR, \fBSECONDS\fR, \fBTMOUT\fR, and
+\fB_\fR removes their special meaning even if they are subsequently assigned.
+.sp
+.LP
+With the \fBexport\fR built-in, the specified \fIname\fRs are marked for
+automatic export to the \fBenvironment\fR of subsequently-executed commands.
+.sp
+.LP
+When \fB-p\fR is specified, \fBexport\fR writes to the standard output the
+names and values of all exported variables in the following format:
+.sp
+.in +2
+.nf
+"export %s=%s\en", \fIname\fR, \fIvalue\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+if \fIname\fR is set, and:
+.sp
+.in +2
+.nf
+"export %s\en", \fIname\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+if \fIname\fR is unset.
+.sp
+.LP
+The shell formats the output, including the proper use of quoting, so that it
+is suitable for reinput to the shell as commands that achieve the same
+exporting results, except for the following:
+.RS +4
+.TP
+1.
+Read-only variables with values cannot be reset.
+.RE
+.RS +4
+.TP
+2.
+Variables that were unset at the time they were output are not reset to the
+unset state if a value is assigned to the variable between the time the state
+was saved and the time at which the saved output is reinput to the shell.
+.RE
+.sp
+.LP
+On this manual page, \fBksh\fR(1) commands that are preceded by one or two
+\fB*\fR (asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by \fB**\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+\fBset\fR sets or unsets options and positional parameters. Options that are
+specified with a \fB-\fR cause the options to be set. Options that are
+specified with a \fB+\fR cause the option to be unset.
+.sp
+.LP
+\fBset\fR without any options or arguments displays the names and values of all
+shell variables in the order of the collation sequence in the current locale.
+The values are quoted so that they are suitable for input again to the shell.
+.sp
+.LP
+If no arguments are specified, not even the end of options argument \fB--\fR,
+the positional parameters are unchanged. Otherwise, unless the \fB-A\fR option
+has been specified, the positional parameters are replaced by the list of
+arguments. A first argument of \fB--\fR is ignored when setting positional
+parameters.
+.sp
+.LP
+For backwards compatibility, a \fBset\fR command without any options specified,
+whose first argument is \fB-\fR turns off the \fB-v\fR and \fB-x\fR options. If
+any additional arguments are specified, they replace the positional parameters.
+.sp
+.LP
+The options for set in \fBksh93\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 15n
+.rt
+Set the export attribute for each variable whose name does not contain a . that
+you assign a value in the current shell environment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR \fIname\fR\fR
+.ad
+.RS 15n
+.rt
+Assign the arguments sequentially to the array named by \fIname\fR starting at
+subscript \fB0\fR rather than to the positional parameters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 15n
+.rt
+The shell writes a message to standard error as soon it detects that a
+background job completes rather than waiting until the next prompt.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 15n
+.rt
+Enable \fB{...}\fR group expansion. On by default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 15n
+.rt
+Prevents existing regular files from being overwritten using the > redirection
+operator. The \fB>|\fR redirection overrides this \fBnoclobber\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 15n
+.rt
+A simple command that has a \fBnon-zero\fR exit status causes the shell to exit
+unless the simple command is:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contained in an \fB&&\fR or \fB||\fR list
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+the command immediately following \fBif\fR, \fBwhile\fR, or \fBuntil\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+contained in the pipeline following \fB!\fR
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 15n
+.rt
+Pathname expansion is disabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR\fR
+.ad
+.RS 15n
+.rt
+Causes \fB**\fR by itself to also match all sub-directories during pathname
+expansion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 15n
+.rt
+Obsolete. Causes each command whose name has the syntax of an alias to become a
+tracked alias when it is first encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 15n
+.rt
+Enable \fB!\fR-style history expansion similar to csh.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 15n
+.rt
+This is obsolete. All arguments of the form \fIname\fR\fB=\fR\fIvalue\fR are
+removed and placed in the variable assignment list for the command. Ordinarily,
+variable assignments must precede command arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 15n
+.rt
+When enabled, the shell runs background jobs in a separate process group and
+displays a line upon completion. This mode is enabled by default for
+interactive shells on systems that support job control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 15n
+.rt
+The shell reads commands and checks for syntax errors, but does not execute the
+command. Usually specified on command invocation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR [\fIoption\fR]\fR
+.ad
+.RS 15n
+.rt
+If option is not specified, the list of options and their current settings is
+written to standard output. When invoked with a \fB+\fR the options are written
+in a format that can be input again to the shell to restore the settings. This
+option can be repeated to enable or disable multiple options.
+.sp
+The value of \fIoption\fR must be one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBallexport\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-a\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbgnice\fR\fR
+.ad
+.RS 15n
+.rt
+All background jobs are run at lower priorities.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbraceexpand\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-B\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBemacs\fR\fR
+.ad
+.RS 15n
+.rt
+Enables or disables \fBemacs\fR editing mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerrexit\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-e\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBglobstar\fR\fR
+.ad
+.RS 15n
+.rt
+Equivalent to \fB-\fRG.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgmacs\fR\fR
+.ad
+.RS 15n
+.rt
+Enables or disables \fBgmacs\fR. \fBgmacs\fR editing mode is the same as
+\fBemacs\fR editing mode, except for the handling of CTRL-T.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhistexpand\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-H\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignoreeof\fR\fR
+.ad
+.RS 15n
+.rt
+The interactive shell does not exit on end-of-file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkeyword\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-k\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmarkdirs\fR\fR
+.ad
+.RS 15n
+.rt
+All directory names resulting from file name generation have a trailing \fB/\fR
+appended.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmonitor\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-m\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmultiline\fR\fR
+.ad
+.RS 15n
+.rt
+Use multiple lines when editing lines that are longer than the window width.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoclobber\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-C\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoexec\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-n\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoglob\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-f\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnolog\fR\fR
+.ad
+.RS 15n
+.rt
+This has no effect. It is provided for backward compatibility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnotify\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-b\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnounset\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-u\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpipefail\fR\fR
+.ad
+.RS 15n
+.rt
+A pipeline does not complete until all components of the pipeline have
+completed, and the exit status of the pipeline is the value of the last command
+to exit with \fBnon-zero\fR exit status, or is \fBzero\fR if all commands
+return zero exit status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprivileged\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-p\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBshowme\fR\fR
+.ad
+.RS 15n
+.rt
+Simple commands preceded by a ; are traced as if \fB-x\fR were enabled but not
+executed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrackall\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-h\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-v\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvi\fR\fR
+.ad
+.RS 15n
+.rt
+Enables or disables \fBvi\fR editing mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBviraw\fR\fR
+.ad
+.RS 15n
+.rt
+Does not use canonical input mode when using vi edit mode
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxtrace\fR\fR
+.ad
+.RS 15n
+.rt
+Same as \fB-x\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 15n
+.rt
+Privileged mode. Disabling \fB-p\fR sets the effective user id to the real user
+id, and the effective group id to the real group id. Enabling \fB-p\fR restores
+the effective user and group ids to their values when the shell was invoked.
+The \fB-p\fR option is on whenever the real and effective user id is not equal
+or the real and effective group id is not equal. User profiles are not
+processed when \fB-p\fR is enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 15n
+.rt
+Restricted. Enables restricted shell. This option cannot be unset once enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 15n
+.rt
+Sort the positional parameters
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 15n
+.rt
+Obsolete. The shell reads one command and then exits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 15n
+.rt
+If enabled, the shell displays an error message when it tries to expand a
+variable that is unset.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 15n
+.rt
+Verbose. The shell displays its input onto standard error as it reads it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Execution trace. The shell displays each command after all expansion and before
+execution preceded by the expanded value of the \fBPS4\fR parameter.
+.RE
+
+.sp
+.LP
+The following exit values are returned by \fBset\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+For each name specified, \fBunset\fR unsets the variable, or function if
+\fB-f\fR is specified, from the current shell execution environment. Read-only
+variables cannot be unset.
+.sp
+.LP
+The options for \fBunset\fR in \fBksh93\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Where \fIname\fR refers to a function name, the shell unsets the function
+definition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+If \fIname\fR refers to variable that is a reference, the variable \fIname\fR
+is unset rather than the variable it references. Otherwise, this option is
+equivalent to the \fB-v\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Where \fIname\fR refers to a variable name, the shell unsets it and removes it
+from the environment. This is the default behavior.
+.RE
+
+.sp
+.LP
+The following exit values are returned by \fBunset\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion. All names were successfully unset.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred, or one or more \fIname\fR operands could not be unset
+.RE
+
+.sp
+.LP
+\fBexport\fR sets the export attribute on each of the variables specified by
+name which causes them to be in the environment of subsequently executed
+commands. If \fB=\fR\fIvalue\fR is specified, the variable \fIname\fR is set to
+\fIvalue\fR.
+.sp
+.LP
+If no \fIname\fR is specified, the names and values of all exported variables
+are written to standard output.
+.sp
+.LP
+\fBexport\fR is built-in to the shell as a declaration command so that field
+splitting and pathname expansion are not performed on the arguments. Tilde
+expansion occurs on value.
+.sp
+.LP
+The options for \fBexport\fR in \fBksh93\fR are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the output to be in the form of \fBexport\fR commands that can be used
+as input to the shell to recreate the current exports.
+.RE
+
+.sp
+.LP
+The following exit values are returned by \fBexport\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+On this manual page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.SH EXAMPLES
+.SS "csh"
+.sp
+.LP
+The following example sets the \fBPATH\fR variable to search for files in the
+\fB/bin\fR, \fB/usr/bin\fR, \fB/usr/sbin\fR, and \fB/usr/ucb/bin\fR
+directories, in that order:
+.sp
+.in +2
+.nf
+setenv PATH "/bin:/usr/bin:/usr/sbin:usr/ucb/bin"
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBread\fR(1), \fBsh\fR(1),
+\fBtypeset\fR(1), \fBattributes\fR(5), \fBenviron\fR(5)
diff --git a/usr/src/man/man1/setfacl.1 b/usr/src/man/man1/setfacl.1
new file mode 100644
index 0000000000..1b5dfae0f8
--- /dev/null
+++ b/usr/src/man/man1/setfacl.1
@@ -0,0 +1,400 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH setfacl 1 "19 Dec 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+setfacl \- modify the Access Control List (ACL) for a file or files
+.SH SYNOPSIS
+.LP
+.nf
+\fBsetfacl\fR [\fB-r\fR] \fB-s\fR \fIacl_entries\fR \fIfile\fR
+.fi
+
+.LP
+.nf
+\fBsetfacl\fR [\fB-r\fR] \fB-md\fR \fIacl_entries\fR \fIfile\fR
+.fi
+
+.LP
+.nf
+\fBsetfacl\fR [\fB-r\fR] \fB-f\fR \fIacl_file\fR \fIfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+For each file specified, \fBsetfacl\fR either replaces its entire \fBACL\fR,
+including the default \fBACL\fR on a directory, or it adds, modifies, or
+deletes one or more \fBACL\fR entries, including default entries on
+directories.
+.sp
+.LP
+When the \fBsetfacl\fR command is used, it can result in changes to the file
+permission bits. When the user \fBACL\fR entry for the file owner is changed,
+the file owner class permission bits are modified. When the group \fBACL\fR
+entry for the file group class is changed, the file group class permission bits
+are modified. When the other \fBACL\fR entry is changed, the file other class
+permission bits are modified.
+.sp
+.LP
+If you use the \fBchmod\fR(1) command to change the file group owner
+permissions on a file with \fBACL\fR entries, both the file group owner
+permissions and the \fBACL\fR mask are changed to the new permissions. Be aware
+that the new \fBACL\fR mask permissions can change the effective permissions
+for additional users and groups who have \fBACL\fR entries on the file.
+.sp
+.LP
+A directory can contain default \fBACL\fR entries. If a file or directory is
+created in a directory that contains default \fBACL\fR entries, the newly
+created file has permissions generated according to the intersection of the
+default \fBACL\fR entries and the permissions requested at creation time. The
+\fBumask\fR(1) are not applied if the directory contains default \fBACL\fR
+entries. If a default \fBACL\fR is specified for a specific user (or users),
+the file has a regular \fBACL\fR created. Otherwise, only the mode bits are
+initialized according to the intersection described above. The default
+\fBACL\fR should be thought of as the maximum discretionary access permissions
+that can be granted.
+.sp
+.LP
+Use the \fBsetfacl\fR command to set ACLs on files in a UFS file system, which
+supports POSIX-draft ACLS (or \fBaclent_t\fR style ACLs). Use the \fBchmod\fR
+command to set ACLs on files in a ZFS file system, which supports NFSv4-style
+ACLS (or \fBace_t\fR style ACLs).
+.SS "\fIacl_entries\fR Syntax"
+.sp
+.LP
+For the \fB-m\fR and \fB-s\fR options, \fIacl_entries\fR are one or more
+comma-separated \fBACL\fR entries.
+.sp
+.LP
+An \fBACL\fR entry consists of the following fields separated by colons:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIentry_type\fR\fR
+.ad
+.RS 14n
+.rt
+Type of \fBACL\fR entry on which to set file permissions. For example,
+\fIentry_type\fR can be \fBuser\fR (the owner of a file) or \fBmask\fR (the
+\fBACL\fR mask).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuid\fR or \fIgid\fR\fR
+.ad
+.RS 14n
+.rt
+User name or user identification number. Or, group name or group identification
+number.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIperms\fR\fR
+.ad
+.RS 14n
+.rt
+Represents the permissions that are set on \fIentry_type\fR. \fIperms\fR can be
+indicated by the symbolic characters \fBrwx\fR or a number (the same
+permissions numbers used with the \fBchmod\fR command).
+.RE
+
+.sp
+.LP
+The following table shows the valid \fBACL\fR entries (default entries can only
+be specified for directories):
+.sp
+
+.sp
+.TS
+tab();
+cw(2i) cw(3.5i)
+lw(2i) lw(3.5i)
+.
+\fBACL\fR EntryDescription
+_
+u[ser]::\fIperms\fR File owner permissions.
+g[roup]::\fIperms\fR File group owner permissions.
+o[ther]:\fIperms\fR T{
+Permissions for users other than the file owner or members of file group owner.
+T}
+m[ask]:\fIperms\fR T{
+The \fBACL\fR mask. The mask entry indicates the maximum permissions allowed for users (other than the owner) and for groups. The mask is a quick way to change permissions on all the users and groups.
+T}
+u[ser]:\fIuid:perms\fRT{
+Permissions for a specific user. For \fIuid\fR, you can specify either a user name or a numeric UID.
+T}
+g[roup]:\fIgid:perms\fRT{
+Permissions for a specific group. For \fIgid\fR, you can specify either a group name or a numeric GID.
+T}
+d[efault]:u[ser]::\fIperms\fR Default file owner permissions.
+d[efault]:g[roup]::\fIperms\fR Default file group owner permissions.
+d[efault]:o[ther]:\fIperms\fR T{
+Default permissions for users other than the file owner or members of the file group owner.
+T}
+d[efault]:m[ask]:\fIperms\fR Default \fBACL\fR mask.
+d[efault]:u[ser]:\fIuid\fR:\fIperms\fRT{
+Default permissions for a specific user. For \fIuid\fR, you can specify either a user name or a numeric UID.
+T}
+d[efault]:g[roup]:\fIgid\fR:\fIperms\fRT{
+Default permissions for a specific group. For \fIgid\fR, you can specify either a group name or a numeric GID.
+T}
+.TE
+
+.sp
+.LP
+For the \fB-d\fR option, \fIacl_entries\fR are one or more comma-separated
+\fBACL\fR entries without permissions. Notice that the entries for file owner,
+file group owner, \fBACL\fR mask, and others can not be deleted.
+.SH OPTIONS
+.sp
+.LP
+The options have the following meaning:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIacl_entries\fR\fR
+.ad
+.RS 18n
+.rt
+Deletes one or more entries from the file. The entries for the file owner, the
+file group owner, and others can not be deleted from the \fBACL\fR. Notice that
+deleting an entry does not necessarily have the same effect as removing all
+permissions from the entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIacl_file\fR\fR
+.ad
+.RS 18n
+.rt
+Sets a file's \fBACL\fR with the \fBACL\fR entries contained in the file named
+\fIacl_file\fR. The same constraints on specified entries hold as with the
+\fB-s\fR option. The entries are not required to be in any specific order in
+the file. Also, if you specify a dash (\fB-\fR) for \fIacl_file\fR, standard
+input is used to set the file's \fBACL\fR.
+.sp
+The character \fB#\fR in \fIacl_file\fR can be used to indicate a comment. All
+characters, starting with the \fB#\fR until the end of the line, are ignored.
+Notice that if the \fIacl_file\fR has been created as the output of the
+\fBgetfacl\fR(1) command, any effective permissions, which follow a \fB#\fR,
+are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIacl_entries\fR\fR
+.ad
+.RS 18n
+.rt
+Adds one or more new \fBACL\fR entries to the file, and/or modifies one or more
+existing \fBACL\fR entries on the file. If an entry already exists for a
+specified \fIuid\fR or \fIgid\fR, the specified permissions replace the current
+permissions. If an entry does not exist for the specified \fIuid\fR or
+\fIgid\fR, an entry is created. When using the \fB-m\fR option to modify a
+default \fBACL\fR, you must specify a complete default \fBACL\fR (user, group,
+other, mask, and any additional entries) the first time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 18n
+.rt
+Recalculates the permissions for the \fBACL\fR mask entry. The permissions
+specified in the \fBACL\fR mask entry are ignored and replaced by the maximum
+permissions necessary to grant the access to all additional user, file group
+owner, and additional group entries in the \fBACL\fR. The permissions in the
+additional user, file group owner, and additional group entries are left
+unchanged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIacl_entries\fR\fR
+.ad
+.RS 18n
+.rt
+Sets a file's \fBACL\fR. All old \fBACL\fR entries are removed and replaced
+with the newly specified \fBACL\fR. The entries need not be in any specific
+order. They are sorted by the command before being applied to the file.
+.sp
+Required entries:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBuser\fR entry specified for the file owner.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBgroup\fR entry for the file group owner.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBother\fR entry specified.
+.RE
+If there are additional user and group entries:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBmask\fR entry specified for the \fBACL\fR mask that indicates
+the maximum permissions allowed for users (other than the owner) and groups.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Must not be duplicate \fBuser\fR entries with the same \fIuid\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Must not be duplicate \fBgroup\fR entries with the same \fIgid\fR.
+.RE
+If \fIfile\fR is a directory, the following default \fBACL\fR entries can be
+specified:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBdefault user\fR entry for the file owner.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBdefault group\fR entry for the file group owner.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBdefault mask\fR entry for the \fBACL\fR mask.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Exactly one \fBdefault other\fR entry.
+.RE
+There can be additional \fBdefault user\fR entries and additional \fBdefault
+group\fR entries specified, but there can not be duplicate additional
+\fBdefault user\fR entries with the same \fIuid\fR, or duplicate \fBdefault
+group\fR entries with the same \fIgid\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAdding read permission only
+.sp
+.LP
+The following example adds one \fBACL\fR entry to file \fBabc\fR, which gives
+user \fBshea\fR read permission only.
+
+.sp
+.in +2
+.nf
+\fBsetfacl -m user:shea:r\(mi\(mi abc\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRReplacing a file's entire \fBACL\fR
+.sp
+.LP
+The following example replaces the entire \fBACL\fR for the file \fBabc\fR,
+which gives \fBshea\fR read access, the file owner all access, the file group
+owner read access only, the \fBACL\fR mask read access only, and others no
+access.
+
+.sp
+.in +2
+.nf
+\fBsetfacl -s user:shea:rwx,user::rwx,group::rw-,mask:r--,other:--- abc\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that after this command, the file permission bits are \fBrwxr-----\fR.
+Even though the file group owner was set with read/write permissions, the
+\fBACL\fR mask entry limits it to have only read permission. The mask entry
+also specifies the maximum permissions available to all additional user and
+group \fBACL\fR entries. Once again, even though the user \fBshea\fR was set
+with all access, the mask limits it to have only read permission. The \fBACL\fR
+mask entry is a quick way to limit or open access to all the user and group
+entries in an \fBACL\fR. For example, by changing the mask entry to read/write,
+both the file group owner and user \fBshea\fR would be given read/write access.
+
+.LP
+\fBExample 3 \fRSetting the same \fBACL\fR on two files
+.sp
+.LP
+The following example sets the same \fBACL\fR on file \fBabc\fR as the file
+\fBxyz\fR.
+
+.sp
+.in +2
+.nf
+\fBgetfacl xyz | setfacl -f \(mi abc\fR
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/passwd\fR\fR
+.ad
+.RS 15n
+.rt
+password file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/group\fR\fR
+.ad
+.RS 15n
+.rt
+group file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBgetfacl\fR(1), \fBumask\fR(1), \fBaclcheck\fR(3SEC),
+\fBaclsort\fR(3SEC), \fBgroup\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/setlabel.1 b/usr/src/man/man1/setlabel.1
new file mode 100644
index 0000000000..05f0d39ad1
--- /dev/null
+++ b/usr/src/man/man1/setlabel.1
@@ -0,0 +1,198 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH setlabel 1 "20 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+setlabel \- move files to zone with corresponding sensitivity label
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/setlabel\fR \fInewlabel\fR \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsetlabel\fR moves files into the zone whose label corresponds to
+\fInewlabel\fR. The old file pathname is adjusted so that it is relative to the
+root pathname of the new zone. If the old pathname for a file's parent
+directory does not exist as a directory in the new zone, the file is not moved.
+Once moved, the file might no longer be accessible in the current zone.
+.sp
+.LP
+Unless \fInewlabel\fR and \fIfilename\fR have been specified, no labels are
+set.
+.sp
+.LP
+Labels are defined by the security administrator at your site. The system
+always displays labels in uppercase. Users can enter labels in any combination
+of uppercase and lowercase. Incremental changes to labels are supported.
+.sp
+.LP
+Refer to \fBsetflabel\fR(3TSOL) for a complete description of the conditions
+that are required to satisfy this command, and the privileges that are needed
+to execute this command.
+.SH EXIT STATUS
+.sp
+.LP
+\fBsetlabel\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Error in getting, setting or translating the label.
+.RE
+
+.SH USAGE
+.sp
+.LP
+On the command line, enclose the label in double quotes unless the label is
+only one word. Without quotes, a second word or letter separated by a space is
+interpreted as a second argument.
+.sp
+.in +2
+.nf
+% \fBsetlabel SECRET \fIsomefile\fR\fR
+% \fBsetlabel "TOP SECRET" \fIsomefile\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Use any combination of upper and lowercase letters. You can separate items in a
+label with blanks, tabs, commas or slashes (\fB/\fR). Do not use any other
+punctuation.
+.sp
+.in +2
+.nf
+% \fBsetlabel "ts a b" \fIsomefile\fR\fR
+% \fBsetlabel "ts,a,b" \fIsomefile\fR\fR
+% \fBsetlabel "ts/a b" \fIsomefile\fR\fR
+% \fBsetlabel " TOP SECRET A B " \fIsomefile\fR\fR
+.fi
+.in -2
+.sp
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSet a Label.
+.sp
+.LP
+To set \fIsomefile\fR's label to \fBSECRET A\fR:
+
+.sp
+.in +2
+.nf
+example% \fBsetlabel "Secret a" \fIsomefile\fR\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRTurn On a Compartment.
+.sp
+.LP
+Plus and minus signs can be used to modify an existing label. A plus sign turns
+on the specified compartment for \fIsomefile\fR's label.
+
+.sp
+.in +2
+.nf
+example% \fBsetlabel +b \fIsomefile\fR\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRTurn Off a Compartment.
+.sp
+.LP
+A minus sign turns off the compartments that are associated with a
+classification. To turn off compartment \fBA\fR in \fIsomefile\fR's label:
+
+.sp
+.in +2
+.nf
+example% \fBsetlabel -A \fIsomefile\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If an incremental change is being made to an existing label and the first
+character of the label is a hyphen (\fB\(mi\fR), a preceding double-hyphen
+(\fB--\fR) is required.
+
+.sp
+.LP
+To turn off compartment \fB-A\fR in \fIsomefile\fR's label:
+
+.sp
+.in +2
+.nf
+example% \fBsetlabel -- -A \fIsomefile\fR\fR
+.fi
+.in -2
+.sp
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsetflabel\fR(3TSOL), \fBlabel_encodings\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+The functionality described on this manual page is available only if the system
+is configured with Trusted Extensions.
+.sp
+.LP
+This implementation of setting a label is meaningful for the Defense
+Intelligence Agency (DIA) Mandatory Access Control (MAC) policy. For more
+information, see \fBlabel_encodings\fR(4).
diff --git a/usr/src/man/man1/setpgrp.1 b/usr/src/man/man1/setpgrp.1
new file mode 100644
index 0000000000..d1bdcbae9c
--- /dev/null
+++ b/usr/src/man/man1/setpgrp.1
@@ -0,0 +1,71 @@
+'\" te
+.\" Copyright (c) 2000 Sun Microsystems, Inc.,
+.\" All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH setpgrp 1 "5 Jan 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+setpgrp \- set process group ID
+.SH SYNOPSIS
+.LP
+.nf
+\fBsetpgrp\fR \fIcommand\fR [\fIarg\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+If the current process is not already a session leader, the \fBsetpgrp\fR
+utility sets the process group \fBID\fR and session \fBID\fR to the current
+process \fBID\fR and does an \fBexec()\fR of \fIcommand\fR and its argument(s),
+if any.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcommand\fR\fR
+.ad
+.RS 11n
+.rt
+The name of a command to be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIarg\fR\fR
+.ad
+.RS 11n
+.rt
+An option or argument to \fIcommand\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Error executing the \fBsetpgrp\fR utility or during \fBexec()\fR of
+\fIcommand\fR.
+.RE
+
+.sp
+.LP
+Otherwise, the exit status will be that of \fIcommand\fR.
+.SH SEE ALSO
+.sp
+.LP
+\fBexec\fR(2), \fBsetpgrp\fR(2), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/sftp.1 b/usr/src/man/man1/sftp.1
new file mode 100644
index 0000000000..ae8d15b138
--- /dev/null
+++ b/usr/src/man/man1/sftp.1
@@ -0,0 +1,671 @@
+'\" te
+.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the specified path to access
+.\" the file at the installed location.
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.TH sftp 1 "8 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+sftp \- secure file transfer program
+.SH SYNOPSIS
+.LP
+.nf
+\fBsftp\fR [\fB-1Cv\fR] [\fB-B\fR \fIbuffer_size\fR] [\fB-b\fR \fIbatchfile\fR] [\fB-F\fR \fIssh_config\fR]
+ [\fB-o\fR \fIssh_option\fR] [\fB-P\fR \fIsftp_server_path\fR] [\fB-R\fR \fInum_requests\fR]
+ [\fB-S\fR \fIprogram\fR] [\fB-s\fR \fIsubsystem\fR | \fIsftp_server\fR] \fIhost\fR
+.fi
+
+.LP
+.nf
+\fBsftp\fR [[\fIuser\fR\fB@\fR]\fIhost\fR[\fB:\fR\fIfile\fR [\fIfile\fR]]]
+.fi
+
+.LP
+.nf
+\fBsftp\fR [[\fIuser\fR\fB@\fR]\fIhost\fR[:\fIdir\fR[\fB/\fR]]]
+.fi
+
+.LP
+.nf
+\fBsftp\fR \fB-b\fR \fIbatchfile\fR [\fIuser\fR\fB@\fR]\fIhost\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsftp\fR utility is an interactive file transfer program with a user
+interface similar to \fBftp\fR(1) that uses the \fBssh\fR(1) command to create
+a secure connection to the server.
+.sp
+.LP
+\fBsftp\fR implements the SSH File Transfer Protocol as defined in IETF
+\fBdraft-ietf-secsh-filexfer\fR. There is no relationship between the protocol
+used by \fBsftp\fR and the FTP protocol (\fIRFC 959\fR) provided by
+\fBftp\fR(1).
+.sp
+.LP
+The first usage format causes \fBsftp\fR to connect to the specified host and
+enter an interactive mode. If a username was provided then \fBsftp\fR tries to
+log in as the specified user. If a directory is provided then \fBsftp\fR tries
+to change the current directory on the server to the specified directory before
+entering the interactive mode.
+.sp
+.LP
+The second usage format retrieves the specified file from the server and copies
+it to the specified target file or directory on the client. If a username is
+specified \fBsftp\fR tries to log in as the specified user.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbatchfile\fR\fR
+.ad
+.RS 30n
+.rt
+Batch mode reads a series of commands from an input \fIbatchfile\fR instead of
+\fBstdin\fR. Since it lacks user interaction, it should be used in conjunction
+with non-interactive authentication. A batchfile of \fB-\fR can be used to
+indicate standard input. \fBsftp\fR aborts if any of the following commands
+fail: \fBget\fR, \fBput\fR, \fBrm\fR, \fBrename\fR, \fBln\fR, \fBrm\fR,
+\fBmkdir\fR, \fBchdir\fR, \fBls\fR, \fBlchdir\fR, \fBchmod\fR, \fBchown\fR,
+\fBchgrp\fR, \fBlpwd\fR, and \fBlmkdir\fR. Termination on error can be
+suppressed on a command by command basis by prefixing the command with a
+\fB-\fR character (for example, \fB-rm /tmp/blah*\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR \fIbuffer_size\fR\fR
+.ad
+.RS 30n
+.rt
+Specifies the size of the buffer that \fBsftp\fR uses when transferring files.
+Larger buffers require fewer round trips at the cost of higher memory
+consumption. The default is 32768 bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 30n
+.rt
+Enables compression, using the \fB-C\fR flag in \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIssh_config\fR\fR
+.ad
+.RS 30n
+.rt
+Specifies an alternative per-user configuration file for \fBssh\fR. This option
+is directly passed to \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIssh_option\fR\fR
+.ad
+.RS 30n
+.rt
+Specifies an option to be directly passed to \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIsftp_server path\fR\fR
+.ad
+.RS 30n
+.rt
+Executes the specified path as an \fIsftp-server\fR and uses a pipe, rather
+than an \fBssh\fR connection, to communicate with it. This option can be useful
+in debugging the \fBsftp\fR client and server. The \fB-P\fR and \fB-S\fR
+options are mutually exclusive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fInum_requests\fR\fR
+.ad
+.RS 30n
+.rt
+Specifies how many requests can be outstanding at any one time. Increasing this
+can slightly improve file transfer speed but increases memory usage. The
+default is 16 outstanding requests.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsubsystem\fR | \fIsftp_server\fR\fR
+.ad
+.RS 30n
+.rt
+Specifies the \fBSSH2\fR subsystem or the path for an \fBsftp\fR server on the
+remote host. A path is useful for using \fBsftp\fR over protocol version 1, or
+when the remote \fBsshd\fR does not have an \fBsftp\fR subsystem configured.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIssh_program\fR \fIpath\fR\fR
+.ad
+.RS 30n
+.rt
+Uses the specified program instead of \fBssh\fR(1) to connect to the \fBsftp\fR
+server. The \fB-P\fR and \fB-S\fR options are mutually exclusive. The program
+must understand \fBssh\fR(1) options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 30n
+.rt
+Raises logging level. This option is also passed to \fBssh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR\fR
+.ad
+.RS 30n
+.rt
+Specifies the use of protocol version 1.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhostname\fR | \fIuser@hostname\fR\fR
+.ad
+.RS 28n
+.rt
+The name of the host to which \fBsftp\fR connects and logs into.
+.RE
+
+.SH INTERACTIVE COMMANDS
+.sp
+.LP
+Once in interactive mode, \fBsftp\fR understands a set of commands similar to
+those of \fBftp\fR(1). Commands are case insensitive and path names can be
+enclosed in quotes if they contain spaces.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbye\fR\fR
+.ad
+.sp .6
+.RS 4n
+Quits \fBsftp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcd\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes remote directory to \fIpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchgrp\fR \fIgrp path\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes group of file \fIpath\fR to \fIgrp\fR. \fIgrp\fR must be a numeric
+\fBGID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchmod\fR \fImode path\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes permissions of file \fIpath\fR to \fImode\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBchown\fR \fIown path\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes owner of file \fIpath\fR to \fIown\fR. \fIown\fR must be a numeric
+\fBUID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Quits \fBsftp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBget\fR [\fIflags\fR] \fIremote-path\fR [\fIlocal-path\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Retrieves the \fIremote-path\fR and stores it on the local machine. If the
+local path name is not specified, it is specified the same name it has on the
+remote machine. If the \fB-P\fR flag is specified, then the file's full
+permission and access time are copied too.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhelp\fR\fR
+.ad
+.sp .6
+.RS 4n
+Displays help text.
+.sp
+Identical to the \fB?\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlcd\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes local directory to \fIpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlls\fR [\fIls-options\fR [\fIpath\fR]]\fR
+.ad
+.sp .6
+.RS 4n
+Displays local directory listing of either \fIpath\fR or current directory if
+\fIpath\fR is not specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlmkdir\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Creates local directory specified by \fIpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBln\fR \fIoldpath\fR \fInewpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Creates a link from \fIoldpath\fR to \fInewpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlpwd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints local working directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBls\fR [\fB-1aflnrSt\fR] [\fIpath\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Displays remote directory listing of either \fIpath\fR or current directory if
+\fIpath\fR is not specified. \fIpath\fR can contain wildcards.
+.sp
+The \fBls\fR supports the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Lists files beginning with a dot (\fB\&.\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Does not sort the listing. The default sort order is lexicographical.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Displays additional details including permissions and ownership information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Produces a long listing with user and group information presented numerically.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Reverses the sort order of the listing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Sorts the listing by file size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Sorts the listing by last modification time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR\fR
+.ad
+.RS 6n
+.rt
+Produces single column output.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlumask\fR \fIumask\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets local \fBumask\fR to \fIumask\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmkdir\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Creates remote directory specified by \fIpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBput\fR [\fIflags\fR] \fIlocal-path\fR [\fIlocal-path\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Uploads \fIlocal-path\fR and stores it on the remote machine. If the remote
+path name is not specified, it is specified the same name it has on the local
+machine. If the \fB-P\fR flag is specified, then the file's full permission and
+access time are copied too.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpwd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Displays remote working directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Quits \fBsftp\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrename\fR \fIoldpath newpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Renames remote file from \fIoldpath\fR to \fInewpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrm\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Deletes remote file specified by \fIpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrmdir\fR \fIpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Removes remote directory specified by \fIpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsymlink\fR \fIoldpath\fR \fInewpath\fR\fR
+.ad
+.sp .6
+.RS 4n
+Creates a symbolic link from \fIoldpath\fR to \fInewpath\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBversion\fR\fR
+.ad
+.sp .6
+.RS 4n
+Displays the \fBsftp\fR protocol version.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB#\fR [\fIcomment\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Include a comment. This is useful in batch files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR [\fIcommand\fR]\fR
+.ad
+.sp .6
+.RS 4n
+If \fIcommand\fR is not specified, escapes to the local shell.
+.sp
+If \fIcommand\fR is specified, executes \fIcommand\fR in the local shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Displays help text.
+.sp
+Identical to the \fBhelp\fR command.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBftp\fR(1), \fBscp\fR(1), \fBssh\fR(1), \fBssh-add\fR(1),
+\fBssh-keygen\fR(1), \fBsshd\fR(1M), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/shcomp.1 b/usr/src/man/man1/shcomp.1
new file mode 100644
index 0000000000..6c29803983
--- /dev/null
+++ b/usr/src/man/man1/shcomp.1
@@ -0,0 +1,167 @@
+'\" te
+.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc.
+.TH shcomp 1 "27 Jan 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+shcomp \- compile a ksh93 shell script
+.SH SYNOPSIS
+.LP
+.nf
+\fBshcomp\fR [\fB-nv\fR] [\fIinfile\fR [\fIoutfile\fR]]
+.fi
+
+.LP
+.nf
+\fBshcomp\fR \fB-D\fR [\fIinfile\fR [\fIoutfile\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+If the \fB-D\fR option is not specified, \fBshcomp\fR takes a shell script,
+\fIinfile\fR, and creates a binary format file, \fIoutfile\fR, that \fBksh93\fR
+reads and executes with the same effect as the original script.
+.sp
+.LP
+Aliases are processed as the script is read. Alias definitions whose value
+requires variable expansion will not work correctly.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.br
+.na
+\fB\fB--dictionary\fR\fR
+.ad
+.RS 16n
+.rt
+Generate a list of strings that need to be placed in a message catalog for
+internationalization.
+.sp
+With this option, all double quoted strings that are preceded by \fB$\fR are
+printed, one literal per line. A literal \fB$"foo"\fR prints \fB"foo"\fR in the
+output. These are the messages that need to be translated to locale specific
+versions for internationalization.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.br
+.na
+\fB\fB--noexec\fR\fR
+.ad
+.RS 16n
+.rt
+Display warning messages for obsolete or non-conforming constructs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.br
+.na
+\fB\fB--verbose\fR\fR
+.ad
+.RS 16n
+.rt
+Display input from \fIinfile\fR onto standard error as it reads it.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinfile\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies the name of the file that contains the shell script to be used as
+input.
+.sp
+If \fIinfile\fR is omitted, the shell script is read from standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoutfile\fR\fR
+.ad
+.RS 11n
+.rt
+Specifies the name of the output file.
+.sp
+If \fIoutfile\fR is omitted, both modes write their results to standard output.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command-line interface and the system variables are Committed. The compiled
+shell code format is Private. The output of the \fB-D\fR option is Volatile.
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/shell_builtins.1 b/usr/src/man/man1/shell_builtins.1
new file mode 100644
index 0000000000..6003b3f707
--- /dev/null
+++ b/usr/src/man/man1/shell_builtins.1
@@ -0,0 +1,337 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH shell_builtins 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+shell_builtins, case, for, foreach, function, if, repeat, select, switch,
+until, while \- shell command interpreter built-in commands
+.SH DESCRIPTION
+.sp
+.LP
+The shell command interpreters \fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), and
+\fBsh\fR(1) have special built-in commands. The commands \fBcase\fR, \fBfor\fR,
+\fBforeach\fR, \fBfunction\fR, \fBif\fR, \fBrepeat\fR, \fBselect\fR,
+\fBswitch\fR, \fBuntil\fR, and \fBwhile\fR are commands in the syntax
+recognized by the shells. They are described in the \fBCommands\fR section of
+the manual pages of the respective shells. In \fBksh93\fR(1), \fBfc\fR,
+\fBhash\fR, \fBstop\fR, \fBsuspend\fR, \fBtimes\fR, and \fBtype\fR are aliases
+by default. In \fBksh93\fR, the following built-ins are bound to the \fB/bin\fR
+pathname by default and are invoked if the pathname search encounters an
+executable command of that name in the \fB/bin\fR or \fB/usr/bin\fR directory:
+\fBcat\fR, \fBchown\fR, \fBgetconf\fR, \fBhead\fR, \fBmkdir\fR, \fBrmdir\fR,
+\fBtee\fR, \fBuniq\fR, and \fBwc\fR.
+.sp
+.LP
+The remaining commands listed in the following table are built into the shells
+for reasons such as efficiency or data sharing between command invocations.
+They are described on their respective manual pages.
+.sp
+
+.sp
+.TS
+tab();
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+CommandShell
+_
+\fB++**alias\fRcsh, ksh, ksh93
+\fBbg\fRcsh, ksh, ksh93, sh
+\fB+*break\fRcsh, ksh, ksh93, sh
+\fBbuiltin\fRksh93
+\fBcase\fRcsh, ksh, ksh93, sh
+\fBcat\fRksh93
+\fBcd\fRcsh, ksh, ksh93, sh
+\fBchdir\fRcsh, sh
+\fBchown\fRksh93
+\fBcommand\fRksh93
+\fB+*continue\fRcsh, ksh, ksh93, sh
+\fBdirs\fRcsh
+\fBdisown\fRksh93
+\fBecho\fRcsh, ksh, ksh93, sh
+\fB+*eval\fRcsh, ksh, ksh93, sh
+\fB+*exec\fRcsh, ksh, ksh93, sh
+\fB+*exit\fRcsh, ksh, ksh93, sh
+\fB++**export\fRksh, ksh93, sh
+\fBfalse\fRksh, ksh93
+\fBfc\fRksh, ksh93
+\fBfg\fRcsh, ksh, ksh93, sh
+\fBfor\fRksh, ksh93, sh
+\fBforeach\fRcsh
+\fBfunction\fRksh, ksh93
+\fBgetconf\fRksh93
+\fBgetopts\fRksh, ksh93, sh
+\fBglob\fRcsh
+\fBgoto\fRcsh
+\fBhash\fRksh, ksh93, sh
+\fBhashstat\fRcsh
+\fBhead\fRksh93
+\fBhist\fRksh93
+\fBhistory\fRcsh
+\fBif\fRcsh, ksh, ksh93, sh
+\fBjobs\fRcsh, ksh, ksh93, sh
+\fBkill\fRcsh, ksh, ksh93, sh
+\fBlet\fRksh, ksh93,
+\fBlimit\fRcsh
+\fBlogin\fRcsh, ksh, ksh93, sh
+\fBlogout\fRcsh
+\fBmkdir\fRksh93
+\fBnice\fRcsh
+\fB+*newgrp\fRksh, ksh93, sh
+\fBnohup\fRcsh
+\fBnotify\fRcsh
+\fBonintr\fRcsh
+\fBpopd\fRcsh
+\fBprint\fRksh, ksh93
+\fBprintf\fRksh93
+\fBpushd\fRcsh
+\fBpwd\fRksh, ksh93, sh
+\fBread\fRksh, ksh93, sh
+\fB++**readonly\fRksh, ksh93, sh
+\fBrehash\fRcsh
+\fBrepeat\fRcsh
+\fB+*return\fRksh, ksh93, sh
+\fBselect\fRksh, ksh93
+\fB+set\fRcsh, ksh, ksh93, sh
+\fBsetenv\fRcsh
+\fBshift\fRcsh, ksh, ksh93, sh
+\fBsleep\fRksh93
+\fBsource\fRcsh
+\fBstop\fRcsh, ksh, ksh93, sh
+\fBsuspend\fRcsh, ksh, sh
+\fBswitch\fRcsh
+\fBtee\fRksh93
+\fBtest\fRksh, ksh93, sh
+\fBtime\fRcsh
+\fB*times\fRksh, ksh93, sh
+\fB*+trap\fRksh, ksh93, sh
+\fBtrue\fRksh, ksh93
+\fBtype\fRksh, ksh93, sh
+\fB++**typeset\fRksh, ksh93
+\fBulimit\fRksh, ksh93, sh
+\fBumask\fRcsh, ksh, ksh93, sh
+\fB+unalias\fRcsh, ksh, ksh93
+\fBunhash\fRcsh
+\fBuniq\fRksh93
+\fBunlimit\fRcsh
+\fB+unset\fRcsh, ksh, ksh93, sh
+\fBunsetenv\fRcsh
+\fBuntil\fRksh, ksh93, sh
+\fB*wait\fRcsh, ksh, ksh93, sh
+\fBwhence\fRksh, ksh93
+\fBwhile\fRcsh, ksh, ksh93, sh
+.TE
+
+.SS "Bourne Shell, sh, Special Commands"
+.sp
+.LP
+Input/output redirection is now permitted for these commands. File descriptor 1
+is the default output location. When Job Control is enabled, additional
+\fBSpecial Commands\fR are added to the shell's environment.
+.sp
+.LP
+In addition to these built-in reserved command words, \fBsh\fR also uses:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:\fR\fR
+.ad
+.RS 15n
+.rt
+No effect; the command does nothing. A zero exit code is returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.\fR\fIfilename\fR\fR
+.ad
+.RS 15n
+.rt
+Read and execute commands from \fIfilename\fR and return. The search path
+specified by \fBPATH\fR is used to find the directory containing
+\fIfilename\fR.
+.RE
+
+.SS "C shell, csh"
+.sp
+.LP
+Built-in commands are executed within the C shell. If a built-in command occurs
+as any component of a pipeline except the last, it is executed in a subshell.
+In addition to these built-in reserved command words, \fBcsh\fR also uses:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:\fR\fR
+.ad
+.RS 5n
+.rt
+Null command. This command is interpreted, but performs no action.
+.RE
+
+.SS "Korn Shell, ksh, Special Commands"
+.sp
+.LP
+Input/Output redirection is permitted. Unless otherwise indicated, the output
+is written on file descriptor 1 and the exit status, when there is no syntax
+error, is zero.
+.sp
+.LP
+Commands that are preceded by one or two \fB*\fR (asterisks) are treated
+specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by \fB**\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.sp
+.LP
+In addition to these built-in reserved command words, \fBksh\fR also uses:
+.sp
+.ne 2
+.mk
+.na
+\fB* \fB:\fR [ \fIarg\fR .\|.\|. ]\fR
+.ad
+.RS 29n
+.rt
+The command only expands parameters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB* \fB\&.\fR\fIfile\fR [ \fIarg\fR .\|.\|. ]\fR
+.ad
+.RS 29n
+.rt
+Read the complete \fIfile\fR then execute the commands. The commands are
+executed in the current shell environment. The search path specified by
+\fBPATH\fR is used to find the directory containing \fIfile\fR. If any
+arguments \fIarg\fR are specified, they become the positional parameters.
+Otherwise, the positional parameters are unchanged. The exit status is the exit
+status of the last command executed. the loop termination test.
+.RE
+
+.SS "Korn Shell, ksh93, Special Commands"
+.sp
+.LP
+Input/Output redirection is permitted. Unless otherwise indicated, the output
+is written on file descriptor 1 and the exit status, when there is no syntax
+error, is zero.
+.sp
+.LP
+Except for \fB:\fR, \fBtrue\fR, \fBfalse\fR, \fBecho\fR, \fBnewgrp\fR, and
+\fBlogin\fR, all built-in commands accept \fB--\fR to indicate end of options.
+They also interpret the option \fB--man\fR as a request to display the manual
+page onto standard error and \fB-?\fR as a help request which prints a usage
+message on standard error.
+.sp
+.LP
+Commands that are preceded by one or two \fB+\fR are treated specially in the
+following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.sp
+.LP
+In addition to these built-in reserved command words, \fBksh93\fR also uses:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:\fR [ \fIarg\fR .\|.\|. ]\fR
+.ad
+.RS 27n
+.rt
+The command only expands parameters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.\fR\fIname\fR [ \fIarg\fR .\|.\|. ]\fR
+.ad
+.RS 27n
+.rt
+If \fIname\fR is a function defined with the function \fIname\fR reserved word
+syntax, the function is executed in the current environment (as if it had been
+defined with the \fBname()\fR syntax.) Otherwise if \fIname\fR refers to a
+file, the file is read in its entirety and the commands are executed in the
+current shell environment. The search path specified by \fBPATH\fR is used to
+find the directory containing the file. If any arguments \fIarg\fR are
+specified, they become the positional parameters while processing the \fB\&.\fR
+command and the original positional parameters are restored upon completion.
+Otherwise the positional parameters are unchanged. The exit status is the exit
+status of the last command executed.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBIntro\fR(1), \fBalias\fR(1), \fBbreak\fR(1), \fBbuiltin\fR(1), \fBcd\fR(1),
+\fBchmod\fR(1), \fBcsh\fR(1), \fBdisown\fR(1), \fBecho\fR(1), \fBexec\fR(1),
+\fBexit\fR(1), \fBfind\fR(1), \fBgetoptcvt\fR(1), \fBgetopts\fR(1),
+\fBglob\fR(1), \fBhash\fR(1), \fBhistory\fR(1), \fBjobs\fR(1), \fBkill\fR(1),
+\fBksh\fR(1), \fBksh93\fR(1), \fBlet\fR(1), \fBlimit\fR(1), \fBlogin\fR(1),
+\fBlogout\fR(1), \fBnewgrp\fR(1), \fBnice\fR(1), \fBnohup\fR(1),
+\fBprint\fR(1), \fBprintf\fR(1), \fBpwd\fR(1), \fBread\fR(1),
+\fBreadonly\fR(1), \fBset\fR(1), \fBsh\fR(1), \fBshift\fR(1), \fBsleep\fR(1),
+\fBsuspend\fR(1), \fBtest\fR(1)\fBtest\fR(1), \fBtest\fR(1B), \fBtime\fR(1),
+\fBtimes\fR(1), \fBtrap\fR(1), \fBtypeset\fR(1), \fBumask\fR(1), \fBwait\fR(1),
+\fBchdir\fR(2), \fBchmod\fR(2), \fBcreat\fR(2), \fBumask\fR(2),
+\fBgetopt\fR(3C), \fBprofile\fR(4), \fBenviron\fR(5)
diff --git a/usr/src/man/man1/shift.1 b/usr/src/man/man1/shift.1
new file mode 100644
index 0000000000..ac0b4d5e68
--- /dev/null
+++ b/usr/src/man/man1/shift.1
@@ -0,0 +1,157 @@
+'\" te
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH shift 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+shift \- shell built-in function to traverse either a shell's argument list or
+a list of field-separated words
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBshift\fR [\fIn\fR]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBshift\fR [\fIvariable\fR]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fB*shift\fR [\fIn\fR]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fB+shift\fR [\fIn\fR]
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+The positional parameters from \fB$\fR\fIn\fR\fB+1\fR .\|.\|. are renamed
+\fB$1\fR .\|.\|. . If \fIn\fR is not specified, it is assumed to be 1.
+.SS "csh"
+.sp
+.LP
+The components of \fIargv\fR, or \fIvariable\fR, if supplied, are shifted to
+the left, discarding the first component. It is an error for the variable not
+to be set or to have a null value.
+.SS "ksh"
+.sp
+.LP
+The positional parameters from \fB$\fR\fIn\fR\fB+1\fR
+\fB$\fR\fIn\fR\fB+1 .\|.\|.\fR are renamed \fB$1 .\|.\|.\fR, default \fIn\fR is 1. The parameter
+\fIn\fR can be any arithmetic expression that evaluates to a non-negative
+number less than or equal to \fB$#\fR.
+.sp
+.LP
+On this manual page, \fBksh\fR(1) commands that are preceded by one or two *
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by ** that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+\fBshift\fR is a shell special built-in that shifts the positional parameters
+to the left by the number of places defined by \fIn\fR, or \fB1\fR if \fIn\fR
+is omitted. The number of positional parameters remaining is reduced by the
+number of places that are shifted.
+.sp
+.LP
+If \fIn\fR is specified, it is evaluated as an arithmetic expression to
+determine the number of places to shift. It is an error to shift more than the
+number of positional parameters or a negative number of places.
+.sp
+.LP
+The following exit values are returned by \fBshift\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion. The positional parameters were successfully shifted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+On this manual page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+\fBI/O\fR redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and
+field splitting and file name generation are not performed.
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/size.1 b/usr/src/man/man1/size.1
new file mode 100644
index 0000000000..7b4f59fc51
--- /dev/null
+++ b/usr/src/man/man1/size.1
@@ -0,0 +1,172 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH size 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+size \- print section sizes in bytes of object files
+.SH SYNOPSIS
+.LP
+.nf
+\fBsize\fR [\fB-f\fR] [\fB-F\fR] [\fB-n\fR] [\fB-o\fR] [\fB-V\fR] [\fB-x\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsize\fR command produces segment or section size information in bytes
+for each loaded section in ELF object files. \fBsize\fR prints out the size of
+the text, data, and bss (uninitialized data) segments (or sections) and their
+total.
+.sp
+.LP
+\fBsize\fR processes ELF object files entered on the command line. If an
+archive file is input to the \fBsize\fR command, the information for each
+object file in the archive is displayed.
+.sp
+.LP
+When calculating segment information, the \fBsize\fR command prints out the
+total file size of the non-writable segments, the total file size of the
+writable segments, and the total memory size of the writable segments minus the
+total file size of the writable segments.
+.sp
+.LP
+If it cannot calculate segment information, \fBsize\fR calculates section
+information. When calculating section information, it prints out the total
+size of sections that are allocatable, non-writable, and not \fBNOBITS\fR, the
+total size of the sections that are allocatable, writable, and not
+\fBNOBITS\fR, and the total size of the writable sections of type \fBNOBITS\fR.
+\fBNOBITS\fR sections do not actually take up space in the \fIfilename\fR.
+.sp
+.LP
+If \fBsize\fR cannot calculate either segment or section information, it
+prints an error message and stops processing the file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Prints out the size of each allocatable section, the name of the section, and
+the total of the section sizes. If there is no section data, \fBsize\fR prints
+out an error message and stops processing the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 6n
+.rt
+Prints out the size of each loadable segment, the permission flags of the
+segment, then the total of the loadable segment sizes. If there is no segment
+data, \fBsize\fR prints an error message and stops processing the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Prints out non-loadable segment or non-allocatable section sizes. If segment
+data exists, \fBsize\fR prints out the memory size of each loadable segment or
+file size of each non-loadable segment, the permission flags, and the total
+size of the segments. If there is no segment data, \fBsize\fR prints out, for
+each allocatable and non-allocatable section, the memory size, the section
+name, and the total size of the sections. If there is no segment or section
+data, \fBsize\fR prints an error message and stops processing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Prints numbers in octal, not decimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the version information for the \fBsize\fR command on the standard error
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Prints numbers in hexadecimal, not decimal.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The examples below are typical \fBsize\fR output.
+.LP
+\fBExample 1 \fRProducing size information
+.sp
+.in +2
+.nf
+example% \fBsize \fIfilename\fR\fR
+2724 + 88 + 0 = 2812
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRProducing allocatable section size information
+.sp
+.in +2
+.nf
+example% \fBsize -f \fIfilename\fR\fR
+26(.text) + 5(.init) + 5(.fini) = 36
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRProducing loadable segment size information
+.sp
+.in +2
+.nf
+example% \fBsize -F \fIfilename\fR\fR
+2724(r-x) + 88(rwx) + 0(rwx) = 2812 ... \fI(If statically linked)\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBas\fR(1), \fBld\fR(1), \fBar.h\fR(3HEAD), \fBa.out\fR(4),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+Since the size of bss sections is not known until link-edit time, the
+\fBsize\fR command will not give the true total size of pre-linked objects.
diff --git a/usr/src/man/man1/sleep.1 b/usr/src/man/man1/sleep.1
new file mode 100644
index 0000000000..3bb026d033
--- /dev/null
+++ b/usr/src/man/man1/sleep.1
@@ -0,0 +1,235 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved Portions
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sleep 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+sleep \- suspend execution for an interval
+.SH SYNOPSIS
+.SS "/usr/bin/sleep"
+.LP
+.nf
+\fB/usr/bin/sleep\fR \fIseconds\fR
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBsleep\fR \fIseconds\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsleep\fR suspends execution for at least the time in seconds specified by
+\fIseconds\fR or until a \fBSIGALRM\fR signal is received. The \fIseconds\fR
+operand can be specified as a floating point number but the actual granularity
+normally depends on the underlying system.
+.SH OPERANDS
+.SS "/usr/bin/sleep"
+.sp
+.LP
+The following operands are supported for \fB/usr/bin/sleep\fR and \fBksh93\fR's
+\fBsleep\fR built-in command:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIseconds\fR\fR
+.ad
+.RS 11n
+.rt
+A non-negative floating-point number specifying the number of seconds for which
+to suspend execution. The floating-point number may be specified in all formats
+required by C99/XPG6, including constants such as "Inf" or "infinite".
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fItime\fR\fR
+.ad
+.RS 8n
+.rt
+Specify \fItime\fR in seconds as a floating point number. The actual
+granularity depends on the underlying system, normally around 1 millisecond.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSuspending Command Execution
+.sp
+.LP
+The following example executes a command after a certain amount of time:
+
+.sp
+.in +2
+.nf
+example% \fB(sleep 105; \fIcommand\fR)&\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRExecuting a Command Every So Often
+.sp
+.LP
+The following example executes a command every so often:
+
+.sp
+.in +2
+.nf
+example% \fBwhile true
+do
+ \fIcommand\fR
+ sleep 37
+done\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSuspend command execution forever (or until a \fBSIGALRM\fR
+signal is received)
+.sp
+.in +2
+.nf
+example% sleep Inf
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRSuspending command execution for 0.5 seconds
+.sp
+.LP
+Suspending command execution for 0.5 seconds using an alternative
+floating-point representation for the value "0.5"
+
+.sp
+.in +2
+.nf
+example% printf "%a\n" 0.5
+0x1.0000000000000000000000000000p-01
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+example% sleep 0x1.0000000000000000000000000000p-01
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBsleep\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The execution was successfully suspended for at least \fItime\fR seconds, or a
+\fBSIGALRM\fR signal was received (see NOTES).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error has occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/sleep"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBksh93\fR(1), \fBwait\fR(1), \fBalarm\fR(2), \fBsleep\fR(3C),
+\fBwait\fR(3UCB), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+If the \fBsleep\fR utility receives a \fBSIGALRM\fR signal, one of the
+following actions is taken:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Terminate normally with a zero exit status.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Effectively ignore the signal.
+.RE
+.sp
+.LP
+The \fBsleep\fR utility takes the standard action for all other signals.
+.sp
+.LP
+The behavior for input values such as "NaN" (not-a-number) or negative values
+is undefined.
diff --git a/usr/src/man/man1/smbutil.1 b/usr/src/man/man1/smbutil.1
new file mode 100644
index 0000000000..c6c08792c9
--- /dev/null
+++ b/usr/src/man/man1/smbutil.1
@@ -0,0 +1,478 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Right Reserved.
+.\" Portions Copyright 1994-2008 The FreeBSD Project. All rights reserved.
+.\" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+.\" disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.TH smbutil 1 "24 Jun 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+smbutil \- Solaris CIFS client utility
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/smbutil crypt\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil login [-c] [[\fIdomain\fR/]\fIuser\fR]\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil login [-c] [\fIuser\fR[@\fIdomain\fR]]\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil logout [[\fIdomain\fR/]\fIuser\fR]\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil logout [\fIuser\fR[@\fIdomain\fR]]\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil logout -a\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil logoutall\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil lookup \fIname\fR\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil status \fIserver\fR\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil view [-A | -U \fIuser\fR] //[\fIdomain\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR\fR
+.fi
+
+.LP
+.nf
+\fB/usr/bin/smbutil [\fB-?dv\fR]\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsmbutil\fR command controls the Solaris CIFS client and issues various
+commands.
+.SS "Subcommands"
+.sp
+.LP
+The \fBsmbutil\fR command supports the following subcommands:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrypt\fR\fR
+.ad
+.sp .6
+.RS 4n
+Creates a hash of a password. This subcommand prompts for a password and writes
+the hash to standard output. This hash value is suitable for use as a value for
+the \fBpassword\fR property in the \fB$HOME/.nsmbrc\fR file.
+.sp
+The hashed password begins with two dollar signs (\fB$$\fR). If you assign this
+hashed password to the \fBpassword\fR property in your \fB$HOME/.nsmbrc\fR, be
+sure that you escape the special characters in the password.
+.sp
+If you plan to store hashed passwords in your \fB$HOME/.nsmbrc\fR file, ensure
+that the file permissions are set so that only the owner can read or write the
+file (\fB400\fR or \fB600\fR), or the passwords are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogin [-c] [ [[\fIdomain\fR/]\fIuser\fR] | [\fIuser\fR[@\fIdomain\fR]
+]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies persistent password information to be used for a CIFS server user
+account. When you specify this information, mounts can be done without a
+password prompt in non-Kerberos configurations. Kerberos sites should use
+Kerberos automatically, not prompt for a password. If a default domain is
+available in SMF or \fBnsmbrc\fR(4), the domain can be omitted. If a user name
+is not specified, the Solaris user account name is used.
+.sp
+Use the \fB-c\fR to check whether a persistent password is set for the
+specified user.
+.sp
+Passwords can also be stored for a specific server by using a server name in
+place of the domain name. This capability is useful with servers that are
+configured for "workgroup mode."
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogout [ [[\fIdomain\fR/]\fIuser\fR] | [\fIuser\fR[@\fIdomain\fR] ]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Erases the persistent passwords for the user running the command.
+.sp
+The user name and domain name portions of the name are optional. If these names
+are not specified, the user name and domain name values are taken from the
+properties set in your environment. See the \fBnsmbrc\fR(4) manual page.
+.sp
+If you stored your password for a specific server, specify the server name in
+place of the domain name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogout -a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Erases all of the persistent passwords that are stored for the user who is
+running the command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogoutall\fR\fR
+.ad
+.sp .6
+.RS 4n
+Erases all the persistent passwords that are stored by all users running the
+\fBsmbutil login\fR command.
+.sp
+This command must be run as superuser.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlookup \fIname\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+Resolves the specified \fIname\fR to an IP address.
+.sp
+This subcommand is only supported if an NBNS/WINS name server is available.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus \fIserver\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+Resolves the specified server to the NetBIOS domain and system name.
+\fIserver\fR can be an IP address or a DNS name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBview [-A | -U \fIuser\fR]
+//[\fIdomain\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists the resources available to \fIuser\fR on the specified \fIserver\fR.
+.sp
+You can specify the \fB-A\fR option to view the resources as an anonymous user
+or the \fB-U\fR \fIuser\fR option to view the resources as the specified user.
+These options are mutually exclusive.
+.sp
+If the resource includes a domain, you must escape the semicolon that appears
+after the domain name to prevent it from being interpreted by the command
+shell. For instance, surround the entire resource name with single quotes:
+\fBsmbutil view '//SALES;george@RSERVER'\fR.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following global options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 13n
+.rt
+Produces debugging output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 13n
+.rt
+Produces verbose output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.RS 13n
+.rt
+Prints a short help message.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating a Password Hash for the \fB$HOME/.nsmbrc\fR File
+.sp
+.LP
+The following example shows how to use the \fBsmbutil crypt\fR command to
+create a hash of the password you specify. Then, you can use the hash as the
+value for the \fB$HOME/.nsmbrc\fR file.
+
+.sp
+.LP
+Be sure to escape the two dollar-sign prefix of the hashed password if you
+store it as a value of the \fBpassword\fR property.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil crypt\fR
+Password:
+$$178465324253e0c07
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following \fB$HOME/.nsmbrc\fR file fragment shows how the password hash
+value is set:
+
+.sp
+.in +2
+.nf
+[RSERVER:george]
+charsets=koi8-r:cp866
+password='$$178465324253e0c07'
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRStoring a Password for a CIFS Server
+.sp
+.LP
+The following example shows how to use the \fBsmbutil login\fR command to store
+the \fBroot@example\fR user's password.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil login root@example\fR
+Password:
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRErasing the Stored Password
+.sp
+.LP
+The following example shows how to use the \fBsmbutil logout\fR command to
+remove the \fBroot@example\fR user's password.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil logout root@example\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRViewing Available Shares
+.sp
+.LP
+The following example shows how to use the \fBsmbutil view\fR command to see
+the available shares for user \fBroot\fR on server \fBexample\fR.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil view //root@example\fR
+Password:
+Share Type Comment
+-------------------------------
+netlogon disk Network Logon Service
+ipc$ IPC IPC Service (Samba Server)
+tmp disk Temporary file space
+public disk Public Stuff
+root disk Home Directories
+
+5 shares listed from 5 available
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRViewing Available Shares as an Anonymous User
+.sp
+.LP
+The following example shows how to use the \fBsmbutil view\fR command to
+anonymously view the available shares on the \fBexample\fR server.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil view -A //example\fR
+Share Type Comment
+-------------------------------
+netlogon disk Network Logon Service
+ipc$ IPC IPC Service (Samba Server)
+tmp disk Temporary file space
+public disk Public Stuff
+ethereal disk /export/ethereal
+myshare disk Jan's stuff
+
+6 shares listed from 6 available
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRObtaining the IP Address From a Server Name
+.sp
+.LP
+The following example shows how to use the \fBsmbutil lookup\fR command to
+obtain the IP address of the \fBexample\fR server.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil lookup example\fR
+Got response from 192.168.168.210
+IP address of example: 192.168.168.210
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRObtaining the NetBIOS Domain and System Name Using the Server
+Name
+.sp
+.LP
+The following example shows how to use the \fBsmbutil status\fR command to
+obtain the NetBIOS domain and system name of the \fBexample\fR server. The
+server name, \fBexample\fR, is specified on the command line.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil status example\fR
+Domain: WORKGROUP
+Server: EXAMPLE
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRObtaining the NetBIOS Domain and System Name Using the IP
+Address
+.sp
+.LP
+The following example shows how to use the \fBsmbutil status\fR command to
+obtain the NetBIOS domain and system name of the \fBexample\fR server. The IP
+address, \fB192.168.168.210\fR, is specified on the command line.
+
+.sp
+.in +2
+.nf
+$ \fBsmbutil status 192.168.168.210\fR
+Domain: WORKGROUP
+Server: EXAMPLE
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.nsmbrc\fR\fR
+.ad
+.sp .6
+.RS 4n
+User-settable mount point configuration file to store the description for each
+connection.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The output is Uncommitted. The rest of the interface is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBmount_smbfs\fR(1M), \fBnsmbrc\fR(4), \fBattributes\fR(5), \fBsmbfs\fR(7FS)
+.SH AUTHORS
+.sp
+.LP
+This manual page contains material originally authored by Boris Popov,
+\fBbp@butya.kz\fR, \fBbp@FreeBSD.org\fR.
+.SH NOTES
+.sp
+.LP
+The Solaris CIFS client always attempts to use \fBgethostbyname()\fR to resolve
+host names. If the host name cannot be resolved, the CIFS client uses NetBIOS
+name resolution (NBNS). By default, the Solaris CIFS client permits the use of
+NBNS to enable Solaris CIFS clients in Windows environments to work without
+additional configuration.
+.sp
+.LP
+Since NBNS has been exploited in the past, you might want to disable it. To
+disable NBNS, set the \fBnbns-enabled\fR service management facility property
+to \fBfalse\fR. By default, \fBnbns-enabled\fR is set to \fBtrue\fR.
diff --git a/usr/src/man/man1/soelim.1 b/usr/src/man/man1/soelim.1
new file mode 100644
index 0000000000..2c17d9f257
--- /dev/null
+++ b/usr/src/man/man1/soelim.1
@@ -0,0 +1,70 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH soelim 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+soelim \- resolve and eliminate .so requests from nroff or troff input
+.SH SYNOPSIS
+.LP
+.nf
+\fBsoelim\fR [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsoelim\fR reads the specified files or the standard input and performs the
+textual inclusion implied by the \fBnroff\fR(1) directives of the form:
+.sp
+.in +2
+.nf
+\fB\&.so\fR \fIsomefile\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+when they appear at the beginning of input lines.
+.sp
+.LP
+This is useful as programs such as \fBtbl\fR(1) do not normally do this. It
+allows the placement of individual tables in separate files to be run as a part
+of a large document.
+.sp
+.LP
+An argument consisting of \fB\(mi\fR is taken to be a file name corresponding
+to the standard input.
+.sp
+.LP
+Inclusion can be suppressed by using a single quote (\fB\&'\fR) instead of a
+dot (\fB\&.\fR) that is,
+.sp
+.in +2
+.nf
+ ' so /usr/share/lib/tmac/tmac.s
+.fi
+.in -2
+.sp
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fBsoelim\fR Command
+.sp
+.LP
+The following is an example of the \fBsoelim\fR command:
+
+.sp
+.in +2
+.nf
+\fBexample% soelim exum?.n | tbl | nroff\fR \fB-ms\fR \fB| col | lpr\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmore\fR(1), \fBnroff\fR(1), \fBtbl\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/sort.1 b/usr/src/man/man1/sort.1
new file mode 100644
index 0000000000..31a46ef55c
--- /dev/null
+++ b/usr/src/man/man1/sort.1
@@ -0,0 +1,745 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sort 1 "19 Nov 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+sort \- sort, merge, or sequence check text files
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/sort\fR [\fB-bcdfimMnru\fR] [\fB-k\fR \fIkeydef\fR] [\fB-o\fR \fIoutput\fR]
+ [\fB-S\fR \fIkmem\fR] [\fB-t\fR \fIchar\fR] [\fB-T\fR \fIdirectory\fR] [\fB-y\fR [\fIkmem\fR]]
+ [\fB-z\fR \fIrecsz\fR] [+\fIpos1\fR [-\fIpos2\fR]] [\fIfile\fR]...
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/sort\fR [\fB-bcdfimMnru\fR] [\fB-k\fR \fIkeydef\fR] [\fB-o\fR \fIoutput\fR]
+ [\fB-S\fR \fIkmem\fR] [\fB-t\fR \fIchar\fR] [\fB-T\fR \fIdirectory\fR] [\fB-y\fR [\fIkmem\fR]]
+ [\fB-z\fR \fIrecsz\fR] [+\fIpos1\fR [-\fIpos2\fR]] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsort\fR command sorts lines of all the named files together and writes
+the result on the standard output.
+.sp
+.LP
+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. Lines are
+ordered according to the collating sequence of the current locale.
+.SH OPTIONS
+.sp
+.LP
+The following options alter the default behavior:
+.SS "/usr/bin/sort"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Checks that the single input file is ordered as specified by the arguments and
+the collating sequence of the current locale. The exit code is set and no
+output is produced unless the file is out of sort.
+.RE
+
+.SS "/usr/xpg4/bin/sort"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 16n
+.rt
+Same as \fB/usr/bin/sort\fR except no output is produced under any
+circumstances.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 16n
+.rt
+Merges only. The input files are assumed to be already sorted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutput\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the name of an output file to be used instead of the standard output.
+This file can be the same as one of the input files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIkmem\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the maximum amount of swap-based memory used for sorting, in
+kilobytes (the default unit). \fIkmem\fR can also be specified directly as a
+number of bytes (b), kilobytes (k), megabytes (m), gigabytes (g), or terabytes
+(t); or as a percentage (%) of the installed physical memory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fIdirectory\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the \fIdirectory\fR in which to place temporary files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 16n
+.rt
+Unique: suppresses all but one in each set of lines having equal keys. If used
+with the \fB-c\fR option, checks that there are no lines with duplicate keys in
+addition to checking that the input file is sorted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR \fIkmem\fR\fR
+.ad
+.RS 16n
+.rt
+(obsolete). This option was used to specify the amount of main memory initially
+used by \fBsort\fR. Its functionality is not appropriate for a virtual memory
+system; memory usage for \fBsort\fR is now specified using the \fB-S\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIrecsz\fR\fR
+.ad
+.RS 16n
+.rt
+(obsolete). This option was used to prevent abnormal termination when lines
+longer than the system-dependent default buffer size are encountered. Because
+\fBsort\fR automatically allocates buffers large enough to hold the longest
+line, this option has no effect.
+.RE
+
+.SS "Ordering Options"
+.sp
+.LP
+The default sort order depends on the value of \fBLC_COLLATE\fR. If
+\fBLC_COLLATE\fR is set to \fBC\fR, sorting is in \fBASCII\fR order. If
+\fBLC_COLLATE\fR is set to \fBen_US\fR, sorting is case insensitive except when
+the two strings are otherwise equal and one has an uppercase letter earlier
+than the other. Other locales have other sort orders.
+.sp
+.LP
+The following options override the default ordering rules. When ordering
+options appear independent of any key field specifications, the requested field
+ordering rules are applied globally to all sort keys. When attached to a
+specific key (see \fBSort Key Options\fR), the specified ordering options
+override all global ordering options for that key. In the obsolescent forms, if
+one or more of these options follows a \fI+pos1\fR option, it affects only the
+key field specified by that preceding option.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Dictionary order: only letters, digits, and blanks (spaces and tabs) are
+significant in comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Folds lower-case letters into upper case.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Ignores non-printable characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR\fR
+.ad
+.RS 6n
+.rt
+Compares as months. The first three non-blank characters of the field are
+folded to upper case and compared. For example, in English the sorting order is
+\fB"JAN" < "FEB" < .\|.\|. < "DEC"\fR. Invalid fields compare low to
+\fB"JAN"\fR. The \fB-M\fR option implies the \fB-b\fR option (see below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Restricts the sort key to an initial numeric string, consisting of optional
+blank characters, optional minus sign, and zero or more digits with an optional
+radix character and thousands separators (as defined in the current locale),
+which is sorted by arithmetic value. An empty digit string is treated as zero.
+Leading zeros and signs on zeros do not affect ordering.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Reverses the sense of comparisons.
+.RE
+
+.SS "Field Separator Options"
+.sp
+.LP
+The treatment of field separators can be altered using the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 11n
+.rt
+Ignores leading blank characters when determining the starting and ending
+positions of a restricted sort key. If the \fB-b\fR option is specified before
+the first sort key option, it is applied to all sort key options. Otherwise,
+the \fB-b\fR option can be attached independently to each \fB-k\fR
+\fIfield_start\fR, \fIfield_end\fR, or +\fIpos1\fR or \(mi\fIpos2\fR
+option-argument (see below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIchar\fR\fR
+.ad
+.RS 11n
+.rt
+Use \fIchar\fR as the field separator character. \fIchar\fR is not considered
+to be part of a field (although it can be included in a sort key). Each
+occurrence of \fIchar\fR is significant (for example, \fI<char><char>\fR
+delimits an empty field). If \fB-t\fR is not specified, blank characters are
+used as default field separators; each maximal non-empty sequence of blank
+characters that follows a non-blank character is a field separator.
+.RE
+
+.SS "Sort Key Options"
+.sp
+.LP
+Sort keys can be specified using the options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIkeydef\fR\fR
+.ad
+.RS 19n
+.rt
+The \fIkeydef\fR argument is a restricted sort key field definition. The format
+of this definition is:
+.sp
+.in +2
+.nf
+\fB-k\fR \fIfield_start\fR [\fItype\fR] [\fB,\fR\fIfield_end\fR [\fItype\fR] ]
+.fi
+.in -2
+.sp
+
+where:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfield_start\fR and \fIfield_end\fR\fR
+.ad
+.sp .6
+.RS 4n
+define a key field restricted to a portion of the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItype\fR\fR
+.ad
+.sp .6
+.RS 4n
+is a modifier from the list of characters \fBbdfiMnr\fR. The \fBb\fR modifier
+behaves like the \fB-b\fR option, but applies only to the \fIfield_start\fR or
+\fIfield_end\fR to which it is attached and characters within a field are
+counted from the first non-blank character in the field. (This applies
+separately to \fIfirst_character\fR and \fIlast_character\fR.) The other
+modifiers behave like the corresponding options, but apply only to the key
+field to which they are attached. They have this effect if specified with
+\fIfield_start\fR, \fIfield_end\fR or both. If any modifier is attached to a
+\fIfield_start\fR or to a \fIfield_end\fR, no option applies to either.
+.RE
+
+When there are multiple key fields, later keys are compared only after all
+earlier keys compare equal. Except when the \fB-u\fR option is specified, lines
+that otherwise compare equal are ordered as if none of the options \fB-d\fR,
+\fB-f\fR, \fB-i\fR, \fB-n\fR or \fB-k\fR were present (but with \fB-r\fR still
+in effect, if it was specified) and with all bytes in the lines significant to
+the comparison.
+.sp
+The notation:
+.sp
+.in +2
+.nf
+\fB-k\fR \fIfield_start\fR[\fItype\fR][\fB,\fR\fIfield_end\fR[\fItype\fR]]
+.fi
+.in -2
+.sp
+
+defines a key field that begins at \fIfield_start\fR and ends at
+\fIfield_end\fR inclusive, unless \fIfield_start\fR falls beyond the end of the
+line or after \fIfield_end\fR, in which case the key field is empty. A missing
+\fIfield_end\fR means the last character of the line.
+.sp
+A field comprises a maximal sequence of non-separating characters and, in the
+absence of option \fB-t\fR, any preceding field separator.
+.sp
+The \fIfield_start\fR portion of the \fIkeydef\fR option-argument has the form:
+.sp
+.in +2
+.nf
+\fIfield_number\fR[\fB\&.\fR\fIfirst_character\fR]
+.fi
+.in -2
+.sp
+
+Fields and characters within fields are numbered starting with 1.
+\fIfield_number\fR and \fIfirst_character\fR, interpreted as positive decimal
+integers, specify the first character to be used as part of a sort key. If
+\fB\&.\fR\fIfirst_character\fR is omitted, it refers to the first character of
+the field.
+.sp
+The \fIfield_end\fR portion of the \fIkeydef\fR option-argument has the form:
+.sp
+.in +2
+.nf
+\fIfield_number\fR[\fB\&.\fR\fIlast_character\fR]
+.fi
+.in -2
+.sp
+
+The \fIfield_number\fR is as described above for \fIfield_start\fR.
+\fIlast_character\fR, interpreted as a non-negative decimal integer, specifies
+the last character to be used as part of the sort key. If \fIlast_character\fR
+evaluates to zero or \fB\&.\fR\fIlast_character\fR is omitted, it refers to the
+last character of the field specified by \fIfield_number\fR.
+.sp
+If the \fB-b\fR option or \fBb\fR type modifier is in effect, characters within
+a field are counted from the first non-blank character in the field. (This
+applies separately to \fIfirst_character\fR and \fIlast_character\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fB+\fR\fIpos1\fR [\fB-\fR\fIpos2\fR]]\fR
+.ad
+.RS 19n
+.rt
+(obsolete). Provide functionality equivalent to the \fB-k\fR\fIkeydef\fR
+option.
+.sp
+\fIpos1\fR and \fIpos2\fR each have the form \fIm\fR\fB\&.\fR\fIn\fR optionally
+followed by one or more of the flags \fBbdfiMnr\fR. A starting position
+specified by \fB+\fR\fIm\fR\fB\&.\fR\fIn\fR is interpreted to mean the
+\fIn\fR+1st character in the \fIm\fR+1st field. A missing \fB\&.\fR\fIn\fR
+means \fB\&.0\fR, indicating the first character of the \fIm\fR+1st field. If
+the \fBb\fR flag is in effect \fIn\fR is counted from the first non-blank in
+the \fIm\fR+1st field; \fB+\fR\fIm\fR\fB\&.0b\fR refers to the first non-blank
+character in the \fIm\fR+1st field.
+.sp
+A last position specified by \fB\(mi\fR\fIm\fR\fB\&.\fR\fIn\fR is interpreted
+to mean the \fIn\fRth character (including separators) after the last character
+of the \fIm\fRth field. A missing \fB\&.\fR\fIn\fR means \fB\&.\fR0, indicating
+the last character of the \fIm\fRth field. If the \fBb\fR flag is in effect
+\fIn\fR is counted from the last leading blank in the \fIm\fR+1st field;
+\fB\(mi\fR\fIm\fR\fB\&.\fR1\fBb\fR refers to the first non-blank in the
+\fIm\fR+1st field.
+.sp
+The fully specified \fI+pos1\fR \fI\(mipos2\fR form with type modifiers \fBT\fR
+and \fBU\fR:
+.sp
+.in +2
+.nf
++\fBw\fR.\fBxT\fR -\fBy\fR.\fBzU\fR
+.fi
+.in -2
+.sp
+
+is equivalent to:
+.sp
+.in +2
+.nf
+undefined (z==0 & U contains \fIb\fR & \fI-t\fR is present)
+-k w+1.x+1T,y.0U (z==0 otherwise)
+-k w+1.x+1T,y+1.zU (z > 0)
+.fi
+.in -2
+.sp
+
+Implementations support at least nine occurrences of the sort keys (the
+\fB-k\fR option and obsolescent \fB+\fR\fIpos1\fR and
+\fB\(mi\fR\fIpos2\fR\fB)\fR which are significant in command line order. If no
+sort key is specified, a default sort key of the entire line is used.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file to be sorted, merged or checked. If no \fIfile\fR
+operands are specified, or if a \fIfile\fR operand is \fB\(mi\fR, the standard
+input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBsort\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.sp
+.LP
+In the following examples, first the preferred and then the obsolete way of
+specifying \fBsort\fR keys are given as an aid to understanding the
+relationship between the two forms.
+.LP
+\fBExample 1 \fRSorting with the Second Field as a sort Key
+.sp
+.LP
+Either of the following commands sorts the contents of \fBinfile\fR with the
+second field as the sort key:
+
+.sp
+.in +2
+.nf
+example% \fBsort -k 2,2 infile\fR
+example% \fBsort +1 \(mi2 infile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRSorting in Reverse Order
+.sp
+.LP
+Either of the following commands sorts, in reverse order, the contents of
+\fBinfile1\fR and \fBinfile2\fR, placing the output in \fBoutfile\fR and using
+the second character of the second field as the sort key (assuming that the
+first character of the second field is the field separator):
+
+.sp
+.in +2
+.nf
+example% \fBsort -r -o outfile -k 2.2,2.2 infile1 infile2\fR
+example% \fBsort -r -o outfile +1.1 \(mi1.2 infile1 infile2\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRSorting Using a Specified Character in One of the Files
+.sp
+.LP
+Either of the following commands sorts the contents of \fBinfile1\fR and
+\fBinfile2\fR using the second non-blank character of the second field as the
+sort key:
+
+.sp
+.in +2
+.nf
+example% \fBsort -k 2.2b,2.2b infile1 infile2\fR
+example% \fBsort +1.1b \(mi1.2b infile1 infile2\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRSorting by Numeric User ID
+.sp
+.LP
+Either of the following commands prints the \fBpasswd\fR(4) file (user
+database) sorted by the numeric user ID (the third colon-separated field):
+
+.sp
+.in +2
+.nf
+example% \fBsort -t : -k 3,3n /etc/passwd\fR
+example% \fBsort -t : +2 \(mi3n /etc/passwd\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRPrinting Sorted Lines Excluding Lines that Duplicate a Field
+.sp
+.LP
+Either of the following commands prints the lines of the already sorted file
+\fBinfile\fR, suppressing all but one occurrence of lines having the same third
+field:
+
+.sp
+.in +2
+.nf
+example% \fBsort -um -k 3.1,3.0 infile\fR
+example% \fBsort -um +2.0 \(mi3.0 infile\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRSorting by Host IP Address
+.sp
+.LP
+Either of the following commands prints the \fBhosts\fR(4) file (IPv4 hosts
+database), sorted by the numeric \fBIP\fR address (the first four numeric
+fields):
+
+.sp
+.in +2
+.nf
+example$ \fBsort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n /etc/hosts\fR
+example$ \fBsort -t . +0 -1n +1 -2n +2 -3n +3 -4n /etc/hosts\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Since '\fB\&.\fR' is both the field delimiter and, in many locales, the decimal
+separator, failure to specify both ends of the field leads to results where the
+second field is interpreted as a fractional portion of the first, and so forth.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBsort\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_CTYPE\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the locale for the interpretation of sequences of bytes of text data
+as characters (for example, single- versus multi-byte characters in arguments
+and input files) and the behavior of character classification for the \fB-b\fR,
+\fB-d\fR, \fB-f\fR, \fB-i\fR and \fB-n\fR options.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLC_NUMERIC\fR\fR
+.ad
+.RS 14n
+.rt
+Determine the locale for the definition of the radix character and thousands
+separator for the \fB-n\fR option.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input files were output successfully, or \fB-c\fR was specified and the
+input file was correctly sorted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+Under the \fB-c\fR option, the file was not ordered as specified, or if the
+\fB-c\fR and \fB-u\fR options were both specified, two input lines were found
+with equal keys.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/tmp/stm???\fR\fR
+.ad
+.RS 19n
+.rt
+Temporary files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/sort"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/sort"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcomm\fR(1), \fBjoin\fR(1), \fBuniq\fR(1), \fBnl_langinfo\fR(3C),
+\fBstrftime\fR(3C), \fBhosts\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+Comments and exits with non-zero status for various trouble conditions (for
+example, when input lines are too long), and for disorders discovered under the
+\fB-c\fR option.
+.SH NOTES
+.sp
+.LP
+When the last line of an input file is missing a \fBnew-line\fR character,
+\fBsort\fR appends one, prints a warning message, and continues.
+.sp
+.LP
+\fBsort\fR does not guarantee preservation of relative line ordering on equal
+keys.
+.sp
+.LP
+One can tune \fBsort\fR performance for a specific scenario using the \fB-S\fR
+option. However, one should note in particular that \fBsort\fR has greater
+knowledge of how to use a finite amount of memory for sorting than the virtual
+memory system. Thus, a sort invoked to request an extremely large amount of
+memory via the \fB-S\fR option could perform extremely poorly.
+.sp
+.LP
+As noted, certain of the field modifiers (such as \fB-M\fR and \fB-d\fR) cause
+the interpretation of input data to be done with reference to locale-specific
+settings. The results of this interpretation can be unexpected if one's
+expectations are not aligned with the conventions established by the locale. In
+the case of the month keys, \fBsort\fR does not attempt to compensate for
+approximate month abbreviations. The precise month abbreviations from
+\fBnl_langinfo\fR(3C) or \fBstrftime\fR(3C) are the only ones recognized. For
+printable or dictionary order, if these concepts are not well-defined by the
+locale, an empty sort key might be the result, leading to the next key being
+the significant one for determining the appropriate ordering.
diff --git a/usr/src/man/man1/sortbib.1 b/usr/src/man/man1/sortbib.1
new file mode 100644
index 0000000000..3a10751ae2
--- /dev/null
+++ b/usr/src/man/man1/sortbib.1
@@ -0,0 +1,326 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sortbib 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+sortbib \- sort a bibliographic database
+.SH SYNOPSIS
+.LP
+.nf
+\fBsortbib\fR [\fB-s\fR \fIKEYS\fR] \fIdatabase\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsortbib\fR sorts files of records containing \fBrefer\fR key-letters by
+user-specified keys. Records may be separated by blank lines, or by
+`\fB\&.[\fR' and `\fB\&.]\fR' delimiters, but the two styles may not be mixed
+together. This program reads through each \fIdatabase\fR and pulls out key
+fields, which are sorted separately. The sorted key fields contain the file
+pointer, byte offset, and length of corresponding records. These records are
+delivered using disk seeks and reads, so \fBsortbib\fR may not be used in a
+pipeline to read standard input.
+.sp
+.LP
+The most common key-letters and their meanings are given below.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%A\fR\fR
+.ad
+.RS 8n
+.rt
+Author's name
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%B\fR\fR
+.ad
+.RS 8n
+.rt
+Book containing article referenced
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%C\fR\fR
+.ad
+.RS 8n
+.rt
+City (place of publication)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%D\fR\fR
+.ad
+.RS 8n
+.rt
+Date of publication
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%E\fR\fR
+.ad
+.RS 8n
+.rt
+Editor of book containing article referenced
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%F\fR\fR
+.ad
+.RS 8n
+.rt
+Footnote number or label (supplied by \fBrefer\fR)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%G\fR\fR
+.ad
+.RS 8n
+.rt
+Government order number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%H\fR\fR
+.ad
+.RS 8n
+.rt
+Header commentary, printed before reference
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%I\fR\fR
+.ad
+.RS 8n
+.rt
+Issuer (publisher)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%J\fR\fR
+.ad
+.RS 8n
+.rt
+Journal containing article
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%K\fR\fR
+.ad
+.RS 8n
+.rt
+Keywords to use in locating reference
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%L\fR\fR
+.ad
+.RS 8n
+.rt
+Label field used by \fB-k\fR option of \fBrefer\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%M\fR\fR
+.ad
+.RS 8n
+.rt
+Bell Labs Memorandum (undefined)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%N\fR\fR
+.ad
+.RS 8n
+.rt
+Number within volume
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%O\fR\fR
+.ad
+.RS 8n
+.rt
+Other commentary, printed at end of reference
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%P\fR\fR
+.ad
+.RS 8n
+.rt
+Page number(s)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%Q\fR\fR
+.ad
+.RS 8n
+.rt
+Corporate or Foreign Author (unreversed)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%R\fR\fR
+.ad
+.RS 8n
+.rt
+Report, paper, or thesis (unpublished)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%S\fR\fR
+.ad
+.RS 8n
+.rt
+Series title
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%T\fR\fR
+.ad
+.RS 8n
+.rt
+Title of article or book
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%V\fR\fR
+.ad
+.RS 8n
+.rt
+Volume number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%X\fR\fR
+.ad
+.RS 8n
+.rt
+Abstract \(em used by \fBroffbib\fR, not by \fBrefer\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%Y,Z\fR\fR
+.ad
+.RS 8n
+.rt
+Ignored by \fBrefer\fR
+.RE
+
+.sp
+.LP
+By default, \fBsortbib\fR alphabetizes by the first \fB%A\fR and the \fB%D\fR
+fields, which contain the senior author and date.
+.sp
+.LP
+\fBsortbib\fR sorts on the last word on the \fB%A\fR line, which is assumed to
+be the author's last name. A word in the final position, such as `\fBjr.\fR' or
+`\fBed.\fR', will be ignored if the name beforehand ends with a comma. Authors
+with two-word last names or unusual constructions can be sorted correctly by
+using the \fBnroff\fR convention `\fB\e0\fR\&' in place of a blank. A \fB%Q\fR
+field is considered to be the same as \fB%A\fR, except sorting begins with the
+first, not the last, word. \fBsortbib\fR sorts on the last word of the \fB%D\fR
+line, usually the year. It also ignores leading articles (like `\fBA\fR' or
+`\fBThe\fR') when sorting by titles in the \fB%T\fR or \fB%J\fR fields; it will
+ignore articles of any modern European language. If a sort-significant field is
+absent from a record, \fBsortbib\fR places that record before other records
+containing that field.
+.sp
+.LP
+No more than 16 databases may be sorted together at one time. Records longer
+than 4096 characters will be truncated.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIKEYS\fR\fR
+.ad
+.RS 10n
+.rt
+Specify new \fIKEYS\fR. For instance, \fB-sATD\fR will sort by author, title,
+and date, while \fB-sA+D\fR will sort by all authors, and date. Sort keys past
+the fourth are not meaningful.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBaddbib\fR(1), \fBindxbib\fR(1), \fBlookbib\fR(1), \fBrefer\fR(1),
+\fBroffbib\fR(1), \fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+Records with missing author fields should probably be sorted by title.
diff --git a/usr/src/man/man1/sotruss.1 b/usr/src/man/man1/sotruss.1
new file mode 100644
index 0000000000..a9a5c4b25f
--- /dev/null
+++ b/usr/src/man/man1/sotruss.1
@@ -0,0 +1,115 @@
+'\" te
+.\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sotruss 1 "12 May 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+sotruss \- trace shared library procedure calls
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/sotruss\fR [\fB-f\fR] [\fB-F\fR \fIbindfromlist\fR] [\fB-T\fR \fIbindtolist\fR]
+ [\fB-o\fR \fIoutputfile\fR] executable [executable arguments...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsotruss\fR executes the specified command and produces a trace of the
+library calls that it performs. Each line of the trace output reports what
+bindings are occurring between dynamic objects as each procedure call is
+executed. \fBsotruss\fR traces all of the procedure calls that occur between
+dynamic objects via the \fIProcedure Linkage Table\fR, so only those procedure
+calls which are bound via the \fIProcedure\fR \fILinkage\fR \fITable\fR will be
+traced. See \fILinker and Libraries Guide\fR
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fI bindfromlist\fR\fR
+.ad
+.RS 19n
+.rt
+A colon-separated list of libraries that are to be traced. Only calls from
+these libraries will be traced. The default is to trace calls from the main
+executable only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fI bindtolist\fR\fR
+.ad
+.RS 19n
+.rt
+A colon-separated list of libraries that are to be traced. Only calls to these
+libraries will be traced. The default is to trace all calls.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fI outputfile\fR\fR
+.ad
+.RS 19n
+.rt
+\fBsotruss\fR output will be directed to the \fIoutputfile\fR. If this option
+is combined with the \fB-f\fR option then the \fIpid\fR of the executing
+program will be placed at the end of the filename. By default \fBsotruss\fR
+output is placed on \fBstderr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 19n
+.rt
+Follow all children created by \fBfork()\fR and print \fBtruss\fR output on
+each child process. This option will also cause a \fIpid\fR to be output on
+each \fBtruss\fR output line.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example of \fBsotruss\fR.
+.sp
+.LP
+A simple example shows the tracing of a simple \fBls\fR command:
+
+.sp
+.in +2
+.nf
+% sotruss ls | more
+ls -> libc.so.1:*atexit(0xef7d7d1c, 0x23c00, 0x0)
+ls -> libc.so.1:*atexit(0x1392c, 0xef7d7d1c, 0xef621bb0)
+ls -> libc.so.1:*setlocale(0x6, 0x1396c, 0xef621ba8)
+ls -> libc.so.1:*textdomain(0x13970, 0x1396c, 0xef621ba8)
+ls -> libc.so.1:*time(0x0, 0xef61f6fc, 0xef621ba8)
+ls -> libc.so.1:*isatty(0x1, 0xef61f6fc, 0x0)
+ls -> libc.so.1:*getopt(0x1, 0xeffff8fc, 0x13980)
+ls -> libc.so.1:*malloc(0x100, 0x0, 0x0)
+ls -> libc.so.1:*malloc(0x9000, 0x0, 0x0)
+ls -> libc.so.1:*lstat64(0x23ee8, 0xeffff7a0, 0x0)
+\&...
+ls -> libc.so.1:*printf(0x13a64, 0x26208, 0x23ef0)
+ls -> libc.so.1:*printf(0x13a64, 0x26448, 0x23ef0)
+ls -> libc.so.1:*exit(0x0, 0x24220, 0x2421c)
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBld.so.1\fR(1), \fBtruss\fR(1), \fBwhocalls\fR(1), \fBfork\fR(2),
+\fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/spell.1 b/usr/src/man/man1/spell.1
new file mode 100644
index 0000000000..6e87a3d54a
--- /dev/null
+++ b/usr/src/man/man1/spell.1
@@ -0,0 +1,291 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH spell 1 "23 " "SunOS 5.11" "User Commands"
+.SH NAME
+spell, hashmake, spellin, hashcheck \- report spelling errors
+.SH SYNOPSIS
+.LP
+.nf
+\fBspell\fR [\fB-bilvx\fR] [+ \fIlocal_file\fR] [\fIfile\fR] ...
+.fi
+
+.LP
+.nf
+\fB/usr/lib/spell/hashmake\fR
+.fi
+
+.LP
+.nf
+\fB/usr/lib/spell/spellin\fR \fIn\fR
+.fi
+
+.LP
+.nf
+\fB/usr/lib/spell/hashcheck\fR \fIspelling_list\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBspell\fR command collects words from the named \fBfile\fRs and looks
+them up in a spelling list. Words that neither occur among nor are derivable
+(by applying certain inflections, prefixes, or suffixes) from words in the
+spelling list are written to the standard output.
+.sp
+.LP
+If there are no \fBfile\fR arguments, words to check are collected from the
+standard input. \fBspell\fR ignores most \fBtroff\fR(1), \fBtbl\fR(1), and
+\fBeqn\fR(1) constructs. Copies of all output words are accumulated in the
+history file (\fBspellhist\fR), and a \fBstop\fR list filters out misspellings
+(for example, \fBtheir=thy\(miy+ier\fR) that would otherwise pass.
+.sp
+.LP
+By default, \fBspell\fR (like \fBderoff\fR(1)) follows chains of included files
+(\fB\&.so\fR and \fB\&.nx\fR \fBtroff\fR(1) requests), unless the names of such
+included files begin with \fB/usr/lib\fR.
+.sp
+.LP
+The standard spelling list is based on many sources, and while more haphazard
+than an ordinary dictionary, is also more effective in respect to proper names
+and popular technical words. Coverage of the specialized vocabularies of
+biology, medicine and chemistry is light.
+.sp
+.LP
+Three programs help maintain and check the hash lists used by \fBspell\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhashmake\fR\fR
+.ad
+.RS 13n
+.rt
+Reads a list of words from the standard input and writes the corresponding
+nine-digit hash code on the standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBspellin\fR\fR
+.ad
+.RS 13n
+.rt
+Reads \fIn\fR hash codes from the standard input and writes a compressed
+spelling list on the standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhashcheck\fR\fR
+.ad
+.RS 13n
+.rt
+Reads a compressed \fIspelling_list\fR and recreates the nine-digit hash codes
+for all the words in it. It writes these codes on the standard output.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 15n
+.rt
+Check British spelling. Besides preferring \fBcentre\fR, \fBcolour\fR,
+\fBprogramme\fR, \fBspeciality\fR, \fBtravelled\fR, and so forth, this option
+insists upon \fI\(miise\fR in words like \fBstandardise\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 15n
+.rt
+Cause \fBderoff\fR(1) to ignore \fB\&.so\fR and \fB\&.nx\fR commands. If
+\fBderoff\fR(1) is not present on the system, then this option is ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 15n
+.rt
+Follow the chains of \fIall\fR included files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 15n
+.rt
+Print all words not literally in the spelling list, as well as plausible
+derivations from the words in the spelling list.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Print every plausible stem, one per line, with \fB=\fR preceding each word.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIlocal_file\fR\fR
+.ad
+.RS 15n
+.rt
+Specify a set of words that are correct spellings (in addition to \fBspell\fR's
+own spelling list) for each job. \fIlocal_file\fR is the name of a
+user-provided file that contains a sorted list of words, one per line. Words
+found in \fIlocal_file\fR are removed from \fBspell\fR's output. Use
+\fBsort\fR(1) to order \fIlocal_file\fR in ASCII collating sequence. If this
+ordering is not followed, some entries in \fIlocal_file\fR might be ignored.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a text file to check for spelling errors. If no files are named,
+words are collected from the standard input.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBspell\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR,
+and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD_SPELL=/usr/lib/spell/hlist[ab]\fR\fR
+.ad
+.sp .6
+.RS 4n
+hashed spelling lists, American & British
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBS_SPELL=/usr/lib/spell/hstop\fR\fR
+.ad
+.sp .6
+.RS 4n
+hashed stop list
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBH_SPELL=/var/adm/spellhist\fR\fR
+.ad
+.sp .6
+.RS 4n
+history file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/dict/words\fR\fR
+.ad
+.sp .6
+.RS 4n
+master dictionary
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBderoff\fR(1), \fBeqn\fR(1), \fBsort\fR(1), \fBtbl\fR(1), \fBtroff\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBspell\fR works only on English words defined in the U.S. \fBASCII\fR
+codeset.
+.sp
+.LP
+Because copies of all output are accumulated in the \fBspellhist\fR file,
+\fBspellhist\fR might grow quite large and require purging.
+.SH BUGS
+.sp
+.LP
+The spelling list's coverage is uneven. New installations might wish to monitor
+the output for several months to gather local additions.
+.sp
+.LP
+British spelling was done by an American.
diff --git a/usr/src/man/man1/split.1 b/usr/src/man/man1/split.1
new file mode 100644
index 0000000000..790482c571
--- /dev/null
+++ b/usr/src/man/man1/split.1
@@ -0,0 +1,193 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH split 1 "16 Apr 1999" "SunOS 5.11" "User Commands"
+.SH NAME
+split \- split a file into pieces
+.SH SYNOPSIS
+.LP
+.nf
+\fBsplit\fR [\fB-linecount\fR | \fB-l\fR \fIlinecount\fR] [\fB-a\fR \fIsuffixlength\fR]
+ [\fIfile\fR [\fIname\fR]]
+.fi
+
+.LP
+.nf
+\fBsplit\fR [\fB-b\fR \fIn\fR | \fIn\fRk | \fIn\fRm] [\fB-a\fR \fIsuffixlength\fR] [\fIfile\fR [\fIname\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsplit\fR utility reads \fIfile\fR and writes it in \fIlinecount\fR-line
+pieces into a set of output-files. The name of the first output-file is
+\fIname\fR with \fBaa\fR appended, and so on lexicographically, up to \fBzz\fR
+(a maximum of 676 files). The maximum length of \fIname\fR is 2 characters less
+than the maximum filename length allowed by the filesystem. See
+\fBstatvfs\fR(2). If no output name is given, \fBx\fR is used as the default
+(output-files will be called \fBxaa\fR, \fBxab\fR, and so forth).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fIlinecount\fR \fB|\fR \fB-l\fR \fIlinecount\fR\fR
+.ad
+.sp .6
+.RS 4n
+Number of lines in each piece. Defaults to \fB1000\fR lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIsuffixlength\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses \fIsuffixlength\fR letters to form the suffix portion of the filenames of
+the split file. If \fB-a\fR is not specified, the default suffix length is
+\fB2\fR. If the sum of the \fIname\fR operand and the \fIsuffixlength\fR
+option-argument would create a filename exceeding \fINAME_MAX\fR bytes, an
+error will result; \fBsplit\fR will exit with a diagnostic message and no files
+will be created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Splits a file into pieces \fIn\fR bytes in size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIn\fR\fBk\fR\fR
+.ad
+.sp .6
+.RS 4n
+Splits a file into pieces \fIn\fR\fB*1024\fR bytes in size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIn\fR\fBm\fR\fR
+.ad
+.sp .6
+.RS 4n
+Splits a file into pieces \fIn\fR\fB*1\|048\|576\fR bytes in size.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+The path name of the ordinary file to be split. If no input file is given or
+\fIfile\fR is \fB\(mi\fR, the standard input will be used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 8n
+.rt
+The prefix to be used for each of the files resulting from the \fBsplit\fR
+operation. If no \fIname\fR argument is given, \fBx\fR will be used as the
+prefix of the output files. The combined length of the basename of \fIprefix\fR
+and \fIsuffixlength\fR cannot exceed \fINAME_MAX\fR bytes. See OPTIONS.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBsplit\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBsplit\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsplit\fR(1), \fBstatvfs\fR(2), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/srchtxt.1 b/usr/src/man/man1/srchtxt.1
new file mode 100644
index 0000000000..77a5b1842b
--- /dev/null
+++ b/usr/src/man/man1/srchtxt.1
@@ -0,0 +1,252 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH srchtxt 1 "20 Dec 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+srchtxt \- display contents of, or search for a text string in, message data
+bases
+.SH SYNOPSIS
+.LP
+.nf
+\fBsrchtxt\fR [\fB-s\fR] [\fB-l\fR \fIlocale\fR] [\fB-m\fR \fImsgfile\fR ,...] [\fItext\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsrchtxt\fR utility is used to display all the text strings in message
+data bases, or to search for a text string in message data bases (see
+\fBmkmsgs\fR(1)). These data bases are files in the directory\fB
+/usr/lib/locale/\fIlocale\fR/LC_MESSAGES\fR (see \fBsetlocale\fR(3C)), unless a
+file name given with the \fB-m\fR option contains a \fB/\fR. The directory
+\fBlocale\fR can be viewed as the name of the language in which the text
+strings are written. If the \fB-l\fR option is not specified, the files
+accessed will be determined by the value of the environment variable
+\fBLC_MESSAGES\fR. If \fBLC_MESSAGES\fR is not set, the files accessed will be
+determined by the value of the environment variable \fBLANG\fR. If \fBLANG\fR
+is not set, the files accessed will be in the directory
+\fB/usr/lib/locale//C/LC_MESSAGES \fR, which contains default strings.
+.sp
+.LP
+If no \fItext\fR argument is present, then all the text strings in the files
+accessed will be displayed.
+.sp
+.LP
+If the \fB-s\fR option is not specified, the displayed text is prefixed by
+message sequence numbers. The message sequence numbers are enclosed in angle
+brackets: \fB<\fR\fImsgfile\fR\fB:\fR\fImsgnum\fR\fB>.\fR
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgfile\fR \fR
+.ad
+.RS 12n
+.rt
+name of the file where the displayed text occurred
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImsgnum\fR \fR
+.ad
+.RS 12n
+.rt
+sequence number in \fImsgfile\fR where the displayed text occurred
+.RE
+
+.sp
+.LP
+This display is in the format used by \fBgettxt\fR(1) and \fBgettxt\fR(3C).
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 14n
+.rt
+Suppress printing of the message sequence numbers of the messages being
+displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fI locale\fR \fR
+.ad
+.RS 14n
+.rt
+Access files in the directory \fB/usr/lib/locale/\fIlocale\fR/LC_MESSAGES\fR.
+If \fB-m\fR \fImsgfile\fR is also supplied, \fIlOCALE\fR is ignored for
+\fImsgfile\fRs containing a \fB/\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI msgfile\fR\fR
+.ad
+.RS 14n
+.rt
+Access files specified by one or more \fImsgfile\fRs. If \fImsgfile\fR contains
+a \fB/\fR character, then \fImsgfile\fR \fIis\fR interpreted as a pathname;
+otherwise, it will be assumed to be in the directory determined as described
+above. To specify more than one \fImsgfile\fR, separate the file names using
+commas.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItext\fR \fR
+.ad
+.RS 14n
+.rt
+Search for the text string specified by \fItext\fR and display each one that
+matches. \fItext\fR can take the form of a regular expression; see
+\fBregexp\fR(5).
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBsrchtxt\fR
+.sp
+.LP
+If message files have been installed in a locale named \fBfrench\fR by using
+\fBmkmsgs\fR(1), then you could display the entire set of text strings in the
+\fBfrench\fR locale (\fB/usr/lib/locale/french/LC_MESSAGES/* \fR) by typing:
+
+.sp
+.in +2
+.nf
+example% srchtxt \(mil french
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing \fBsrchtxt\fR
+.sp
+.LP
+If a set of error messages associated with the operating system have been
+installed in the file \fBUX\fR in the \fBfrench\fR locale
+(\fB/usr/lib/locale/french/LC_MESSAGE/UX \fR), then, using the value of the
+\fBLANG\fR environment variable to determine the locale to be searched, you
+could search that file in that locale for all error messages dealing with files
+by typing:
+
+.sp
+.in +2
+.nf
+example% setenv LANG=french; export LANG
+example% srchtxt -m UX "[Ff]ichier"
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If \fB/usr/lib/locale/french/LC_MESSAGES/UX \fR contained the following
+strings:
+
+.sp
+.in +2
+.nf
+Erreur E/S\en
+Liste d'arguments trop longue\en
+Fichier inexistant\en
+Argument invalide\en
+Trop de fichiers ouverts\en
+Fichier trop long\en
+Trop de liens\en
+Argument hors du domaine\en
+Identificateur supprim\en
+Etreinte fatale\en
+ .
+ .
+ .
+.fi
+.in -2
+
+.sp
+.LP
+then the following strings would be displayed:
+
+.sp
+.in +2
+.nf
+<UX:3>Fichier inexistant\en
+<UX:5>Trop de fichiers ouverts\en
+<UX:6>Fichier trop long\en
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing \fBsrchtxt\fR
+.sp
+.LP
+If a set of error messages associated with the operating system have been
+installed in the file \fBUX\fR and a set of error messages associated with the
+INGRESS data base product have been installed in the file \fBingress\fR, both
+in the \fBgerman\fR locale, then you could search for the pattern
+\fB[Dd]atei\fR in both the files \fBUX\fR and \fBingress\fR in the \fBgerman\fR
+locale by typing:
+
+.sp
+.in +2
+.nf
+example% srchtxt -l german -m UX,ingress "[Dd]atei"
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for a description of the \fBLC_CTYPE\fR environment
+variable that affects the execution of \fBsrchtxt\fR.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/C/LC_MESSAGES/* \fR\fR
+.ad
+.sp .6
+.RS 4n
+default files created by \fBmkmsgs\fR(1)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/locale/locale/LC_MESSAGES/* \fR\fR
+.ad
+.sp .6
+.RS 4n
+message files created by \fBmkmsgs\fR(1)
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBexstr\fR(1), \fBgettxt\fR(1), \fBlocale\fR(1), \fBmkmsgs\fR(1),
+\fBgettxt\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlocale\fR(5), \fBregexp\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+The error messages produced by \fBsrchtxt\fR are intended to be
+self-explanatory. They indicate an error in the command line or errors
+encountered while searching for a particular locale and/or message file.
diff --git a/usr/src/man/man1/ssh-add.1 b/usr/src/man/man1/ssh-add.1
new file mode 100644
index 0000000000..ff26f6163b
--- /dev/null
+++ b/usr/src/man/man1/ssh-add.1
@@ -0,0 +1,289 @@
+'\" te
+.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
+.\" installed location.
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.TH ssh-add 1 "20 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh-add \- add RSA or DSA identities to the authentication agent
+.SH SYNOPSIS
+.LP
+.nf
+\fBssh-add\fR [\fB-lLdDxX\fR] [\fB-t\fR \fIlife\fR] [ \fIfile\fR ]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBssh-add\fR utility adds \fBRSA\fR or \fBDSA\fR identities to the
+authentication agent, \fBssh-agent\fR(1). When run without arguments, it
+attempts to add all of the files \fB$HOME/.ssh/identity\fR (RSA v1),
+\fB$HOME/.ssh/id_rsa\fR (RSA v2), and \fB$HOME/.ssh/id_dsa\fR (DSA v2) that
+exist. If more than one of the private keys exists, an attempt to decrypt each
+with the same passphrase is made before reprompting for a different passphrase.
+The passphrase is read from the user's tty or by running the program defined in
+\fBSSH_ASKPASS\fR (see below).
+.sp
+.LP
+The authentication agent must be running.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 11n
+.rt
+Instead of adding the identity, this option \fBremoves\fR the identity from the
+agent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 11n
+.rt
+Deletes all identities from the agent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 11n
+.rt
+Lists fingerprints of all identities currently represented by the agent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 11n
+.rt
+Lists public key parameters of all identities currently represented by the
+agent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIlife\fR\fR
+.ad
+.RS 11n
+.rt
+Sets a maximum lifetime when adding identities to an agent. The lifetime can be
+specified in seconds or in a time format specified in \fBsshd\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 11n
+.rt
+Locks the agent with a password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.RS 11n
+.rt
+Unlocks the agent.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDISPLAY\fR\fR
+.ad
+.br
+.na
+\fB\fBSSH_ASKPASS\fR\fR
+.ad
+.RS 17n
+.rt
+If \fBssh-add\fR needs a passphrase, it reads the passphrase from the current
+terminal if it was run from a terminal. If \fBssh-add\fR does not have a
+terminal associated with it but \fBDISPLAY\fR and \fBSSH_ASKPASS\fR are set, it
+executes the program specified by \fBSSH_ASKPASS\fR and open an X11 window to
+read the passphrase. This is particularly useful when calling \fBssh-add\fR
+from a .Xsession or related script. The system is shipped with
+\fB/usr/lib/ssh/ssh-askpass\fR which is the default value for
+\fBSSH_ASKPASS\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSSH_AUTH_SOCK\fR\fR
+.ad
+.RS 17n
+.rt
+Identifies the path of a unix-domain socket used to communicate with the agent.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.LP
+These files should not be readable by anyone but the user. Notice that
+\fBssh-add\fR ignores a file if it is accessible by others. It is possible to
+specify a passphrase when generating the key; that passphrase is used to
+encrypt the private part of this file.
+.sp
+.LP
+If these files are stored on a network file system it is assumed that either
+the protection provided in the file themselves or the transport layer of the
+network file system provides sufficient protection for the site policy. If this
+is not the case, then it is recommended the key files are stored on removable
+media or locally on the relevant hosts.
+.sp
+.LP
+Recommended names for the \fBDSA\fR and \fBRSA\fR key files:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/identity\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the \fBRSA\fR authentication identity of the user for protocol version
+1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/identity.pub\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the public part of the \fBRSA\fR authentication identity of the user
+for protocol version 1.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/id_dsa\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the private \fBDSA\fR authentication identity of the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/id_dsa.pub\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the public part of the DSA authentication identity of the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/id_rsa\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the private \fBRSA\fR authentication identity of the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/id_rsa.pub\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the public part of the \fBRSA\fR authentication identity of the user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/ssh/ssh-askpass\fR\fR
+.ad
+.RS 28n
+.rt
+Contains the default value for SSH_ASKPASS.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBssh\fR(1), \fBssh-agent\fR(1), \fBssh-keygen\fR(1), \fBsshd\fR(1M),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ssh-agent.1 b/usr/src/man/man1/ssh-agent.1
new file mode 100644
index 0000000000..d16953b23e
--- /dev/null
+++ b/usr/src/man/man1/ssh-agent.1
@@ -0,0 +1,211 @@
+'\" te
+.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
+.\" installed location.
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.TH ssh-agent 1 "17 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh-agent \- authentication agent
+.SH SYNOPSIS
+.LP
+.nf
+\fBssh-agent\fR [\fB-a\fR \fIbind_address\fR] [\fB-c\fR | \fB-s\fR ] [\fB-d\fR]
+ [-t \fIlife\fR] [\fIcommand\fR [\fIargs\fR]...]
+.fi
+
+.LP
+.nf
+\fBssh-agent\fR [\fB-c\fR | \fB-s\fR] \fB-k\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBssh-agent\fR is a program to hold private keys used for public key
+authentication (\fBRSA\fR, \fBDSA\fR). \fBssh-agent\fR is often started at the
+beginning of a login session. All other windows or programs are started as
+clients to the \fBssh-agent\fR program. Through use of environment variables,
+the agent can be located and automatically used for authentication when logging
+in to other machines using \fBssh\fR(1). See the \fISystem Administration
+Guide: Security Services\fR.
+.sp
+.LP
+If a command line is given, this is executed as a subprocess of the agent. When
+the command dies, so does the agent.
+.sp
+.LP
+The agent initially does not have any private keys. Keys are added using
+\fBssh-add\fR(1), which sends the identity to the agent. Several identities can
+be stored in the agent; the agent can automatically use any of these
+identities. Use the \fB-l\fR option in \fBssh-add\fR(1) to display the
+identities currently held by the agent.
+.sp
+.LP
+The agent is run in the user's local host. Authentication data need not be
+stored on any other machine, and authentication passphrases never go over the
+network. However, if the connection to the agent is forwarded over \fBSSH\fR
+remote logins, the user can use the privileges given by the identities anywhere
+in the network in a secure way.
+.sp
+.LP
+There are two main ways to get an agent setup. Either you let the agent start a
+new subcommand into which some environment variables are exported, or you let
+the agent print the needed shell commands (either \fBsh\fR(1) or \fBcsh\fR(1)
+syntax can be generated) which can be evalled in the calling shell. Later, use
+\fBssh\fR(1) to look at these variables and use them to establish a connection
+to the agent.
+.sp
+.LP
+A unix-domain socket is created (\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR) and
+the name of this socket is stored in the \fBSSH_AUTH_SOCK\fR environment
+variable. The socket is made accessible only to the current user. This method
+is easily abused by root or another instance of the same user.
+.sp
+.LP
+The \fBSSH_AGENT_PID\fR environment variable holds the agent's \fBPID\fR.
+.sp
+.LP
+The agent exits automatically when the command given on the command line
+terminates.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIbind_address\fR\fR
+.ad
+.RS 19n
+.rt
+Binds the agent to the unix-domain socket bind_address. The default is
+\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 19n
+.rt
+Generates C-shell commands on stdout. This is the default if \fBSHELL\fR
+indicates that it is a csh style of shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 19n
+.rt
+Debug mode. When this option is specified, \fBssh-agent\fR does not fork.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 19n
+.rt
+Kills the current agent (given by the \fBSSH_AGENT_PID\fR environment
+variable).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 19n
+.rt
+Generates Bourne shell commands on stdout. This is the default if \fBSHELL\fR
+does not indicate that it is a csh style of shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fIlife\fR\fR
+.ad
+.RS 19n
+.rt
+Set a default value for the maximum lifetime (\fIlife\fR) of identities added
+to the agent. \fIlife\fR can be specified in seconds or in a time format
+specified in \fBsshd_config\fR(4). \fIlife\fR specified for an identity with
+\fBssh-add\fR(1) overrides this value. Without this option the default maximum
+\fIlife\fR is forever.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR\fR
+.ad
+.sp .6
+.RS 4n
+Unix-domain sockets used to contain the connection to the authentication agent.
+These sockets should only be readable by the owner. The sockets are removed
+when the agent exits.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBssh\fR(1), \fBssh-add\fR(1), \fBssh-keygen\fR(1), \fBsshd\fR(1M),
+\fBsshd_config\fR(4), \fBattributes\fR(5)
+.sp
+.LP
+\fISystem Administration Guide: Security Services\fR
diff --git a/usr/src/man/man1/ssh-http-proxy-connect.1 b/usr/src/man/man1/ssh-http-proxy-connect.1
new file mode 100644
index 0000000000..962886ed1d
--- /dev/null
+++ b/usr/src/man/man1/ssh-http-proxy-connect.1
@@ -0,0 +1,239 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ssh-http-proxy-connect 1 "24 Oct 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh-http-proxy-connect \- Secure Shell proxy for HTTP
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/lib/ssh/ssh-http-proxy-connect\fR [\fB-h\fR \fIhttp_proxy_host\fR]
+ [\fB-p\fR \fIhttp_proxy_port\fR] \fIconnect_host\fR \fIconnect_port\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+A proxy command for \fBssh\fR(1) that uses HTTP CONNECT. Typical use is where
+connections external to a network are only allowed via a proxy web server.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIhttp_proxy_host\fR\fR
+.ad
+.RS 22n
+.rt
+Specifies the proxy web server through which to connect. Overrides the
+\fBHTTPPROXY\fR and \fBhttp_proxy\fR environment variables if they are set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIhttp_proxy_port\fR\fR
+.ad
+.RS 22n
+.rt
+Specifies the port on which the proxy web server runs. If not specified, port
+80 is assumed. Overrides the \fBHTTPPROXYPORT\fR and \fBhttp_proxy\fR
+environment variables if they are set.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhttp_proxy_host\fR\fR
+.ad
+.RS 19n
+.rt
+The host name or IP address (IPv4 or IPv6) of the proxy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhttp_proxy_port\fR\fR
+.ad
+.RS 19n
+.rt
+The numeric port number to connect to on \fIhttp_proxy_host\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIconnect_host\fR\fR
+.ad
+.RS 19n
+.rt
+The name of the remote host to which the proxy web server is to connect you.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIconnect_port\fR\fR
+.ad
+.RS 19n
+.rt
+The numeric port number of the proxy web server to connect you to on
+\fIhttp_proxy_host\fR.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The recommended way to use a proxy connection command is to configure the
+\fBProxyCommand\fR in \fBssh_config\fR(4) (see Example 1 and Example 2).
+Example 3 shows how the proxy command can be specified on the command line when
+running \fBssh\fR(1).
+.LP
+\fBExample 1 \fRSetting the proxy from the environment
+.sp
+.LP
+The following example uses \fBssh-http-proxy-connect\fR in \fBssh_config\fR(4)
+when the proxy is set from the environment:
+
+.sp
+.in +2
+.nf
+\fBHost playtime.foo.com
+ ProxyCommand /usr/lib/ssh/ssh-http-proxy-connect \e
+ playtime.foo.com 22\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fROverriding proxy environment variables
+.sp
+.LP
+The following example uses \fBssh-http-proxy-connect\fR in \fBssh_config\fR(4)
+to override (or if not set) proxy environment variables:
+
+.sp
+.in +2
+.nf
+\fBHost playtime.foo.com
+ ProxyCommand /usr/lib/ssh/ssh-http-proxy-connect -h webcache \e
+ -p 8080 playtime.foo.com 22\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing the command line
+.sp
+.LP
+The following example uses \fBssh-http-proxy-connect\fR from the \fBssh\fR(1)
+command line:
+
+.sp
+.in +2
+.nf
+example$ \fBssh -o'ProxyCommand="/usr/lib/ssh/ssh-http-proxy-connect \e
+ -h webcache -p 8080 playtime.foo.com 22"' playtime.foo.com\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHTTPPROXY\fR\fR
+.ad
+.RS 17n
+.rt
+Takes the \fIhttp_proxy_host\fR operand to specify the default proxy host.
+Overrides \fBhttp_proxy\fR if both are set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHTTPPROXYPORT\fR\fR
+.ad
+.RS 17n
+.rt
+Takes the \fIhttp_proxy_port\fR operand to specify the default proxy port.
+Ignored if \fBHTTPPROXY\fR is not set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhttp_proxy\fR\fR
+.ad
+.RS 17n
+.rt
+\fBURL\fR format for specifying proxy host and port.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBssh\fR(1), \fBssh-socks5-proxy-connect\fR(1), \fBssh_config\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ssh-keygen.1 b/usr/src/man/man1/ssh-keygen.1
new file mode 100644
index 0000000000..d1a4419538
--- /dev/null
+++ b/usr/src/man/man1/ssh-keygen.1
@@ -0,0 +1,466 @@
+'\" te
+.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
+.\" installed location.
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.TH ssh-keygen 1 "17 Feb 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh-keygen \- authentication key generation
+.SH SYNOPSIS
+.LP
+.nf
+\fBssh-keygen\fR [\fB-q\fR] [\fB-b\fR \fIbits\fR ] \fB-t\fR \fItype\fR [\fB-N\fR \fInew_passphrase\fR]
+ [\fB-C\fR \fIcomment\fR] [\fB-f\fR \fIoutput_keyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-p\fR [\fB-P\fR \fIold_passphrase\fR] [\fB-N\fR \fInew_passphrase\fR]
+ [\fB-f\fR \fIkeyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-i\fR [\fB-f\fR \fIinput_keyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-e\fR [\fB-f\fR \fIinput_keyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-y\fR [\fB-f\fR \fIinput_keyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-c\fR [\fB-P\fR \fIpassphrase\fR] [\fB-C\fR \fIcomment\fR] [\fB-f\fR \fIkeyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-l\fR [\fB-f\fR \fIinput_keyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-B\fR [\fB-f\fR \fIinput_keyfile\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-F\fR \fIhostname\fR [\fB-f\fR \fIknown_hosts_file\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-H\fR [\fB-f\fR \fIknown_hosts_file\fR]
+.fi
+
+.LP
+.nf
+\fBssh-keygen\fR \fB-R\fR \fIhostname\fR [\fB-f\fR \fIknown_hosts_file\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBssh-keygen\fR utility generates, manages, and converts authentication
+keys for \fBssh\fR(1). \fBssh-keygen\fR can create RSA keys for use by SSH
+protocol version 1 and RSA or DSA keys for use by SSH protocol version 2. The
+type of key to be generated is specified with the \fB-t\fR option.
+.sp
+.LP
+Normally, each user wishing to use \fBSSH\fR with \fBRSA\fR or \fBDSA\fR
+authentication runs this once to create the authentication key in
+\fB$HOME/.ssh/identity\fR, \fB$HOME/.ssh/id_dsa\fR, or \fB$HOME/.ssh/id_rsa\fR.
+The system administrator can also use this to generate host keys..
+.sp
+.LP
+Ordinarily, this program generates the key and asks for a file in which to
+store the private key. The public key is stored in a file with the same name
+but with the ``\fB\&.pub\fR'' extension appended. The program also asks for a
+passphrase. The passphrase can be empty to indicate no passphrase (host keys
+must have empty passphrases), or it can be a string of arbitrary length. Good
+passphrases are 10-30 characters long, are not simple sentences or otherwise
+easy to guess, and contain a mix of uppercase and lowercase letters, numbers,
+and non-alphanumeric characters. (English prose has only 1-2 bits of entropy
+per word and provides very poor passphrases.) If a passphrase is set, it must
+be at least 4 characters long.
+.sp
+.LP
+The passphrase can be changed later by using the \fB-p\fR option.
+.sp
+.LP
+There is no way to recover a lost passphrase. If the passphrase is lost or
+forgotten, you have to generate a new key and copy the corresponding public key
+to other machines.
+.sp
+.LP
+For \fBRSA\fR, there is also a comment field in the key file that is only for
+convenience to the user to help identify the key. The \fIcomment\fR can tell
+what the key is for, or whatever is useful. The comment is initialized to
+``\fBuser@host\fR'' when the key is created, but can be changed using the
+\fB-c\fR option.
+.sp
+.LP
+After a key is generated, instructions below detail where to place the keys to
+activate them.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbits\fR\fR
+.ad
+.RS 21n
+.rt
+Specifies the number of bits in the key to create. The minimum number is 512
+bits. Generally, 1024 bits is considered sufficient. Key sizes above that no
+longer improve security but make things slower. The default is 1024 bits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.RS 21n
+.rt
+Shows the bubblebabble digest of the specified private or public key file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 21n
+.rt
+Requests changing the comment in the private and public key files. The program
+prompts for the file containing the private keys, for the passphrase if the key
+has one, and for the new comment.
+.sp
+This option only applies to \fBrsa1\fR (\fBSSHv1\fR) keys.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR \fIcomment\fR\fR
+.ad
+.RS 21n
+.rt
+Provides the new comment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 21n
+.rt
+This option reads a private or public OpenSSH key file and prints the key in a
+"SECSH" Public Key File Format to stdout. This option allows exporting keys for
+use by several other SSH implementations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 21n
+.rt
+Specifies the filename of the key file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.RS 21n
+.rt
+Search for the specified \fIhostname\fR in a \fBknown_hosts\fR file, listing
+any occurrences found. This option is useful to find hashed host names or
+addresses and can also be used in conjunction with the \fB-H\fR option to print
+found keys in a hashed format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 21n
+.rt
+Hash a \fBknown_hosts\fR file. This replaces all host names and addresses with
+hashed representations within the specified file. The original content is moved
+to a file with a \fB\&.old\fR suffix. These hashes may be used normally by
+\fBssh\fR and \fBsshd\fR, but they do not reveal identifying information should
+the file's contents be disclosed. This option does not modify existing hashed
+host names and is therefore safe to use on files that mix hashed and non-hashed
+names.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 21n
+.rt
+This option reads an unencrypted private (or public) key file in
+SSH2-compatible format and prints an OpenSSH compatible private (or public) key
+to stdout. \fBssh-keygen\fR also reads the "SECSH" Public Key File Format. This
+option allows importing keys from several other SSH implementations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 21n
+.rt
+Shows the fingerprint of the specified private or public key file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fInew_passphrase\fR\fR
+.ad
+.RS 21n
+.rt
+Provides the new passphrase.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 21n
+.rt
+Requests changing the passphrase of a private key file instead of creating a
+new private key. The program prompts for the file containing the private key,
+for the old passphrase, and prompts twice for the new passphrase.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIpassphrase\fR\fR
+.ad
+.RS 21n
+.rt
+Provides the (old) passphrase.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 21n
+.rt
+Silences \fBssh-keygen\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItype\fR\fR
+.ad
+.RS 21n
+.rt
+Specifies the algorithm used for the key, where \fItype\fR is one of \fBrsa\fR,
+\fBdsa\fR, and \fBrsa1\fR. Type \fBrsa1\fR is used only for the SSHv1 protocol.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIhostname\fR\fR
+.ad
+.RS 21n
+.rt
+Removes all keys belonging to \fIhostname\fR from a \fBknown_hosts\fR file.
+This option is useful to delete hashed hosts. See \fB-H\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 21n
+.rt
+Obsolete. Replaced by the \fB-e\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.RS 21n
+.rt
+Obsolete. Replaced by the \fB-i\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-y\fR\fR
+.ad
+.RS 21n
+.rt
+This option reads a private OpenSSH format file and prints an OpenSSH public
+key to stdout.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/identity\fR\fR
+.ad
+.RS 27n
+.rt
+This file contains the RSA private key for the SSHv1 protocol. This file should
+not be readable by anyone but the user. It is possible to specify a passphrase
+when generating the key; that passphrase is used to encrypt the private part of
+this file using 3DES. This file is not automatically accessed by
+\fBssh-keygen\fR, but it is offered as the default file for the private key.
+\fBsshd\fR(1M) reads this file when a login attempt is made.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/identity.pub\fR\fR
+.ad
+.RS 27n
+.rt
+This file contains the RSA public key for the SSHv1 protocol. The contents of
+this file should be added to \fB$HOME/.ssh/authorized_keys\fR on all machines
+where you wish to log in using \fBRSA\fR authentication. There is no need to
+keep the contents of this file secret.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/id_dsa\fR\fR
+.ad
+.br
+.na
+\fB\fB$HOME/.ssh/id_rsa\fR\fR
+.ad
+.RS 27n
+.rt
+These files contain, respectively, the DSA or RSA private key for the SSHv2
+protocol. These files should not be readable by anyone but the user. It is
+possible to specify a passphrase when generating the key; that passphrase is
+used to encrypt the private part of the file using 3DES. Neither of these files
+is automatically accessed by \fBssh-keygen\fR but is offered as the default
+file for the private key. \fBsshd\fR(1M) reads this file when a login attempt
+is made.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/id_dsa.pub\fR\fR
+.ad
+.br
+.na
+\fB\fB$HOME/.ssh/id_rsa.pub\fR\fR
+.ad
+.RS 27n
+.rt
+These files contain, respectively, the DSA or RSA public key for the SSHv2
+protocol. The contents of these files should be added, respectively, to
+\fB$HOME/.ssh/authorized_keys\fR on all machines where you wish to log in using
+DSA or RSA authentication. There is no need to keep the contents of these files
+secret.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBssh\fR(1), \fBssh-add\fR(1), \fBssh-agent\fR(1), \fBsshd\fR(1M),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ssh-keyscan.1 b/usr/src/man/man1/ssh-keyscan.1
new file mode 100644
index 0000000000..6cda7c0a7a
--- /dev/null
+++ b/usr/src/man/man1/ssh-keyscan.1
@@ -0,0 +1,279 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ssh-keyscan 1 "24 Jul 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh-keyscan \- gather public ssh host keys of a number of hosts
+.SH SYNOPSIS
+.LP
+.nf
+\fBssh-keyscan\fR [\fB-v46\fR] [\fB-p\fR \fIport\fR] [\fB-T\fR \fItimeout\fR] [\fB-t\fR \fItype\fR]
+ [\fB-f\fR \fIfile\fR] [\fB-\fR] [\fIhost\fR... | \fIaddrlist\fR \fInamelist\fR] [...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBssh-keyscan\fR is a utility for gathering the public ssh host keys of a
+number of hosts. It was designed to aid in building and verifying
+\fBssh_known_hosts\fR files. \fBssh-keyscan\fR provides a minimal interface
+suitable for use by shell and perl scripts. The output of \fBssh-keyscan\fR is
+directed to standard output.
+.sp
+.LP
+\fBssh-keyscan\fR uses non-blocking socket I/O to contact as many hosts as
+possible in parallel, so it is very efficient. The keys from a domain of 1,000
+hosts can be collected in tens of seconds, even when some of those hosts are
+down or do not run ssh. For scanning, one does not need login access to the
+machines that are being scanned, nor does the scanning process involve any
+encryption.
+.SS "File Format"
+.sp
+.LP
+Input format:
+.sp
+.in +2
+.nf
+1.2.3.4,1.2.4.4
+\fIname.my.domain,name,n.my.domain,n,\fR1.2.3.4,1.2.4.4
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Output format for \fBrsa1\fR keys:
+.sp
+.in +2
+.nf
+\fIhost-or-namelist bits exponent modulus\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Output format for \fBrsa\fR and \fBdsa\fR keys, where \fIkeytype\fR is either
+\fBssh-rsa\fR or `\fBssh-dsa\fR:
+.sp
+.in +2
+.nf
+\fIhost-or-namelist keytype base64-encoded-key\fR
+.fi
+.in -2
+.sp
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfilename\fR\fR
+.ad
+.RS 28n
+.rt
+Read hosts or addrlist namelist pairs from this file, one per line. If you
+specity - instead of a filename, \fBssh-keyscan\fR reads hosts or addrlist
+namelist pairs from the standard input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIport\fR\fR
+.ad
+.RS 28n
+.rt
+Port to connect to on the remote host.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItimeout\fR\fR
+.ad
+.RS 28n
+.rt
+Set the timeout for connection attempts. If \fItimeout\fR seconds have elapsed
+since a connection was initiated to a host or since the last time anything was
+read from that host, the connection is closed and the host in question is
+considered unavailable. The default is for \fItimeout\fR is 5 seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItype\fR\fR
+.ad
+.RS 28n
+.rt
+Specify the type of the key to fetch from the scanned hosts. The possible
+values for \fItype\fR are \fBrsa1\fR for protocol version 1 and \fBrsa\fR or
+\fBdsa\fR for protocol version 2. Specify multiple values by separating them
+with commas. The default is \fBrsa1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 28n
+.rt
+Specify verbose mode. Print debugging messages about progress.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-4\fR\fR
+.ad
+.RS 28n
+.rt
+Force to use IPv4 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-6\fR\fR
+.ad
+.RS 28n
+.rt
+Forces to use IPv6 addresses only.
+.RE
+
+.SH SECURITY
+.sp
+.LP
+If a \fBssh_known_hosts\fR file is constructed using \fBssh-keyscan\fR without
+verifying the keys, users are vulnerable to man-in-the-middle attacks. If the
+security model allows such a risk, \fBssh-keyscan\fR can help in the detection
+of tampered keyfiles or man-in-the-middle attacks which have begun after the
+\fBssh_known_hosts\fR file was created.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting the \fBrsa1\fR Host Key
+.sp
+.LP
+The following example prints the \fBrsa1\fR host key for machine
+\fBhostname\fR:
+
+.sp
+.in +2
+.nf
+$ ssh-keyscan hostname
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRFinding All Hosts
+.sp
+.LP
+The following commands finds all hosts from the file \fBssh_hosts\fR which have
+new or different keys from those in the sorted file \fBssh_known_hosts\fR:
+
+.sp
+.in +2
+.nf
+$ ssh-keyscan -t rsa,dsa -f ssh_hosts | \e
+ sort -u - ssh_known_hosts | diff ssh_known_hosts -
+.fi
+.in -2
+.sp
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/ssh_known_hosts\fR \fR
+.ad
+.RS 25n
+.rt
+
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+No usage errors. \fBssh-keyscan\fR might or might not have succeeded or failed
+to scan one, more or all of the given hosts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+Usage error.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBssh\fR(1), \fBsshd\fR(1M), \fBattributes\fR(5)
+.SH AUTHORS
+.sp
+.LP
+David Mazieres wrote the initial version, and Wayne Davison added suppport for
+protocol version 2.
+.SH BUGS
+.sp
+.LP
+\fBssh\(emkeyscan\fR generates
+.sp
+.in +2
+.nf
+Connection closed by remote host
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+messages on the consoles of all machines it scans if the server is older than
+version 2.9. This is because \fBssh-keyscan\fR opens a connection to the
+\fBssh\fR port, reads the public key, and drops the connection as soon as it
+gets the key.
diff --git a/usr/src/man/man1/ssh-socks5-proxy-connect.1 b/usr/src/man/man1/ssh-socks5-proxy-connect.1
new file mode 100644
index 0000000000..58dccc3871
--- /dev/null
+++ b/usr/src/man/man1/ssh-socks5-proxy-connect.1
@@ -0,0 +1,231 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ssh-socks5-proxy-connect 1 "30 Oct 2002" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh-socks5-proxy-connect \- Secure Shell proxy for SOCKS5
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/lib/ssh/ssh-socks5-proxy-connect\fR
+ [\fB-h\fR \fIsocks5_proxy_host\fR]
+ [\fB-p\fR \fIsocks5_proxy_port\fR] \fIconnect_host\fR \fIconnect_port\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+A proxy command for \fBssh\fR(1) that uses SOCKS5 (RFC 1928). Typical use is
+where connections external to a network are only allowed via a socks gateway
+server.
+.sp
+.LP
+This proxy command does not provide any of the SOCKS5 authentication mechanisms
+defined in RFC 1928. Only anonymous connections are possible.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIsocks5_proxy_host\fR\fR
+.ad
+.RS 24n
+.rt
+Specifies the proxy web server through which to connect. Overrides the
+\fBSOCKS5_SERVER\fR environment variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIsocks5_proxy_port\fR\fR
+.ad
+.RS 24n
+.rt
+Specifies the port on which the proxy web server runs. If not specified, port
+80 is assumed. Overrides the \fBSOCKS5_PORT\fR environment variable.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsocks5_proxy_host\fR\fR
+.ad
+.RS 21n
+.rt
+The host name or IP address (IPv4 or IPv6) of the proxy.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsocks5_proxy_port\fR\fR
+.ad
+.RS 21n
+.rt
+The numeric port number to connect to on \fIsocks5_proxy_host\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIconnect_host\fR\fR
+.ad
+.RS 21n
+.rt
+The name of the remote host to which the socks gateway is to connect you.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIconnect_port\fR\fR
+.ad
+.RS 21n
+.rt
+The numeric port number of the socks gateway to connect you to on
+\fIconnect_host\fR.
+.RE
+
+.SH EXAMPLES
+.sp
+.LP
+The recommended way to use a proxy connection command is to configure the
+\fBProxyCommand\fR in \fBssh_config\fR(4) (see Example 1 and Example 2).
+Example 3 shows how the proxy command can be specified on the command line when
+running \fBssh\fR(1).
+.LP
+\fBExample 1 \fRSetting the proxy from the environment
+.sp
+.LP
+The following example uses \fBssh-socks5-proxy-connect\fR in
+\fBssh_config\fR(4) when the proxy is set from the environment:
+
+.sp
+.in +2
+.nf
+\fBHost playtime.foo.com
+ ProxyCommand /usr/lib/ssh/ssh-socks5-proxy-connect \e
+ playtime.foo.com 22\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fROverriding proxy environment variables
+.sp
+.LP
+The following example uses \fBssh-socks5-proxy-connect\fR in
+\fBssh_config\fR(4) to override (or if not set) proxy environment variables:
+
+.sp
+.in +2
+.nf
+\fBHost playtime.foo.com
+ ProxyCommand /usr/lib/ssh/ssh-socks5-proxy-connect -h socks-gw \e
+ -p 1080 playtime.foo.com 22\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRUsing the command line
+.sp
+.LP
+The following example uses \fBssh-socks5-proxy-connect\fR from the \fBssh\fR(1)
+command line:
+
+.sp
+.in +2
+.nf
+example$ \fBssh -o'ProxyCommand=/usr/lib/ssh/ssh-socks5-proxy-connect \e
+ -h socks-gw -p 1080 playtime.foo.com 22' playtime.foo.com\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSOCKS5_SERVER\fR\fR
+.ad
+.RS 17n
+.rt
+Takes \fIsocks5_proxy_host\fR operand to specify the default proxy host.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSOCKS5_PORT\fR\fR
+.ad
+.RS 17n
+.rt
+Takes \fIsocks5_proxy_port \fR operand to specify the default proxy port.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStable
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBssh\fR(1), \fBssh-http-proxy-connect\fR(1), \fBssh_config\fR(4),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ssh.1 b/usr/src/man/man1/ssh.1
new file mode 100644
index 0000000000..1bbf10cf95
--- /dev/null
+++ b/usr/src/man/man1/ssh.1
@@ -0,0 +1,1056 @@
+'\" te
+.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the specified path to access the file at
+.\" the installed location.
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.TH ssh 1 "20 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+ssh \- secure shell client (remote login program)
+.SH SYNOPSIS
+.LP
+.nf
+\fBssh\fR [\fB-l\fR \fIlogin_name\fR] \fIhostname\fR | \fIuser@hostname\fR [ \fIcommand\fR]
+.fi
+
+.LP
+.nf
+\fBssh\fR [\fB-afgknqstvxACNTX1246\fR] [\fB-b\fR \fIbind_address\fR] [\fB-m\fR \fImac_spec\fR]
+ [\fB-c\fR \fIcipher_spec\fR] [\fB-e\fR \fIescape_char\fR] [\fB-i\fR \fIidentity_file\fR]
+ [\fB-l\fR \fIlogin_name\fR] [\fB-F\fR \fIconfigfile\fR] [\fB-o\fR \fIoption\fR] [\fB-p\fR \fIport\fR]
+ [\fB-L\fR [\fIbind_address\fR\fB:\fR]\fIport\fR\fB:\fR\fIhost\fR\fB:\fR\fIhostport\fR]
+ [\fB-R\fR [\fIbind_address\fR\fB:\fR]\fIport\fR\fB:\fR\fIhost\fR\fB:\fR\fIhostport\fR]
+ [\fB-D\fR [\fIbind_address\fR\fB:\fR]\fIport\fR] \fIhostname\fR | \fIuser\fR\fB@\fR\fIhostname\fR [\fIcommand\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBssh\fR (Secure Shell) is a program for logging into a remote machine and for
+executing commands on a remote machine. It is intended to replace \fBrlogin\fR
+and \fBrsh\fR, and to provide secure encrypted communications between two
+untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP
+ports can also be forwarded over the secure channel.
+.sp
+.LP
+\fBssh\fR connects and logs into the specified hostname. The user must prove
+his or her identity to the remote machine using one of several methods
+depending on the protocol version used:
+.SS "SSH Protocol Version 1"
+.sp
+.LP
+First, if the machine the user logs in from is listed in \fB/etc/hosts.equiv\fR
+or \fB/etc/shosts.equiv\fR on the remote machine, and the user names are the
+same on both sides, the user is immediately permitted to log in. Second,
+if .\fBrhosts\fR or \fB\&.shosts\fR exists in the user's home directory on the
+remote machine and contains a line containing the name of the client machine
+and the name of the user on that machine, the user is permitted to log in. This
+form of authentication alone is normally not allowed by the server because it
+is not secure.
+.sp
+.LP
+The second (and primary) authentication method is the \fBrhosts\fR or
+\fBhosts.equiv\fR method combined with RSA-based host authentication. It means
+that if the login would be permitted by \fB$HOME/.rhosts\fR,
+\fB$HOME/.shosts\fR, \fB/etc/hosts.equiv\fR, or \fB/etc/shosts.equiv\fR, and if
+additionally the server can verify the client's host key (see
+\fB/etc/ssh_known_hosts\fR in the FILES section), only then is login permitted.
+This authentication method closes security holes due to \fBIP\fR spoofing,
+\fBDNS\fR spoofing, and routing spoofing.
+.sp
+.LP
+\fBNote to the administrator:\fR \fB/etc/hosts.equiv\fR, \fB$HOME/.rhosts\fR,
+and the rlogin/rsh protocol in general, are inherently insecure and should be
+disabled if security is desired.
+.sp
+.LP
+As a third authentication method, \fBssh\fR supports \fBRSA\fR-based
+authentication. The scheme is based on public-key cryptography. There are
+cryptosystems where encryption and decryption are done using separate keys, and
+it is not possible to derive the decryption key from the encryption key.
+\fBRSA\fR is one such system. The idea is that each user creates a
+public/private key pair for authentication purposes. The server knows the
+public key, and only the user knows the private key. The file
+\fB$HOME/.ssh/authorized_keys\fR lists the public keys that are permitted for
+logging in. When the user logs in, the \fBssh\fR program tells the server which
+key pair it would like to use for authentication. The server checks if this key
+is permitted, and if so, sends the user (actually the \fBssh\fR program running
+on behalf of the user) a challenge in the form of a random number, encrypted by
+the user's public key. The challenge can only be decrypted using the proper
+private key. The user's client then decrypts the challenge using the private
+key, proving that he or she knows the private key but without disclosing it to
+the server.
+.sp
+.LP
+\fBssh\fR implements the \fBRSA\fR authentication protocol automatically. The
+user creates his or her \fBRSA\fR key pair by running \fBssh-keygen\fR(1). This
+stores the private key in \fB$HOME/.ssh/identity\fR and the public key in
+\fB$HOME/.ssh/identity.pub\fR in the user's home directory. The user should
+then copy the \fBidentity.pub\fR to \fB$HOME/.ssh/authorized_keys\fR in his or
+her home directory on the remote machine (the \fBauthorized_keys\fR file
+corresponds to the conventional \fB$HOME/.rhosts\fR file, and has one key per
+line, though the lines can be very long). After this, the user can log in
+without giving the password. \fBRSA\fR authentication is much more secure than
+\fBrhosts\fR authentication.
+.sp
+.LP
+The most convenient way to use \fBRSA\fR authentication can be with an
+authentication agent. See \fBssh-agent\fR(1) for more information.
+.sp
+.LP
+If other authentication methods fail, \fBssh\fR prompts the user for a
+password. The password is sent to the remote host for checking. However, since
+all communications are encrypted, the password cannot be seen by someone
+listening on the network.
+.SS "SSH Protocol Version 2"
+.sp
+.LP
+The SSH version 2 protocol supports multiple user authentication methods, some
+of which are similar to those available with the SSH protocol version 1. These
+authentication mechanisms are negotiated by the client and server, with the
+client trying methods in the order specified in the
+\fBPreferredAuthentications\fR client configuration option. The server decides
+when enough authentication methods have passed successfully so as to complete
+the authentication phase of the protocol.
+.sp
+.LP
+When a user connects by using protocol version 2, similar authentication
+methods are available. Using the default values for
+\fBPreferredAuthentications\fR, the client tries to authenticate first by using
+the hostbased method. If this method fails, public key authentication is
+attempted. Finally, if this method fails, keyboard-interactive and password
+authentication are tried.
+.sp
+.LP
+The public key method is similar to \fBRSA\fR authentication described in the
+previous section and allows the \fBRSA\fR or \fBDSA\fR algorithm to be used:
+The client uses his or her private key, \fB$HOME/.ssh/id_dsa\fR or
+\fB$HOME/.ssh/id_rsa\fR, to sign the session identifier and sends the result to
+the server. The server checks whether the matching public key is listed in
+\fB$HOME/.ssh/authorized_keys\fR and grants access if both the key is found and
+the signature is correct. The session identifier is derived from a shared
+Diffie-Hellman value and is only known to the client and the server.
+.sp
+.LP
+If public key authentication fails or is not available, a password can be sent
+encrypted to the remote host for proving the user's identity, or an extended
+prompt/reply protocol can be engaged.
+.sp
+.LP
+Additionally, \fBssh\fR supports hostbased or challenge response
+authentication.
+.sp
+.LP
+Protocol 2 provides additional mechanisms for confidentiality (the traffic is
+encrypted using 3DES, Blowfish, CAST128 or Arcfour) and integrity
+(\fBhmac-sha1\fR, \fBhmac-md5\fR). Protocol 1 lacks a strong mechanism for
+ensuring the integrity of the connection.
+.SS "Login Session and Remote Execution"
+.sp
+.LP
+When the user's identity has been accepted by the server, the server either
+executes the specified command, or logs into the machine and gives the user a
+normal shell on the remote machine. All communication with the remote command
+or shell is automatically encrypted.
+.sp
+.LP
+If a pseudo-terminal has been allocated (normal login session), the user can
+use the escape characters noted below. If a pseudo-terminal has been allocated
+(normal login session), the user can disconnect with \fB~.\fR, and suspend
+\fBssh\fR with \fB~^Z\fR. All forwarded connections can be listed with
+\fB~#\fR. If the session blocks waiting for forwarded X11 or TCP/IP connections
+to terminate, \fBssh\fR can be backgrounded with \fB~&\fR, although this should
+not be used while the user shell is active, as it can cause the shell to hang.
+All available escapes can be listed with \fB~?\fR.
+.sp
+.LP
+A single tilde character can be sent as \fB~~\fR, or by following the tilde
+with a character other than those described above. The escape character must
+always follow a newline to be interpreted as special. The escape character can
+be changed in configuration files or on the command line.
+.sp
+.LP
+If no pseudo tty has been allocated, the session is transparent and can be used
+to reliably transfer binary data. On most systems, setting the escape character
+to "\fBnone\fR" also makes the session transparent even if a tty is used.
+.sp
+.LP
+The session terminates when the command or shell on the remote machine exits
+and all X11 and TCP/IP connections have been closed. The exit status of the
+remote program is returned as the exit status of \fBssh\fR.
+.SS "Escape Characters"
+.sp
+.LP
+When a pseudo-terminal has been requested, \fBssh\fR supports a number of
+functions through the use of an escape character.
+.sp
+.LP
+A single tilde character can be sent as \fB~~\fR or by following the tilde with
+a character other than those described below. The escape character must always
+follow a newline to be interpreted as special. The escape character can be
+changed in configuration files using the \fBEscapeChar\fR configuration
+directive or on the command line by the \fB-e\fR option.
+.sp
+.LP
+The supported escapes, assuming the default \fB~\fR, are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~.\fR\fR
+.ad
+.RS 7n
+.rt
+Disconnect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~^Z\fR\fR
+.ad
+.RS 7n
+.rt
+Background \fBssh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~#\fR\fR
+.ad
+.RS 7n
+.rt
+List forwarded connections.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~&\fR\fR
+.ad
+.RS 7n
+.rt
+Background \fBssh\fR at logout when waiting for forwarded connection / X11
+sessions to terminate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~?\fR\fR
+.ad
+.RS 7n
+.rt
+Display a list of escape characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~B\fR\fR
+.ad
+.RS 7n
+.rt
+Send a break to the remote system. Only useful for SSH protocol version 2 and
+if the peer supports it.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~C\fR\fR
+.ad
+.RS 7n
+.rt
+Open command line. Only useful for adding port forwardings using the \fB-L\fR
+and \fB-R\fR options).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~R\fR\fR
+.ad
+.RS 7n
+.rt
+Request rekeying of the connection. Only useful for SSH protocol version 2 and
+if the peer supports it.
+.RE
+
+.SS "X11 and TCP Forwarding"
+.sp
+.LP
+If the \fBForwardX11\fR variable is set to ``\fByes\fR'' (or, see the
+description of the \fB-X\fR and \fB-x\fR options described later) and the user
+is using X11 (the \fBDISPLAY\fR environment variable is set), the connection to
+the X11 display is automatically forwarded to the remote side in such a way
+that any X11 programs started from the shell (or command) goes through the
+encrypted channel, and the connection to the real X server is made from the
+local machine. The user should not manually set \fBDISPLAY\fR. Forwarding of
+X11 connections can be configured on the command line or in configuration
+files.
+.sp
+.LP
+The \fBDISPLAY\fR value set by \fBssh\fR points to the server machine, but with
+a display number greater than zero. This is normal behavior, because \fBssh\fR
+creates a "proxy" X11 server on the server machine for forwarding the
+connections over the encrypted channel.
+.sp
+.LP
+\fBssh\fR also automatically sets up \fBXauthority\fR data on the server
+machine. For this purpose, it generates a random authorization cookie, store it
+in \fBXauthority\fR on the server, and verify that any forwarded connections
+carry this cookie and replace it by the real cookie when the connection is
+opened. The real authentication cookie is never sent to the server machine (and
+no cookies are sent in the plain).
+.sp
+.LP
+If the \fBForwardAgent\fR variable is set to "\fByes\fR" (or, see the
+description of the \fB-A\fR and \fB-a\fR options described later) and the user
+is using an authentication agent, the connection to the agent is automatically
+forwarded to the remote side.
+.sp
+.LP
+Forwarding of arbitrary TCP/IP connections over the secure channel can be
+specified either on the command line or in a configuration file. One possible
+application of TCP/IP forwarding is a secure connection to an electronic purse.
+Another possible application is firewall traversal.
+.SS "Server Authentication"
+.sp
+.LP
+\fBssh\fR automatically maintains and checks a database containing
+identifications for all hosts it has ever been used with. Host keys are stored
+in \fB$HOME/.ssh/known_hosts\fR in the user's home directory. Additionally, the
+file \fB/etc/ssh_known_hosts\fR is automatically checked for known hosts. The
+behavior of \fBssh\fR with respect to unknown host keys is controlled by the
+\fBStrictHostKeyChecking\fR parameter. If a host's identification ever changes,
+\fBssh\fR warns about this and disables password authentication to prevent a
+trojan horse from getting the user's password. Another purpose of this
+mechanism is to prevent attacks by intermediaries which could otherwise be used
+to circumvent the encryption. The \fBStrictHostKeyChecking\fR option can be
+used to prevent logins to machines whose host key is not known or has changed.
+.sp
+.LP
+However, when using key exchange protected by GSS-API, the server can advertise
+a host key. The client automatically adds this host key to its known hosts
+file, \fB$HOME/.ssh/known_hosts\fR, regardless of the setting of the
+\fBStrictHostKeyChecking\fR option, unless the advertised host key collides
+with an existing known hosts entry.
+.sp
+.LP
+When the user's GSS-API credentials expire, the client continues to be able to
+rekey the session using the server's public host key to protect the key
+exchanges.
+.SS "GSS-API User and Server Authentication"
+.sp
+.LP
+\fBssh\fR uses the user's GSS-API credentials to authenticate the client to the
+server wherever possible, if \fBGssKeyEx\fR and/or \fBGssAuthentication\fR are
+set.
+.sp
+.LP
+With \fBGssKeyEx\fR, one can have an SSHv2 server that has no host public keys,
+so that only \fBGssKeyEx\fR can be used. With such servers, rekeying fails if
+the client's credentials are expired.
+.sp
+.LP
+GSS-API user authentication has the disadvantage that it does not obviate the
+need for SSH host keys, but its failure does not impact rekeying. \fBssh\fR can
+try other authentication methods (such as public key, password, and so on) if
+GSS-API authentication fails.
+.sp
+.LP
+Delegation of GSS-API credentials can be quite useful, but is not without
+danger. As with passwords, users should not delegate GSS credentials to
+untrusted servers, since a compromised server can use a user's delegated GSS
+credentials to impersonate the user.
+.sp
+.LP
+GSS-API user authorization is covered in \fBgss_auth_rules\fR(5).
+.sp
+.LP
+Rekeying can be used to redelegate credentials when \fBGssKeyEx\fR is
+"\fByes\fR". (See \fB~R\fR under \fBEscape Characters\fR above.)
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-1\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces \fBssh\fR to try protocol version 1 only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-2\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces \fBssh\fR to try protocol version 2 only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-4\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces \fBssh\fR to use IPv4 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-6\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces \fBssh\fR to use IPv6 addresses only.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables forwarding of the authentication agent connection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables forwarding of the authentication agent connection. This can also be
+specified on a per-host basis in a configuration file.
+.sp
+Agent forwarding should be enabled with caution. Users with the ability to
+bypass file permissions on the remote host (for the agent's UNIX-domain socket)
+can access the local agent through the forwarded connection. An attacker cannot
+obtain key material from the agent. However, the attacker can perform
+operations on the keys that enable the attacker to authenticate using the
+identities loaded into the agent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIbind_address\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the interface to transmit from on machines with multiple interfaces
+or aliased addresses.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcipher_spec\fR\fR
+.ad
+.sp .6
+.RS 4n
+Selects the cipher specification for encrypting the session.
+.sp
+For protocol version 1, \fIcipher_spec\fR is a single cipher. See the
+\fBCipher\fR option in \fBssh_config\fR(4) for more information.
+.sp
+For protocol version 2, \fIcipher_spec\fR is a comma-separated list of ciphers
+listed in order of preference. See the \fICiphers\fR option in
+\fBssh_config\fR(4) for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.sp .6
+.RS 4n
+Requests compression of all data (including stdin, stdout, stderr, and data for
+forwarded X11 and TCP/IP connections). The compression algorithm is the same
+used by \fBgzip\fR(1). The \fBgzip\fR man page is available in the
+\fBSUNWsfman\fR package. The "level" can be controlled by the
+\fBCompressionLevel\fR option (see \fBssh_config\fR(4)). Compression is
+desirable on modem lines and other slow connections, but only slows down things
+on fast networks. The default value can be set on a host-by-host basis in the
+configuration files. See the \fBCompression\fR option in \fBssh_config\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR [\fIbind_address\fR\fB:\fR]\fIport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies a local \fBdynamic\fR application-level port forwarding. This works
+by allocating a socket to listen to port on the local side, optionally bound to
+the specified \fIbind_address\fR. Whenever a connection is made to this port,
+the connection is forwarded over the secure channel. The application protocol
+is then used to determine where to connect to from the remote machine.
+Currently, the \fBSOCKS4\fR and \fBSOCKS5\fR protocols are supported and
+\fBssh\fR acts as a SOCKS server. Only a user with enough privileges can
+forward privileged ports. Dynamic port forwardings can also be specified in the
+configuration file.
+.sp
+IPv6 addresses can be specified with an alternative syntax:
+\fB[\fR\fIbind_address\fR\fB/]\fR\fIport\fR or by enclosing the address in
+square brackets. By default, the local port is bound in accordance with the
+\fBGatewayPorts\fR setting. However, an explicit \fIbind_address\fR can be used
+to bind the connection to a specific address. The \fIbind_address\fR of
+\fBlocalhost\fR indicates that the listening port be bound for local use only,
+while an empty address or \fB*\fR indicates that the port should be available
+from all interfaces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIch\fR | ^\fIch\fR | none\fR
+.ad
+.sp .6
+.RS 4n
+Sets the escape character for sessions with a pty (default: `\fB~\fR'). The
+escape character is only recognized at the beginning of a line. The escape
+character followed by a dot (\fB\&.\fR) closes the connection. If followed by
+CTRL-z, the escape character suspends the connection. If followed by itself,
+the escape character sends itself once. Setting the character to \fBnone\fR
+disables any escapes and makes the session fully transparent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.sp .6
+.RS 4n
+Requests \fBssh\fR to go to background just before command execution. This is
+useful if \fBssh\fR is going to ask for passwords or passphrases, but the user
+wants it in the background. This implies the \fB-n\fR option. The recommended
+way to start X11 programs at a remote site is with something like \fBssh\fR
+\fB-f\fR \fIhost\fR \fIxterm\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR \fIconfigfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an alternative per-user configuration file. If a configuration file
+is specified on the command line, the system-wide configuration file,
+\fB/etc/ssh_config\fR, is ignored. The default for the per-user configuration
+file is \fB$HOME/.ssh/config\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.sp .6
+.RS 4n
+Allows remote hosts to connect to local forwarded ports.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIidentity_file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Selects a file from which the identity (private key) for \fBRSA\fR or \fBDSA\fR
+authentication is read. The default is \fB$HOME/.ssh/identity\fR for protocol
+version 1, and \fB$HOME/.ssh/id_rsa\fR and \fB$HOME/.ssh/id_dsa\fR for protocol
+version 2. Identity files can also be specified on a per-host basis in the
+configuration file. It is possible to have multiple \fB-i\fR options (and
+multiple identities specified in configuration files).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlogin_name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the user to log in as on the remote machine. This also can be
+specified on a per-host basis in the configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR [\fIbind_address:\fR]\fIport\fR:\fIhost\fR:\fIhostport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies that the specified port on the local (client) host is to be forwarded
+to the specified host and port on the remote side. This works by allocating a
+socket to listen to the port on the local side, optionally bound to the
+specified \fIbind_address\fR. Then, whenever a connection is made to this port,
+the connection is forwarded over the secure channel and a connection is made to
+host port \fIhostport\fR from the remote machine. Port forwardings can also be
+specified in the configuration file. Only a user with enough privileges can
+forward privileged ports. IPv6 addresses can be specified with an alternative
+syntax: \fB[\fR\fIbind_address\fR\fB/]\fR\fIport\fR\fB/\fR\fIhost\fR\fB/\fR\fIh
+ostport\fR or by enclosing the address in square brackets.
+.sp
+By default, the local port is bound in accordance with the \fBGatewayPorts\fR
+setting. However, an explicit \fIbind_address\fR can be used to bind the
+connection to a specific address. The \fIbind_address\fR of \fBlocalhost\fR
+indicates that the listening port be bound for local use only, while an empty
+address or \fB*\fR indicates that the port should be available from all
+interfaces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImac_spec\fR\fR
+.ad
+.sp .6
+.RS 4n
+Additionally, for protocol version 2 a comma-separated list of \fBMAC\fR
+(message authentication code) algorithms can be specified in order of
+preference. See the MACs keyword for more information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.sp .6
+.RS 4n
+Redirects \fBstdin\fR from \fB/dev/null\fR (actually, prevents reading from
+\fBstdin\fR). This must be used when \fBssh\fR is run in the background. A
+common trick is to use this to run X11 programs on a remote machine. For
+example,
+.sp
+.in +2
+.nf
+ssh -n shadows.cs.hut.fi emacs &
+.fi
+.in -2
+.sp
+
+starts an \fBemacs\fR on \fBshadows.cs.hut.fi\fR, and the X11 connection is
+automatically forwarded over an encrypted channel. The \fBssh\fR program is put
+in the background. This does not work if \fBssh\fR needs to ask for a password
+or passphrase. See also the \fB-f\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does not execute a remote command. This is useful if you just want to forward
+ports (protocol version 2 only).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR\fR
+.ad
+.sp .6
+.RS 4n
+Can be used to give options in the format used in the configuration file. This
+is useful for specifying options for which there is no separate command-line
+flag. The option has the same format as a line in the configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the port to connect to on the remote host. This can be specified on a
+per-host basis in the configuration file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.sp .6
+.RS 4n
+Obsoleted option. SSHv1 connections from privileged ports are not supported.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.sp .6
+.RS 4n
+Quiet mode. Causes all warning and diagnostic messages to be suppressed. Only
+fatal errors are displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR [\fIbind_address\fR:]\fIport\fR:\fIhost\fR:\fIhostport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies that the specified port on the remote (server) host is to be
+forwarded to the specified host and port on the local side. This works by
+allocating a socket to listen to the port on the remote side. Then, whenever a
+connection is made to this port, the connection is forwarded over the secure
+channel and a connection is made to host port \fIhostport\fR from the local
+machine. Port forwardings can also be specified in the configuration file.
+Privileged ports can be forwarded only when logging in on the remote machine as
+a user with enough privileges.
+.sp
+IPv6 addresses can be specified by enclosing the address in square braces or
+using an alternative syntax: \fB[\fR\fIbind_address\fR\fB/]\fR\fIhost\fR\fB/\fR
+\fIport\fR\fB/\fR\fIhostport\fR.
+.sp
+By default, the listening socket on the server is bound to the loopback
+interface only. This can be overridden by specifying a \fIbind_address\fR. An
+empty \fIbind_address\fR, or the address \fB*\fR, indicates that the remote
+socket should listen on all interfaces. Specifying a remote \fIbind_address\fR
+only succeeds if the server's \fBGatewayPorts\fR option is enabled. See
+\fBsshd_config\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.sp .6
+.RS 4n
+Can be used to request invocation of a subsystem on the remote system.
+Subsystems are a feature of the SSH2 protocol which facilitate the use of SSH
+as a secure transport for other applications, for example, \fBsftp\fR. The
+subsystem is specified as the remote command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forces pseudo-tty allocation. This can be used to execute arbitrary
+screen-based programs on a remote machine, which can be very useful, for
+example, when implementing menu services. Multiple \fB-t\fR options force
+allocation, even if \fBssh\fR has no local \fBtty\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables pseudo-tty allocation (protocol version 2 only).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.sp .6
+.RS 4n
+Verbose mode. Causes \fBssh\fR to print debugging messages about its progress.
+This is helpful in debugging connection, authentication, and configuration
+problems. Multiple \fB-v\fR options increase the verbosity. Maximum is 3.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables X11 forwarding.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables X11 forwarding. This can also be specified on a per-host basis in a
+configuration file.
+.sp
+X11 forwarding should be enabled with caution. Users with the ability to bypass
+file permissions on the remote host (for the user's X authorization database)
+can access the local X11 display through the forwarded connection. An attacker
+can then be able to perform activities such as keystroke monitoring.
+.sp
+For this reason, X11 forwarding might be subjected to X11 SECURITY extension
+restrictions. Refer to the \fBForwardX11Trusted\fR directive in
+\fBssh_config\fR(4) for more information.
+.sp
+If X11 forwarding is enabled, remote X11 clients is trusted by default. This
+means that they have full access to the original X11 display.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+\fBssh\fR normally sets the following environment variables:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDISPLAY\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBDISPLAY\fR variable must be set for X11 display forwarding to work.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSSH_ASKPASS\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBssh\fR needs a passphrase, it reads the passphrase from the current
+terminal if it was run from a terminal. If \fBssh\fR does not have a terminal
+associated with it but \fBDISPLAY\fR and \fBSSH_ASKPASS\fR are set, it executes
+the program specified by \fBSSH_ASKPASS\fR and opens an X11 window to read the
+passphrase. This is particularly useful when calling \fBssh\fR from a .Xsession
+or related script. On some machines it might be necessary to redirect the input
+from \fB/dev/null\fR to make this work. The system is shipped with
+\fB/usr/lib/ssh/ssh-askpass\fR which is the default value for \fBSSH_ASKPASS\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSSH_AUTH_SOCK\fR\fR
+.ad
+.sp .6
+.RS 4n
+Indicates the path of a unix-domain socket used to communicate with the agent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSSH_LANGS\fR\fR
+.ad
+.sp .6
+.RS 4n
+A comma-separated list of IETF language tags (see RFC3066) indicating the
+languages that the user can read and write. Used for negotiation of the locale
+on the server.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,\fR
+.ad
+.br
+.na
+\fB\fBLC_MESSAGES\fR, \fBLC_MONETARY\fR, \fBLC_NUMERIC\fR, \fBLC_TIME\fR\fR
+.ad
+.sp .6
+.RS 4n
+The values of these environment variables can be set in remote sessions
+according to the locale settings on the client side and availability of support
+for those locales on the server side. Environment Variable Passing (see \fIRFC
+4254\fR) is used for passing them over to the server side.
+.RE
+
+.sp
+.LP
+See the \fBENVIRONMENT VARIABLES\fR section in the \fBsshd\fR(1M) man page for
+more information on how locale setting can be further changed depending on
+server side configuration.
+.SH EXIT STATUS
+.sp
+.LP
+The status of the remote program is returned as the exit status of \fBssh\fR.
+\fB255\fR is returned if an error occurred at anytime during the \fBssh\fR
+connection, including the initial key exchange.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/known_hosts\fR\fR
+.ad
+.RS 26n
+.rt
+Records host keys for all hosts the user has logged into that are not in
+\fB/etc/ssh/ssh_known_hosts\fR. See \fBsshd\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/identity\fR\fR
+.ad
+.br
+.na
+\fB\fB$HOME/.ssh/id_dsa\fR\fR
+.ad
+.br
+.na
+\fB\fB$HOME/.ssh/id_ssa\fR\fR
+.ad
+.RS 26n
+.rt
+Contains the authentication identity of the user. These files are for protocol
+1 \fBRSA\fR, protocol 2 \fBDSA\fR, and protocol 2 \fBRSA\fR, respectively.
+These files contain sensitive data and should be readable by the user but not
+accessible by others (read/write/execute). \fBssh\fR ignores a private key file
+if it is accessible by others. It is possible to specify a passphrase when
+generating the key. The passphrase is used to encrypt the sensitive part of
+this file using \fB3DES\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/ssh/sshrc\fR\fR
+.ad
+.RS 26n
+.rt
+Commands in this file are executed by \fBssh\fR when the user logs in just
+before the user's shell or command is started. See \fBsshd\fR(1M) for more
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/rc\fR\fR
+.ad
+.RS 26n
+.rt
+Commands in this file are executed by \fBssh\fR when the user logs in just
+before the user's shell or command is started. See \fBsshd\fR(1M) for more
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.ssh/environment\fR\fR
+.ad
+.RS 26n
+.rt
+Contains additional definitions for environment variables. See ENVIRONMENT
+VARIABLES.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The command line syntax is Committed. The remote locale selection through
+passing \fBLC_*\fR environment variables is Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBrlogin\fR(1), \fBrsh\fR(1), \fBscp\fR(1), \fBssh-add\fR(1),
+\fBssh-agent\fR(1), \fBssh-keygen\fR(1), \fBssh-http-proxy-connect\fR(1),
+\fBssh-socks5-proxy-connect\fR(1), \fBtelnet\fR(1), \fBsshd\fR(1M),
+\fBssh_config\fR(4), \fBsshd_config\fR(4), \fBattributes\fR(5),
+\fBgss_auth_rules\fR(5), \fBkerberos\fR(5), \fBprivileges\fR(5)
+.sp
+.LP
+\fIRFC 1928\fR
+.sp
+.LP
+\fIRFC 4254\fR
diff --git a/usr/src/man/man1/strchg.1 b/usr/src/man/man1/strchg.1
new file mode 100644
index 0000000000..b341222b5a
--- /dev/null
+++ b/usr/src/man/man1/strchg.1
@@ -0,0 +1,275 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH strchg 1 "24 Mar 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+strchg, strconf \- change or query stream configuration
+.SH SYNOPSIS
+.LP
+.nf
+\fBstrchg\fR \fB-h\fR \fImodule1\fR [, \fImodule2\fR...]
+.fi
+
+.LP
+.nf
+\fBstrchg\fR \fB-p\fR [\fB-a\fR | \fB-u\fR \fImodule\fR]
+.fi
+
+.LP
+.nf
+\fBstrchg\fR \fB-f\fR \fIfilename\fR
+.fi
+
+.LP
+.nf
+\fBstrconf\fR [\fB-m\fR | \fB-t\fR \fImodule\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+These commands are used to alter or query the configuration of the stream
+associated with the user's standard input. The \fBstrchg\fR command pushes
+modules on and/or pops modules off the stream. The \fBstrconf\fR command
+queries the configuration of the stream. Only the super-user or owner of a
+STREAMS device can alter the configuration of that stream.
+.sp
+.LP
+Invoked without any arguments, \fBstrconf\fR prints a list of all the modules
+in the stream as well as the topmost driver. The list is printed with one name
+per line where the first name printed is the topmost module on the stream (if
+one exists) and the last item printed is the name of the driver.
+.SH OPTIONS
+.sp
+.LP
+The following options apply to \fBstrchg\fR and, \fB\fR\fB-h\fR\fB,\fR
+\fB\fR\fB-f\fR\fB,\fR and \fB-p\fR are mutually exclusive.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Pop all the modules above the topmost driver off the stream. This option
+requires the \fB-p\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fI filename\fR \fR
+.ad
+.sp .6
+.RS 4n
+Specify a \fIfilename\fR that contains a list of modules representing the
+desired configuration of the stream. Each module name must appear on a separate
+line where the first name represents the topmost module and the last name
+represents the module that should be closest to the driver. \fBstrchg\fR
+determines the current configuration of the stream and pop and push the
+necessary modules in order to end up with the desired configuration.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fI module1\fR [\|,\|\fImodule2\fR.\|.\|.\|]\fR
+.ad
+.sp .6
+.RS 4n
+ Mnemonic for pus\fIh\fR, pushes modules onto a stream. It takes as arguments
+the names of one or more pushable streams modules. These modules are pushed in
+order; that is, \fImodule1\fR is pushed first, \fImodule2\fR is pushed second,
+etc.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fR
+.ad
+.sp .6
+.RS 4n
+Mnemonic for po\fIp\fR, pops modules off the stream. With the \fB-p\fR option
+alone, \fBstrchg\fR pops the topmost module from the stream.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fI module\fR \fR
+.ad
+.sp .6
+.RS 4n
+All modules above, but not including \fImodule\fR are popped off the stream.
+This option requires the \fB-p\fR option.
+.RE
+
+.sp
+.LP
+The following options apply to \fBstrconf\fR and, \fB-m\fR and \fB-t\fR are
+mutually exclusive.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI module\fR \fR
+.ad
+.RS 14n
+.rt
+Determine if the named \fImodule\fR is present on a stream. If it is,
+\fBstrconf\fR prints the message \fByes\fR and returns zero. If not,
+\fBstrconf\fR prints the message \fBno\fR and returns a non-zero value. The
+\fB-t\fR and \fB-m\fR options are mutually exclusive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fI module\fR \fR
+.ad
+.RS 14n
+.rt
+Print only the topmost module (if one exists). The \fB-t\fR and \fB-m\fR
+options are mutually exclusive.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fBstrchg\fR Command
+.sp
+.LP
+The following command pushes the module \fBldterm\fR on the stream associated
+with the user's standard input:
+
+.sp
+.in +2
+.nf
+example% strchg -h ldterm
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command pops the topmost module from the stream associated with
+\fB/dev/term/24\fR. The user must be the owner of this device or the super
+user.
+
+.sp
+.in +2
+.nf
+example% strchg -p < /dev/term/24
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the file \fBfileconf\fR contains the following:
+
+.sp
+.in +2
+.nf
+ttcompat
+ldterm
+ptem
+.fi
+.in -2
+
+.sp
+.LP
+then the command
+
+.sp
+.in +2
+.nf
+example% strchg -f fileconf
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+configures the user's standard input stream so that the module \fBptem\fR is
+pushed over the driver, followed by \fBldterm\fR and \fBttcompat\fR closest to
+the stream head.
+
+.sp
+.LP
+The \fBstrconf\fR command with no arguments lists the modules and topmost
+driver on the stream; for a stream that has only the module \fBldterm\fR pushed
+above the \fBzs\fR driver, it would produce the following output:
+
+.sp
+.in +2
+.nf
+ldterm
+zs
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command asks if \fBldterm\fR is on the stream:
+
+.sp
+.in +2
+.nf
+example% strconf -m ldterm
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+and produces the following output while returning an exit status of 0:
+
+.sp
+.in +2
+.nf
+yes
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5), \fBstreamio\fR(7I)
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBstrchg\fR returns zero on success. It prints an error message and returns
+non-zero status for various error conditions, including usage error, bad module
+name, too many modules to push, failure of an ioctl on the stream, or failure
+to open \fIfilename\fR from the \fB-f\fR option.
+.sp
+.LP
+\fBstrconf\fR returns zero on success (for the \fB-m\fR or \fB-t\fR option,
+"success" means the named or topmost module is present). It returns a non-zero
+status if invoked with the \fB-m\fR or \fB-t\fR option and the module is not
+present. It prints an error message and returns non-zero status for various
+error conditions, including usage error or failure of an \fBioctl\fR on the
+stream.
+.SH NOTES
+.sp
+.LP
+If the user is neither the owner of the stream nor the super-user, the
+\fBstrchg\fR command fails. If the user does not have read permissions on the
+stream and is not the super user, the \fBstrconf\fR command fails.
+.sp
+.LP
+If modules are pushed in the wrong order, one could end up with a stream that
+does not function as expected. For ttys, if the line discipline module is not
+pushed in the correct place, one could have a terminal that does not respond to
+any commands.
diff --git a/usr/src/man/man1/strings.1 b/usr/src/man/man1/strings.1
new file mode 100644
index 0000000000..df5776837a
--- /dev/null
+++ b/usr/src/man/man1/strings.1
@@ -0,0 +1,224 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH strings 1 "13 Apr 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+strings \- find printable strings in an object or binary file
+.SH SYNOPSIS
+.LP
+.nf
+\fBstrings\fR [\fB-a\fR | \fB-\fR]
+ [\fB-t\fR \fIformat\fR | \fB-o\fR] [\fB-n\fR \fInumber\fR | \fB-number\fR] [\fB-N\fR \fIname\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBstrings\fR utility looks for \fBASCII\fR strings in a binary file. A
+string is any sequence of 4 or more printing characters ending with a NEWLINE
+or a \fBNULL\fR character.
+.sp
+.LP
+\fBstrings\fR is useful for identifying random object files and many other
+things.
+.sp
+.LP
+By default, strings looks at program sections that are loaded in memory.
+Program sections are identified by the section type \fBSHT_PROGBITS\fR.
+Sections that are loaded in memory are identified by the section flag
+\fBSHF_ALLOC\fR. Use \fBelfdump\fR(1) to display complete section information
+for a file.
+.sp
+.LP
+All sections can be inspected with the \fB-a\fR option. Individual sections can
+be inspected with the \fB-N\fR option.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR | \fB\(mi\fR\fR
+.ad
+.RS 23n
+.rt
+Look everywhere in the file for strings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR \fB|\fR \fB-\fR\fInumber\fR\fR
+.ad
+.RS 23n
+.rt
+Use a \fInumber\fR as the minimum string length rather than the default, which
+is \fB4\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-N\fR \fIname\fR\fR
+.ad
+.RS 23n
+.rt
+Look only in ELF section name. See \fBelfdump\fR(1). Multiple \fB-N\fR options
+can be specified to inspect multiple sections.
+.sp
+If the \fB-a\fR or \fB-\fRoption is specified, all \fB-N\fR options are
+ignored .
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 23n
+.rt
+Equivalent to \fB\fR\fB-t\fR \fBd\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fBformat\fR\fR
+.ad
+.RS 23n
+.rt
+Write each string preceded by its byte offset from the start of the file. The
+format is dependent on the single character used as the \fIformat\fR
+option-argument:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBd\fR\fR
+.ad
+.RS 5n
+.rt
+The offset is written in decimal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.RS 5n
+.rt
+The offset is written in octal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.RS 5n
+.rt
+The offset is written in hexadecimal.
+.RE
+
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fIfile\fR\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a regular file to be used as input. If no \fIfile\fR operand is
+specified, the \fBstrings\fR utility reads from the standard input.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBstrings\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBstrings\fR utility, including all options except \fB-N\fR, are specified
+by standards. See \fBstandards\fR(5). The \fB-N\fR option is not currently
+specified by any standard.
+.SH SEE ALSO
+.sp
+.LP
+\fBelfdump\fR(1), \fBod\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The algorithm for identifying strings is extremely primitive.
+.sp
+.LP
+For backwards compatibility, the options \fB-a\fR and \fB\(mi\fR are
+interchangeable.
diff --git a/usr/src/man/man1/strip.1 b/usr/src/man/man1/strip.1
new file mode 100644
index 0000000000..5140c89928
--- /dev/null
+++ b/usr/src/man/man1/strip.1
@@ -0,0 +1,193 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH strip 1 "5 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+strip \- strip symbol table, debugging and line number information from an
+object file
+.SH SYNOPSIS
+.LP
+.nf
+\fBstrip\fR [\fB-lVx\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBstrip\fR command removes the symbol table \fBSHT_SYMTAB\fR and its
+associated string table, debugging information, and line number information
+from \fBELF\fR object files. That is, besides the symbol table and associated
+string table, the following sections are removed:
+.sp
+.in +2
+.nf
+\&.line
+\&.debug*
+\&.stab*
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Once this stripping process has been done, limited symbolic debugging access is
+available for that file. Therefore, this command is normally run only on
+production modules that have been debugged and tested.
+.sp
+.LP
+If \fBstrip\fR is executed on a common archive file (see \fBar.h\fR(3HEAD)) in
+addition to processing the members, \fBstrip\fR removes the archive symbol
+table. The archive symbol table must be restored by executing the \fBar\fR(1)
+command with the \fB-s\fR option before the archive can be linked by the
+\fBld\fR(1) command. \fBstrip\fR produces appropriate warning messages when
+this situation arises.
+.sp
+.LP
+\fBstrip\fR is used to reduce the file storage overhead taken by the object
+file.
+.SH OPTIONS
+.sp
+.LP
+The amount of information stripped from the \fBELF\fR object file can be
+controlled by using any of the following options. The following options are
+supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Strip line number information only.Does not strip the symbol table or debugging
+information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 6n
+.rt
+Prints, on standard error, the version number of \fBstrip\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Does not strip the symbol table. Debugging and line number information might be
+stripped.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name referring to an executable file.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBstrip\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/strp*\fR\fR
+.ad
+.RS 14n
+.rt
+Temporary files
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBas\fR(1), \fBld\fR(1), \fBmcs\fR(1), \fBelf\fR(3ELF),
+\fBtmpnam\fR(3C), \fBa.out\fR(4), \fBar.h\fR(3HEAD), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The symbol table section is not removed if it is contained within a segment or
+if the file is a relocatable object.
+.sp
+.LP
+The line number and debugging sections are not removed if they are contained
+within a segment or if their associated relocation section is contained within
+a segment.
+.sp
+.LP
+The \fBstrip\fR command is used to remove a standard predefined set of sections
+from an ELF object file. To remove a user specified section by name, see
+\fBmcs\fR(1).
diff --git a/usr/src/man/man1/stty.1 b/usr/src/man/man1/stty.1
new file mode 100644
index 0000000000..6f5da12fe2
--- /dev/null
+++ b/usr/src/man/man1/stty.1
@@ -0,0 +1,1593 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH stty 1 "20 May 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+stty \- set the options for a terminal
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/stty\fR [\fB-a\fR] [\fB-g\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/stty\fR [\fImodes\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/stty\fR [\fB-a\fR | \fB-g\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/stty\fR [\fImodes\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/stty\fR [\fB-a\fR | \fB-g\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/stty\fR [\fImodes\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBstty\fR utility sets certain terminal I/O options for the device that is
+the current standard input. Without arguments, \fBstty\fR reports the settings
+of certain options.
+.sp
+.LP
+In this report, if a character is preceded by a caret (\fB^\fR), then the value
+of that option is the corresponding control character (for example, \fB^h\fR is
+CTRL-h. In this case, recall that CTRL-h is the same as the BACKSPACE key). The
+sequence \fB^@\fR means that an option has a null value.
+.sp
+.LP
+See \fBtermio\fR(7I) for detailed information about the modes listed from
+\fBControl\fR \fBModes\fR through \fBLocal Modes\fR. For detailed information
+about the modes listed under \fBHardware\fR \fBFlow\fR \fBControl\fR
+\fBModes\fR and \fBClock Modes\fR, see \fBtermiox\fR(7I).
+.sp
+.LP
+Operands described in the \fBCombination Modes\fR section are implemented using
+options in the earlier sections. Notice that many combinations of options make
+no sense, but no sanity checking is performed. Hardware flow control and clock
+modes options might not be supported by all hardware interfaces.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Writes to standard output all of the option settings for the terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR\fR
+.ad
+.RS 6n
+.rt
+Reports current settings in a form that can be used as an argument to another
+\fBstty\fR command. Emits termios-type output if the underlying driver supports
+it. Otherwise, it emits termio-type output.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following \fImode\fR operands are supported:
+.SS "Control Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparenb\fR(\fB-parenb\fR)\fR
+.ad
+.RS 24n
+.rt
+Enable (disable) parity generation and detection.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparext\fR(\fB-parext\fR)\fR
+.ad
+.RS 24n
+.rt
+Enable (disable) extended parity generation and detection for mark and space
+parity.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparodd\fR(\fB-parodd\fR)\fR
+.ad
+.RS 24n
+.rt
+Select odd (even) parity, or mark (space) parity if \fBparext\fR is enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcs5\fR \fBcs6\fR \fBcs7\fR \fBcs8\fR\fR
+.ad
+.RS 24n
+.rt
+Select character size (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 24n
+.rt
+Hang up line immediately.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhupcl\fR (\fB-hupcl\fR)\fR
+.ad
+.RS 24n
+.rt
+Hang up (do not hang up) connection on last close.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhup\fR (\fB-hup\fR)\fR
+.ad
+.RS 24n
+.rt
+Same as \fBhupcl\fR(\fB-hupcl\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcstopb\fR (\fB-cstopb\fR)\fR
+.ad
+.RS 24n
+.rt
+Use two (one) stop bits per character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcread\fR (\fB-cread\fR)\fR
+.ad
+.RS 24n
+.rt
+Enable (disable) the receiver.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrtscts\fR (\fB-crtscts\fR)\fR
+.ad
+.RS 24n
+.rt
+Enable output hardware flow control. Raise the \fBRTS\fR (Request to Send)
+modem control line. Suspends output until the CTS (Clear to Send) line is
+raised.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrtsxoff\fR (\fB-crtsxoff\fR)\fR
+.ad
+.RS 24n
+.rt
+Enable input hardware flow control. Raise the \fBRTS\fR (Request to Send) modem
+control line to receive data. Suspends input when RTS is low.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclocal\fR (\fB-clocal\fR)\fR
+.ad
+.RS 24n
+.rt
+Assume a line without (with) modem control.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefeucw\fR\fR
+.ad
+.RS 24n
+.rt
+Set the widths of multibyte characters to the values defined in the current
+locale specified by \fBLC_CTYPE\fR. Internally, width is expressed in terms of
+bytes per character, and screen or display columns per character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB110 300 600 1200 1800\fR
+.ad
+.br
+.na
+\fB2400 4800 9600 19200\fR
+.ad
+.br
+.na
+\fB38400 357600 76800 115200\fR
+.ad
+.br
+.na
+\fB153600 230400 307200 460800\fR
+.ad
+.sp .6
+.RS 4n
+Set terminal baud rate to the number given, if possible. (All speeds are not
+supported by all hardware interfaces.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBispeed 0 110 300 600 1200\fR
+.ad
+.br
+.na
+\fB1800 2400 4800 9600 19200\fR
+.ad
+.br
+.na
+\fB38400 57600 76800 115200\fR
+.ad
+.br
+.na
+\fB153600 230400 307200 460800\fR
+.ad
+.sp .6
+.RS 4n
+Set terminal input baud rate to the number given, if possible. (Not all
+hardware supports split baud rates.) If the input baud rate is set to \fB0\fR,
+the input baud rate is specified by the value of the output baud rate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBospeed 0 110 300 600 1200\fR
+.ad
+.br
+.na
+\fB1800 2400 4800 9600 19200\fR
+.ad
+.br
+.na
+\fB38400 57600 76800 115200\fR
+.ad
+.br
+.na
+\fB153600 230400 307200 460800\fR
+.ad
+.sp .6
+.RS 4n
+Set terminal output baud rate to the number given, if possible. (Not all
+hardware supports split baud rates.) If the output baud rate is set to \fB0\fR,
+the line is hung up immediately.
+.RE
+
+.SS "Input Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignbrk\fR (\fB-ignbrk\fR)\fR
+.ad
+.RS 22n
+.rt
+Ignore (do not ignore) break on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbrkint\fR (\fB-brkint\fR)\fR
+.ad
+.RS 22n
+.rt
+Signal (do not signal) INTR on break.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBignpar\fR (\fB-ignpar\fR)\fR
+.ad
+.RS 22n
+.rt
+Ignore (do not ignore) parity errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparmrk\fR (\fB-parmrk\fR)\fR
+.ad
+.RS 22n
+.rt
+Mark (do not mark) parity errors (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinpck\fR (\fB-inpck\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) input parity checking.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBistrip\fR (\fB-istrip\fR)\fR
+.ad
+.RS 22n
+.rt
+Strip (do not strip) input characters to seven bits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinlcr\fR (\fB-inlcr\fR)\fR
+.ad
+.RS 22n
+.rt
+Map (do not map) NL to CR on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBigncr\fR (\fB-igncr\fR)\fR
+.ad
+.RS 22n
+.rt
+Ignore (do not ignore) CR on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBicrnl\fR (\fB-icrnl\fR)\fR
+.ad
+.RS 22n
+.rt
+Map (do not map) CR to NL on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBiuclc\fR (\fB-iuclc\fR)\fR
+.ad
+.RS 22n
+.rt
+Map (do not map) upper-case alphabetics to lower case on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBixon\fR (\fB-ixon\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) START/STOP output control. Output is stopped by sending STOP
+control character and started by sending the START control character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBixany\fR (\fB-ixany\fR)\fR
+.ad
+.RS 22n
+.rt
+Allow any character (only DC1) to restart output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBixoff\fR (\fB-ixoff\fR)\fR
+.ad
+.RS 22n
+.rt
+Request that the system send (not send) START/STOP characters when the input
+queue is nearly empty/full.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimaxbel\fR (\fB-imaxbel\fR)\fR
+.ad
+.RS 22n
+.rt
+Echo (do not echo) \fBBEL\fR when the input line is too long. If \fBimaxbel\fR
+is set, the \fBASCII BEL\fR character (\fB07 hex\fR) is echoed if the input
+stream overflows. Further input is not stored, but any input already present
+is not disturbed. If \fB-imaxbel\fR is set, no \fBBEL\fR character is echoed,
+and all unread input present in the input queue is discarded if the input
+stream overflows.
+.RE
+
+.SS "Output Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBopost\fR (\fB-opost\fR)\fR
+.ad
+.RS 23n
+.rt
+Post-process output (do not post-process output; ignore all other output
+modes).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBolcuc\fR (\fB-olcuc\fR)\fR
+.ad
+.RS 23n
+.rt
+Map (do not map) lower-case alphabetics to upper case on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBonlcr\fR (\fB-onlcr\fR)\fR
+.ad
+.RS 23n
+.rt
+Map (do not map) NL to CR-NL on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBocrnl\fR (\fB-ocrnl\fR)\fR
+.ad
+.RS 23n
+.rt
+Map (do not map) CR to NL on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBonocr\fR (\fB-onocr\fR)\fR
+.ad
+.RS 23n
+.rt
+Do not (do) output CRs at column zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBonlret\fR (\fB-onlret\fR)\fR
+.ad
+.RS 23n
+.rt
+On the terminal NL performs (does not perform) the CR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBofill\fR (\fB-ofill\fR)\fR
+.ad
+.RS 23n
+.rt
+Use fill characters (use timing) for delays.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBofdel\fR (\fB-ofdel\fR)\fR
+.ad
+.RS 23n
+.rt
+Fill characters are DELs (NULs).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcr0 cr1 cr2 cr3\fR\fR
+.ad
+.RS 23n
+.rt
+Select style of delay for carriage returns (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnl0 nl1\fR\fR
+.ad
+.RS 23n
+.rt
+Select style of delay for line-feeds (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtab0 tab1 tab2 tab3\fR\fR
+.ad
+.RS 23n
+.rt
+Select style of delay for horizontal tabs (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbs0 bs1\fR\fR
+.ad
+.RS 23n
+.rt
+Select style of delay for backspaces (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBff0 ff1\fR\fR
+.ad
+.RS 23n
+.rt
+Select style of delay for form-feeds (see \fBtermio\fR(7I)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvt0 vt1\fR\fR
+.ad
+.RS 23n
+.rt
+Select style of delay for vertical tabs (see \fBtermio\fR(7I)).
+.RE
+
+.SS "Local Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBisig\fR(\fB-isig\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) the checking of characters against the special control
+characters INTR, QUIT, SWTCH, and SUSP. For information on \fBSWTCH\fR, see
+\fBNOTES\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBicanon\fR (\fB-icanon\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) canonical input (ERASE and KILL processing). Does not set
+\fBMIN\fR or \fBTIME\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxcase\fR (\fB-xcase\fR)\fR
+.ad
+.RS 22n
+.rt
+Canonical (unprocessed) upper/lower-case presentation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBecho\fR (\fB-echo\fR)\fR
+.ad
+.RS 22n
+.rt
+Echo back (do not echo back) every character typed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechoe\fR (\fB-echoe\fR)\fR
+.ad
+.RS 22n
+.rt
+Echo (do not echo) ERASE character as a backspace-space-backspace string. This
+mode erases the ERASEed character on many CRT terminals; however, it does not
+keep track of column position and, as a result, it might be confusing for
+escaped characters, tabs, and backspaces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechok\fR(\fB-echok\fR)\fR
+.ad
+.RS 22n
+.rt
+Echo (do not echo) NL after KILL character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlfkc\fR (\fB-lfkc\fR)\fR
+.ad
+.RS 22n
+.rt
+The same as \fBechok\fR(\fB-echok\fR); obsolete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechonl\fR (\fB-echonl\fR)\fR
+.ad
+.RS 22n
+.rt
+Echo (do not echo) NL.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnoflsh\fR (\fB-noflsh\fR)\fR
+.ad
+.RS 22n
+.rt
+Disable (enable) flush after INTR, QUIT, or SUSP.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstwrap\fR (\fB-stwrap\fR)\fR
+.ad
+.RS 22n
+.rt
+Disable (enable) truncation of lines longer than \fB79\fR characters on a
+synchronous line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtostop\fR (\fB-tostop\fR)\fR
+.ad
+.RS 22n
+.rt
+Send (do not send) \fBSIGTTOU\fR when background processes write to the
+terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechoctl\fR \fB(\fR\fB-echoctl\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Echo (do not echo) control characters as \fB^\fR\fIchar,\fR delete as \fB^?\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechoprt\fR \fB(\fR\fB-echoprt\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Echo (do not echo) erase character as character is ``erased''.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechoke\fR \fB(\fR\fB-echoke\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+BS-SP-BS erase (do not BS-SP-BS erase) entire line on line kill.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBflusho\fR \fB(\fR\fB-flusho\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Output is (is not) being flushed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpendin\fR \fB(\fR\fB-pendin\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Retype (do not retype) pending input at next read or input character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBiexten\fR \fB(\fR\fB-iexten\fR\fB)\fR\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) special control characters not currently controlled by
+\fBicanon\fR, \fBisig\fR, \fBixon\fR, or \fBixoff\fR: \fBVEOL\fR, \fBVSWTCH\fR,
+\fBVREPRINT\fR, \fBVDISCARD\fR, \fBVDSUSP\fR, \fBVWERASE\fR, \fBand\fR
+\fBVLNEXT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstflush\fR \fB(\fR\fB-stflush\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) flush on a synchronous line after every \fBwrite\fR(2).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstappl\fR \fB(\fR\fB-stappl\fR)\fR
+.ad
+.RS 22n
+.rt
+Use application mode (use line mode) on a synchronous line.
+.RE
+
+.SS "Hardware Flow Control Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrtsxoff\fR (\fB-rtsxoff\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) RTS hardware flow control on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBctsxon\fR (\fB-ctsxon\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) CTS hardware flow control on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdtrxoff\fR (\fB-dtrxoff\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) DTR hardware flow control on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcdxon\fR (\fB-cdxon\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) CD hardware flow control on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBisxoff\fR (\fB-isxoff\fR)\fR
+.ad
+.RS 22n
+.rt
+Enable (disable) isochronous hardware flow control on input.
+.RE
+
+.SS "Clock Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxcibrg\fR\fR
+.ad
+.RS 13n
+.rt
+Get transmit clock from internal baud rate generator.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxctset\fR\fR
+.ad
+.RS 13n
+.rt
+Get the transmit clock from transmitter signal element timing (DCE source)
+lead, CCITT V.24 circuit 114, EIA-232-D pin 15.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxcrset\fR\fR
+.ad
+.RS 13n
+.rt
+Get transmit clock from receiver signal element timing (DCE source) lead, CCITT
+V.24 circuit 115, EIA-232-D pin 17.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrcibrg\fR\fR
+.ad
+.RS 13n
+.rt
+Get receive clock from internal baud rate generator.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrctset\fR\fR
+.ad
+.RS 13n
+.rt
+Get receive clock from transmitter signal element timing (DCE source) lead,
+CCITT V.24 circuit 114, EIA-232-D pin 15.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrcrset\fR\fR
+.ad
+.RS 13n
+.rt
+Get receive clock from receiver signal element timing (DCE source) lead, CCITT
+V.24 circuit 115, EIA-232-D pin 17.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtsetcoff\fR\fR
+.ad
+.RS 13n
+.rt
+Transmitter signal element timing clock not provided.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtsetcrbrg\fR\fR
+.ad
+.RS 13n
+.rt
+Output receive baud rate generator on transmitter signal element timing (DTE
+source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtsetctbrg\fR\fR
+.ad
+.RS 13n
+.rt
+Output transmit baud rate generator on transmitter signal element timing (DTE
+source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtsetctset\fR\fR
+.ad
+.RS 13n
+.rt
+Output transmitter signal element timing (DCE source) on transmitter signal
+element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtsetcrset\fR\fR
+.ad
+.RS 13n
+.rt
+Output receiver signal element timing (DCE source) on transmitter signal
+element timing (DTE source) lead, CCITT V.24 circuit 113, EIA-232-D pin 24.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsetcoff\fR\fR
+.ad
+.RS 13n
+.rt
+Receiver signal element timing clock not provided.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsetcrbrg\fR\fR
+.ad
+.RS 13n
+.rt
+Output receive baud rate generator on receiver signal element timing (DTE
+source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsetctbrg\fR\fR
+.ad
+.RS 13n
+.rt
+Output transmit baud rate generator on receiver signal element timing (DTE
+source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsetctset\fR\fR
+.ad
+.RS 13n
+.rt
+Output transmitter signal element timing (DCE source) on receiver signal
+element timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrsetcrset\fR\fR
+.ad
+.RS 13n
+.rt
+Output receiver signal element timing (DCE source) on receiver signal element
+timing (DTE source) lead, CCITT V.24 circuit 128, no EIA-232-D pin.
+.RE
+
+.SS "Control Assignments"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcontrol-character\fR \fIc\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set \fIcontrol-character\fR to \fIc\fR, where:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcontrol-character\fR\fR
+.ad
+.RS 21n
+.rt
+is \fBctab\fR, \fBdiscard\fR, \fBdsusp\fR, \fBeof\fR, \fBeol\fR, \fBeol2\fR,
+\fBerase\fR, \fBintr\fR, \fBkill\fR, \fBlnext\fR, \fBquit\fR, \fBreprint\fR,
+\fBstart\fR, \fBstop\fR, \fBsusp\fR, \fBswtch\fR, or \fBwerase\fR (\fBctab\fR
+is used with \fB-stappl\fR, see \fBtermio\fR(7I)). For information on
+\fBswtch\fR, see NOTES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc\fR\fR
+.ad
+.RS 21n
+.rt
+If \fIc\fR is a single character, the control character is set to that
+character.
+.sp
+In the POSIX locale, if \fIc\fR is preceded by a caret (\fB^\fR) indicating an
+escape from the shell and is one of those listed in the \fI^c\fR column of the
+following table, then its value used (in the Value column) is the corresponding
+control character (for example, ``\fB^d\fR'' is a CTRL-d). ``\fB^?\fR'' is
+interpreted as DEL and ``\fB^\(mi\fR'' is interpreted as undefined.
+.RE
+
+.RE
+
+.sp
+
+.sp
+.TS
+tab() box;
+cw(.92i) cw(.92i) cw(.92i) cw(.92i) cw(.92i) cw(.92i)
+lw(.92i) lw(.92i) lw(.92i) lw(.92i) lw(.92i) lw(.92i)
+.
+\fB^\fR\fIc\fR\fBValue\fR\fB^\fR\fIc\fR\fBValue\fR\fB^\fR\fIc\fR\fBValue\fR
+\fBa\fR, A<SOH>\fBl\fR, L<FF>\fBw\fR, W<ETB>
+\fBb\fR, B<STX>\fBm\fR, M<CR>\fBx\fR, X<CAN>
+\fBc\fR, C<ETX>\fBn\fR, N<SO>\fBy\fR, Y<EM>
+\fBd\fR, D<EOT>\fBo\fR, O<SI>\fBz\fR, Z<SUB>
+\fBe\fR, E<ENQ>\fBp\fR, P<DLE>\fB[\fR<ESC>
+\fBf\fR, F<ACK>\fBq\fR, Q<DC1>\fB\e\fR<FS>
+\fBg\fR, G<BEL>\fBr\fR, R<DC2>\fB]\fR<GS>
+\fBh\fR, H<BS>\fBs\fR, S<DC3>\fB^\fR<RS>
+\fBi\fR, I<HT>\fBt\fR, T<DC4>\fB_\fR<US>
+\fBj\fR, J<LF>\fBu\fR, U<NAK>\fB?\fR<DEL>
+\fBk\fR, K<VT>\fBv\fR, V<SYN>
+.TE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmin\fR \fInumber\fR\fR
+.ad
+.br
+.na
+\fB\fBtime\fR \fInumber\fR\fR
+.ad
+.RS 15n
+.rt
+Set the value of \fBmin\fR or \fBtime\fR to \fInumber\fR. \fBMIN\fR and
+\fBTIME\fR are used in Non-Canonical mode input processing (\fB-icanon\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBline\fR \fIi\fR\fR
+.ad
+.RS 15n
+.rt
+Set line discipline to \fIi\fR ( \fB0\fR< \fIi\fR <\fB127\fR).
+.RE
+
+.SS "Combination Modes"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsaved\fR \fIsettings\fR\fR
+.ad
+.RS 24n
+.rt
+Set the current terminal characteristics to the saved settings produced by the
+\fB-g\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBevenp\fR or \fBparity\fR\fR
+.ad
+.RS 24n
+.rt
+Enable \fBparenb\fR and \fBcs7\fR, or disable \fBparodd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoddp\fR\fR
+.ad
+.RS 24n
+.rt
+Enable \fBparenb\fR, \fBcs7\fR, and \fBparodd\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBspacep\fR\fR
+.ad
+.RS 24n
+.rt
+Enable \fBparenb\fR, \fBcs7\fR, and \fBparext\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmarkp\fR\fR
+.ad
+.RS 24n
+.rt
+Enable \fBparenb\fR, \fBcs7\fR, \fBparodd\fR, and \fBparext\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-parity\fR, or \fB-evenp\fR\fR
+.ad
+.RS 24n
+.rt
+Disable \fBparenb\fR, and set \fBcs8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-oddp\fR\fR
+.ad
+.RS 24n
+.rt
+Disable \fBparenb\fR and \fBparodd\fR, and set \fBcs8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-spacep\fR\fR
+.ad
+.RS 24n
+.rt
+Disable \fBparenb\fR and \fBparext\fR, and set \fBcs8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-markp\fR\fR
+.ad
+.RS 24n
+.rt
+Disable \fBparenb\fR, \fBparodd\fR, and \fBparext\fR, and set \fBcs8\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBraw\fR (\fB-raw\fR or \fBcooked\fR)\fR
+.ad
+.RS 24n
+.rt
+Enable (disable) raw input and output. Raw mode is equivalent to setting:
+.sp
+.in +2
+.nf
+stty cs8 -icanon min 1 time 0 -isig -xcase \e
+ -inpck -opost
+.fi
+.in -2
+
+.RE
+
+.SS "/usr/bin/stty, /usr/xpg6/bin/stty"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnl\fR (\fB-nl\fR)\fR
+.ad
+.RS 12n
+.rt
+Unset (set) \fBicrnl\fR, \fBonlcr\fR. In addition \fB-nl\fR unsets \fBinlcr\fR,
+\fBigncr\fR, \fBocrnl\fR, and \fBonlret\fR.
+.RE
+
+.SS "/usr/xpg4/bin/stty"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnl\fR (\fB-nl\fR)\fR
+.ad
+.RS 24n
+.rt
+Set (unset) \fBicrnl\fR. In addition, \fB-nl\fR unsets \fBinlcr\fR,
+\fBigncr\fR, \fBocrnl\fR, and \fBonlret\fR; \fB-nl\fR sets \fBonlcr\fR, and
+\fBnl\fR unsets \fBonlcr\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlcase\fR (\fB-lcase\fR)\fR
+.ad
+.RS 24n
+.rt
+Set (unset) \fBxcase\fR, \fBiuclc\fR, and \fBolcuc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLCASE\fR (\fB-LCASE\fR)\fR
+.ad
+.RS 24n
+.rt
+Same as \fBlcase\fR (\fB-lcase\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtabs\fR (\fB-tabs\fR or \fBtab3\fR)\fR
+.ad
+.RS 24n
+.rt
+Preserve (expand to spaces) tabs when printing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBek\fR\fR
+.ad
+.RS 24n
+.rt
+Reset ERASE and KILL characters back to normal DEL and CTRL-u, respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsane\fR\fR
+.ad
+.RS 24n
+.rt
+Reset all modes to some reasonable values.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIterm\fR\fR
+.ad
+.RS 24n
+.rt
+Set all modes suitable for the terminal type \fIterm\fR, where \fIterm\fR is
+one of \fBtty33\fR, \fBtty37\fR, \fBvt05\fR, \fBtn300\fR, \fBti700\fR, or
+\fBtek\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBasync\fR\fR
+.ad
+.RS 24n
+.rt
+Set normal asynchronous communications where clock settings are \fBxcibrg\fR,
+\fBrcibrg\fR, \fBtsetcoff\fR and \fBrsetcoff\fR.
+.RE
+
+.SS "Window Size"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrows\fR \fIn\fR\fR
+.ad
+.RS 13n
+.rt
+Set window size to \fIn\fR rows.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcolumns\fR \fIn\fR\fR
+.ad
+.RS 13n
+.rt
+Set window size to \fIn\fR columns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcols\fR \fIn\fR\fR
+.ad
+.RS 13n
+.rt
+Set window size to \fIn\fR columns. \fBcols\fR is a shorthand alias for
+columns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBypixels\fR \fIn\fR\fR
+.ad
+.RS 13n
+.rt
+Set vertical window size to \fIn\fR pixels.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxpixels\fR \fIn\fR\fR
+.ad
+.RS 13n
+.rt
+Set horizontal window size to \fIn\fR pixels.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fB-g\fR flag is designed to facilitate the saving and restoring of
+terminal state from the shell level. For example, a program can:
+.sp
+.in +2
+.nf
+saveterm="$(stty -g)" # save terminal state
+stty (new settings) # set new state
+\&... # ...
+stty $saveterm # restore terminal state
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Since the \fB-a\fR format is so loosely specified, scripts that save and
+restore terminal settings should use the \fB-g\fR option.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBstty\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/xpg4/bin/stty"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "/usr/xpg6/bin/stty"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtabs\fR(1), \fBioctl\fR(2), \fBwrite\fR(2), \fBgetwidth\fR(3C),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5), \fBldterm\fR(7M),
+\fBtermio\fR(7I), \fBtermiox\fR(7I)
+.SH NOTES
+.sp
+.LP
+Solaris does not support any of the actions implied by \fBswtch\fR, which was
+used by the \fBsxt\fR driver on System V release 4. Solaris allows the
+\fBswtch\fR value to be set, and prints it out if set, but it does not perform
+the \fBswtch\fR action.
+.sp
+.LP
+The job switch functionality on Solaris is actually handled by job control.
+\fBsusp\fR is the correct setting for this.
diff --git a/usr/src/man/man1/sum.1 b/usr/src/man/man1/sum.1
new file mode 100644
index 0000000000..ac143d4e0c
--- /dev/null
+++ b/usr/src/man/man1/sum.1
@@ -0,0 +1,776 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sum 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+sum \- print checksum and block count for a file
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/sum\fR [-abBchHlLpPrRstTw] [-x method] [\fIfile\fR...]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+sum [-abBchHlLpPrRstTw] [-x method] [\fIfile\fR...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsum\fR utility and ksh93 built-in command list the checksum, and for
+most methods the block count, for each file argument. The standard input is
+read if there are no file arguments.
+.sp
+.LP
+The \fBgetconf\fR(1) \fBUNIVERSE\fR determines the default sum method: att for
+the att universe, bsd otherwise. The default for the other commands is the
+command name itself. The att method is a true sum, all others are order
+dependent.
+.sp
+.LP
+Method names consist of a leading identifier and 0 or more options separated by
+-.
+.sp
+.LP
+\fBgetconf\fR \fBPATH_RESOLVE\fR determines how symbolic links are handled.
+This can be explicitly overridden by the \fB--logical\fR, \fB--metaphysical\fR,
+and \fB--physical\fR options below. \fBPATH_RESOLVE\fR can be one of:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--logical\fR\fR
+.ad
+.RS 18n
+.rt
+Follow all symbolic links.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--metaphysical\fR\fR
+.ad
+.RS 18n
+.rt
+Follow command argument symbolic links, otherwise do not follow.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB--physical\fR\fR
+.ad
+.RS 18n
+.rt
+Do not follow symbolic links.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for \fB/usr/bin/sum\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.br
+.na
+\fB\fB--all\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the checksum for all files. Use with \fB--total\fR to list both individual
+and total checksums and block counts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.br
+.na
+\fB\fB--binary\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read files in binary mode. This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-B\fR\fR
+.ad
+.br
+.na
+\fB\fB--scale=scale\fR\fR
+.ad
+.sp .6
+.RS 4n
+Block count scale (bytes per block) override for methods that include size in
+the output. The default is method-specific.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--check\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each file is interpreted as the output from a previous sum. If \fB--header\fR
+or \fB--permissions\fR was specified in the previous sum then the checksum
+method is automatically determined, otherwise \fB--method\fR must be specified.
+The listed checksum is compared with the current value and a warning is issued
+for each file that does not match. If file was generated by
+\fB--permissions\fR, then the file mode, user and group are also checked. Empty
+lines, lines starting with #<space>, or the line # are ignored. Lines
+containing no blanks are interpreted as [no]name[=\fIvalue\fR] options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmethod=name\fR\fR
+.ad
+.sp .6
+.RS 4n
+Checksum method to apply to subsequent lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpermissions\fR\fR
+.ad
+.sp .6
+.RS 4n
+Subsequent lines were generated with \fB--permissions\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.br
+.na
+\fB\fB--header\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print the checksum method as the first output line. Used with \fB--check\fR and
+\fB--permissions\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--list\fR\fR
+.ad
+.sp .6
+.RS 4n
+Each file is interpreted as a list of files, one per line, that is checksummed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.br
+.na
+\fB\fB--permissions\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fB--check\fR is not specified then list the file mode, user and group
+between the checksum and path. User and group matching the caller are output as
+-. If \fB--check\fR is specified then the mode, user and group for each path in
+file are updated if necessary to match those in file. A warning is printed on
+the standard error for each changed file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.br
+.na
+\fB\fB--recursive\fR\fR
+.ad
+.sp .6
+.RS 4n
+Recursively checksum the contents of directories.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.br
+.na
+\fB\fB--total\fR\fR
+.ad
+.sp .6
+.RS 4n
+List only the total checksum and block count of all files. \fB--all\fR
+\fB--total\fR lists each checksum and the total. The total checksum and block
+count may be different from the checksum and block count of the catenation of
+all files due to partial blocks that may occur when the files are treated
+separately.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fR
+.ad
+.br
+.na
+\fB\fB--text\fR\fR
+.ad
+.sp .6
+.RS 4n
+Read files in text mode (for example, treat \r\n as \n).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.br
+.na
+\fB\fB--warn\fR\fR
+.ad
+.sp .6
+.RS 4n
+Warn about invalid \fB--check\fR lines. On by default; \fB-w\fR means
+\fB--nowarn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.br
+.na
+\fB\fB--method|algorithm=method\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies the checksum method to apply. Parenthesized method options are
+readonly implementation details.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBatt\fR|\fBsys5\fR|\fBs5\fR|\fBdefault\fR\fR
+.ad
+.sp .6
+.RS 4n
+The system 5 release 4 checksum. This is the default for sum when \fBgetconf\fR
+\fBUNIVERSE\fR is \fBatt\fR. This is the only true sum; all of the other
+methods are order dependent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBast4\fR|\fB32x4\fR|\fBtw\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBast\fR 128 bit \fBPRNG\fR hash generated by catenating 4 separate 32 bit
+\fBPNRG\fR hashes. The block count is not printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbsd\fR|\fBucb\fR\fR
+.ad
+.sp .6
+.RS 4n
+The BSD checksum.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrc\fR\fR
+.ad
+.sp .6
+.RS 4n
+32 bit CRC (cyclic redundancy check).
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpolynomial\fR=\fImask\fR\fR
+.ad
+.sp .6
+.RS 4n
+The 32 bit \fBcrc\fR polynomial bitmask with implicit bit 32. The default value
+is 0xedb88320.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdone\fR[=\fInumber\fR]\fR
+.ad
+.sp .6
+.RS 4n
+XOR the final \fBcrc\fR value with number. 0xffffffff is used if number is
+omitted. The option value may be omitted. The default value is 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinit\fR[=\fInumber\fR]\fR
+.ad
+.sp .6
+.RS 4n
+The initial \fBcrc\fR value. 0xffffffff is used if number is omitted. The
+option value may be omitted. The default value is 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrotate\fR\fR
+.ad
+.sp .6
+.RS 4n
+XOR each input character with the high order \fBcrc\fR byte (instead of the low
+order).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsize\fR[=\fInumber\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Include the total number of bytes in the crc. number, if specified, is first
+XOR'd into the size. The option value may be omitted. The default value is 0.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprng\fR\fR
+.ad
+.sp .6
+.RS 4n
+32 bit \fBPRNG\fR (pseudo random number generator) hash.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmpy\fR=\fInumber\fR\fR
+.ad
+.RS 17n
+.rt
+The 32 bit \fBPRNG\fR multiplier. The default value is 0x01000193.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBadd\fR=\fInumber\fR\fR
+.ad
+.RS 17n
+.rt
+The 32 bit \fBPRNG\fR addend. The default value is 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinit\fR[=\fInumber\fR]\fR
+.ad
+.RS 17n
+.rt
+The \fBPRNG\fR initial value. 0xffffffff is used if number is omitted. The
+option value may be omitted. The default value is 0x811c9dc5.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmd4\fR|\fBMD4\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBRFC1320\fR \fBMD4\fR message digest. Cryptographically weak. The block count
+is not printed. (version) \fBmd4\fR (\fBsolaris\fR \fB-lmd\fR) 2005-07-26
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmd5\fR|\fBMD5\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBRFC1321\fR \fBMD5\fR message digest. Cryptographically weak. The block count
+is not printed. (version) \fBmd5\fR (\fBsolaris\fR \fB-lmd\fR) 2005-07-26
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsha1\fR|\fBSHA1\fR|\fBsha-1\fR|\fBSHA-1\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBRFC3174\fR / \fBFIPS 180-1\fR \fBSHA-1\fR secure hash algorithm 1.
+Cryptographically weak. The block count is not printed. (version) \fBsha1\fR
+(\fBsolaris\fR \fB-lmd\fR) 2005-07-26
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsha256\fR|\fBsha-256\fR|\fBSHA256\fR|\fBSHA-256\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBFIPS 180-2\fR \fBSHA256\fR secure hash algorithm. The block count is not
+printed. (version) \fBsha256\fR (\fBsolaris\fR \fB-lmd\fR) 2005-07-26
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsha384\fR|\fBsha-384\fR|\fBSHA384\fR|\fBSHA-384\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBFIPS 180-2\fR \fBSHA384\fR secure hash algorithm. The block count is not
+printed. (version) \fBsha384\fR (\fBsolaris\fR \fB-lmd\fR) 2005-07-26
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsha512\fR|\fBsha-512\fR|\fBSHA512\fR|\fBSHA-512\fR\fR
+.ad
+.sp .6
+.RS 4n
+\fBFIPS 180-2\fR \fBSHA512\fR secure hash algorithm. The block count is not
+printed. (version) \fBsha512\fR (\fBsolaris\fR \fB-lmd\fR) 2005-07-26
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBposix\fR|\fBcksum\fR|\fBstd\fR|\fBstandard\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBposix 1003.2-1992\fR 32 bit \fBcrc\fR checksum. This is the default
+\fBcksum\fR(1) method. Shorthand for \fBcrc-0x04c11db7-rotate-done-size\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBzip\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBzip\fR(1) \fBcrc\fR. Shorthand for \fBcrc-0xedb88320-init-done\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfddi\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBFDDI\fR \fBcrc\fR. Shorthand for
+\fBcrc-0xedb88320-size\fR=\fB0xcc55cc55\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfnv\fR|\fBfnv1\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBFowler-Noll-Vo\fR 32 bit \fBPRNG\fR hash with non-zero initializer
+(\fBFNV-1\fR). Shorthand for \fBprng-0x01000193-init\fR=\fB0x811c9dc5\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBast\fR|\fBstrsum\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBast\fR \fBstrsum\fR \fBPRNG\fR hash. Shorthand for
+\fBprng-0x63c63cd9-add\fR=\fB0x9c39c33d\fR.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.br
+.na
+\fB\fB--logical\fR|\fBfollow\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follow symbolic links when traversing directories. The default is determined by
+\fBgetconf\fR \fBPATH_RESOLVE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.br
+.na
+\fB\fB--metaphysical\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follow command argument symbolic links, otherwise do not follow symbolic links
+when traversing directories. The default is determined by \fBgetconf\fR
+\fBPATH_RESOLVE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR\fR
+.ad
+.br
+.na
+\fB\fB--physical\fR\fR
+.ad
+.sp .6
+.RS 4n
+Do not follow symbolic links when traversing directories. The default is
+determined by \fBgetconf\fR \fBPATH_RESOLVE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.br
+.na
+\fB\fB--bsd\fR\fR
+.ad
+.sp .6
+.RS 4n
+Equivalent to \fB--method=bsd\fR \fB--scale=512\fR for compatibility with other
+sum implementations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--sysv\fR\fR
+.ad
+.sp .6
+.RS 4n
+Equivalent to \fB--method=sys5\fR for compatibility with other sum
+implementations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.br
+.na
+\fB\fB--silent\fR|\fBstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+No output for \fB--check\fR; 0 exit status means all sums matched, non-0 means
+at least one sum failed to match. Ignored for \fB--permissions\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file. If no files are named, the standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBsum\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBsum\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcksum\fR(1), \fBgetconf\fR(1), \fBksh93\fR(1), \fBsum\fR(1B), \fBwc\fR(1),
+\fBzip\fR(1) , \fBlibmd\fR(3LIB), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBRead error\fR is indistinguishable from end of file on most devices. Check
+the block count.
+.SH NOTES
+.sp
+.LP
+Portable applications should use \fBcksum\fR(1). The default algorithm for this
+command is defined in the POSIX standard and is identical across platforms.
+.sp
+.LP
+\fBsum\fR and \fBusr/ucb/sum\fR (see \fBsum\fR(1B)) return different checksums.
diff --git a/usr/src/man/man1/suspend.1 b/usr/src/man/man1/suspend.1
new file mode 100644
index 0000000000..0480218315
--- /dev/null
+++ b/usr/src/man/man1/suspend.1
@@ -0,0 +1,46 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1994 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH suspend 1 "15 Apr 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+suspend \- shell built-in function to halt the current shell
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBsuspend\fR
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBsuspend\fR
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBsuspend\fR
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+Stops the execution of the current shell (but not if it is the login shell).
+.SS "csh"
+.sp
+.LP
+Stop the shell in its tracks, much as if it had been sent a stop signal with
+\fB^Z\fR. This is most often used to stop shells started by \fBsu\fR.
+.SS "ksh"
+.sp
+.LP
+Stops the execution of the current shell (but not if it is the login shell).
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBkill\fR(1), \fBksh\fR(1), \fBsh\fR(1), \fBsu\fR(1M),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/svcprop.1 b/usr/src/man/man1/svcprop.1
new file mode 100644
index 0000000000..1f5e80422b
--- /dev/null
+++ b/usr/src/man/man1/svcprop.1
@@ -0,0 +1,429 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH svcprop 1 "13 Sep 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+svcprop \- retrieve values of service configuration properties
+.SH SYNOPSIS
+.LP
+.nf
+\fBsvcprop\fR [\fB-fqtv\fR] [\fB-C\fR | \fB-c\fR | \fB-s\fR \fIsnapshot\fR] [\fB-p\fR [\fIname\fR/]\fIname\fR]...
+ {\fIFMRI\fR | \fIpattern\fR}...
+.fi
+
+.LP
+.nf
+\fBsvcprop\fR \fB-w\fR [\fB-fqtv\fR] [\fB-p\fR [\fIname\fR/]\fIname\fR] {\fIFMRI\fR | \fIpattern\fR}
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsvcprop\fR utility prints values of properties in the service
+configuration repository. Properties are selected by \fB-p\fR options and the
+operands.
+.sp
+.LP
+Without the \fB-C\fR, \fB-c\fR, or \fB-s\fR options, \fBsvcprop\fR accesses
+effective properties. The effective properties of a service are its directly
+attached properties. The effective properties of a service instance are the
+union of properties in the composed view of its \fBrunning\fR snapshot and the
+properties in nonpersistent property groups in the composed view of the
+instance's directly attached properties. See \fBsmf\fR(5) for an explanation of
+property composition. If the \fBrunning\fR snapshot does not exist then the
+instance's directly attached properties are used instead.
+.SS "Output Format"
+.sp
+.LP
+By default, when a single property is selected, the values for each are printed
+on separate lines. Empty \fBASCII\fR string values are represented by a pair of
+double quotes (\fB""\fR). Bourne shell metacharacters ('\fB;\fR', '\fB&\fR\&',
+\&'\fB(\fR', '\fB)\fR', '\fB|\fR', '\fB^\fR', '\fB<\fR\&', '\fB>\fR', newline,
+space, tab, backslash, '\fB"\fR', single-quote, '\fB`\fR') in \fBASCII\fR
+string values are quoted by backslashes (\fB\e\fR).
+.sp
+.LP
+When multiple properties are selected, a single line is printed for each. Each
+line comprises a property designator, a property type, and the values (as
+described above), separated by spaces. By default, if a single \fIFMRI\fR
+operand has been supplied, the property designator consists of the property
+group name and the property name joined by a slash (\fB/\fR). If multiple
+\fIFMRI\fR operands are supplied, the designator is the canonical \fIFMRI\fR
+for the property.
+.sp
+.LP
+If access controls prohibit reading the value of a property, and no property or
+property group is specified explicitly by a \fB-p\fR option, the property is
+displayed as if it had no values. If one or more property or property group
+names is specified by a \fB-p\fR option, and any property value cannot be read
+due to access controls, an error results.
+.sp
+.LP
+Error messages are printed to the standard error stream.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 14n
+.rt
+Uses the directly attached properties, without composition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 14n
+.rt
+For service instances, uses the composed view of their directly attached
+properties.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 14n
+.rt
+Selects the multi-property output format, with full FMRIs as designators.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIname\fR\fR
+.ad
+.RS 14n
+.rt
+For each service or service instance specified by the operands, selects all
+properties in the \fIname\fR property group. For property groups specified by
+the operands, selects the \fIname\fR property.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpg\fR/\fIprop\fR\fR
+.ad
+.RS 14n
+.rt
+Selects property \fIprop\fR in property group \fIpg\fR for each of the services
+or service instances specified by the operands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 14n
+.rt
+Quiet. Produces no output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIname\fR\fR
+.ad
+.RS 14n
+.rt
+Uses the composed view of the \fIname\fR snapshot for service instances.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 14n
+.rt
+Selects the multi-property output format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 14n
+.rt
+Verbose. Prints error messages for nonexistent properties, even if option -q is
+also used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 14n
+.rt
+Waits until the specified property group or the property group containing the
+specified property changes before printing.
+.sp
+This option is only valid when a single entity is specified. If more than one
+operand is specified, or an operand matches more than one instance, an error
+message is printed and no action is taken. The -C option is implied.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIFMRI\fR\fR
+.ad
+.RS 11n
+.rt
+The FMRI of a service, a service instance, a property group, or a property.
+.sp
+Instances and services can be abbreviated by specifying the instance name, or
+the trailing portion of the service name. Properties and property groups must
+be specified by a full FMRI. For example, given the FMRI:
+.sp
+.in +2
+.nf
+svc:/network/smtp:sendmail
+.fi
+.in -2
+.sp
+
+The following are valid abbreviations:
+.sp
+.in +2
+.nf
+sendmail
+:sendmail
+smtp
+smtp:sendmail
+network/smtp
+.fi
+.in -2
+.sp
+
+The following are invalid abbreviations:
+.sp
+.in +2
+.nf
+mail
+network
+network/smt
+.fi
+.in -2
+.sp
+
+Abbreviated forms of FMRIs are unstable and should not be used in scripts or
+other permanent tools. If an abbreviation matches multiple instances,
+\fBsvcprop\fR acts on each instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBpattern\fR
+.ad
+.RS 11n
+.rt
+A glob pattern which is matched against the FMRIs of services and instances in
+the repository. See \fBfnmatch\fR(5). If a pattern matches multiple services or
+instances, \fBsvcprop\fR acts on each service or instance.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying the Value of a Single Property
+.sp
+.LP
+The following example displays the value of the state property in the restarter
+property group of instance \fBdefault\fR of service \fBsystem/cron\fR.
+
+.sp
+.in +2
+.nf
+example% svcprop -p restarter/state system/cron:default
+online
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRRetrieving Whether a Service is Enabled
+.sp
+.LP
+Whether a service is enabled is determined by its \fB-general/enabled\fR
+property. This property takes immediate effect, so the \fB-c\fR option must be
+used:
+
+.sp
+.in +2
+.nf
+example% svcprop -c -p general/enabled system/cron:default
+true
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRDisplaying All Properties in a Property Group
+.sp
+.LP
+On a default installation of Solaris, the following example displays all
+properties in the \fBgeneral\fR property group of each instance of the
+\fBnetwork/ntp\fR service:
+
+.sp
+.in +2
+.nf
+example% svcprop -p general ntp
+general/package astring SUNWntpr
+general/enabled boolean true
+general/entity_stability astring Unstable
+general/single_instance boolean true
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRTesting the Existance of a Property
+.sp
+.LP
+The following example tests the existence of the \fBgeneral/enabled\fR property
+for all instances of service identity:
+
+.sp
+.in +2
+.nf
+example% svcprop -q -p general/enabled identity:
+example% echo $?
+0
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRWaiting for Property Change
+.sp
+.LP
+The following example waits for the \fBsendmail\fR instance to change state.
+
+.sp
+.in +2
+.nf
+example% svcprop -w -p restarter/state sendmail
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRRetrieving the Value of a Boolean Property in a Script
+.sp
+.LP
+The following example retrieves the value of a boolean property in a script:
+
+.sp
+.in +2
+.nf
+set -- `svcprop -c -t -p general/enabled service`
+code=$?
+if [ $code -ne 0 ]; then
+ echo "svcprop failed with exit code $code"
+ return 1
+fi
+if [ $2 != boolean ]; then
+ echo "general/enabled has unexpected type $2"
+ return 2
+fi
+if [ $# -ne 3 ]; then
+ echo "general/enabled has wrong number of values"
+ return 3
+fi
+value=$3
+\&...
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRUsing \fBsvcprop\fR in a Script
+.sp
+.in +2
+.nf
+example% cat getval
+#!/bin/sh
+
+svcprop -p $1 $2 | (
+ read value v2
+ if [ -n "$v2" ]; then echo "Multiple values!"; exit; fi
+ echo $value
+ )
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsvcs\fR(1), \fBinetd\fR(1M), \fBsvcadm\fR(1M), \fBsvccfg\fR(1M),
+\fBsvc.startd\fR(1M), \fBservice_bundle\fR(4), \fBattributes\fR(5),
+\fBfnmatch\fR(5), \fBsmf\fR(5), \fBsmf_method\fR(5), \fBsmf_security\fR(5)
diff --git a/usr/src/man/man1/svcs.1 b/usr/src/man/man1/svcs.1
new file mode 100644
index 0000000000..5e578ffc4e
--- /dev/null
+++ b/usr/src/man/man1/svcs.1
@@ -0,0 +1,884 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH svcs 1 "6 Nov 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+svcs \- report service status
+.SH SYNOPSIS
+.LP
+.nf
+\fBsvcs\fR [\fB-aHpv?\fR] [\fB-o\fR \fIcol\fR[,\fIcol\fR]]... [\fB-R\fR \fIFMRI-instance\fR]...
+ [\fB-sS\fR \fIcol\fR]... [\fIFMRI\fR | \fIpattern\fR]...
+.fi
+
+.LP
+.nf
+\fBsvcs\fR {\fB-d\fR | \fB-D\fR} [\fB-Hpv?\fR] [\fB-o\fR \fIcol\fR[,\fIcol\fR]]... [\fB-sS\fR \fIcol\fR]...
+ [\fIFMRI\fR | \fIpattern\fR] ...
+.fi
+
+.LP
+.nf
+\fBsvcs\fR \fB-l\fR [\fB-v\fR] [\fIFMRI\fR | \fIpattern\fR]...
+.fi
+
+.LP
+.nf
+\fBsvcs\fR \fB-x\fR [\fB-v\fR] [\fIFMRI\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBsvcs\fR command displays information about service instances as recorded
+in the service configuration repository.
+.sp
+.LP
+The first form of this command prints one-line status listings for service
+instances specified by the arguments. Each instance is listed only once. With
+no arguments, all enabled service instances, even if temporarily disabled, are
+listed with the columns indicated below.
+.sp
+.LP
+The second form prints one-line status listings for the dependencies or
+dependents of the service instances specified by the arguments.
+.sp
+.LP
+The third form prints detailed information about specific services and
+instances.
+.sp
+.LP
+The fourth form explains the states of service instances. For each argument, a
+block of human-readable text is displayed which explains what state the service
+is in, and why it is in that state. With no arguments, problematic services are
+described.
+.sp
+.LP
+Error messages are printed to the standard error stream.
+.sp
+.LP
+The output of this command can be used appropriately as input to the
+\fBsvcadm\fR(1M) command.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-?\fR\fR
+.ad
+.RS 20n
+.rt
+Displays an extended usage message, including column specifiers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 20n
+.rt
+Show all services, even disabled ones. This option has no effect if services
+are selected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 20n
+.rt
+Lists the services or service instances upon which the given service instances
+depend.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.RS 20n
+.rt
+Lists the service instances that depend on the given services or service
+instances.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 20n
+.rt
+Omits the column headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 20n
+.rt
+(The letter ell.) Displays all available information about the selected
+services and service instances, with one service attribute displayed for each
+line. Information for different instances are separated by blank lines.
+.sp
+The following specific attributes require further explanation:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdependency\fR\fR
+.ad
+.RS 14n
+.rt
+Information about a dependency. The grouping and \fBrestart_on\fR properties
+are displayed first and are separated by a forward slash (\fB/\fR). Next, each
+entity and its state is listed. See \fBsmf\fR(5) for information about states.
+In addition to the standard states, each service dependency can have the
+following state descriptions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBabsent\fR\fR
+.ad
+.RS 12n
+.rt
+No such service is defined on the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinvalid\fR\fR
+.ad
+.RS 12n
+.rt
+The fault management resource identifier (FMRI) is invalid (see \fBsmf\fR(5)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmultiple\fR\fR
+.ad
+.RS 12n
+.rt
+The entity is a service with multiple instances.
+.RE
+
+File dependencies can only have one of the following state descriptions:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBabsent\fR\fR
+.ad
+.RS 11n
+.rt
+No such file on the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBonline\fR\fR
+.ad
+.RS 11n
+.rt
+The file exists.
+.sp
+If the file did not exist the last time that \fBsvc.startd\fR evaluated the
+service's dependencies, it can consider the dependency to be unsatisfied.
+\fBsvcadm refresh\fR forces dependency re-evaluation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunknown\fR\fR
+.ad
+.RS 11n
+.rt
+\fBstat\fR(2) failed for a reason other than \fBENOENT\fR.
+.RE
+
+See \fBsmf\fR(5) for additional details about dependencies, grouping, and
+\fBrestart_on\fR values.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBenabled\fR\fR
+.ad
+.RS 14n
+.rt
+Whether the service is enabled or not, and whether it is enabled or disabled
+temporarily (until the next system reboot). The former is specified as either
+\fBtrue\fR or \fBfalse\fR, and the latter is designated by the presence of
+\fB(temporary)\fR.
+.sp
+A service might be temporarily disabled because an administrator has run
+\fBsvcadm disable -t\fR, used \fBsvcadm milestone\fR, or booted the system to a
+specific milestone. See \fBsvcadm\fR(1M) for details.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIcol\fR[,\fIcol\fR]...\fR
+.ad
+.RS 20n
+.rt
+Prints the specified columns. Each \fIcol\fR should be a column name. See
+\fBCOLUMNS\fR below for available columns.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 20n
+.rt
+Lists processes associated with each service instance. A service instance can
+have no associated processes. The process ID, start time, and command name
+(\fBPID\fR, \fBSTIME\fR, and \fBCMD\fR fields from \fBps\fR(1)) are displayed
+for each process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR \fIFMRI-instance\fR\fR
+.ad
+.RS 20n
+.rt
+Selects service instances that have the given service instance as their
+restarter.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIcol\fR\fR
+.ad
+.RS 20n
+.rt
+Sorts output by column. \fIcol\fR should be a column name. See \fBCOLUMNS\fR
+below for available columns. Multiple \fB-s\fR options behave additively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIcol\fR\fR
+.ad
+.RS 20n
+.rt
+Sorts by \fIcol\fR in the opposite order as option \fB-s\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 20n
+.rt
+Without \fB-x\fR or \fB-l\fR, displays verbose columns: \fBSTATE\fR,
+\fBNSTATE\fR, \fBSTIME\fR, \fBCTID\fR, and \fBFMRI\fR.
+.sp
+With \fB-x\fR, displays extra information for each explanation.
+.sp
+With \fB-l\fR, displays user-visible properties in property groups of type
+\fBapplication\fR and their description.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 20n
+.rt
+Displays explanations for service states.
+.sp
+Without arguments, the \fB-x\fR option explains the states of services which:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+are enabled, but are not running.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+are preventing another enabled service from running.
+.RE
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIFMRI\fR\fR
+.ad
+.RS 17n
+.rt
+A fault management resource identifier (FMRI) that specifies one or more
+instances (see \fBsmf\fR(5)). FMRIs can be abbreviated by specifying the
+instance name, or the trailing portion of the service name. For example, given
+the FMRI:
+.sp
+.in +2
+.nf
+svc:/network/smtp:sendmail
+.fi
+.in -2
+.sp
+
+The following are valid abbreviations:
+.sp
+.in +2
+.nf
+sendmail
+:sendmail
+smtp
+smtp:sendmail
+network/smtp
+.fi
+.in -2
+.sp
+
+The following are invalid abbreviations:
+.sp
+.in +2
+.nf
+mail
+network
+network/smt
+.fi
+.in -2
+.sp
+
+If the FMRI specifies a service, then the command applies to all instances of
+that service, except when used with the \fB-D\fR option.
+.sp
+Abbreviated forms of FMRIs are unstable, and should not be used in scripts or
+other permanent tools.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpattern\fR\fR
+.ad
+.RS 17n
+.rt
+A pattern that is matched against the \fIFMRI\fRs of service instances
+according to the "globbing" rules described by \fBfnmatch\fR(5). If the pattern
+does not begin with \fBsvc:\fR, then \fBsvc:/\fR is prepended. The following is
+a typical example of a glob pattern:
+.sp
+.in +2
+.nf
+qexample% svcs \e*keyserv\e*
+STATE STIME FMRI
+disabled Aug_02 svc:/network/rpc/keyserv:default
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIFMRI-instance\fR\fR
+.ad
+.RS 17n
+.rt
+An FMRI that specifies an instance.
+.RE
+
+.SH COLUMNS
+.sp
+.LP
+Column names are case insensitive. The default output format is equivalent to
+"\fB-o\fR \fBstate,stime,fmri\fR". The default sorting columns are \fBSTATE\fR,
+\fBSTIME\fR, \fBFMRI\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCTID\fR\fR
+.ad
+.RS 10n
+.rt
+The primary contract ID for the service instance. Not all instances have valid
+primary contract IDs.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDESC\fR\fR
+.ad
+.RS 10n
+.rt
+A brief description of the service, from its template element. A service might
+not have a description available, in which case a hyphen (\fB\(hy\fR) is used
+to denote an empty value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFMRI\fR\fR
+.ad
+.RS 10n
+.rt
+The \fIFMRI\fR of the service instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBINST\fR\fR
+.ad
+.RS 10n
+.rt
+The instance name of the service instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNSTA\fR\fR
+.ad
+.RS 10n
+.rt
+The abbreviated next state of the service instance, as given in the \fBSTA\fR
+column description. A hyphen denotes that the instance is not transitioning.
+Same as \fBSTA\fR otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNSTATE\fR\fR
+.ad
+.RS 10n
+.rt
+The next state of the service. A hyphen is used to denote that the instance is
+not transitioning. Same as \fBSTATE\fR otherwise.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSCOPE\fR\fR
+.ad
+.RS 10n
+.rt
+The scope name of the service instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSVC\fR\fR
+.ad
+.RS 10n
+.rt
+The service name of the service instance.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSTA\fR\fR
+.ad
+.RS 10n
+.rt
+The abbreviated state of the service instance (see \fBsmf\fR(5)):
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDGD\fR\fR
+.ad
+.RS 7n
+.rt
+degraded
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDIS\fR\fR
+.ad
+.RS 7n
+.rt
+disabled
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBLRC\fR\fR
+.ad
+.RS 7n
+.rt
+legacy \fBrc*.d\fR script-initiated instance
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBMNT\fR\fR
+.ad
+.RS 7n
+.rt
+maintenance
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBOFF\fR\fR
+.ad
+.RS 7n
+.rt
+offline
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBON\fR\fR
+.ad
+.RS 7n
+.rt
+online
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBUN\fR\fR
+.ad
+.RS 7n
+.rt
+uninitialized
+.RE
+
+Absent or unrecognized states are denoted by a question mark (\fB?\fR)
+character. An asterisk (\fB*\fR) is appended for instances in transition,
+unless the \fBNSTA\fR or \fBNSTATE\fR column is also being displayed.
+.sp
+See \fBsmf\fR(5) for an explanation of service states.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSTATE\fR\fR
+.ad
+.RS 10n
+.rt
+The state of the service instance. An asterisk is appended for instances in
+transition, unless the \fBNSTA\fR or \fBNSTATE\fR column is also being
+displayed.
+.sp
+See \fBsmf\fR(5) for an explanation of service states.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSTIME\fR\fR
+.ad
+.RS 10n
+.rt
+If the service instance entered the current state within the last 24 hours,
+this column indicates the time that it did so. Otherwise, this column indicates
+the date on which it did so, printed with underscores (\fB_\fR) in place of
+blanks.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRDisplaying the Default Output
+.sp
+.LP
+This example displays default output:
+
+.sp
+.in +2
+.nf
+example% svcs
+STATE STIME FMRI
+\&...
+legacy_run 13:25:04 lrc:/etc/rc3_d/S42myscript
+\&...
+online 13:21:50 svc:/system/svc/restarter:default
+\&...
+online 13:25:03 svc:/milestone/multi-user:default
+\&...
+online 13:25:07 svc:/milestone/multi-user-server:default
+\&...
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRListing All Local Instances
+.sp
+.LP
+This example lists all local instances of the \fBservice1\fR service.
+
+.sp
+.in +2
+.nf
+example% svcs -o state,nstate,fmri service1
+STATE NSTATE FMRI
+online - svc:/service1:instance1
+disabled - svc:/service1:instance2
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRListing Verbose Information
+.sp
+.LP
+This example lists verbose information.
+
+.sp
+.in +2
+.nf
+example% svcs -v network/rpc/rstat:udp
+STATE NSTATE STIME CTID FMRI
+online - Aug_09 - svc:/network/rpc/rstat:udp
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fRListing Detailed Information
+.sp
+.LP
+This example lists detailed information about all instances of
+\fBsystem/service3\fR. Additional fields can be displayed, as appropriate to
+the managing restarter.
+
+.sp
+.in +2
+.nf
+example% svcs -l network/rpc/rstat:udp
+
+fmri svc:/network/rpc/rstat:udp
+enabled true
+state online
+next_state none
+restarter svc:/network/inetd:default
+contract_id
+dependency require_all/error svc:/network/rpc/bind (online)
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRListing Processes
+.sp
+.in +2
+.nf
+example% svcs -p sendmail
+STATE STIME FMRI
+online 13:25:13 svc:/network/smtp:sendmail
+ 13:25:15 100939 sendmail
+13:25:15 100940 sendmail
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRExplaining Service States Using \fBsvcs\fR \fB-x\fR
+.sp
+.LP
+(a) In this example, \fBsvcs\fR \fB-x\fR has identified that the print/server
+service being disabled is the root cause of two services which are enabled but
+not online. \fBsvcs\fR \fB-xv\fR shows that those services are
+\fBprint/rfc1179\fR and \fBprint/ipp-listener\fR. This situation can be
+rectified by either enabling \fBprint/server\fR or disabling \fBrfc1179\fR and
+\fBipp-listener\fR.
+
+.sp
+.in +2
+.nf
+example% svcs -x
+svc:/application/print/server:default (LP print server)
+ State: disabled since Mon Feb 13 17:56:21 2006
+Reason: Disabled by an administrator.
+ See: http://sun.com/msg/SMF-8000-05
+ See: lpsched(1M)
+Impact: 2 dependent services are not running. (Use -v for list.)
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+(b) In this example, NFS is not working:
+
+.sp
+.in +2
+.nf
+example$ svcs nfs/client
+STATE STIME FMRI
+offline 16:03:23 svc:/network/nfs/client:default
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+(c) The following example shows that the problem is \fBnfs/status\fR.
+\fBnfs/client\fR is waiting because it depends on \fBnfs/nlockmgr\fR, which
+depends on \fBnfs/status\fR:
+
+.sp
+.in +2
+.nf
+example$ svcs -xv nfs/client
+svc:/network/nfs/client:default (NFS client)
+ State: offline since Mon Feb 27 16:03:23 2006
+Reason: Service svc:/network/nfs/status:default
+ is not running because a method failed repeatedly.
+ See: http://sun.com/msg/SMF-8000-GE
+ Path: svc:/network/nfs/client:default
+ svc:/network/nfs/nlockmgr:default
+ svc:/network/nfs/status:default
+ See: man -M /usr/share/man -s 1M mount_nfs
+ See: /var/svc/log/network-nfs-client:default.log
+Impact: This service is not running.
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful command invocation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Fatal error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR\fR
+.ad
+.RS 5n
+.rt
+Invalid command line options were specified.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+Screen output is Uncommitted. The invocation is Committed.
+.SH SEE ALSO
+.sp
+.LP
+\fBps\fR(1), \fBsvcprop\fR(1), \fBsvcadm\fR(1M), \fBsvccfg\fR(1M),
+\fBsvc.startd\fR(1M), \fBstat\fR(2), \fBlibscf\fR(3LIB), \fBattributes\fR(5),
+\fBfnmatch\fR(5), \fBsmf\fR(5)
diff --git a/usr/src/man/man1/symorder.1 b/usr/src/man/man1/symorder.1
new file mode 100644
index 0000000000..88dd6cfe06
--- /dev/null
+++ b/usr/src/man/man1/symorder.1
@@ -0,0 +1,32 @@
+'\" te
+.\" Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH symorder 1 "16 Oct 1996" "SunOS 5.11" "User Commands"
+.SH NAME
+symorder \- rearrange a list of symbols
+.SH SYNOPSIS
+.LP
+.nf
+\fBsymorder\fR [\fB-s\fR] \fIobjectfile\fR \fIsymbolfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsymorder\fR was used in SunOS 4.\fIx\fR specifically to cut down on the
+overhead of getting symbols from \fBvmunix\fR. This is no longer applicable as
+kernel symbol entries are dynamically obtained through \fB/dev/ksyms\fR.
+.sp
+.LP
+This script is provided as a convenience for software developers who need to
+maintain scripts that are portable across a variety of operating systems.
+.SH EXIT STATUS
+.sp
+.LP
+\fBsymorder\fR has exit status \fB0\fR.
+.SH SEE ALSO
+.sp
+.LP
+\fBnlist\fR(3ELF), \fBattributes\fR(5), \fBksyms\fR(7D).
diff --git a/usr/src/man/man1/sys-suspend.1 b/usr/src/man/man1/sys-suspend.1
new file mode 100644
index 0000000000..f75ddb79bf
--- /dev/null
+++ b/usr/src/man/man1/sys-suspend.1
@@ -0,0 +1,134 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH sys-suspend 1 "10 Mar 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+sys-suspend \- suspend or shutdown the system and power off
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/sys-suspend\fR [\fB-fnxh\fR][\fB-d\fR \fIdisplayname\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsys-suspend\fR provides options to suspend or shutdown the whole system.
+.sp
+.LP
+A system can be suspended to conserve power or to prepare the system for
+transport. The suspend should not be used when performing any hardware
+reconfiguration or replacement.
+.sp
+.LP
+In case of suspend, the current system state is preserved either by keeping
+memory powered (Suspend to RAM), or by saving the state to non-volatile storage
+(Suspend to Disk) until a resume operation is performed by power on or a
+wake-up event.
+.sp
+.LP
+On a resume in the windows environment, the system brings up lockscreen to
+ensure that only the authorized person has access to the system. In a
+non-windows environment, the user is prompted for password.
+.sp
+.LP
+It is possible that when devices or processes are performing critical or time
+sensitive operations (such as real time operations) the system fails to
+suspend. When this occurs, the system remains in its current running state.
+Messages reporting the failure are displayed on the console or system log. Once
+the system is successfully suspended, the resume operation always succeed
+barring external influences such as hardware reconfiguration or the like.
+.sp
+.LP
+In case of shutdown, the system responds as if \fBpoweroff\fR(1M) was
+performed.
+.sp
+.LP
+This command enforces the \fBsolaris.system.power.suspend.\fR authorizations.
+On a default install these are associated with the console user. Other users
+need to include these authorizations or include the Suspend profile.
+.SH OPTIONS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdisplayname\fR\fR
+.ad
+.RS 18n
+.rt
+Connect to the X server specified by \fIdisplayname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Force suspend. Causes a \fBpoweroff\fR(1M) to occur if the suspend fails.
+System state are not be saved, and a normal boot follows.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Change the default from suspend to shutdown.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 6n
+.rt
+Do not display messages or request user intervention.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Disable \fBlockscreen\fR. This flag disables the execution of \fBlockscreen\fR
+at resume time.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBhalt\fR(1M), \fBpowerd\fR(1M), \fBpoweroff\fR(1M), \fBshutdown\fR(1M),
+\fBattributes\fR(5), \fBcpr\fR(7)
diff --git a/usr/src/man/man1/tabs.1 b/usr/src/man/man1/tabs.1
new file mode 100644
index 0000000000..cf2f1ba446
--- /dev/null
+++ b/usr/src/man/man1/tabs.1
@@ -0,0 +1,434 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tabs 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+tabs \- set tabs on a terminal
+.SH SYNOPSIS
+.LP
+.nf
+\fBtabs\fR [\fB-n\fR | \(mi\(mi\fIfile\fR
+ [[\fB-code\fR] | \fB-a\fR | \fB-a2\fR | \fB-c\fR | \fB-c2\fR | \fB-c3\fR | \fB-f\fR | \fB-p\fR | \fB-s\fR | \fB-u\fR]]
+ q!! [+m [\fIn\fR]] [\fB-T\fR \fItype\fR]
+.fi
+
+.LP
+.nf
+\fBtabs\fR [\fB-T\fR \fItype\fR] [+ \fIm\fR [\fIn\fR]] \fIn1\fR [, \fIn2\fR ,...]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtabs\fR utility sets the tab stops on the user's terminal according to a
+tab specification, after clearing any previous settings. The user's terminal
+must have remotely settable hardware tabs.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported. If a given flag occurs more than once, the
+last value given takes effect:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItype\fR \fR
+.ad
+.RS 12n
+.rt
+\fBtabs\fR needs to know the type of terminal in order to set tabs and margins.
+\fItype\fR is a name listed in \fBterm\fR(5). If no \fB-T\fR flag is supplied,
+\fBtabs\fR uses the value of the environment variable \fBTERM\fR. If the value
+of \fBTERM\fR is \fINULL\fR or \fBTERM\fR is not defined in the environment
+(see \fBenviron\fR(5)), \fBtabs\fR uses \fBansi+tabs\fR as the terminal type to
+provide a sequence that will work for many terminals.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+m[\fR\fIn\fR\fB]\fR \fR
+.ad
+.RS 12n
+.rt
+The margin argument may be used for some terminals. It causes all tabs to be
+moved over \fIn\fR columns by making column \fIn\fR\fB+1\fR the left margin.
+If \fB+m\fR is given without a value of \fIn\fR, the value assumed is \fB10\fR.
+For a TermiNet, the first value in the tab list should be \fB1\fR, or the
+margin will move even further to the right. The normal (leftmost) margin on
+most terminals is obtained by \fB+m0\fR. The margin for most terminals is reset
+only when the \fB+m\fR flag is given explicitly.
+.RE
+
+.SS "Tab Specification"
+.sp
+.LP
+Four types of tab specification are accepted. They are described below:
+canned, repetitive (\fB-\fR\fIn\fR), arbitrary (\fIn1,n2,...\fR), and file
+(\fB-\fR\fIfile\fR).
+.sp
+.LP
+If no tab specification is given, the default value is \fB\(mi8\fR, that is,
+UNIX system ``standard'' tabs. The lowest column number is \fB1\fR. Note: For
+\fBtabs\fR, column 1 always refers to the leftmost column on a terminal, even
+one whose column markers begin at 0, for example, the DASI 300, DASI 300s, and
+DASI 450.
+.SS "\fICanned\fR \fB-code\fR"
+.sp
+.LP
+Use one of the codes listed below to select a canned set of tabs. If more than
+one code is specified, the last code option will be used. The legal codes and
+their meanings are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,10,16,36,72\fR Assembler, IBM S/370, first format
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a2\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,10,16,40,72\fR
+.sp
+Assembler, IBM S/370, second format
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,8,12,16,20,55\fR
+.sp
+COBOL, normal format
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c2\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,6,10,14,49\fR
+.sp
+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 (see \fBfspec\fR(4)):
+.sp
+.in +2
+.nf
+<:t\fB-c2\fR \|m6 \|s66 \|d:>
+.fi
+.in -2
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c3\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67\fR
+.sp
+COBOL compact format (columns 1-6 omitted), with more tabs than
+\fB\fR\fB-c2\fR\fB\&.\fR This is the recommended format for COBOL. The
+appropriate format specification is (see \fBfspec\fR(4)):
+.sp
+.in +2
+.nf
+<:t\fB-c3\fR \|m6 \|s66 \|d:>
+.fi
+.in -2
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,7,11,15,19,23\fR
+.sp
+FORTRAN
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61\fR
+.sp
+PL/I
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,10,55\fR
+.sp
+SNOBOL
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 7n
+.rt
+\fB1,12,20,44\fR
+.sp
+UNIVAC 1100 Assembler
+.RE
+
+.SS "\fIRepetitive\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIn\fR \fR
+.ad
+.RS 7n
+.rt
+A \fIrepetitive\fR specification requests tabs at columns 1+\fIn\fR,
+1+2*\fIn\fR, etc., where \fIn\fR is a single-digit decimal number. Of
+particular importance is the value \fB8\fR: this represents the UNIX system
+``standard'' tab setting, and is the most likely tab setting to be found at a
+terminal. When \fB\(mi0\fR is used, the tab stops are cleared and no new ones
+are set.
+.RE
+
+.SS "\fIArbitrary\fR"
+.sp
+.LP
+See OPERANDS.
+.SS "\fIFile\fR"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIfile\fR\fR
+.ad
+.RS 9n
+.rt
+If the name of a \fIfile\fR is given, \fBtabs\fR reads the first line of the
+file, searching for a format specification (see \fBfspec\fR(4)). If it finds
+one there, it sets the tab stops according to it, otherwise it sets them as
+\fB\(mi8\fR\&. This type of specification may be used to make sure that a
+tabbed file is printed with correct tab settings, and would be used with the
+\fBpr\fR command:
+.sp
+.in +2
+.nf
+example% \fBtabs -\fI file\fR; pr\fI file\fR\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.LP
+Tab and margin setting is performed via the standard output.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR[,\fIn2\fR,\|.\|.\|.] \fR
+.ad
+.RS 22n
+.rt
+The \fIarbitrary\fR format consists of tab-stop values separated by commas or
+spaces. The tab-stop values must be positive decimal integers 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 formats \fB1\fR,\fB10\fR,\fB20\fR,\fB30\fR, and
+\fB1\fR,\fB10\fR,\fB+10\fR,\fB+10\fR are considered identical.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the tabs command
+.sp
+.LP
+The following command is an example using \fB-code\fR ( \fIcanned\fR
+specification) to set tabs to the settings required by the IBM assembler:
+columns 1, 10, 16, 36, 72:
+
+.sp
+.in +2
+.nf
+example% \fBtabs -a\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The next command is an example of using \fB-n\fR (\fIrepetitive\fR
+specification), where \fIn\fR is \fB8\fR, causes tabs to be set every eighth
+position: 1+(1*8), 1+(2*8), .\|.\|.\| which evaluate to columns 9,
+17, .\|.\|.\|:
+
+.sp
+.in +2
+.nf
+example% \fBtabs \(mi8\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This command uses \fIn1\fR,\fIn2\fR,.\|.\|.\| (\fIarbitrary\fR specification)
+to set tabs at columns 1, 8, and 36:
+
+.sp
+.in +2
+.nf
+example% \fBtabs 1,8,36\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The last command is an example of using \fI-file\fR (\fBfile\fR specification)
+to indicate that tabs should be set according to the first line of
+$\fBHOME\fR/fspec.list/att4425 (see \fBfspec\fR(4)).
+
+.sp
+.in +2
+.nf
+example% \fBtabs -$HOME/fspec.list/att4425\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtabs\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTERM\fR \fR
+.ad
+.RS 9n
+.rt
+Determine the terminal type. If this variable is unset or null, and if the
+\fB-T\fR option is not specified, terminal type \fBansi+tabs\fR will be used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBexpand\fR(1), \fBnewform\fR(1), \fBpr\fR(1), \fBstty\fR(1), \fBtput\fR(1),
+\fBfspec\fR(4), \fBterminfo\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBterm\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+There is no consistency among different terminals regarding ways of clearing
+tabs and setting the left margin.
+.sp
+.LP
+\fBtabs\fR clears only \fB20\fR tabs (on terminals requiring a long sequence),
+but is willing to set \fB64\fR.
+.sp
+.LP
+The \fItabspec\fR used with the \fBtabs\fR command is different from the one
+used with the \fBnewform\fR command. For example, \fBtabs\fR \fB\(mi8\fR sets
+every eighth position; whereas \fBnewform\fR \fB\(mii\(mi8\fR indicates that
+tabs are set every eighth position.
diff --git a/usr/src/man/man1/tail.1 b/usr/src/man/man1/tail.1
new file mode 100644
index 0000000000..ca8914b122
--- /dev/null
+++ b/usr/src/man/man1/tail.1
@@ -0,0 +1,324 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tail 1 "13 Jul 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+tail \- deliver the last part of a file
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/tail\fR [\(+-s \fInumber\fR [lbcr]] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/tail\fR [\fB-lbcr\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/tail\fR [\(+- \fInumber\fR [lbcf]] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/tail\fR [\fB-lbcf\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/tail\fR [\fB-f\fR | \fB-r\fR] [\fB-c\fR \fInumber\fR | \fB-n\fR \fInumber\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/tail\fR [\(+- \fInumber\fR [l | b | c] [f]] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/tail\fR [\(+- \fInumber\fR [l] [f | r]] [\fIfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtail\fR utility copies the named file to the standard output beginning
+at a designated place. If no file is named, the standard input is used.
+.sp
+.LP
+Copying begins at a point in the file indicated by the \fB-c\fR\fInumber\fR,
+\fB-n\fR\fInumber\fR, or \fB\(+-\fR\fInumber\fR options (if \fB+\fR\fInumber\fR
+is specified, begins at distance number from the beginning; if
+\fB-\fR\fInumber\fR is specified, from the end of the input; if \fInumber\fR is
+\fINULL\fR, the value \fB10\fR is assumed). \fInumber\fR is counted in units of
+lines or byte according to the \fB-c\fR \fB or \fR \fB-n\fR options, or lines,
+blocks, or bytes, according to the appended option \fBl\fR, \fBb\fR, or
+\fBc\fR. When no units are specified, counting is by lines.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported for both \fB/usr/bin/tail\fR and
+\fB/usr/xpg4/bin/tail\fR. The \fB-r\fR and \fB-f\fR options are mutually
+exclusive. If both are specified on the command line, the \fB-f\fR option is
+ignored.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fR
+.ad
+.RS 7n
+.rt
+Units of blocks.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fR
+.ad
+.RS 7n
+.rt
+Units of bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fR
+.ad
+.RS 7n
+.rt
+Follow. If the input-file is not a pipe, the program does not terminate after
+the line of the input-file has been copied, but enters an endless loop, wherein
+it sleeps for a second and then attempts to read and copy further records from
+the input-file. Thus it can be used to monitor the growth of a file that is
+being written by some other process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fR
+.ad
+.RS 7n
+.rt
+Units of lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fR
+.ad
+.RS 7n
+.rt
+Reverse. Copies lines from the specified starting point in the file in reverse
+order. The default for \fBr\fR is to print the entire file in reverse order.
+.RE
+
+.SS "/usr/xpg4/bin/tail"
+.sp
+.LP
+The following options are supported for \fB/usr/xpg4/bin/tail\fR only:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fInumber\fR \fR
+.ad
+.RS 14n
+.rt
+The \fInumber\fR option-argument must be a decimal integer whose sign affects
+the location in the file, measured in bytes, to begin the copying:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR \fR
+.ad
+.RS 9n
+.rt
+Copying starts relative to the beginning of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR \fR
+.ad
+.RS 9n
+.rt
+Copying starts relative to the end of the file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBnone\fR
+.ad
+.RS 9n
+.rt
+Copying starts relative to the end of the file.
+.RE
+
+The origin for counting is 1; that is, \fB\fR\fB-c\fR\fB+1\fR represents the
+first byte of the file, \fB\fR\fB-c\fR\fB\(mi1\fR the last.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR \fR
+.ad
+.RS 14n
+.rt
+Equivalent to \fB-c\fR\fInumber,\fR except the starting location in the file is
+measured in lines instead of bytes. The origin for counting is \fB1\fR. That
+is, \fB-n\fR\fB+1\fR represents the first line of the file, \fB-n\fR\fB\(mi1\fR
+the last.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 9n
+.rt
+A path name of an input file. If no \fIfile\fR operands are specified, the
+standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBtail\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the tail Command
+.sp
+.LP
+The following command prints the last ten lines of the file \fBfred\fR,
+followed by any lines that are appended to \fBfred\fR between the time
+\fBtail\fR is initiated and killed.
+
+.sp
+.in +2
+.nf
+example% \fBtail -f fred\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The next command prints the last 15 bytes of the file \fBfred\fR, followed by
+any lines that are appended to \fBfred\fR between the time \fBtail\fR is
+initiated and killed:
+
+.sp
+.in +2
+.nf
+example% \fBtail -15cf fred\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtail\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/tail"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/tail"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBhead\fR(1), \fBmore\fR(1), \fBpg\fR(1), \fBdd\fR(1M),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Piped tails relative to the end of the file are stored in a buffer, and thus
+are limited in length. Various kinds of anomalous behavior can happen with
+character special files.
diff --git a/usr/src/man/man1/talk.1 b/usr/src/man/man1/talk.1
new file mode 100644
index 0000000000..1006de4318
--- /dev/null
+++ b/usr/src/man/man1/talk.1
@@ -0,0 +1,269 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH talk 1 "6 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+talk \- talk to another user
+.SH SYNOPSIS
+.LP
+.nf
+\fBtalk\fR \fIaddress\fR [\fIterminal\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtalk\fR utility is a two-way, screen-oriented communication program.
+.sp
+.LP
+When first invoked, \fBtalk\fR sends a message similar to:
+.sp
+.in +2
+.nf
+Message from TalkDaemon@ \fIher_machine\fR at \fItime .\|.\|.\fR
+talk: connection requested by \fIyour_address\fR
+talk: respond with: talk \fIyour_address\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+to the specified \fIaddress\fR. At this point, the recipient of the message can
+reply by typing:
+.sp
+.in +2
+.nf
+talk \fIyour_address\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Once communication is established, the two parties can type simultaneously,
+with their output displayed in separate regions of the screen. Characters are
+processed as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing the alert character will alert the recipient's terminal.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing Control-L will cause the sender's screen regions to be refreshed.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing the erase and kill characters will affect the sender's terminal in the
+manner described by the \fBtermios\fR(3C) interface.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing the interrupt or end-of-file (\fBEOF\fR) characters will terminate the
+local \fBtalk\fR utility. Once the \fBtalk\fR session has been terminated on
+one side, the other side of the \fBtalk\fR session will be notified that the
+\fBtalk\fR session has been terminated and will be able to do nothing except
+exit.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing characters from \fBLC_CTYPE\fR classifications \fBprint\fR or
+\fBspace\fR will cause those characters to be sent to the recipient's terminal.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When and only when the \fBstty\fR \fBiexten\fR local mode is enabled,
+additional special control characters and multi-byte or single-byte characters
+are processed as printable characters if their wide character equivalents are
+printable.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing other non-printable characters will cause them to be written to the
+recipient's terminal as follows: control characters will appear as a caret
+(\|\fB^\fR\|) followed by the appropriate \fBASCII\fR character, and characters
+with the high-order bit set will appear in "meta" notation. For example,
+`\fB\e003\fR\&' is displayed as `\fB^C\fR' and `\fB\e372\fR\&' as
+`\fBM\(miz\fR'.
+.RE
+.sp
+.LP
+Permission to be a recipient of a \fBtalk\fR message can be denied or granted
+by use of the \fBmesg\fR(1) utility. However, a user's privilege may further
+constrain the domain of accessibility of other users' terminals. Certain
+commands, such as \fBpr\fR(1), disallow messages in order to prevent
+interference with their output. \fBtalk\fR will fail when the user lacks the
+appropriate privileges to perform the requested action.
+.sp
+.LP
+Certain block-mode terminals do not have all the capabilities necessary to
+support the simultaneous exchange of messages required for \fBtalk\fR. When
+this type of exchange cannot be supported on such terminals, the implementation
+may support an exchange with reduced levels of simultaneous interaction or it
+may report an error describing the terminal-related deficiency.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIaddress\fR\fR
+.ad
+.RS 12n
+.rt
+The recipient of the \fBtalk\fR session. One form of \fIaddress\fR is the
+\fIusername\fR, as returned by the \fBwho\fR(1) utility. If you wish to talk to
+someone on your own machine, then \fIusername\fR is just the person's login
+name. If you wish to talk to a user on another host, then \fIusername\fR is one
+of the following forms:
+.sp
+.in +2
+.nf
+\fIhost\fR\fB!\fR\fIuser\fR
+\fIhost\fR\fB\&.\fR\fIuser\fR
+\fIhost\fR\fB:\fR\fIuser\fR
+\fIuser\fR\fB@\fR\fIhost\fR
+.fi
+.in -2
+.sp
+
+although \fIuser\fR\fB@\fR\fIhost\fR is perhaps preferred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIterminal\fR\fR
+.ad
+.RS 12n
+.rt
+If the recipient is logged in more than once, \fIterminal\fR can be used to
+indicate the appropriate terminal name. If \fIterminal\fR is not specified, the
+\fBtalk\fR message will be displayed on one or more accessible terminals in use
+by the recipient. The format of \fIterminal\fR will be the same as that
+returned by \fBwho\fR.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtalk\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTERM\fR\fR
+.ad
+.RS 8n
+.rt
+Determine the name of the invoker's terminal type. If this variable is unset
+or null, an unspecified terminal type will be used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred, or \fBtalk\fR was invoked on a terminal incapable of
+supporting it.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/hosts\fR\fR
+.ad
+.RS 18n
+.rt
+host name database
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR\fR
+.ad
+.RS 18n
+.rt
+user and accounting information for \fBtalk\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmail\fR(1), \fBmesg\fR(1), \fBpr\fR(1), \fBstty\fR(1), \fBwho\fR(1),
+\fBwrite\fR(1), \fBtermios\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Typing Control-L redraws the screen, while the erase, kill, and word kill
+characters will work in \fBtalk\fR as normal. To exit, type an interrupt
+character. \fBtalk\fR then moves the cursor to the bottom of the screen and
+restores the terminal to its previous state.
diff --git a/usr/src/man/man1/tar.1 b/usr/src/man/man1/tar.1
new file mode 100644
index 0000000000..3205d961c8
--- /dev/null
+++ b/usr/src/man/man1/tar.1
@@ -0,0 +1,1297 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tar 1 "26 Oct 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+tar \- create tape archives and add or extract files
+.SH SYNOPSIS
+.LP
+.nf
+\fBtar\fR c[BDeEFhilnopPqTvw@/[0-7]][bfk][X...] [\fIblocksize\fR]
+ [\fItarfile\fR] [\fIsize\fR] [\fIexclude-file\fR]...
+ {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
+.fi
+
+.LP
+.nf
+\fBtar\fR r[BDeEFhilnqTvw@/[0-7]][bfk] [\fIblocksize\fR] [\fItarfile\fR]
+ [\fIsize\fR]
+ {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
+.fi
+
+.LP
+.nf
+\fBtar\fR t[BeFhilnqTv[0-7]][fk][X...] [\fItarfile\fR] [\fIsize\fR]
+ [\fIexclude-file\fR]... {\fIfile\fR | \(miI \fIinclude-file\fR}...
+.fi
+
+.LP
+.nf
+\fBtar\fR u[BDeEFhilnqTvw@/[0-7]][bfk] [\fIblocksize\fR] [\fItarfile\fR]
+ [\fIsize\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBtar\fR x[BeFhilmnopqTvw@/[0-7]][fk][X...] [\fItarfile\fR] [\fIsize\fR]
+ [\fIexclude-file\fR]... [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtar\fR command archives and extracts files to and from a single file
+called a \fItarfile\fR. A tarfile is usually a magnetic tape, but it can be any
+file. \fBtar\fR's actions are controlled by the \fIkey\fR argument. The
+\fIkey\fR is a string of characters containing exactly one function letter
+(\fBc\fR, \fBr\fR, \fBt\fR , \fBu\fR, or \fBx\fR) and zero or more function
+modifiers (letters or digits), depending on the function letter used. The
+\fIkey\fR string contains no SPACE characters. Function modifier arguments are
+listed on the command line in the same order as their corresponding function
+modifiers appear in the \fIkey\fR string.
+.sp
+.LP
+The \fB\(miI\fR \fIinclude-file\fR, \fB\(miC\fR \fIdirectory file\fR, and
+\fIfile\fR arguments specify which files or directories are to be archived or
+extracted. In all cases, appearance of a directory name refers to the files and
+(recursively) subdirectories of that directory. Arguments appearing within
+braces (\fB{ }\fR) indicate that one of the arguments must be specified.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(miC\fR \fIdirectory file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Performs a \fBchdir\fR (see \fBcd\fR(1)) operation on \fIdirectory\fR and
+performs the \fBc\fR (create) or \fBr\fR (replace) operation on \fIfile\fR. Use
+short relative path names for \fIfile\fR. If \fIfile\fR is "\fB\&.\fR", archive
+all files in \fIdirectory\fR. This operand enables archiving files from
+multiple directories not related by a close common parent.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(miI\fR \fIinclude-file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Opens \fIinclude-file\fR containing a list of files, one per line, and treats
+it as if each file appeared separately on the command line. Be careful of
+trailing white spaces. Also beware of leading white spaces, since, for each
+line in the included file, the entire line (apart from the newline) is used to
+match against the initial string of files to include. In the case where
+excluded files (see \fBX\fR function modifier) are also specified, they take
+precedence over all included files. If a file is specified in both the
+\fIexclude-file\fR and the \fIinclude-file\fR (or on the command line), it is
+excluded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+A path name of a regular file or directory to be archived (when the \fBc\fR,
+\fBr\fR or \fBu\fR functions are specified), extracted (\fBx\fR) or listed
+(\fBt\fR). When \fIfile\fR is the path name of a directory, the action applies
+to all of the files and (recursively) subdirectories of that directory.
+.sp
+When a file is archived, and the \fBE\fR flag (see \fBFunction Modifiers\fR) is
+not specified, the filename cannot exceed 256 characters. In addition, it must
+be possible to split the name between parent directory names so that the prefix
+is no longer than 155 characters and the name is no longer than 100 characters.
+If \fBE\fR is specified, a name of up to \fIPATH_MAX\fR characters can be
+specified.
+.sp
+For example, a file whose basename is longer than 100 characters could not be
+archived without using the \fBE\fR flag. A file whose directory portion is 200
+characters and whose basename is 50 characters could be archived (without using
+\fBE\fR) if a slash appears in the directory name somewhere in character
+positions 151-156.
+.RE
+
+.SS "Function Letters"
+.sp
+.LP
+The function portion of the key is specified by one of the following letters:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.sp .6
+.RS 4n
+Create. Writing begins at the beginning of the tarfile, instead of at the end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBr\fR\fR
+.ad
+.sp .6
+.RS 4n
+Replace. The named \fIfile\fRs are written at the end of the tarfile. A file
+created with extended headers must be updated with extended headers (see
+\fBE\fR flag under \fBFunction Modifiers\fR). A file created without extended
+headers cannot be modified with extended headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBt\fR\fR
+.ad
+.sp .6
+.RS 4n
+Table of Contents. The names of the specified files are listed each time they
+occur in the tarfile. If no \fIfile\fR argument is specified, the names of all
+files and any associated extended attributes in the tarfile are listed. With
+the \fBv\fR function modifier, additional information for the specified files
+is displayed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBu\fR\fR
+.ad
+.sp .6
+.RS 4n
+Update. The named \fIfile\fRs are written at the end of the tarfile if they are
+not already in the tarfile, or if they have been modified since last written to
+that tarfile. An update can be rather slow. A tarfile created on a 5.x system
+cannot be updated on a 4.x system. A file created with extended headers must be
+updated with extended headers (see \fBE\fR flag under \fBFunction
+Modifiers\fR). A file created without extended headers cannot be modified with
+extended headers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx\fR\fR
+.ad
+.sp .6
+.RS 4n
+Extract or restore. The named \fIfile\fRs are extracted from the tarfile and
+written to the directory specified in the tarfile, relative to the current
+directory. Use the relative path names of files and directories to be
+extracted.
+.sp
+Absolute path names contained in the tar archive are unpacked using the
+absolute path names, that is, the leading forward slash (\fB/\fR) is \fBnot\fR
+stripped off.
+.sp
+If a named file matches a directory whose contents has been written to the
+tarfile, this directory is recursively extracted. The owner, modification time,
+and mode are restored (if possible); otherwise, to restore owner, you must be
+the super-user. Character-special and block-special devices (created by
+\fBmknod\fR(1M)) can only be extracted by the super-user. If no \fIfile\fR
+argument is specified, the entire content of the tarfile is extracted. If the
+tarfile contains several files with the same name, each file is written to the
+appropriate directory, overwriting the previous one. Filename substitution
+wildcards cannot be used for extracting files from the archive. Rather, use a
+command of the form:
+.sp
+.in +2
+.nf
+\fBtar xvf ... /dev/rmt/0 \(gatar tf ... /dev/rmt/0 | \e
+ grep '\fIpattern\fR' \(ga\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.LP
+When extracting tapes created with the \fBr\fR or \fBu\fR functions, directory
+modification times can not be set correctly. These same functions cannot be
+used with many tape drives due to tape drive limitations such as the absence of
+backspace or append capabilities.
+.sp
+.LP
+When using the \fBr\fR, \fBu\fR, or \fBx\fR functions or the \fBX\fR function
+modifier, the named files must match exactly the corresponding files in the
+\fItarfile\fR. For example, to extract \fB\&./\fR\fIthisfile\fR, you must
+specify \fB\&./\fR\fIthisfile,\fR and not \fIthisfile\fR. The \fBt\fR function
+displays how each file was archived.
+.SS "Function Modifiers"
+.sp
+.LP
+The characters below can be used in conjunction with the letter that selects
+the desired function.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBb\fR \fIblocksize\fR\fR
+.ad
+.sp .6
+.RS 4n
+Blocking Factor. Use when reading or writing to raw magnetic archives (see
+\fBf\fR below). The \fIblocksize\fR argument specifies the number of 512-byte
+tape blocks to be included in each read or write operation performed on the
+tarfile. The minimum is \fB1\fR, the default is \fB20\fR. The maximum value is
+a function of the amount of memory available and the blocking requirements of
+the specific tape device involved (see \fBmtio\fR(7I) for details.) The maximum
+cannot exceed \fBINT_MAX\fR/512 (\fB4194303\fR).
+.sp
+When a tape archive is being read, its actual blocking factor is automatically
+detected, provided that it is less than or equal to the nominal blocking factor
+(the value of the \fIblocksize\fR argument, or the default value if the \fBb\fR
+modifier is not specified). If the actual blocking factor is greater than the
+nominal blocking factor, a read error results. See Example 5 in EXAMPLES.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBB\fR\fR
+.ad
+.sp .6
+.RS 4n
+Block. Force \fBtar\fR to perform multiple reads (if necessary) to read exactly
+enough bytes to fill a block. This function modifier enables \fBtar\fR to work
+across the Ethernet, since pipes and sockets return partial blocks even when
+more data is coming. When reading from standard input, "\fB\(mi\fR", this
+function modifier is selected by default to ensure that \fBtar\fR can recover
+from short reads.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBD\fR\fR
+.ad
+.sp .6
+.RS 4n
+Data change warnings. Used with \fBc\fR, \fBr\fR, or \fBu\fR function letters.
+Ignored with \fBt\fR or \fBx\fR function letters. If the size of a file changes
+while the file is being archived, treat this condition as a warning instead of
+as an error. A warning message is still written, but the exit status is not
+affected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.sp .6
+.RS 4n
+Error. Exit immediately with a positive exit status if any unexpected errors
+occur. The \fBSYSV3\fR environment variable overrides the default behavior.
+(See ENVIRONMENT VARIABLES section below.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBE\fR\fR
+.ad
+.sp .6
+.RS 4n
+Write a tarfile with extended headers. (Used with \fBc\fR, \fBr\fR, or \fBu\fR
+function letters. Ignored with \fBt\fR or \fBx\fR function letters.) When a
+tarfile is written with extended headers, the modification time is maintained
+with a granularity of microseconds rather than seconds. In addition, filenames
+no longer than \fBPATH_MAX\fR characters that could not be archived without
+\fBE\fR, and file sizes greater than \fB8GB\fR, are supported. The \fBE\fR flag
+is required whenever the larger files and/or files with longer names, or whose
+\fBUID/GID\fR exceed \fB2097151\fR, are to be archived, or if time granularity
+of microseconds is desired.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBf\fR\fR
+.ad
+.sp .6
+.RS 4n
+File. Use the \fItarfile\fR argument as the name of the tarfile. If \fBf\fR is
+specified, \fB/etc/default/tar\fR is not searched. If \fBf\fR is omitted,
+\fBtar\fR uses the device indicated by the \fBTAPE\fR environment variable, if
+set. Otherwise, \fBtar\fR uses the default values defined in
+\fB/etc/default/tar\fR. The number matching the \fBarchive\fR\fIN\fR string is
+used as the output device with the blocking and size specifications from the
+file. For example,
+.sp
+.in +2
+.nf
+\fBtar -c 2/tmp/*\fR
+.fi
+.in -2
+.sp
+
+writes the output to the device specified as \fBarchive2\fR in
+\fB/etc/default/tar\fR.
+.sp
+If the name of the tarfile is "\fB\(mi\fR", \fBtar\fR writes to the standard
+output or reads from the standard input, whichever is appropriate. \fBtar\fR
+can be used as the head or tail of a pipeline. \fBtar\fR can also be used to
+move hierarchies with the command:
+.sp
+.in +2
+.nf
+example% \fBcd fromdir; tar cf \(mi .| (cd todir; tar xfBp \(mi)\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR\fR
+.ad
+.sp .6
+.RS 4n
+With one \fBF\fR argument, \fBtar\fR excludes all directories named \fBSCCS\fR
+and \fBRCS\fR from the tarfile. With two arguments, \fBFF\fR, \fBtar\fR
+excludes all directories named SCCS and RCS, all files with \fB\&.o\fR as their
+suffix, and all files named \fBerrs\fR, \fBcore\fR, and \fBa.out\fR. The
+\fBSYSV3\fR environment variable overrides the default behavior. (See
+ENVIRONMENT VARIABLES section below.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBh\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follow symbolic links as if they were normal files or directories. Normally,
+\fBtar\fR does not follow symbolic links.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBi\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ignore directory checksum errors.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBk\fR \fIsize\fR\fR
+.ad
+.sp .6
+.RS 4n
+Requires \fBtar\fR to use the size argument as the size of an archive in
+kilobytes. This is useful when the archive is intended for a fixed size device
+such as floppy disks. Large files are then split across volumes if they do not
+fit in the specified size.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBl\fR\fR
+.ad
+.sp .6
+.RS 4n
+Link. Output error message if unable to resolve all links to the files being
+archived. If \fBl\fR is not specified, no error messages are printed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBm\fR\fR
+.ad
+.sp .6
+.RS 4n
+Modify. The modification time of the file is the time of extraction. This
+function modifier is valid only with the \fBx\fR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBn\fR\fR
+.ad
+.sp .6
+.RS 4n
+The file being read is a non-tape device. Reading of the archive is faster
+since \fBtar\fR can randomly seek around the archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBo\fR\fR
+.ad
+.sp .6
+.RS 4n
+Ownership. Assign to extracted files the user and group identifiers of the user
+running the program, rather than those on tarfile. This is the default behavior
+for users other than root. If the \fBo\fR function modifier is not set and the
+user is root, the extracted files takes on the group and user identifiers of
+the files on tarfile (see \fBchown\fR(1) for more information). The \fBo\fR
+function modifier is only valid with the \fBx\fR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBp\fR\fR
+.ad
+.sp .6
+.RS 4n
+Restore the named files to their original modes, and \fBACL\fRs if applicable,
+ignoring the present \fBumask\fR(1). This is the default behavior if invoked as
+super-user with the \fBx\fR function letter specified. If super-user,
+\fBSETUID\fR, and sticky information are also extracted, and files are restored
+with their original owners and permissions, rather than owned by root. When
+this function modifier is used with the \fBc\fR function, \fBACL\fRs are
+created in the tarfile along with other information. Errors occur when a
+tarfile with \fBACL\fRs is extracted by previous versions of \fBtar\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBP\fR\fR
+.ad
+.sp .6
+.RS 4n
+Suppress the addition of a trailing "\fB/\fR" on directory entries in the
+archive.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBq\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stop after extracting the first occurrence of the named file. \fBtar\fR
+normally continues reading the archive after finding an occurrence of a file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBT\fR\fR
+.ad
+.sp .6
+.RS 4n
+This modifier is only available if the system is configured with Trusted
+Extensions.
+.sp
+When this modifier is used with the function letter \fBc\fR, \fBr,\fR or
+\fBu\fR for creating, replacing or updating a tarfile, the sensitivity label
+associated with each archived file and directory is stored in the tarfile.
+.sp
+Specifying \fBT\fR implies the function modifier \fBp\fR.
+.sp
+When used with the function letter \fBx\fR for extracting a tarfile, the tar
+program verifies that the file's sensitivity label specified in the archive
+equals the sensitivity label of the destination directory. If not, the file is
+not restored. This operation must be invoked from the global zone. If the
+archived file has a relative pathname, it is restored to the corresponding
+directory with the same label, if available. This is done by prepending to the
+current destination directory the root pathname of the zone whose label equals
+the file. If no such zone exists, the file is not restored.
+.sp
+Limited support is provided for extracting labeled archives from Trusted
+Solaris 8. Only sensitivity labels, and multi-level directory specifications
+are interpreted. Privilege specifications and audit attribute flags are
+silently ignored. Multilevel directory specifications including symbolic links
+to single level directories are are mapped into zone-relative pathnames if a
+zone with the same label is available. This support is intended to facilitate
+migration of home directories. Architectural differences preclude the
+extraction of arbitrarily labeled files from Trusted Solaris 8 into identical
+pathnames in Trusted Extensions. Files cannot be extracted unless their
+archived label matches the destination label.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBv\fR\fR
+.ad
+.sp .6
+.RS 4n
+Verbose. Output the name of each file preceded by the function letter. With the
+\fBt\fR function, \fBv\fR provides additional information about the tarfile
+entries. The listing is similar to the format produced by the \fB-l\fR option
+of the \fBls\fR(1) command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBw\fR\fR
+.ad
+.sp .6
+.RS 4n
+What. Output the action to be taken and the name of the file, then await the
+user's confirmation. If the response is affirmative, the action is performed;
+otherwise, the action is not performed. This function modifier cannot be used
+with the \fBt\fR function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBX\fR\fR
+.ad
+.sp .6
+.RS 4n
+Exclude. Use the \fIexclude-file\fR argument as a file containing a list of
+relative path names for files (or directories) to be excluded from the tarfile
+when using the functions \fBc\fR, \fBx\fR, or \fBt\fR. Be careful of trailing
+white spaces. Also beware of leading white spaces, since, for each line in the
+excluded file, the entire line (apart from the newline) is used to match
+against the initial string of files to exclude. Lines in the exclude file are
+matched exactly, so an entry like "\fB/var\fR" does \fBnot\fR exclude the
+\fB/var\fR directory if \fBtar\fR is backing up relative pathnames. The entry
+should read "\fB\&./var\fR" under these circumstances. The \fBtar\fR command
+does not expand shell metacharacters in the exclude file, so specifying entries
+like "\fB*.o\fR" does not have the effect of excluding all files with names
+suffixed with "\fB\&.o\fR". If a complex list of files is to be excluded, the
+exclude file should be generated by some means such as the \fBfind\fR(1)
+command with appropriate conditions.
+.sp
+Multiple \fBX\fR arguments can be used, with one \fIexclude-file\fR per
+argument. In the case where included files (see \fB\(miI\fR \fIinclude-file\fR
+operand) are also specified, the excluded files take precedence over all
+included files. If a file is specified in both the \fIexclude-file\fR and the
+\fIinclude-file\fR (or on the command line), it is excluded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB@\fR\fR
+.ad
+.sp .6
+.RS 4n
+Include extended attributes in archive. By default, \fBtar\fR does not place
+extended attributes in the archive. With this flag, \fBtar\fR looks for
+extended attributes on the files to be placed in the archive and add them to
+the archive. Extended attributes go in the archive as special files with a
+special type label. When this modifier is used with the \fBx\fR function,
+extended attributes are extracted from the tape along with the normal file
+data. Extended attribute files can only be extracted from an archive as part of
+a normal file extract. Attempts to explicitly extract attribute records are
+ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/\fR\fR
+.ad
+.sp .6
+.RS 4n
+Include extended system attributes in archive. By default, \fBtar\fR does not
+place extended system attributes in the archive. With this flag, \fBtar\fR
+looks for extended system attributes on the files to be placed in the archive
+and adds them to the archive. Extended system attributes go in the archive as
+special files with a special type label. When this modifier is used with the
+\fBx\fR function, extended system attributes are extracted from the tape along
+with the normal file data. Extended system attribute files can only be
+extracted from an archive as part of a normal file extract. Attempts to
+explicitly extract attribute records are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[0-7]\fR\fR
+.ad
+.sp .6
+.RS 4n
+Select an alternative drive on which the tape is mounted. The default entries
+are specified in \fB/etc/default/tar\fR. If no digit or \fBf\fR function
+modifier is specified, the entry in \fB/etc/default/tar\fR with digit "\fB0\fR"
+is the default.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBtar\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.sp
+.LP
+The automatic determination of the actual blocking factor can be fooled when
+reading from a pipe or a socket (see the \fBB\fR function modifier below).
+.sp
+.LP
+1/4" streaming tape has an inherent blocking factor of one 512-byte block. It
+can be read or written using any blocking factor.
+.sp
+.LP
+This function modifier works for archives on disk files and block special
+devices, among others, but is intended principally for tape devices.
+.sp
+.LP
+For information on \fBtar\fR header format, see \fBarchives.h\fR(3HEAD).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating an archive of your home directory
+.sp
+.LP
+The following is an example using \fBtar\fR to create an archive of your home
+directory on a tape mounted on drive \fB/dev/rmt/0\fR:
+
+.sp
+.in +2
+.nf
+example% \fBcd\fR
+example% \fBtar cvf /dev/rmt/0\fR .
+\fImessages from\fR tar
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The \fBc\fR function letter means create the archive. The \fBv\fR function
+modifier outputs messages explaining what \fBtar\fR is doing. The \fBf\fR
+function modifier indicates that the tarfile is being specified
+(\fB/dev/rmt/0\fR in this example). The dot (\fB\&.\fR) at the end of the
+command line indicates the current directory and is the argument of the \fBf\fR
+function modifier.
+
+.sp
+.LP
+Display the table of contents of the tarfile with the following command:
+
+.sp
+.in +2
+.nf
+example% \fBtar tvf /dev/rmt/0\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The output is similar to the following for the POSIX locale:
+
+.sp
+.in +2
+.nf
+rw\(mir\(mi\(mir\(mi\(mi 1677/40 2123 Nov 7 18:15 1985 ./test.c
+\&...
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The columns have the following meanings:
+
+.RS +4
+.TP
+.ie t \(bu
+.el o
+column 1 is the access permissions to \fB\&./test.c\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+column 2 is the \fIuser-id\fR/\fIgroup-id\fR of \fB\&./test.c\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+column 3 is the size of \fB\&./test.c\fR in bytes
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+column 4 is the modification date of \fB\&./test.c\fR. When the \fBLC_TIME\fR
+category is not set to the POSIX locale, a different format and date order
+field can be used.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+column 5 is the name of \fB\&./test.c\fR
+.RE
+.sp
+.LP
+To extract files from the archive:
+
+.sp
+.in +2
+.nf
+example% \fBtar xvf /dev/rmt/0\fR
+\fImessages from\fR tar
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If there are multiple archive files on a tape, each is separated from the
+following one by an EOF marker. To have \fBtar\fR read the first and second
+archives from a tape with multiple archives on it, the \fInon-rewinding\fR
+version of the tape device name must be used with the \fBf\fR function
+modifier, as follows:
+
+.sp
+.in +2
+.nf
+example% \fBtar xvfp /dev/rmt/0n \fIread first archive from tape\fR\fR
+\fImessages from\fR tar
+example% \fBtar xvfp /dev/rmt/0n \fIread second archive from tape\fR\fR
+\fImessages from\fR tar
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that in some earlier releases, the above scenario did not work
+correctly, and intervention with \fBmt\fR(1) between \fBtar\fR invocations was
+necessary. To emulate the old behavior, use the non-rewind device name
+containing the letter \fBb\fR for BSD behavior. See the \fBClose Operations\fR
+section of the \fBmtio\fR(7I) manual page.
+
+.LP
+\fBExample 2 \fRArchiving files from /usr/include and from /etc to default tape
+drive 0
+.sp
+.LP
+To archive files from \fB/usr/include\fR and from \fB/etc\fR to default tape
+drive \fB0\fR:
+
+.sp
+.in +2
+.nf
+example% \fBtar c -C /usr include -C /etc .\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The table of contents from the resulting tarfile would produce output like the
+following:
+
+.sp
+.in +2
+.nf
+include/
+include/a.out.h
+\fIand all the other files in\fR \fB/usr/include ...\fR
+\&./chown \fIand all the other files in\fR /etc
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To extract all files in the \fBinclude\fR directory:
+
+.sp
+.in +2
+.nf
+example% \fBtar xv include
+x include/, 0 bytes, 0 tape blocks \e
+ \fIand all files under\fR include ...\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRTransferring files across the network
+.sp
+.LP
+The following is an example using \fBtar\fR to transfer files across the
+network. First, here is how to archive files from the local machine
+(\fBexample\fR) to a tape on a remote system (\fBhost\fR):
+
+.sp
+.in +2
+.nf
+example% \fBtar cvfb \(mi 20 \fIfiles\fR| \e
+ rsh \fIhost\fR dd of=/dev/rmt/0 obs=20b\fR
+\fImessages from\fR tar
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In the example above, we are \fIcreating\fR a \fItarfile\fR with the \fBc\fR
+key letter, asking for \fIverbose\fR output from \fBtar\fR with the \fBv\fR
+function modifier, specifying the name of the output \fItarfile\fR using the
+\fBf\fR function modifier (the standard output is where the \fItarfile\fR
+appears, as indicated by the `\fB\(mi\fR\&' sign), and specifying the blocksize
+(\fB20\fR) with the \fBb\fR function modifier. If you want to change the
+blocksize, you must change the blocksize arguments both on the \fBtar\fR
+command \fIand\fR on the \fBdd\fR command.
+
+.LP
+\fBExample 4 \fRRetrieving files from a tape on the remote system back to the
+local system
+.sp
+.LP
+The following is an example that uses \fBtar\fR to retrieve files from a tape
+on the remote system back to the local system:
+
+.sp
+.in +2
+.nf
+example% \fBrsh -n host dd if=/dev/rmt/0 bs=20b | \e
+ tar xvBfb \(mi 20 \fIfiles\fR\fR
+\fImessages from\fR tar
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+In the example above, we are \fIextracting\fR from the \fItarfile\fR with the
+\fBx\fR key letter, asking for \fIverbose\fR \fIoutput\fR \fIfrom\fR \fBtar\fR
+with the \fBv\fR function modifier, telling \fBtar\fR it is reading from a pipe
+with the \fBB\fR function modifier, specifying the name of the input
+\fItarfile\fR using the \fBf\fR function modifier (the standard input is where
+the \fItarfile\fR appears, as indicated by the "\fB\(mi\fR" sign), and
+specifying the blocksize (\fB20\fR) with the \fBb\fR function modifier.
+
+.LP
+\fBExample 5 \fRCreating an archive of the home directory
+.sp
+.LP
+The following example creates an archive of the home directory on
+\fB/dev/rmt/0\fR with an actual blocking factor of \fB19\fR:
+
+.sp
+.in +2
+.nf
+example% \fBtar cvfb /dev/rmt/0 19 $HOME\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To recognize this archive's actual blocking factor without using the \fBb\fR
+function modifier:
+
+.sp
+.in +2
+.nf
+example% \fBtar tvf /dev/rmt/0\fR
+tar: blocksize = 19
+\&...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+To recognize this archive's actual blocking factor using a larger nominal
+blocking factor:
+
+.sp
+.in +2
+.nf
+example% \fBtar tvf /dev/rmt/0 30\fR
+tar: blocksize = 19
+\&...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Attempt to recognize this archive's actual blocking factor using a nominal
+blocking factor that is too small:
+
+.sp
+.in +2
+.nf
+example% \fBtar tvf /dev/rmt/0 10\fR
+tar: tape read error
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSYSV3\fR\fR
+.ad
+.sp .6
+.RS 4n
+This variable is used to override the default behavior of \fBtar\fR, provide
+compatibility with INTERACTIVE UNIX Systems and SCO UNIX installation scripts,
+and should not be used in new scripts. (It is intended for compatibility
+purposes only.) When set, the following function modifiers behave differently:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBF\fR \fIfilename\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses \fIfilename\fR to obtain a list of command line switches and files on
+which to operate.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prevents files from being split across volumes. If there is insufficient room
+on one volume, \fBtar\fR prompts for a new volume. If the file does not fit on
+the new volume, \fBtar\fR exits with an error.
+.RE
+
+.RE
+
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtar\fR: \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
+\fBLC_MESSAGES\fR, \fBLC_TIME\fR, \fBTZ\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.sp .6
+.RS 4n
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.sp .6
+.RS 4n
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/[0-7][b][n]\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/[0-7]l[b][n]\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/[0-7]m[b][n]\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/[0-7]h[b][n]\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/[0-7]u[b][n]\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/rmt/[0-7]c[b][n]\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/default/tar\fR\fR
+.ad
+.sp .6
+.RS 4n
+Settings might look like this:
+.br
+.in +2
+\fBarchive0=/dev/rmt/0\fR
+.in -2
+.br
+.in +2
+\fBarchive1=/dev/rmt/0n\fR
+.in -2
+.br
+.in +2
+\fBarchive2=/dev/rmt/1\fR
+.in -2
+.br
+.in +2
+\fBarchive3=/dev/rmt/1n\fR
+.in -2
+.br
+.in +2
+\fBarchive4=/dev/rmt/0\fR
+.in -2
+.br
+.in +2
+\fBarchive5=/dev/rmt/0n\fR
+.in -2
+.br
+.in +2
+\fBarchive6=/dev/rmt/1\fR
+.in -2
+.br
+.in +2
+\fBarchive7=/dev/rmt/1n\fR
+.in -2
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/tar*\fR\fR
+.ad
+.sp .6
+.RS 4n
+
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBar\fR(1), \fBbasename\fR(1), \fBcd\fR(1), \fBchown\fR(1), \fBcpio\fR(1),
+\fBcsh\fR(1), \fBdirname\fR(1), \fBfind\fR(1), \fBls\fR(1), \fBmt\fR(1),
+\fBpax\fR(1), \fBsetfacl\fR(1), \fBumask\fR(1), \fBmknod\fR(1M),
+\fBarchives.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBfsattr\fR(5), \fBlargefile\fR(5), \fBmtio\fR(7I)
+.SH DIAGNOSTICS
+.sp
+.LP
+Diagnostic messages are output for bad key characters and tape read/write
+errors, and for insufficient memory to hold the link tables.
+.SH NOTES
+.sp
+.LP
+There is no way to access the \fIn\fR-th occurrence of a file.
+.sp
+.LP
+Tape errors are handled ungracefully.
+.sp
+.LP
+The \fBtar\fR archive format allows \fBUID\fRs and \fBGID\fRs up to
+\fB2097151\fR to be stored in the archive header. Files with \fBUID\fRs and
+\fBGID\fRs greater than this value is archived with the \fBUID\fR and \fBGID\fR
+of \fB60001\fR.
+.sp
+.LP
+If an archive is created that contains files whose names were created by
+processes running in multiple locales, a single locale that uses a full 8-bit
+codeset (for example, the \fBen_US\fR locale) should be used both to create the
+archive and to extract files from the archive.
+.sp
+.LP
+Neither the \fBr\fR function letter nor the \fBu\fR function letter can be used
+with quarter-inch archive tapes, since these tape drives cannot backspace.
+.sp
+.LP
+Since \fBtar\fR has no options, the standard "\fB\(mi\(mi\fR" argument that is
+normally used in other utilities to terminate recognition of options is not
+needed. If used, it is recognized only as the first argument and is ignored.
+.sp
+.LP
+Since \fB\(miC\fR \fIdirectory\fR \fIfile\fR and \fB\(miI\fR \fIinclude-file\fR
+are multi-argument operands, any of the following methods can be used to
+archive or extract a file named \fB\(miC\fR or \fB\(miI\fR:
+.RS +4
+.TP
+1.
+Specify them using file operands containing a \fB/\fR character on the
+command line (such as \fB/home/joe/\(miC\fR or \fB\&./\(miI\fR).
+.RE
+.RS +4
+.TP
+2.
+Include them in an include file with \fB\(miI\fR \fIinclude-file\fR.
+.RE
+.RS +4
+.TP
+3.
+Specify the directory in which the file resides:
+.sp
+.in +2
+.nf
+\fB-C \fIdirectory\fR -C\fR
+.fi
+.in -2
+.sp
+
+or
+.sp
+.in +2
+.nf
+\fB-C \fIdirectory\fR -I\fR
+.fi
+.in -2
+.sp
+
+.RE
+.RS +4
+.TP
+4.
+Specify the entire directory in which the file resides:
+.sp
+.in +2
+.nf
+\fB-C \fIdirectory\fR .\fR
+.fi
+.in -2
+.sp
+
+.RE
diff --git a/usr/src/man/man1/tbl.1 b/usr/src/man/man1/tbl.1
new file mode 100644
index 0000000000..46111d5038
--- /dev/null
+++ b/usr/src/man/man1/tbl.1
@@ -0,0 +1,150 @@
+'\" te
+.\" Copyright (c) 1994, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tbl 1 "2 Aug 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+tbl \- format tables for nroff or troff
+.SH SYNOPSIS
+.LP
+.nf
+\fBtbl\fR [\fB-me\fR] [\fB-mm\fR] [\fB-ms\fR] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBtbl\fR is a preprocessor for formatting tables for \fBnroff\fR(1) or
+\fBtroff\fR(1). The input \fIfilename\fRs are copied to the standard output,
+except that lines between \fB\&.TS\fR and \fB\&.TE\fR command lines are assumed
+to describe tables and are reformatted.
+.sp
+.LP
+If no arguments are given, \fBtbl\fR reads the standard input, so \fBtbl\fR may
+be used as a filter. When \fBtbl\fR is used with \fBeqn\fR(1) or \fBneqn\fR,
+the \fBtbl\fR command should be first, to minimize the volume of data passed
+through pipes.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-me\fR \fR
+.ad
+.RS 8n
+.rt
+Copy the \fB-me\fR macro package to the front of the output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-mm\fR \fR
+.ad
+.RS 8n
+.rt
+Copy the \fB-mm\fR macro package to the front of the output file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ms\fR \fR
+.ad
+.RS 8n
+.rt
+Copy the \fB-ms\fR macro package to the front of the output file.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBtbl\fR
+.sp
+.LP
+As an example, letting `\fB@\fR' (at-sign) represent a \fBTAB,\fR which should
+be typed as an actual \fBTAB\fR character in the input file
+
+.sp
+.in +2
+.nf
+\fB\&.TS
+c s s
+c c s
+c c c
+l n n.
+Household Population
+Town@Households
+@Number@Size
+Bedminster@789@3.26
+Bernards Twp.@3087@3.74
+Bernardsville@2018@3.30
+Bound Brook@3425@3.04
+Branchburg@1644@3.49
+\&.TE\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+yields
+
+.sp
+
+.sp
+.TS
+tab();
+lw(1.83i) lw(1.83i) lw(1.83i)
+lw(1.83i) lw(1.83i) lw(1.83i)
+.
+\fBHousehold Population\fR
+\fBTown\fR\fBHouseholds\fR
+\fBNumber\fR\fBSize\fR
+\fBBedminster\fR\fB789\fR\fB3.26\fR
+\fBBernards Twp.\fR\fB3087\fR\fB3.74\fR
+\fBBernardsville\fR\fB2018\fR\fB3.30\fR
+\fBBound Brook\fR\fB3425\fR\fB3.04\fR
+\fBBranchburg\fR\fB1644\fR\fB3.49\fR
+.TE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/e\fR \fR
+.ad
+.RS 26n
+.rt
+\fB-me\fR macros
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/m\fR \fR
+.ad
+.RS 26n
+.rt
+\fB-mm\fR macros
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/s\fR \fR
+.ad
+.RS 26n
+.rt
+\fB-ms\fR macros
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBeqn\fR(1), \fBnroff\fR(1), \fBtroff\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/tcopy.1 b/usr/src/man/man1/tcopy.1
new file mode 100644
index 0000000000..de760fc2f8
--- /dev/null
+++ b/usr/src/man/man1/tcopy.1
@@ -0,0 +1,49 @@
+'\" te
+.\" Copyright (c) 1985 Regents of the University
+.\" of California. All rights reserved. The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.TH tcopy 1 "10 Mar 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+tcopy \- copy a magnetic tape
+.SH SYNOPSIS
+.LP
+.nf
+\fBtcopy\fR \fIsource\fR [\fIdestination\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtcopy\fR utility copies the magnetic tape mounted on the tape drive
+specified by the \fBsource\fR argument. The only assumption made about the
+contents of a tape is that there are two tape marks at the end.
+.sp
+.LP
+When only a source drive is specified, \fBtcopy\fR scans the tape, and displays
+information about the sizes of records and tape files. If a destination is
+specified, \fBtcopy\fR makes a copies the source tape onto the
+\fIdestination\fR tape, with blocking preserved. As it copies, \fBtcopy\fR
+produces the same output as it does when only scanning a tape.
+.sp
+.LP
+The \fBtcopy\fR utility requires the use of Berkeley-compatible device names.
+For example,
+.sp
+.in +2
+.nf
+example% \fBtcopy /dev/rmt/1b /dev/rmt/2b\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmt\fR(1), \fBioctl\fR(2), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBtcopy\fR will only run on systems supporting an associated set of
+\fBioctl\fR(2) requests.
diff --git a/usr/src/man/man1/tee.1 b/usr/src/man/man1/tee.1
new file mode 100644
index 0000000000..82aed5fd4d
--- /dev/null
+++ b/usr/src/man/man1/tee.1
@@ -0,0 +1,256 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tee 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+tee \- replicate the standard output
+.SH SYNOPSIS
+.SS "/usr/bin/tee"
+.LP
+.nf
+\fB/usr/bin/tee\fR [\fB-ai\fR] [\fIfile\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBtee\fR [\fB-ail\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/tee"
+.sp
+.LP
+\fB/usr/bin/tee\fR copies standard input to standard output, making a copy in
+zero or more files. \fBtee\fR does not buffer its output. The options determine
+if the specified files are overwritten or appended to.
+.SS "ksh93"
+.sp
+.LP
+The \fBtee\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when tee is executed without a pathname
+prefix and the pathname search finds a \fB/bin/tee\fR or \fB/usr/bin/tee\fR
+executable.
+.sp
+.LP
+\fBtee\fR copies standard input to standard output and to zero or more files.
+The options determine whether the specified files are overwritten or appended
+to. The tee utility does not buffer output. If a write to a file fails,
+\fBtee\fR continues to write to other files although it exits with a non-zero
+exit status.
+.sp
+.LP
+The number of \fIfile\fR operands that can be specified is limited by the
+underlying operating system.
+.SH OPTIONS
+.SS "/usr/bin/tee"
+.sp
+.LP
+The following options are supported by \fB/usr/bin/tee\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Appends the output to the files rather than overwriting them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Ignores interrupts.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by the \fBtee\fR built-in command in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.br
+.na
+\fB\fB--append\fR\fR
+.ad
+.RS 23n
+.rt
+Appends the output to the files rather than overwriting them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.br
+.na
+\fB\fB--ignore-interrupts\fR\fR
+.ad
+.RS 23n
+.rt
+Ignores \fBSIGINT\fR signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--line-buffer\fR\fR
+.ad
+.RS 23n
+.rt
+Sets the standard output to be line buffered.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of an output file. Processing of at least 13 \fIfile\fR operands
+are supported.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBtee\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtee\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.SS "/usr/bin/tee"
+.sp
+.LP
+The following exit values are returned by \fB/usr/bin/tee\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The standard input was successfully copied to all output files.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+The number of files that could not be opened or whose status could not be
+obtained.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned by \fBtee\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/tee"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBksh93\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/telnet.1 b/usr/src/man/man1/telnet.1
new file mode 100644
index 0000000000..ad41b369a1
--- /dev/null
+++ b/usr/src/man/man1/telnet.1
@@ -0,0 +1,1682 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright (c) 1983, 1990, 1993 The Regents of the University of California. All rights reserved.
+.TH telnet 1 "17 Aug 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+telnet \- user interface to a remote system using the TELNET protocol
+.SH SYNOPSIS
+.LP
+.nf
+\fBtelnet\fR [\fB-8EFKLacdfrx\fR] [\fB-X\fR \fIatype\fR] [\fB-e\fR \fIescape_char\fR]
+ [\fB-k\fR \fIrealm\fR] [\fB-l\fR \fIuser\fR] [\fB-n\fR \fIfile\fR]
+ [ [ [!] @hop1 [@hop2...] @] \fIhost\fR [\fIport\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtelnet\fR utility communicates with another host using the \fBTELNET\fR
+protocol. If \fBtelnet\fR is invoked without arguments, it enters command mode,
+indicated by its prompt, \fBtelnet>\fR. In this mode, it accepts and executes
+its associated commands. See \fBUSAGE\fR. If it is invoked with arguments, it
+performs an \fBopen\fR command with those arguments.
+.sp
+.LP
+If, for example, a \fIhost\fR is specified as \fI@hop1@hop2@host\fR, the
+connection goes through hosts \fIhop1\fR and \fIhop2\fR, using loose source
+routing to end at \fIhost\fR. If a leading \fB!\fR is used, the connection
+follows strict source routing. Notice that when \fBtelnet\fR uses IPv6, it can
+only use loose source routing, and the connection ignores the \fB!\fR.
+.sp
+.LP
+Once a connection has been opened, \fBtelnet\fR enters input mode. In this
+mode, text typed is sent to the remote host. The input mode entered will be
+either "line mode", "character at a time", or "old line by line", depending
+upon what the remote system supports.
+.sp
+.LP
+In "line mode", character processing is done on the local system, under the
+control of the remote system. When input editing or character echoing is to be
+disabled, the remote system will relay that information. The remote system will
+also relay changes to any special characters that happen on the remote system,
+so that they can take effect on the local system.
+.sp
+.LP
+In "character at a time" mode, most text typed is immediately sent to the
+remote host for processing.
+.sp
+.LP
+In "old line by line" mode, all text is echoed locally, and (normally) only
+completed lines are sent to the remote host. The "local echo character"
+(initially \fB^E\fR) may be used to turn off and on the local echo. (Use this
+mostly to enter passwords without the password being echoed.).
+.sp
+.LP
+If the "line mode" option is enabled, or if the \fBlocalchars\fR toggle is
+\fBTRUE\fR (the default in "old line by line" mode), the user's \fBquit\fR,
+\fBintr\fR, and \fBflush\fR characters are trapped locally, and sent as
+\fBTELNET\fR protocol sequences to the remote side. If "line mode" has ever
+been enabled, then the user's \fBsusp\fR and \fBeof\fR are also sent as
+\fBTELNET\fR protocol sequences. \fBquit\fR is then sent as a \fBTELNET
+ABORT\fR instead of \fBBREAK\fR. The options \fBtoggle\fR \fBautoflush\fR and
+\fBtoggle\fR \fBautosynch\fR cause this action to flush subsequent output to
+the terminal (until the remote host acknowledges the \fBTELNET\fR sequence);
+and to flush previous terminal input, in the case of \fBquit\fR and \fBintr\fR.
+.sp
+.LP
+While connected to a remote host, the user can enter \fBtelnet\fR command mode
+by typing the \fBtelnet\fR escape character (initially \fB^]\fR). When in
+command mode, the normal terminal editing conventions are available. Pressing
+RETURN at the \fBtelnet\fR command prompt causes \fBtelnet\fR to exit command
+mode.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-8\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an 8-bit data path. Negotiating the \fBTELNET BINARY\fR option is
+attempted for both input and output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Attempts automatic login. This sends the user name by means of the \fBUSER\fR
+variable of the \fBENVIRON\fR option, if supported by the remote system. The
+name used is that of the current user as returned by \fBgetlogin\fR(3C) if it
+agrees with the current user \fBID\fR. Otherwise, it is the name associated
+with the user \fBID\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables the reading of the user's \fBtelnetrc\fR file. (See the \fBtoggle\fR
+\fBskiprc\fR command on this reference page.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the initial value of the \fBdebug\fR toggle to \fBTRUE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIescape_char\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the initial escape character to \fIescape_char\fR. \fIescape_char\fR may
+also be a two character sequence consisting of \fB^\fR (Control key) followed
+by one character. If the second character is \fB?\fR, the \fBDEL\fR character
+is selected. Otherwise, the second character is converted to a control
+character and used as the escape character. If \fIescape_char\fR is defined as
+the null string (that is, \fB-e\fR \fB\&''\fR), this is equivalent to
+\fB-e\fR '\fB^@\fR' (Control-@). To specify that no character can be the escape
+character, use the \fB-E\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+Stops any character from being recognized as an escape character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forwards a copy of the local credentials to the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fR
+.ad
+.sp .6
+.RS 4n
+Forwards a forwardable copy of the local credentials to the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIrealm\fR\fR
+.ad
+.sp .6
+.RS 4n
+If Kerberos authentication is being used, requests that \fBtelnet\fR obtain
+tickets for the remote host in \fIrealm\fR instead of the remote host's default
+realm as determined in\fBkrb5.conf\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-K\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies no automatic login to the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIuser\fR\fR
+.ad
+.sp .6
+.RS 4n
+When connecting to a remote system that understands the \fBENVIRON\fR option,
+then \fIuser\fR will be sent to the remote system as the value for the
+\fBENVIRON\fR variable \fBUSER\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies an 8-bit data path on output. This causes the \fBBINARY\fR option to
+be negotiated on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fItracefile\fR\fR
+.ad
+.sp .6
+.RS 4n
+Opens \fItracefile\fR for recording trace information. See the \fBset\fR
+\fItracefile\fR command below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.sp .6
+.RS 4n
+Specifies a user interface similar to \fBrlogin\fR. In this mode, the escape
+character is set to the tilde (\fB~\fR) character, unless modified by the
+\fB-e\fR option. The \fBrlogin\fR escape character is only recognized when it
+is preceded by a carriage return. In this mode, the \fBtelnet\fR escape
+character, normally '\fB^]\fR', must still precede a \fBtelnet\fR command. The
+\fBrlogin\fR escape character can also be followed by '\fB\&.\er\fR'
+or '\fB^Z\fR', and, like \fBrlogin\fR(1), closes or suspends the connection,
+respectively. This option is an uncommitted interface and may change in the
+future.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.sp .6
+.RS 4n
+Turns on encryption of the data stream. When this option is turned on,
+\fBtelnet\fR will exit with an error if authentication cannot be negotiated or
+if encryption cannot be turned on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR \fIatype\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables the \fIatype\fR type of authentication.
+.RE
+
+.SH USAGE
+.SS "telnet Commands"
+.sp
+.LP
+The commands described in this section are available with \fBtelnet\fR. It is
+necessary to type only enough of each command to uniquely identify it. (This is
+also true for arguments to the \fBmode\fR, \fBset\fR, \fBtoggle\fR,
+\fBunset\fR, \fBenviron\fR, and \fBdisplay\fR commands.)
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauth\fR \fIargument\fR ...\fR
+.ad
+.sp .6
+.RS 4n
+The \fBauth\fR command manipulates the information sent through the
+\fBTELNET\fR \fBAUTHENTICATE\fR option. Valid arguments for the \fBauth\fR
+command are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisable\fR \fItype\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disables the specified type of authentication. To obtain a list of available
+types, use the \fBauth\fR \fBdisable ?\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBenable\fR \fItype\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enables the specified type of authentication. To obtain a list of available
+types, use the \fBauth\fR \fBenable ?\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists the current status of the various types of authentication.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBopen\fR [\fB\fR\fB-l\fR \fIuser\fR ] [ [!] @\fIhop1\fR
+[@\fIhop2\fR ...]@\fIhost\fR [ \fIport\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Open a connection to the named host. If no port number is specified,
+\fBtelnet\fR will attempt to contact a \fBTELNET\fR server at the default port.
+The host specification may be either a host name (see \fBhosts\fR(4)) or an
+Internet address specified in the "dot notation" (see \fBinet\fR(7P) or
+\fBinet6\fR(7P)). If the \fIhost\fR is specified as \fI@hop1@hop2@host\fR, the
+connection goes through hosts \fIhop1\fR and \fIhop2\fR, using loose source
+routing to end at \fIhost\fR. The \fB@\fR symbol is required as a separator
+between the hosts specified. If a leading \fB!\fR is used with IPv4, the
+connection follows strict source routing.
+.sp
+The \fB-l\fR option passes the \fIuser\fR as the value of the \fBENVIRON\fR
+variable \fBUSER\fR to the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Close any open \fBTELNET\fR session and exit \fBtelnet\fR. An \fBEOF\fR (in
+command mode) will also close a session and exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBencrypt\fR\fR
+.ad
+.sp .6
+.RS 4n
+The encrypt command manipulates the information sent through the \fBTELNET\fR
+\fBENCRYPT\fR option.
+.sp
+Valid arguments for the encrypt command are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisable\fR \fItype\fR [\fBinput\fR|\fBoutput\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Disables the specified type of encryption. If you omit the input and output,
+both input and output are disabled. To obtain a list of available types, use
+the \fBencrypt\fR \fBdisable ?\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBenable\fR \fItype\fR [\fBinput\fR|\fBoutput\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Enables the specified type of encryption. If you omit input and output, both
+input and output are enabled. To obtain a list of available types, use the
+\fBencrypt\fR \fBenable ?\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinput\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the same as the \fBencrypt\fR \fBstart input\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-input\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the same as the \fBencrypt\fR \fBstop input\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutput\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the same as the \fBencrypt\fR \fBstart output\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-output\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the same as the \fBencrypt\fR \fBstop output\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstart\fR [\fBinput\fR|\fBoutput\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Attempts to start encryption. If you omit input and output, both input and
+output are enabled. To obtain a list of available types, use the \fBencrypt\fR
+\fBenable ?\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+Lists the current status of encryption.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR [\fBinput\fR|\fBoutput\fR]\fR
+.ad
+.sp .6
+.RS 4n
+Stops encryption. If you omit input and output, encryption is on both input and
+output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype\fR \fItype\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sets the default type of encryption to be used with later \fBencrypt\fR
+\fBstart\fR or \fBencrypt\fR \fBstop\fR commands.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Same as \fBclose\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBz\fR\fR
+.ad
+.sp .6
+.RS 4n
+Suspend \fBtelnet\fR. This command only works when the user is using a shell
+that supports job control, such as \fBsh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmode\fR \fItype\fR\fR
+.ad
+.sp .6
+.RS 4n
+The remote host is asked for permission to go into the requested mode. If the
+remote host is capable of entering that mode, the requested mode will be
+entered. The argument \fItype\fR is one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcharacter\fR\fR
+.ad
+.sp .6
+.RS 4n
+Disable the \fBTELNET LINEMODE\fR option, or, if the remote side does not
+understand the \fBLINEMODE\fR option, then enter "character at a time" mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBline\fR\fR
+.ad
+.sp .6
+.RS 4n
+Enable the \fBTELNET LINEMODE\fR option, or, if the remote side does not
+understand the \fBLINEMODE\fR option, then attempt to enter "old-line-by-line"
+mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBisig\fR (\fB-isig\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Attempt to enable (disable) the \fBTRAPSIG\fR mode of the \fBLINEMODE\fR
+option. This requires that the \fBLINEMODE\fR option be enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBedit\fR (\fB-edit\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Attempt to enable (disable) the \fBEDIT\fR mode of the \fBLINEMODE\fR option.
+This requires that the \fBLINEMODE\fR option be enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsofttabs\fR (\fB-softtabs\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Attempt to enable (disable) the \fBSOFT_TAB\fR mode of the \fBLINEMODE\fR
+option. This requires that the \fBLINEMODE\fR option be enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlitecho\fR (\fB-litecho\fR)\fR
+.ad
+.sp .6
+.RS 4n
+Attempt to enable (disable) the \fBLIT_ECHO\fR mode of the \fBLINEMODE\fR
+option. This requires that the \fBLINEMODE\fR option be enabled.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints out help information for the \fBmode\fR command.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+Show the current status of \fBtelnet\fR. This includes the peer one is
+connected to, as well as the current mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisplay\fR\fR
+.ad
+.sp .6
+.RS 4n
+[\fIargument\fR\|.\|.\|.\|] Display all, or some, of the \fBset\fR and
+\fBtoggle\fR values (see \fBtoggle\fR \fIargument\fR.\|.\|.).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+[\fIcommand\fR] Get help. With no arguments, \fBtelnet\fR prints a help
+summary. If a command is specified, \fBtelnet\fR will print the help
+information for just that command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsend\fR \fIargument\fR\fB\|.\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send one or more special character sequences to the remote host. The following
+are the arguments that can be specified (more than one argument may be
+specified at a time):
+.sp
+.ne 2
+.mk
+.na
+\fB\fBescape\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the current \fBtelnet\fR escape character (initially \fB^]\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsynch\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET SYNCH\fR sequence. This sequence discards all previously
+typed, but not yet read, input on the remote system. This sequence is sent as
+\fBTCP\fR urgent data and may not work if the remote system is a 4.2 \fBBSD\fR
+system. If it does not work, a lowercase "r" may be echoed on the terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbrk\fR or \fBbreak\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET BRK\fR (Break) sequence, which may have significance to the
+remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBip\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET IP\fR (Interrupt Process) sequence, which aborts the
+currently running process on the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBabort\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET ABORT\fR (Abort Process) sequence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBao\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET AO\fR (Abort Output) sequence, which flushes all output from
+the remote system to the user's terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBayt\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET AYT\fR (Are You There) sequence, to which the remote system
+may or may not respond.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBec\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET EC\fR (Erase Character) sequence, which erases the last
+character entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBel\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET EL\fR (Erase Line) sequence, which should cause the remote
+system to erase the line currently being entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeof\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET EOF\fR (End Of File) sequence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeor\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET EOR\fR (End Of Record) sequence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBga\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET GA\fR (Go Ahead) sequence, which probably has no
+significance for the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBgetstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the remote side supports the \fBTELNET STATUS\fR command, \fBgetstatus\fR
+will send the subnegotiation to request that the server send its current option
+status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnop\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET NOP\fR (No Operation) sequence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsusp\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET SUSP\fR (Suspend Process) sequence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdo\fR \fIoption\fR\fR
+.ad
+.br
+.na
+\fB\fBdont\fR \fIoption\fR\fR
+.ad
+.br
+.na
+\fB\fBwill\fR \fIoption\fR\fR
+.ad
+.br
+.na
+\fB\fBwont\fR \fIoption\fR\fR
+.ad
+.sp .6
+.RS 4n
+Send the \fBTELNET\fR protocol option negotiation indicated. Option may be the
+text name of the protocol option, or the number corresponding to the option.
+The command will be silently ignored if the option negotiation indicated is not
+valid in the current state. If the \fIoption\fR is given as \fBhelp\fR or
+\fB?\fR, the list of option names known is listed. This command is mostly
+useful for unusual debugging situations.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Print out help information for the \fBsend\fR command.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBset\fR \fIargument\fR [\fIvalue\fR]\fR
+.ad
+.br
+.na
+\fB\fBunset\fR \fIargument\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set any one of a number of \fBtelnet\fR variables to a specific value. The
+special value \fBoff\fR turns off the function associated with the variable.
+The values of variables may be interrogated with the \fBdisplay\fR command. If
+\fIvalue\fR is omitted, the value is taken to be true, or "on". If the
+\fBunset\fR form is used, the value is taken to be false, or \fBoff\fR. The
+variables that may be specified are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBecho\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the value (initially \fB^E\fR) that, when in "line by line" mode,
+toggles between local echoing of entered characters for normal processing, and
+suppressing echoing of entered characters, for example, entering a password.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBescape\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the \fBtelnet\fR escape character (initially \fB^]\fR) that enters
+\fBtelnet\fR command mode when connected to a remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinterrupt\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode (see \fBtoggle\fR,
+\fBlocalchars\fR) and the \fBinterrupt\fR character is typed, a \fBTELNET IP\fR
+sequence (see \fBsend\fR and \fBip\fR) is sent to the remote host. The initial
+value for the interrupt character is taken to be the terminal's \fBintr\fR
+character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquit\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode and the \fBquit\fR character is
+typed, a \fBTELNET BRK\fR sequence (see \fBsend\fR, \fBbrk\fR) is sent to the
+remote host. The initial value for the quit character is taken to be the
+terminal's \fBquit\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBflushoutput\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode and the \fBflushoutput\fR character
+is typed, a \fBTELNET AO\fR sequence (see \fBsend\fR, \fBao\fR) is sent to the
+remote host. The initial value for the flush character is taken to be the
+terminal's \fBflush\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBerase\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode \fIand\fR operating in "character
+at a time" mode, then when the \fBerase\fR character is typed, a \fBTELNET
+EC\fR sequence (see \fBsend\fR, \fBec\fR) is sent to the remote system. The
+initial value for the \fBerase\fR character is taken to be the terminal's
+\fBerase\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBkill\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode \fIand\fR operating in "character
+at a time" mode, then when the \fBkill\fR character is typed, a \fBTELNET EL\fR
+sequence (see \fBsend\fR, \fBel\fR) is sent to the remote system. The initial
+value for the \fBkill\fR character is taken to be the terminal's \fBkill\fR
+character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeof\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is operating in "line by line"/ mode, entering the \fBeof\fR
+character as the first character on a line sends this character to the remote
+system. The initial value of \fBeof\fR is taken to be the terminal's \fBeof\fR
+character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBayt\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode, or \fBLINEMODE\fR is enabled, and
+the status character is typed, a \fBTELNET AYT\fR ("Are You There") sequence is
+sent to the remote host. (See \fBsend\fR, \fBayt\fR above.) The initial value
+for \fBayt\fR is the terminal's status character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBforw1\fR\fR
+.ad
+.br
+.na
+\fB\fBforw2\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is operating in \fBLINEMODE,\fR and the \fBforw1\fR or
+\fBforw2\fR characters are typed, this causes the forwarding of partial lines
+to the remote system. The initial values for the forwarding characters come
+from the terminal's \fBeol\fR and \fBeol2\fR characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlnext\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is operating in \fBLINEMODE\fR or "old line by line" mode, then
+the \fBlnext\fR character is assumed to be the terminal's \fBlnext\fR
+character. The initial value for the \fBlnext\fR character is taken to be the
+terminal's \fBlnext\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreprint\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is operating in \fBLINEMODE\fR or "old line by line" mode, then
+the \fBreprint\fR character is assumed to be the terminal's \fBreprint\fR
+character. The initial value for \fBreprint\fR is taken to be the terminal's
+\fBreprint\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrlogin\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the \fBrlogin\fR escape character. If set, the normal \fBtelnet\fR
+escape character is ignored, unless it is preceded by this character at the
+beginning of a line. The \fBrlogin\fR character, at the beginning of a line
+followed by a "\fB\&.\fR" closes the connection. When followed by a \fB^Z\fR,
+the \fBrlogin\fR command suspends the \fBtelnet\fR command. The initial state
+is to disable the \fBrlogin\fR escape character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstart\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the \fBTELNET TOGGLE-FLOW-CONTROL\fR option has been enabled, then the
+\fBstart\fR character is taken to be the terminal's \fBstart\fR character. The
+initial value for the \fBkill\fR character is taken to be the terminal's
+\fBstart\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstop\fR\fR
+.ad
+.sp .6
+.RS 4n
+If the \fBTELNET TOGGLE-FLOW-CONTROL\fR option has been enabled, then the
+\fBstop\fR character is taken to be the terminal's \fBstop\fR character. The
+initial value for the \fBkill\fR character is taken to be the terminal's
+\fBstop\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsusp\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is in \fBlocalchars\fR mode, or \fBLINEMODE\fR is enabled, and
+the \fBsuspend\fR character is typed, a \fBTELNET SUSP\fR sequence (see
+\fBsend\fR, \fBsusp\fR above) is sent to the remote host. The initial value for
+the \fBsuspend\fR character is taken to be the terminal's \fBsuspend\fR
+character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtracefile\fR\fR
+.ad
+.sp .6
+.RS 4n
+This is the file to which the output, generated when the \fBnetdata\fR or the
+\fBdebug\fR option is \fBTRUE\fR, will be written. If \fBtracefile\fR is set to
+"\fB-\fR", then tracing information will be written to standard output (the
+default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBworderase\fR\fR
+.ad
+.sp .6
+.RS 4n
+If \fBtelnet\fR is operating in \fBLINEMODE\fR or "old line by line" mode, then
+this character is taken to be the terminal's \fBworderase\fR character. The
+initial value for the \fBworderase\fR character is taken to be the terminal's
+\fBworderase\fR character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Displays the legal \fBset\fR and \fBunset\fR commands.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBslc\fR \fIstate\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBslc\fR (Set Local Characters) command is used to set or change the state
+of special characters when the \fBTELNET LINEMODE\fR option has been enabled.
+Special characters are characters that get mapped to \fBTELNET\fR commands
+sequences (like \fBip\fR or \fBquit\fR) or line editing characters (like
+\fBerase\fR and \fBkill\fR). By default, the local special characters are
+exported. The following values for \fIstate\fR are valid:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcheck\fR\fR
+.ad
+.sp .6
+.RS 4n
+Verifies the settings for the current special characters. The remote side is
+requested to send all the current special character settings. If there are any
+discrepancies with the local side, the local settings will switch to the remote
+values.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Switches to the local defaults for the special characters. The local default
+characters are those of the local terminal at the time when \fBtelnet\fR was
+started.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBimport\fR\fR
+.ad
+.sp .6
+.RS 4n
+Switches to the remote defaults for the special characters. The remote default
+characters are those of the remote system at the time when the \fBTELNET\fR
+connection was established.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints out help information for the \fBslc\fR command.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtoggle\fR \fIargument\fR...\fR
+.ad
+.sp .6
+.RS 4n
+Toggle between \fBTRUE\fR and \fBFALSE\fR the various flags that control how
+\fBtelnet\fR responds to events. More than one argument may be specified. The
+state of these flags may be interrogated with the \fBdisplay\fR command. Valid
+arguments are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBauthdebug\fR\fR
+.ad
+.RS 20n
+.rt
+Turns on debugging information for the authentication code.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBautodecrypt\fR\fR
+.ad
+.RS 20n
+.rt
+When the \fBTELNET\fR \fBENCRYPT\fR option is negotiated, by default the actual
+encryption (decryption) of the data stream does not start automatically. The
+autoencrypt (autodecrypt) command states that encryption of the output (input)
+stream should be enabled as soon as possible.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBautologin\fR\fR
+.ad
+.RS 20n
+.rt
+If the remote side supports the \fBTELNET\fR \fBAUTHENTICATION\fR option,
+\fBtelnet\fR attempts to use it to perform automatic authentication. If the
+\fBAUTHENTICATION\fR option is not supported, the user's login name is
+propagated through the \fBTELNET\fR \fBENVIRON\fR option. This command is the
+same as specifying the \fB-a\fR option on the \fBopen\fR command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBautoflush\fR\fR
+.ad
+.RS 20n
+.rt
+If \fBautoflush\fR and \fBlocalchars\fR are both \fBTRUE,\fR then when the
+\fBao\fR, \fBintr\fR, or \fBquit\fR characters are recognized (and transformed
+into \fBTELNET\fR sequences; see \fBset\fR for details), \fBtelnet\fR refuses
+to display any data on the user's terminal until the remote system acknowledges
+(using a \fBTELNET\fR Timing Mark option) that it has processed those
+\fBTELNET\fR sequences. The initial value for this toggle is \fBTRUE\fR if the
+terminal user has not done an "stty noflsh". Otherwise, the value is
+\fBFALSE\fR (see \fBstty\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBautosynch\fR\fR
+.ad
+.RS 20n
+.rt
+If \fBautosynch\fR and \fBlocalchars\fR are both \fBTRUE\fR, then when either
+the \fBinterrupt\fR or \fBquit\fR characters are typed (see \fBset\fR for
+descriptions of \fBinterrupt\fR and \fBquit\fR), the resulting \fBTELNET\fR
+sequence sent is followed by the \fBTELNET SYNCH\fR sequence. This procedure
+\fIshould\fR cause the remote system to begin throwing away all previously
+typed input until both of the \fBTELNET\fR sequences have been read and acted
+upon. The initial value of this toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbinary\fR\fR
+.ad
+.RS 20n
+.rt
+Enable or disable the \fBTELNET BINARY\fR option on both input and output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinbinary\fR\fR
+.ad
+.RS 20n
+.rt
+Enable or disable the \fBTELNET BINARY\fR option on input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoutbinary\fR\fR
+.ad
+.RS 20n
+.rt
+Enable or disable the \fBTELNET BINARY\fR option on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrlf\fR\fR
+.ad
+.RS 20n
+.rt
+Determines how carriage returns are sent. If the value is \fBTRUE\fR, then
+carriage returns will be sent as \fB<CR><LF>\fR\&. If the value is \fBFALSE\fR,
+then carriage returns will be send as \fB<CR><NUL>\fR\&. The initial value for
+this toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcrmod\fR\fR
+.ad
+.RS 20n
+.rt
+Toggle RETURN mode. When this mode is enabled, most RETURN characters received
+from the remote host will be mapped into a RETURN followed by a line feed. This
+mode does not affect those characters typed by the user, only those received
+from the remote host. This mode is useful only for remote hosts that send
+RETURN but never send LINEFEED. The initial value for this toggle is
+\fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdebug\fR\fR
+.ad
+.RS 20n
+.rt
+Toggle socket level debugging (only available to the super-user). The initial
+value for this toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBencdebug\fR\fR
+.ad
+.RS 20n
+.rt
+Turns on debugging information for the encryption code.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlocalchars\fR\fR
+.ad
+.RS 20n
+.rt
+If this toggle is \fBTRUE\fR, then the \fBflush\fR, \fBinterrupt\fR,
+\fBquit\fR, \fBerase\fR, and \fBkill\fR characters (see \fBset\fR) are
+recognized locally, and transformed into appropriate \fBTELNET\fR control
+sequences, respectively \fBao\fR, \fBip\fR, \fBbrk\fR, \fBec\fR, and \fBel\fR
+(see \fBsend\fR). The initial value for this toggle is \fBTRUE\fR in "line by
+line" mode, and \fBFALSE\fR in "character at a time" mode. When the
+\fBLINEMODE\fR option is enabled, the value of \fBlocalchars\fR is ignored, and
+assumed always to be \fBTRUE\fR. If \fBLINEMODE\fR has ever been enabled, then
+\fBquit\fR is sent as \fBabort\fR, and \fBeof\fR and \fBsuspend\fR are sent as
+\fBeof\fR and \fBsusp\fR (see \fBsend\fR above).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnetdata\fR\fR
+.ad
+.RS 20n
+.rt
+Toggle the display of all network data (in hexadecimal format). The initial
+value for this toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBoptions\fR\fR
+.ad
+.RS 20n
+.rt
+Toggle the display of some internal \fBTELNET\fR protocol processing (having to
+do with \fBtelnet\fR options). The initial value for this toggle is
+\fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprettydump\fR\fR
+.ad
+.RS 20n
+.rt
+When the \fBnetdata\fR toggle is enabled, if \fBprettydump\fR is enabled, the
+output from the \fBnetdata\fR command will be formatted in a more user readable
+format. Spaces are put between each character in the output. The beginning of
+any \fBTELNET\fR escape sequence is preceded by an asterisk (\fB*\fR) to aid in
+locating them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBskiprc\fR\fR
+.ad
+.RS 20n
+.rt
+When the \fBskiprc\fR toggle is \fBTRUE\fR, \fBTELNET\fR skips the reading of
+the \fB\&.telnetrc\fR file in the user's home directory when connections are
+opened. The initial value for this toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtermdata\fR\fR
+.ad
+.RS 20n
+.rt
+Toggles the display of all terminal data (in hexadecimal format). The initial
+value for this toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose_encrypt\fR\fR
+.ad
+.RS 20n
+.rt
+When the \fBverbose_encrypt\fR flag is \fBTRUE\fR, \fBTELNET\fR prints out a
+message each time encryption is enabled or disabled. The initial value for this
+toggle is \fBFALSE\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.RS 20n
+.rt
+Display the legal \fBtoggle\fR commands.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBenviron\fR \fIargument\|.\|.\|.\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBenviron\fR command is used to manipulate variables that may be sent
+through the \fBTELNET ENVIRON\fR option. The initial set of variables is taken
+from the users environment. Only the \fBDISPLAY\fR and \fBPRINTER\fR variables
+are exported by default. Valid arguments for the \fBenviron\fR command are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdefine\fR \fIvariable value\fR\fR
+.ad
+.sp .6
+.RS 4n
+Define \fIvariable\fR to have a value of \fIvalue\fR. Any variables defined by
+this command are automatically exported. The \fIvalue\fR may be enclosed in
+single or double quotes, so that tabs and spaces may be included.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBundefine\fR \fIvariable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Remove \fIvariable\fR from the list of environment variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexport\fR \fIvariable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mark the \fIvariable\fR to be exported to the remote side.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBunexport\fR \fIvariable\fR\fR
+.ad
+.sp .6
+.RS 4n
+Mark the \fIvariable\fR to not be exported unless explicitly requested by the
+remote side.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlist\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the current set of environment variables. Those marked with an asterisk
+(\fB*\fR) will be sent automatically. Other variables will be sent only if
+explicitly requested.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR\fR
+.ad
+.sp .6
+.RS 4n
+Prints out help information for the \fBenviron\fR command.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlogout\fR\fR
+.ad
+.sp .6
+.RS 4n
+Sends the \fBtelnet logout\fR option to the remote side. This command is
+similar to a \fBclose\fR command. However, if the remote side does not support
+the \fBlogout\fR option, nothing happens. If, however, the remote side does
+support the \fBlogout\fR option, this command should cause the remote side to
+close the \fBTELNET\fR connection. If the remote side also supports the concept
+of suspending a user's session for later reattachment, the \fBlogout\fR
+argument indicates that the remote side should terminate the session
+immediately.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB$HOME/.telnetrc\fR\fR
+.ad
+.RS 19n
+.rt
+file that contains commands to be executed before initiating a \fBtelnet\fR
+session
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBrlogin\fR(1), \fBsh\fR(1), \fBstty\fR(1), \fBgetlogin\fR(3C),
+\fBhosts\fR(4), \fBkrb5.conf\fR(4), \fBnologin\fR(4), \fBtelnetrc\fR(4),
+\fBattributes\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBNO LOGINS: System going down in\fR \fIN\fR \fBminutes\fR\fR
+.ad
+.sp .6
+.RS 4n
+The machine is in the process of being shut down and logins have been disabled.
+.RE
+
+.SH NOTES
+.sp
+.LP
+On some remote systems, echo has to be turned off manually when in "line by
+line" mode.
+.sp
+.LP
+In "old line by line" mode, or \fBLINEMODE\fR, the terminal's \fBEOF\fR
+character is only recognized (and sent to the remote system) when it is the
+first character on a line.
+.sp
+.LP
+The \fBtelnet\fR protocol only uses single DES for session
+protection\(emclients request service tickets with single DES session keys. The
+KDC must know that host service principals that offer the \fBtelnet\fR service
+support single DES, which, in practice, means that such principals must have
+single DES keys in the KDC database.
diff --git a/usr/src/man/man1/test.1 b/usr/src/man/man1/test.1
new file mode 100644
index 0000000000..098c7062f8
--- /dev/null
+++ b/usr/src/man/man1/test.1
@@ -0,0 +1,1184 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH test 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+test \- evaluate condition(s)
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/test\fR [\fIcondition\fR]
+.fi
+
+.LP
+.nf
+\fB[\fR [\fIcondition\fR] ]
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBtest\fR [\fIcondition\fR]
+.fi
+
+.LP
+.nf
+\fB[\fR [\fIcondition\fR] ]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBtest\fR [\fIcondition\fR]
+.fi
+
+.LP
+.nf
+\fB[\fR [\fIcondition\fR] ]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBtest\fR [\fIcondition\fR]
+.fi
+
+.LP
+.nf
+\fB[\fR [\fIcondition\fR] ]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBtest\fR [\fIcondition\fR]
+.fi
+
+.LP
+.nf
+\fB[\fR [\fIcondition\fR] ]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtest\fR utility evaluates the \fIcondition\fR and indicates the result
+of the evaluation by its exit status. An exit status of zero indicates that the
+condition evaluated as true and an exit status of 1 indicates that the
+condition evaluated as false.
+.sp
+.LP
+In the first form of the utility shown using the SYNOPSIS:
+.sp
+.in +2
+.nf
+test [\fIcondition\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the square brackets denote that \fIcondition\fR is an optional operand and are
+not to be entered on the command line.
+.sp
+.LP
+In the second form of the utility shown using the SYNOPSIS:
+.sp
+.in +2
+.nf
+\fB[\fR [ \fIcondition\fR ] \fB]\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the first open square bracket, \fB[\fR, is the required utility name.
+\fIcondition\fR is optional, as denoted by the inner pair of square brackets.
+The final close square bracket, \fB]\fR, is a required operand.
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBtest\fR when
+encountering files greater than or equal to 2 Gbyte (2^31 bytes).
+.sp
+.LP
+The \fBtest\fR and \fB[\fR utilities evaluate the condition \fIcondition\fR
+and, if its value is true, set exit status to \fB0\fR. Otherwise, a non-zero
+(false) exit status is set. \fBtest\fR and \fB[\fR also set a non-zero exit
+status if there are no arguments. When permissions are tested, the effective
+user \fBID\fR of the process is used.
+.sp
+.LP
+All operators, flags, and brackets (brackets used as shown in the last SYNOPSIS
+line) must be separate arguments to these commands. Normally these arguments
+are separated by spaces.
+.SH OPERANDS
+.sp
+.LP
+The primaries listed below with two elements of the form:
+.sp
+.in +2
+.nf
+\fI-primary_operator primary_operand\fR
+.fi
+.in -2
+
+.sp
+.LP
+are known as \fBunary primaries\fR. The primaries with three elements in either
+of the two forms:
+.sp
+.in +2
+.nf
+\fIprimary_operand -primary_operator primary_operand
+primary_operand primary_operator primary_operand\fR
+.fi
+.in -2
+
+.sp
+.LP
+are known as \fBbinary primaries\fR.
+.sp
+.LP
+If any file operands except for \fB-h\fR and \fB-L\fR primaries refer to
+symbolic links, the symbolic link is expanded and the test is performed on the
+resulting file.
+.sp
+.LP
+If you test a file you own (the \fB-r\fR \fB-w\fR or \fB-x\fR tests), but the
+permission tested does not have the \fIowner\fR bit set, a non-zero (false)
+exit status is returned even though the file can have the \fBgroup\fR or
+\fBother\fR bit set for that permission.
+.sp
+.LP
+The \fB=\fR and \fB!=\fR primaries have a higher precedence than the unary
+primaries. The \fB=\fR and \fB!=\fR primaries always expect arguments;
+therefore, \fB=\fR and \fB!=\fR cannot be used as an argument to the unary
+primaries.
+.sp
+.LP
+The following primaries can be used to construct \fIcondition\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists. (Not available in \fBsh\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a block special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a character special file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists. (Not available in \fBsh\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a regular file. Alternatively, if
+\fB/usr/bin/sh\fR users specify \fB/usr/ucb\fR before \fB/usr/bin\fR in their
+\fBPATH\fR environment variable, then \fBtest\fR returns true if \fIfile\fR
+exists and is (\fBnot\(mia\(midirectory\fR). The \fBcsh\fR \fBtest\fR and
+\fB[\fR built-ins always use this alternative behavior.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-g\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and its set group \fBID\fR flag is set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-G\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and its group matches the effective group \fBID\fR of
+this process. (Not available in \fBsh\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a symbolic link.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and has its sticky bit set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a symbolic link.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIstring\fR\fR
+.ad
+.RS 28n
+.rt
+True if the length of \fIstring\fR is non-zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoption\fR\fR
+.ad
+.RS 28n
+.rt
+True if option named \fIoption\fR is on. This option is not available in
+\fBcsh\fR or \fBsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-O\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is owned by the effective user \fBID\fR of this
+process. This option is not available in \fBsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR is a named pipe (\fBFIFO\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is readable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and has a size greater than zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is a socket. This option is not available in
+\fBsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR [\fIfile_descriptor\fR]\fR
+.ad
+.RS 28n
+.rt
+True if the file whose file descriptor number is \fIfile_descriptor\fR is open
+and is associated with a terminal. If \fIfile_descriptor\fR is not specified,
+\fB1\fR is used as a default value.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and its set-user-ID flag is set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is writable. True indicates only that the write
+flag is on. The \fIfile\fR is not writable on a read-only file system even if
+this test indicates true.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIfile\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile\fR exists and is executable. True indicates only that the
+execute flag is on. If \fIfile\fR is a directory, true indicates that
+\fIfile\fR can be searched.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR \fIstring\fR\fR
+.ad
+.RS 28n
+.rt
+True if the length of string \fIstring\fR is zero.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fB-nt\fR \fIfile2\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile1\fR exists and is newer than \fIfile2\fR. This option is not
+available in \fBsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fB-ot\fR \fIfile2\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile1\fR exists and is older than \fIfile2\fR. This option is not
+available in \fBsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile1\fR \fB-ef\fR \fIfile2\fR\fR
+.ad
+.RS 28n
+.rt
+True if \fIfile1\fR and \fIfile2\fR exist and refer to the same file. This
+option is not available in \fBsh\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring\fR\fR
+.ad
+.RS 28n
+.rt
+True if the string \fIstring\fR is not the null string.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring1\fR \fB=\fR \fIstring2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the strings \fIstring1\fR and \fIstring2\fR are identical.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring1\fR \fB!=\fR \fIstring2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the strings \fIstring1\fR and \fIstring2\fR are not identical.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR \fB-eq\fR \fIn2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the numbers \fIn1\fR and \fIn2\fR are algebraically equal. A number may
+be integer, floating point or floating-point constant (such as [+/-]Inf,
+[+/-]NaN) in any format specified by C99/XPG6/SUS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR \fB-ne\fR \fIn2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the numbers \fIn1\fR and \fIn2\fR are not algebraically equal. A number
+may be integer, floating point or floating-point constant (such as [+/-]Inf,
+[+/-]NaN) in any format specified by C99/XPG6/SUS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR \fB-gt\fR \fIn2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the number \fIn1\fR is algebraically greater than the number \fIn2\fR.
+A number may be integer, floating point or floating-point constant (such as
+[+/-]Inf, [+/-]NaN) in any format specified by C99/XPG6/SUS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR \fB-ge\fR \fIn2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the number \fIn1\fR is algebraically greater than or equal to the
+number \fIn2\fR. A number may be integer, floating point or floating-point
+constant (such as [+/-]Inf, [+/-]NaN) in any format specified by C99/XPG6/SUS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR \fB-lt\fR \fIn2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the number \fIn1\fR is algebraically less than the number \fIn2\fR. A
+number may be integer, floating point or floating-point constant (such as
+[+/-]Inf, [+/-]NaN) in any format specified by C99/XPG6/SUS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIn1\fR \fB-le\fR \fIn2\fR\fR
+.ad
+.RS 28n
+.rt
+True if the number \fIn1\fR is algebraically less than or equal to the number
+\fIn2\fR. A number may be integer, floating point or floating-point constant
+(such as [+/-]Inf, [+/-]NaN) in any format specified by C99/XPG6/SUS.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcondition1\fR \fB-a\fR \fIcondition2\fR\fR
+.ad
+.RS 28n
+.rt
+True if both \fIcondition1\fR and \fIcondition2\fR are true. The \fB-a\fR
+binary primary is left associative and has higher precedence than the \fB-o\fR
+binary primary.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcondition1\fR \fB-o\fR \fIcondition2\fR\fR
+.ad
+.RS 28n
+.rt
+True if either \fIcondition1\fR or \fIcondition2\fR is true. The \fB-o\fR
+binary primary is left associative.
+.RE
+
+.sp
+.LP
+These primaries can be combined with the following operators:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB!\fR \fIcondition\fR\fR
+.ad
+.RS 17n
+.rt
+True if \fIcondition\fR is false.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB( \fIcondition\fR )\fR
+.ad
+.RS 17n
+.rt
+True if condition is true. The parentheses ( ) can be used to alter the normal
+precedence and associativity. The parentheses are meaningful to the shell and,
+therefore, must be quoted.
+.RE
+
+.sp
+.LP
+The algorithm for determining the precedence of the operators and the return
+value that is generated is based on the number of arguments presented to
+\fBtest\fR. (However, when using the \fB[...]\fR form, the right-bracket final
+argument is not counted in this algorithm.)
+.sp
+.LP
+In the following list, \fB$1\fR, \fB$2\fR, \fB$3\fR and \fB$4\fR represent the
+arguments presented to \fBtest\fR as a \fIcondition\fR, \fIcondition1\fR, or
+\fIcondition2\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fI0 arguments:\fR\fR
+.ad
+.RS 16n
+.rt
+Exit false (1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fI1 argument:\fR\fR
+.ad
+.RS 16n
+.rt
+Exit true (0) if \fB$1\fR is not null. Otherwise, exit false.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fI2 arguments:\fR\fR
+.ad
+.RS 16n
+.rt
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB$1\fR is \fB!\fR, exit true if \fB$2\fR is null, false if \fB$2\fR is not
+null.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB$1\fR is a unary primary, exit true if the unary test is true, false if
+the unary test is false.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, produce unspecified results.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fI3 arguments:\fR\fR
+.ad
+.RS 16n
+.rt
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB$2\fR is a binary primary, perform the binary test of \fB$1\fR and
+\fB$3\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB$1\fR is \fB!\fR, negate the two-argument test of \fB$2\fR and \fB$3\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, produce unspecified results.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fI4 arguments:\fR\fR
+.ad
+.RS 16n
+.rt
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fB$1\fR is \fB!\fR, negate the three-argument test of \fB$2\fR, \fB$3\fR,
+and \fB$4\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Otherwise, the results are unspecified.
+.RE
+.RE
+
+.SH USAGE
+.sp
+.LP
+Scripts should be careful when dealing with user-supplied input that could be
+confused with primaries and operators. Unless the application writer knows all
+the cases that produce input to the script, invocations like \fBtest "$1" -a
+"$2"\fR should be written as \fBtest "$1" && test "$2"\fR to avoid problems if
+a user supplied values such as \fB$1\fR set to \fB!\fR and \fB$2\fR set to the
+null string. That is, in cases where maximal portability is of concern, replace
+\fBtest expr1 -a expr2\fR with \fBtest expr1 && test expr2\fR, and replace
+\fBtest expr1 -o expr2\fR with \fBtest expr1 || test expr2\fR. But notice that,
+in \fBtest\fR, \fB-a\fR has \fBhigher\fR precedence than \fB-o\fR, while
+\fB&&\fR and \fB||\fR have \fBequal\fR precedence in the shell.
+.sp
+.LP
+Parentheses or braces can be used in the shell command language to effect
+grouping.
+.sp
+.LP
+Parentheses must be escaped when using \fBsh\fR. For example:
+.sp
+.in +2
+.nf
+test \e( expr1 -a expr2 \e) -o expr3
+.fi
+.in -2
+
+.sp
+.LP
+This command is not always portable outside XSI-conformant systems. The
+following form can be used instead:
+.sp
+.in +2
+.nf
+( test expr1 && test expr2 ) || test expr3
+.fi
+.in -2
+
+.sp
+.LP
+The two commands:
+.sp
+.in +2
+.nf
+test "$1"
+test ! "$1"
+.fi
+.in -2
+
+.sp
+.LP
+could not be used reliably on some historical systems. Unexpected results would
+occur if such a \fIstring\fR condition were used and \fB$1\fR expanded to
+\fB!\fR, \fB(\fR, or a known unary primary. Better constructs are,
+respectively,
+.sp
+.in +2
+.nf
+test -n "$1"
+test -z "$1"
+.fi
+.in -2
+
+.sp
+.LP
+Historical systems have also been unreliable given the common construct:
+.sp
+.in +2
+.nf
+test "$response" = "expected string"
+.fi
+.in -2
+
+.sp
+.LP
+One of the following is a more reliable form:
+.sp
+.in +2
+.nf
+test "X$response" = "Xexpected string"
+test "expected string" = "$response"
+.fi
+.in -2
+
+.sp
+.LP
+The second form assumes that \fBexpected string\fR could not be confused with
+any unary primary. If \fBexpected string\fR starts with \fB\(mi\fR, \fB(\fR,
+\fB!\fR or even \fB=\fR, the first form should be used instead. Using the
+preceding rules without the marked extensions, any of the three comparison
+forms is reliable, given any input. (However, observe that the strings are
+quoted in all cases.)
+.sp
+.LP
+Because the string comparison binary primaries, \fB=\fR and \fB!=\fR, have a
+higher precedence than any unary primary in the >4 argument case, unexpected
+results can occur if arguments are not properly prepared. For example, in
+.sp
+.in +2
+.nf
+test -d $1 -o -d $2
+.fi
+.in -2
+
+.sp
+.LP
+If \fB$1\fR evaluates to a possible directory name of \fB=\fR, the first three
+arguments are considered a string comparison, which causes a syntax error when
+the second \fB-d\fR is encountered. is encountered. One of the following forms
+prevents this; the second is preferred:
+.sp
+.in +2
+.nf
+test \e( -d "$1" \e) -o \e( -d "$2" \e)
+test -d "$1" || test -d "$2"
+.fi
+.in -2
+
+.sp
+.LP
+Also in the >4 argument case:
+.sp
+.in +2
+.nf
+test "$1" = "bat" -a "$2" = "ball"
+.fi
+.in -2
+
+.sp
+.LP
+Syntax errors occur if \fB$1\fR evaluates to \fB(\fR or \fB!\fR. One of the
+following forms prevents this; the third is preferred:
+.sp
+.in +2
+.nf
+test "X$1" = "Xbat" -a "X$2" = "Xball"
+test "$1" = "bat" && test "$2" = "ball"
+test "X$1" = "Xbat" && test "X$2" = "Xball"
+.fi
+.in -2
+
+.SH EXAMPLES
+.sp
+.LP
+In the \fBif\fR command examples, three conditions are tested, and if all three
+evaluate as true or successful, then their validities are written to the
+screen. The three tests are:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if a variable set to 1 is greater than 0,
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if a variable set to 2 is equal to 2, and
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+if the word \fBroot\fR is included in the text file \fB/etc/passwd\fR.
+.RE
+.SS "/usr/bin/test"
+.LP
+\fBExample 1 \fRUsing /usr/bin/test
+.sp
+.LP
+Perform a \fBmkdir\fR if a directory does not exist:
+
+.sp
+.in +2
+.nf
+test ! -d tempdir && mkdir tempdir
+.fi
+.in -2
+
+.sp
+.LP
+Wait for a file to become non-readable:
+
+.sp
+.in +2
+.nf
+while test -r thefile
+do
+ sleep 30
+done
+echo'"thefile" is no longer readable'
+.fi
+.in -2
+
+.sp
+.LP
+Perform a command if the argument is one of three strings (two variations),
+using the open bracket version \fB[\fR of the \fBtest\fR command:
+
+.sp
+.in +2
+.nf
+if [ "$1" = "pear" ] || [ "$1" = "grape" ] || [ "$1" = "apple" ]
+then
+ command
+fi
+case "$1" in
+ pear|grape|apple) command;;
+esac
+.fi
+.in -2
+
+.LP
+\fBExample 2 \fRUsing /usr/bin/test for the -e option
+.sp
+.LP
+If one really wants to use the \fB-e\fR option in \fBsh\fR, use
+\fB/usr/bin/test\fR, as in the following:
+
+.sp
+.in +2
+.nf
+if [ ! -h $PKG_INSTALL_ROOT$rLink ] && /usr/bin/test -e
+$PKG_INSTALL_ROOT/usr/bin/$rFile ; then
+ ln -s $rFile $PKG_INSTALL_ROOT$rLink
+fi
+.fi
+.in -2
+
+.SS "The test built-in"
+.sp
+.LP
+The two forms of the \fBtest\fR built-in follow the Bourne shell's \fBif\fR
+example.
+.LP
+\fBExample 3 \fRUsing the sh built-in
+.sp
+.in +2
+.nf
+ZERO=0 ONE=1 TWO=2 ROOT=root
+
+if [ $ONE \fB-gt\fR $ZERO ]
+
+[ $TWO \fB-eq\fR 2 ]
+
+grep $ROOT /etc/passwd >&1 > /dev/null \fI# discard output\fR
+
+then
+
+ echo "$ONE is greater than 0, $TWO equals 2, and $ROOT is" \e
+ "a user-name in the password file"
+
+else
+
+ echo "At least one of the three test conditions is false"
+fi
+.fi
+.in -2
+
+.LP
+\fBExample 4 \fRUsing the test built-in
+.sp
+.LP
+Examples of the \fBtest\fR built-in:
+
+.sp
+.in +2
+.nf
+test \(gagrep $ROOT /etc/passwd >&1 /dev/null\(ga \fI# discard output\fR
+
+echo $? \fI# test for success\fR
+[ \(gagrep nosuchname /etc/passwd >&1 /dev/null\(ga ]
+
+echo $? \fI# test for failure\fR
+.fi
+.in -2
+
+.SS "csh"
+.LP
+\fBExample 5 \fRUsing the csh built-in
+.sp
+.in +2
+.nf
+@ ZERO = 0; @ ONE = 1; @ TWO = 2; set ROOT = root
+grep $ROOT /etc/passwd >&1 /dev/null \fI# discard output\fR
+ \fI# $status must be tested for immediately following grep\fR
+if ( "$status" == "0" && $ONE > $ZERO && $TWO == 2 ) then
+ echo "$ONE is greater than 0, $TWO equals 2, and $ROOT is" \e
+ "a user-name in the password file"
+ endif
+.fi
+.in -2
+
+.SS "ksh"
+.LP
+\fBExample 6 \fRUsing the ksh/ksh93 built-in
+.sp
+.in +2
+.nf
+ZERO=0 ONE=1 TWO=$((ONE+ONE)) ROOT=root
+if ((ONE > ZERO)) \fI# arithmetical comparison\fR
+ [[ $TWO = 2 ]] \fI# string comparison\fR
+ [ \(gagrep $ROOT /etc/passwd >&1 /dev/null\(ga ] \fI# discard output\fR
+then
+ echo "$ONE is greater than 0, $TWO equals 2, and $ROOT is" \e
+ "a user-name in the password file"
+
+else
+ echo "At least one of the three test conditions is false"
+fi
+.fi
+.in -2
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtest\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+\fIcondition\fR evaluated to true.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+\fIcondition\fR evaluated to false or \fIcondition\fR was missing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/test, csh, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityUncommitted
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1), \fBtest\fR(1B),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+The \fBnot\(mia\(midirectory\fR alternative to the \fB-f\fR option is a
+transition aid for \fBBSD\fR applications and may not be supported in future
+releases.
+.SS "XPG4 \fBsh\fR, \fBksh\fR, \fBksh93\fR"
+.sp
+.LP
+Use arithmetic expressions such as
+.sp
+.in +2
+.nf
+$(( x > 3.1 )) #
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+instead of
+.sp
+.in +2
+.nf
+$ /usr/bin/test "$x" -gt 3.1 # )
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+when comparing two floating-point variables or a constant and a floating-point
+variable to prevent rounding errors (caused by the base16 to base10
+transformation) to affect the result. Additionally the built-in arithmetic
+support in XPG4 \fBsh\fR, \fBksh\fR and \fBksh93\fR is significantly faster
+because it does not require the explicit transformation to strings for each
+comparison.
diff --git a/usr/src/man/man1/tftp.1 b/usr/src/man/man1/tftp.1
new file mode 100644
index 0000000000..04a0a938e2
--- /dev/null
+++ b/usr/src/man/man1/tftp.1
@@ -0,0 +1,322 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (C) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tftp 1 "7 May 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+tftp \- trivial file transfer program
+.SH SYNOPSIS
+.LP
+.nf
+\fBtftp\fR [\fIhost\fR [\fIport\fR]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBtftp\fR is the user interface to the Internet \fBTFTP\fR (Trivial File
+Transfer Protocol), which allows users to transfer files to and from a remote
+machine. The remote \fIhost\fR and optional \fIport\fR may be specified on the
+command line, in which case \fBtftp\fR uses \fIhost\fR as the default host, and
+if specified, \fIport\fR as the default port, for future transfers. See the
+\fBconnect\fR command below.
+.SH USAGE
+.sp
+.LP
+Once \fBtftp\fR is running, it issues the prompt \fBtftp>\fR and recognizes the
+following commands:
+.SS "Commands"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBconnect\fR \fIhost-name\fR [ \fIport\fR ]\fR
+.ad
+.sp .6
+.RS 4n
+Set the \fIhost\fR, and optionally \fIport\fR, for transfers. The \fBTFTP\fR
+protocol, unlike the \fBFTP\fR protocol, does not maintain connections between
+transfers; thus, the \fBconnect\fR command does not actually create a
+connection, but merely remembers what host is to be used for transfers. You do
+not have to use the \fBconnect\fR command; the remote host can be specified as
+part of the \fBget\fR or \fBput\fR commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmode\fR \fItransfer-mode\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the mode for transfers; \fItransfer-mode\fR may be one of \fBascii\fR or
+\fBbinary\fR. The default is \fBascii\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBput\fR \fIfilename\fR\fR
+.ad
+.br
+.na
+\fB\fBput\fR \fIlocalfile remotefile\fR\fR
+.ad
+.br
+.na
+\fB\fBput\fR \fIfilename1 filename2 .\|.\|. filenameN remote-directory\fR\fR
+.ad
+.sp .6
+.RS 4n
+Transfer a file, or a set of files, to the specified remote file or directory.
+The destination can be in one of two forms: a filename on the remote host if
+the host has already been specified, or a string of the form:
+.sp
+.in +2
+.nf
+\fIhost\fR\fB:\fR\fIfilename\fR
+.fi
+.in -2
+
+to specify both a \fIhost\fR and \fIfilename\fR at the same time. If the latter
+form is used, the specified host becomes the default for future transfers. If
+the remote-directory form is used, the remote host is assumed to be running the
+UNIX system.
+.sp
+The \fIhost\fR can be a host name (see \fBhosts\fR(4)) or an IPv4 or IPv6
+address string (see \fBinet\fR(7P) or \fBinet6\fR(7P)). Since IPv6 addresses
+already contain \fB":"s\fR, the \fIhost\fR should be enclosed in square
+brackets when an IPv6 address is used. Otherwise, the first occurrence of a
+colon will be interpreted as the separator between the \fIhost\fR and the
+\fIfilename\fR. For example,
+.sp
+.in +2
+.nf
+[1080::8:800:200c:417A]:myfile
+.fi
+.in -2
+
+Files may be written only if they already exist and are publicly writable. See
+\fBin.tftpd\fR(1M).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBget\fR \fIfilename\fR\fR
+.ad
+.br
+.na
+\fB\fBget\fR \fIremotename localname\fR\fR
+.ad
+.br
+.na
+\fB\fBget\fR \fIfilename1 filename2 filename3\fR .\|.\|. \fIfilenameN\fR\fR
+.ad
+.sp .6
+.RS 4n
+Get a file or set of files (three or more) from the specified remote
+\fIsources\fR. \fBsource\fR can be in one of two forms: a filename on the
+remote host if the host has already been specified, or a string of the form:
+.sp
+.in +2
+.nf
+\fIhost\fR\fB:\fR\fIfilename\fR
+.fi
+.in -2
+
+to specify both a host and filename at the same time. If the latter form is
+used, the last host specified becomes the default for future transfers. See the
+\fBput\fR command regarding specifying a \fIhost\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBquit\fR\fR
+.ad
+.sp .6
+.RS 4n
+Exit \fBtftp\fR. An \fBEOF\fR also exits.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggle verbose mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtrace\fR\fR
+.ad
+.sp .6
+.RS 4n
+Toggle packet tracing.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstatus\fR\fR
+.ad
+.sp .6
+.RS 4n
+Show current status.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrexmt\fR\fIretransmission-timeout\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the per-packet retransmission timeout, in seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtimeout\fR\fItotal-transmission-timeout\fR\fR
+.ad
+.sp .6
+.RS 4n
+Set the total transmission timeout, in seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBascii\fR\fR
+.ad
+.sp .6
+.RS 4n
+Shorthand for \fBmode ascii\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbinary\fR\fR
+.ad
+.sp .6
+.RS 4n
+Shorthand for \fBmode binary\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBblksize\fR \fItransfer-blocksize\fR\fR
+.ad
+.sp .6
+.RS 4n
+The value of the transfer blocksize option to negotiate with the server. A
+value of \fB0\fR disables the negotiation of this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBsrexmt\fR \fIserver-retransmission-timeout\fR\fR
+.ad
+.sp .6
+.RS 4n
+The value of the retransmission timeout option to request that the server uses.
+A value of 0 disables the negotiation of this option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtsize\fR\fR
+.ad
+.sp .6
+.RS 4n
+A toggle that sends the transfer size option to the server. By default, the
+option is not sent. The transfer size option is not sent with a \fBwrite\fR
+request when the \fItransfer-mode\fR is \fBascii\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB? [\fR \fIcommand-name\fR .\|.\|. ]\fR
+.ad
+.sp .6
+.RS 4n
+Print help information.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBin.tftpd\fR(1M), \fBhosts\fR(4), \fBattributes\fR(5),\fBinet\fR(7P),
+\fBinet6\fR(7P)
+.sp
+.LP
+Malkin, G. and Harkin, A. \fIRFC 2347, TFTP Option Extension\fR. The Internet
+Society. May 1998
+.sp
+.LP
+Malkin, G. and Harkin, A. \fIRFC 2348, TFTP Blocksize Option\fR. The Internet
+Society. May 1998
+.sp
+.LP
+Malkin, G. and Harkin, A. \fIRFC 2349, TFTP Timeout Interval and Transfer Size
+Options\fR. The Internet Society. May 1998
+.sp
+.LP
+Sollins, K.R. \fIRFC 1350, The TFTP Protocol (Revision 2)\fR. Network Working
+Group. July 1992.
+.SH NOTES
+.sp
+.LP
+The default \fItransfer-mode\fR is \fBascii\fR. This differs from pre-SunOS 4.0
+and pre-4.3BSD systems, so explicit action must be taken when transferring
+non-ASCII binary files such as executable commands.
+.sp
+.LP
+Because there is no user-login or validation within the \fBTFTP\fR protocol,
+many remote sites restrict file access in various ways. Approved methods for
+file access are specific to each site, and therefore cannot be documented here.
+.sp
+.LP
+When using the \fBget\fR command to transfer multiple files from a remote host,
+three or more files must be specified. If two files are specified, the second
+file is used as a local file.
+.sp
+.LP
+With the default block size of \fB512\fR octets and a \fB16-\fRbit block
+counter, some \fBTFTP\fR implementations might have problems with files over
+\fB33,553,919\fR octets (\fB513\fR octets short of \fB32MB\fR) in size. The
+Solaris implementation can transfer files up to \fB4GB\fR in size.
+.sp
+.LP
+By default, the Solaris \fBTFTP\fR client does not enable the \fBblocksize\fR
+or transfer size options. Setting the \fBblocksize\fR option to a higher value
+is sometimes useful as a workaround when dealing with peers that have a
+\fB32MB\fR limit.
diff --git a/usr/src/man/man1/time.1 b/usr/src/man/man1/time.1
new file mode 100644
index 0000000000..addd7bae63
--- /dev/null
+++ b/usr/src/man/man1/time.1
@@ -0,0 +1,263 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH time 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+time \- time a simple command
+.SH SYNOPSIS
+.LP
+.nf
+\fBtime\fR [\fB-p\fR] \fIutility\fR [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtime\fR utility invokes \fIutility\fR operand with \fIargument\fR, and
+writes a message to standard error that lists timing statistics for
+\fIutility\fR. The message includes the following information:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The elapsed (real) time between invocation of \fIutility\fR and its
+termination.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The User \fBCPU\fR time, equivalent to the sum of the \fItms_utime\fR and
+\fItms_cutime\fR fields returned by the \fBtimes\fR(2) function for the process
+in which \fIutility\fR is executed.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The System \fBCPU\fR time, equivalent to the sum of the \fItms_stime\fR and
+\fItms_cstime\fR fields returned by the \fBtimes()\fR function for the process
+in which \fIutility\fR is executed.
+.RE
+.sp
+.LP
+When \fBtime\fR is used as part of a pipeline, the times reported are
+unspecified, except when it is the sole command within a grouping command in
+that pipeline. For example, the commands on the left are unspecified; those on
+the right report on utilities \fBa\fR and \fBc\fR, respectively:
+.sp
+.in +2
+.nf
+time a | b | c { time a } | b | c
+a | b | time c a | b | (time c)
+.fi
+.in -2
+
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fR
+.ad
+.RS 7n
+.rt
+Writes the timing output to standard error in the following format:
+.sp
+.in +2
+.nf
+real %f\enuser %f\ensys %f\en < \fIreal seconds\fR>, <\fIuser seconds\fR>,
+<\fIsystem seconds\fR>
+.fi
+.in -2
+.sp
+
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIutility\fR \fR
+.ad
+.RS 13n
+.rt
+The name of the utility that is to be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR \fR
+.ad
+.RS 13n
+.rt
+Any string to be supplied as an argument when invoking \fIutility\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fBtime\fR utility returns exit status \fB127\fR if an error occurs so that
+applications can distinguish "failure to find a utility" from "invoked utility
+exited with an error indication." The value \fB127\fR was chosen because it is
+not commonly used for other meanings. Most utilities use small values for
+"normal error conditions" and the values above \fB128\fR can be confused with
+termination due to receipt of a signal. The value \fB126\fR was chosen in a
+similar manner to indicate that the utility could be found, but not invoked.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the time command
+.sp
+.LP
+It is frequently desirable to apply \fBtime\fR to pipelines or lists of
+commands. This can be done by placing pipelines and command lists in a single
+file. This single file can then be invoked as a utility, and the \fBtime\fR
+applies to everything in the file.
+
+.sp
+.LP
+Alternatively, the following command can be used to apply \fBtime\fR to a
+complex command:
+
+.sp
+.in +2
+.nf
+example% \fBtime sh -c 'complex-command-line'\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRUsing time in the csh shell
+.sp
+.LP
+The following two examples show the differences between the \fBcsh\fR version
+of \fBtime\fR and the version in \fB/usr/bin/time\fR. These examples assume
+that \fBcsh\fR is the shell in use.
+
+.sp
+.in +2
+.nf
+example% \fBtime find / -name csh.1 -print
+/usr/share/man/man1/csh.1\fR
+95.0u 692.0s 1:17:52 16% 0+0k 0+0io 0pf+0w
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+See \fBcsh\fR(1) for an explanation of the format of \fBtime\fR output.
+
+.sp
+.in +2
+.nf
+example% \fB/usr/bin/time find / -name csh.1 -print
+/usr/share/man/man1/csh.1\fR
+real 1:23:31.5
+user 1:33.2
+sys 11:28.2
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtime\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_NUMERIC\fR, \fBNLSPATH\fR, and
+\fBPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+If \fIutility\fR is invoked, the exit status of \fBtime\fR will be the exit
+status of \fIutility\fR. Otherwise, the \fBtime\fR utility will exit with one
+of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\(mi125\fR \fR
+.ad
+.RS 13n
+.rt
+An error occurred in the \fBtime\fR utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR \fR
+.ad
+.RS 13n
+.rt
+\fIutility\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR \fR
+.ad
+.RS 13n
+.rt
+\fIutility\fR could not be found.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBshell_builtins\fR(1), \fBtimex\fR(1), \fBtimes\fR(2),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+When the time command is run on a multiprocessor machine, the total of the
+values printed for \fBuser\fR and \fBsys\fR can exceed \fBreal\fR. This is
+because on a multiprocessor machine it is possible to divide the task between
+the various processors.
+.sp
+.LP
+When the command being timed is interrupted, the timing values displayed may
+not always be accurate.
+.SH BUGS
+.sp
+.LP
+Elapsed time is accurate to the second, while the \fBCPU\fR times are measured
+to the 100th second. Thus the sum of the \fBCPU\fR times can be up to a second
+larger than the elapsed time.
diff --git a/usr/src/man/man1/times.1 b/usr/src/man/man1/times.1
new file mode 100644
index 0000000000..fb10a45d2f
--- /dev/null
+++ b/usr/src/man/man1/times.1
@@ -0,0 +1,63 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1994 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH times 1 "15 Apr 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+times \- shell built-in function to report time usages of the current shell
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBtimes\fR
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBtimes\fR
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+Print the accumulated user and system times for processes run from the shell.
+.SS "ksh"
+.sp
+.LP
+Print the accumulated user and system times for the shell and for processes run
+from the shell.
+.sp
+.LP
+On this man page, \fBksh\fR(1) commands that are preceded by one or two *
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by ** that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBksh\fR(1), \fBsh\fR(1), \fBtime\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/timex.1 b/usr/src/man/man1/timex.1
new file mode 100644
index 0000000000..c0f558174e
--- /dev/null
+++ b/usr/src/man/man1/timex.1
@@ -0,0 +1,180 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH timex 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+timex \- time a command; report process data and system activity
+.SH SYNOPSIS
+.LP
+.nf
+\fBtimex\fR [\fB-o\fR] [\fB-p\fR [\fB-fhkmrt\fR]] [\fB-s\fR] \fIcommand\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The given \fBcommand\fR is executed; the elapsed time, user time and system
+time spent in execution are reported in seconds. Optionally, process accounting
+data for the \fBcommand\fR and all its children can be listed or summarized,
+and total system activity during the execution interval can be reported.
+.sp
+.LP
+The output of \fBtimex\fR is written on standard error.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fR
+.ad
+.RS 6n
+.rt
+Report the total number of blocks read or written and total characters
+transferred by \fBcommand\fR and all its children. This option works only if
+the process accounting software is installed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+List process accounting records for \fBcommand\fR and all its children. This
+option works only if the process accounting software is installed. Suboptions
+\fBf\fR, \fBh\fR, \fBk\fR, \fBm\fR, \fBr\fR, and \fBt\fR modify the data items
+reported. The options are as follows:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Print the \fBfork\fR(2)/ \fBexec\fR(2) flag and system exit status columns in
+the output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Instead of mean memory size, show the fraction of total available CPU time
+consumed by the process during its execution. This ``hog factor'' is computed
+as (total CPU time)/(elapsed time).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 6n
+.rt
+Instead of memory size, show total kcore-minutes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Show mean core size (the default).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Show CPU factor (user time/(system-time + user-time)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Show separate system and user CPU times. The number of blocks read or written
+and the number of characters transferred are always reported.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Report total system activity (not just that due to \fBcommand\fR) that
+occurred during the execution interval of \fBcommand\fR. All the data items
+listed in \fBsar\fR(1) are reported.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExamples of \fBtimex\fR.
+.sp
+.LP
+A simple example:
+
+.sp
+.in +2
+.nf
+\fBexample% timex \fR\fB-ops\fR\fB sleep 60\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+A terminal session of arbitrary complexity can be measured by timing a
+sub-shell:
+
+.sp
+.in +2
+.nf
+\fBexample% timex \fR\fB-opskmt\fR\fB sh\fR
+ \fIsession commands\fR
+\fBEOT\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsar\fR(1), \fBtime\fR(1), \fBexec\fR(2), \fBfork\fR(2), \fBtimes\fR(2),
+\fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+Process records associated with \fBcommand\fR are selected from the accounting
+file \fB/var/adm/pacct\fR by inference, since process genealogy is not
+available. Background processes having the same user ID, terminal ID, and
+execution time window will be spuriously included.
diff --git a/usr/src/man/man1/tip.1 b/usr/src/man/man1/tip.1
new file mode 100644
index 0000000000..5919c958a0
--- /dev/null
+++ b/usr/src/man/man1/tip.1
@@ -0,0 +1,1064 @@
+'\" te
+.\" Copyright (c) 1980 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution. Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.TH tip 1 "28 Nov 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+tip \- connect to remote system
+.SH SYNOPSIS
+.LP
+.nf
+\fBtip\fR [\fB-v\fR] [\fB-speed-entry\fR] {\fIhostname\fR | \fIphone-number\fR | \fIdevice\fR}
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtip\fR utility establishes a full-duplex terminal connection to a remote
+host. Once the connection is established, a remote session using \fBtip\fR
+behaves like an interactive session on a local terminal.
+.sp
+.LP
+The \fBremote\fR file contains entries describing remote systems and line
+speeds used by \fBtip\fR.
+.sp
+.LP
+Each host has a default baud rate for the connection, or you can specify a
+speed with the \fB-\fR\fIspeed-entry\fR command line argument.
+.sp
+.LP
+When \fIphone-number\fR is specified, \fBtip\fR looks for an entry in the
+\fBremote\fR file of the form:
+.sp
+.in +2
+.nf
+tip -\fIspeed-entry\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+When \fBtip\fR finds such an entry, it sets the connection speed accordingly.
+If it finds no such entry, \fBtip\fR interprets \fB-\fR\fIspeed-entry\fR as if
+it were a system name, resulting in an error message.
+.sp
+.LP
+If you omit \fB-\fR\fIspeed-entry\fR, \fBtip\fR uses the \fBtip0\fR entry to
+set a speed for the connection.
+.sp
+.LP
+When \fIdevice\fR is specified, \fBtip\fR attempts to open that device, but
+will do so using the access privileges of the user, rather than \fBtip\fR's
+usual access privileges (\fBsetuid uucp\fR). The user must have read/write
+access to the device. The \fBtip\fR utility interprets any character string
+beginning with the slash character (\|\fB/\fR\|) as a device name.
+.sp
+.LP
+When establishing the connection, \fBtip\fR sends a connection message to the
+remote system. The default value for this message can be found in the
+\fBremote\fR file.
+.sp
+.LP
+When \fBtip\fR attempts to connect to a remote system, it opens the associated
+device with an exclusive-open \fBioctl\fR(2) call. Thus, only one user at a
+time may access a device. This is to prevent multiple processes from sampling
+the terminal line. In addition, \fBtip\fR honors the locking protocol used by
+\fBuucp\fR(1C).
+.sp
+.LP
+When \fBtip\fR starts up, it reads commands from the file \fB\&.tiprc\fR in
+your home directory.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+Display commands from the \fB\&.tiprc\fR file as they are executed.
+.RE
+
+.SH USAGE
+.sp
+.LP
+Typed characters are normally transmitted directly to the remote machine, which
+does the echoing as well.
+.sp
+.LP
+At any time that \fBtip\fR prompts for an argument (for example, during setup
+of a file transfer), the line typed may be edited with the standard erase and
+kill characters. A null line in response to a prompt, or an interrupt, aborts
+the dialogue and returns you to the remote machine.
+.SS "Commands"
+.sp
+.LP
+A tilde (\fB~\fR) appearing as the first character of a line is an escape
+signal which directs \fBtip\fR to perform some special action. \fBtip\fR
+recognizes the following escape sequences:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~^D\fR\fR
+.ad
+.br
+.na
+\fB\fB~.\fR\fR
+.ad
+.RS 18n
+.rt
+Drop the connection and exit (you may still be logged in on the remote
+machine). \fBNote:\fR If you rlogin and then run \fBtip\fR on the remote host,
+you must type \fB~~.\fR (tilde tilde dot) to end the \fBtip\fR session. If you
+type \fB~.\fR (tilde dot), it terminates the rlogin.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~c\fR [\fIname\fR]\fR
+.ad
+.RS 18n
+.rt
+Change directory to \fIname\fR. No argument implies change to your home
+directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~!\fR\fR
+.ad
+.RS 18n
+.rt
+Escape to an interactive shell on the local machine. Exiting the shell returns
+you to \fBtip\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~>\fR\fR
+.ad
+.RS 18n
+.rt
+Copy file from local to remote.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~<\fR\fR
+.ad
+.RS 18n
+.rt
+Copy file from remote to local.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~p\fR\fI from\fR [\fI to \fR]\fR
+.ad
+.RS 18n
+.rt
+Send a file to a remote host running the UNIX system. When you use the put
+command, the remote system runs the command string
+.sp
+.in +2
+.nf
+\fBcat > \fR\fIto\fR
+.fi
+.in -2
+.sp
+
+while \fBtip\fR sends it the \fIfrom\fR file. If the \fIto\fR file is not
+specified, the \fIfrom\fR file name is used. This command is actually a
+UNIX-system-specific version of the `\fB~>\fR' command.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~t\fR\fI from\fR [\fI to \fR]\fR
+.ad
+.RS 18n
+.rt
+Take a file from a remote host running the UNIX system. As in the put command
+the \fIto\fR file defaults to the \fIfrom\fR file name if it is not specified.
+The remote host executes the command string
+.sp
+.in +2
+.nf
+\fBcat \fR\fIfrom\fR\fB\|; echo ^A\fR
+.fi
+.in -2
+.sp
+
+to send the file to \fBtip\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~|\fR\fR
+.ad
+.RS 18n
+.rt
+Pipe the output from a remote command to a local process. The command string
+sent to the local system is processed by the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~C\fR\fR
+.ad
+.RS 18n
+.rt
+Connect a program to the remote machine. The command string sent to the program
+is processed by the shell. The program inherits file descriptors 0 as remote
+line input, 1 as remote line output, and 2 as tty standard error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~$\fR\fR
+.ad
+.RS 18n
+.rt
+Pipe the output from a local process to the remote host. The command string
+sent to the local system is processed by the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~#\fR\fR
+.ad
+.RS 18n
+.rt
+Send a \fBBREAK\fR to the remote system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~s\fR\fR
+.ad
+.RS 18n
+.rt
+Set a variable (see the discussion below).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~^Z\fR\fR
+.ad
+.RS 18n
+.rt
+Stop \fBtip\fR. Only available when run under a shell that supports job
+control, such as the C shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~^Y\fR\fR
+.ad
+.RS 18n
+.rt
+Stop only the "local side" of \fBtip\fR. Only available when run under a shell
+that supports job control, such as the C shell. The "remote side" of \fBtip\fR,
+that is, the side that displays output from the remote host, is left running.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~?\fR\fR
+.ad
+.RS 18n
+.rt
+Get a summary of the tilde escapes.
+.RE
+
+.sp
+.LP
+Copying files requires some cooperation on the part of the remote host. When a
+\fB~>\fR or \fB~<\fR escape is used to send a file, \fBtip\fR prompts for a
+file name (to be transmitted or received) and a command to be sent to the
+remote system, in case the file is being transferred from the remote system.
+While \fBtip\fR is transferring a file, the number of lines transferred will be
+continuously displayed on the screen. A file transfer may be aborted with an
+interrupt.
+.SS "Auto-call Units"
+.sp
+.LP
+\fBtip\fR may be used to dial up remote systems using a number of auto-call
+unit's (\fBACU\fRs). When the remote system description contains the \fBdu\fR
+capability, \fBtip\fR uses the call-unit (\fBcu\fR), \fBACU\fR type (\fBat\fR),
+and phone numbers (\fBpn\fR) supplied. Normally, \fBtip\fR displays verbose
+messages as it dials.
+.sp
+.LP
+Depending on the type of auto-dialer being used to establish a connection, the
+remote host may have garbage characters sent to it upon connection. The user
+should never assume that the first characters typed to the foreign host are the
+first ones presented to it. The recommended practice is to immediately type a
+\fBkill\fR character upon establishing a connection (most UNIX systems either
+support \fB@\fR or Control-U as the initial kill character).
+.sp
+.LP
+\fBtip\fR currently supports the Ventel MD-212+ modem and DC Hayes-compatible
+modems.
+.sp
+.LP
+When \fBtip\fR initializes a Hayes-compatible modem for dialing, it sets up the
+modem to auto-answer. Normally, after the conversation is complete, \fBtip\fR
+drops \fBDTR\fR, which causes the modem to "hang up."
+.sp
+.LP
+Most modems can be configured so that when \fBDTR\fR drops, they re-initialize
+themselves to a preprogrammed state. This can be used to reset the modem and
+disable auto-answer, if desired.
+.sp
+.LP
+Additionally, it is possible to start the phone number with a Hayes \fBS\fR
+command so that you can configure the modem before dialing. For example, to
+disable auto-answer, set up all the phone numbers in \fB/etc/remote\fR using
+something like \fBpn=S0=0DT5551212\fR. The \fBS0=0\fR disables auto-answer.
+.SS "Remote Host Description"
+.sp
+.LP
+Descriptions of remote hosts are normally located in the system-wide file
+\fB/etc/remote\fR. However, a user may maintain personal description files (and
+phone numbers) by defining and exporting the \fBREMOTE\fR shell variable. The
+\fBremote\fR file must be readable by \fBtip\fR, but a secondary file
+describing phone numbers may be maintained readable only by the user. This
+secondary phone number file is \fB/etc/phones\fR, unless the shell variable
+\fBPHONES\fR is defined and exported. The phone number file contains lines of
+the form:
+.sp
+.in +2
+.nf
+\fIsystem-name phone-number\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Each phone number found for a system is tried until either a connection is
+established, or an end of file is reached. Phone numbers are constructed from
+`\fB0123456789\(mi=*\fR', where the `\fB=\fR' and `\fB*\fR' are used to
+indicate a second dial tone should be waited for (\fBACU\fR dependent).
+.SS "tip Internal Variables"
+.sp
+.LP
+\fBtip\fR maintains a set of variables which are used in normal operation. Some
+of these variables are read-only to normal users (root is allowed to change
+anything of interest). Variables may be displayed and set through the \fB~s\fR
+escape. The syntax for variables is patterned after \fBvi\fR(1) and
+\fBmail\fR(1). Supplying \fBall\fR as an argument to the \fB~s\fR escape
+displays all variables that the user can read. Alternatively, the user may
+request display of a particular variable by attaching a \fB?\fR to the end. For
+example, `\fB~s escape?\fR' displays the current escape character.
+.sp
+.LP
+Variables are numeric (num), string (str), character (char), or Boolean (bool)
+values. Boolean variables are set merely by specifying their name. They may be
+reset by prepending a \fB!\fR to the name. Other variable types are set by
+appending an \fB=\fR and the value. The entire assignment must not have any
+blanks in it. A single set command may be used to interrogate as well as set a
+number of variables.
+.sp
+.LP
+Variables may be initialized at run time by placing set commands (without the
+\fB~s\fR prefix) in a \fB\&.tiprc\fR file in one's home directory. The \fB-v\fR
+option makes \fBtip\fR display the sets as they are made. Comments preceded by
+a \fB#\fR sign can appear in the \fB\&.tiprc\fR file.
+.sp
+.LP
+Finally, the variable names must either be completely specified or an
+abbreviation may be given. The following list details those variables known to
+\fBtip\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbeautify\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Discard unprintable characters when a session is being scripted;
+abbreviated \fBbe\fR. If the \fBnb\fR capability is present, \fBbeautify\fR is
+initially set to \fBoff\fR. Otherwise, \fBbeautify\fR is initially set to
+\fBon\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBbaudrate\fR\fR
+.ad
+.RS 16n
+.rt
+(num) The baud rate at which the connection was established; abbreviated
+\fBba\fR. If a baud rate was specified on the command line, \fBbaudrate\fR is
+initially set to the specified value. Or, if the \fBbr\fR capability is
+present, \fBbaudrate\fR is initially set to the value of that capability.
+Otherwise, \fBbaudrate\fR is set to 300 baud. Once \fBtip\fR has been started,
+\fBbaudrate\fR can only changed by the super-user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdialtimeout\fR\fR
+.ad
+.RS 16n
+.rt
+(num) When dialing a phone number, the time (in seconds) to wait for a
+connection to be established; abbreviated \fBdial\fR. \fBdialtimeout\fR is
+initially set to 60 seconds, and can only changed by the super-user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBdisconnect\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The string to send to the remote host to disconnect from it; abbreviated
+\fBdi\fR. If the \fBdi\fR capability is present, \fBdisconnect\fR is initially
+set to the value of that capability. Otherwise, \fBdisconnect\fR is set to a
+null string (\fB""\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBechocheck\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Synchronize with the remote host during file transfer by waiting for the
+echo of the last character transmitted; abbreviated \fBec\fR. If the \fBec\fR
+capability is present, \fBechocheck\fR is initially set to \fBon\fR. Otherwise,
+\fBechocheck\fR is initially set to \fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeofread\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The set of characters which signify an end-of-transmission during a
+\fB~<\fR file transfer command; abbreviated \fBeofr\fR. If the \fBie\fR
+capability is present, \fBeofread\fR is initially set to the value of that
+capability. Otherwise, \fBeofread\fR is set to a null string (\fB""\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeofwrite\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The string sent to indicate end-of-transmission during a \fB~>\fR file
+transfer command; abbreviated \fBeofw\fR. If the \fBoe\fR capability is
+present, \fBeofread\fR is initially set to the value of that capability.
+Otherwise, \fBeofread\fR is set to a null string (\fB""\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeol\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The set of characters which indicate an end-of-line. \fBtip\fR will
+recognize escape characters only after an end-of-line. If the \fBel\fR
+capability is present, \fBeol\fR is initially set to the value of that
+capability. Otherwise, \fBeol\fR is set to a null string (\fB""\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBescape\fR\fR
+.ad
+.RS 16n
+.rt
+(char) The command prefix (escape) character; abbreviated \fBes\fR. If the
+\fBes\fR capability is present, \fBescape\fR is initially set to the value of
+that capability. Otherwise, \fBescape\fR is set to `\fB\|~\|\fR\&'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBetimeout\fR\fR
+.ad
+.RS 16n
+.rt
+(num) The amount of time, in seconds, that \fBtip\fR should wait for the
+echo-check response when \fBechocheck\fR is set; abbreviated \fBet\fR. If the
+\fBet\fR capability is present, \fBetimeout\fR is initially set to the value of
+that capability. Otherwise, \fBetimeout\fR is set to 10 seconds.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBexceptions\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The set of characters which should not be discarded due to the
+beautification switch; abbreviated \fBex\fR. If the \fBex\fR capability is
+present, \fBexceptions\fR is initially set to the value of that capability.
+Otherwise, \fBexceptions\fR is set to `\fB\et\en\ef\eb\fR\&'.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBforce\fR\fR
+.ad
+.RS 16n
+.rt
+(char) The character used to force literal data transmission; abbreviated
+\fBfo\fR. If the \fBfo\fR capability is present, \fBforce\fR is initially set
+to the value of that capability. Otherwise, \fBforce\fR is set to \fB\e377\fR
+(which disables it).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBframesize\fR\fR
+.ad
+.RS 16n
+.rt
+(num) The amount of data (in bytes) to buffer between file system writes when
+receiving files; abbreviated \fBfr\fR. If the \fBfs\fR capability is present,
+\fBframesize\fR is initially set to the value of that capability. Otherwise,
+\fBframesize\fR is set to \fB1024\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhalfduplex\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Do local echoing because the host is half-duplex; abbreviated \fBhdx\fR.
+If the \fBhd\fR capability is present, \fBhalfduplex\fR is initially set to
+\fBon\fR. Otherwise, \fBhalfduplex\fR is initially set to \fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhardwareflow\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Do hardware flow control; abbreviated \fBhf\fR. If the \fBhf\fR
+capability is present, \fBhardwareflow\fR is initially set to \fBon\fR.
+Otherwise, \fBhardwareflowcontrol\fR is initially set to \fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBhost\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The name of the host to which you are connected; abbreviated \fBho\fR.
+\fBhost\fR is permanently set to the name given on the command line or in the
+\fBHOST\fR environment variable.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlocalecho\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) A synonym for \fBhalfduplex\fR; abbreviated \fBle\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlog\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The name of the file to which to log information about outgoing phone
+calls. \fBlog\fR is initially set to \fB/var/adm/aculog\fR, and can only be
+inspected or changed by the super-user.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBparity\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The parity to be generated and checked when talking to the remote host;
+abbreviated \fBpar\fR. The possible values are:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnone\fR>\fR
+.ad
+.br
+.na
+\fB\fBzero\fR\fR
+.ad
+.RS 9n
+.rt
+Parity is not checked on input, and the parity bit is set to zero on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBone\fR\fR
+.ad
+.RS 9n
+.rt
+Parity is not checked on input, and the parity bit is set to one on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBeven\fR\fR
+.ad
+.RS 9n
+.rt
+Even parity is checked for on input and generated on output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBodd\fR\fR
+.ad
+.RS 9n
+.rt
+Odd parity is checked for on input and generated on output.
+.RE
+
+If the \fBpa\fR capability is present, \fBparity\fR is initially set to the
+value of that capability; otherwise, \fBparity\fR is set to \fBnone\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBphones\fR\fR
+.ad
+.RS 16n
+.rt
+The file in which to find hidden phone numbers. If the environment variable
+\fBPHONES\fR is set, \fBphones\fR is set to the value of \fBPHONES\fR.
+Otherwise, \fBphones\fR is set to \fB/etc/phones\fR. The value of \fBphones\fR
+cannot be changed from within \fBtip\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprompt\fR\fR
+.ad
+.RS 16n
+.rt
+(char) The character which indicates an end-of-line on the remote host;
+abbreviated \fBpr\fR. This value is used to synchronize during data transfers.
+The count of lines transferred during a file transfer command is based on
+receipt of this character. If the \fBpr\fR capability is present, \fBprompt\fR
+is initially set to the value of that capability. Otherwise, \fBprompt\fR is
+set to \fB\en\fR\&.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBraise\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Upper case mapping mode; abbreviated \fBra\fR. When this mode is
+enabled, all lower case letters will be mapped to upper case by \fBtip\fR for
+transmission to the remote machine. If the \fBra\fR capability is present,
+\fBraise\fR is initially set to \fBon\fR. Otherwise, \fBraise\fR is initially
+set to \fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBraisechar\fR\fR
+.ad
+.RS 16n
+.rt
+(char) The input character used to toggle upper case mapping mode; abbreviated
+\fBrc\fR. If the \fBrc\fR capability is present, \fBraisechar\fR is initially
+set to the value of that capability. Otherwise, \fBraisechar\fR is set to
+\fB\e377\fR (which disables it).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrawftp\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Send all characters during file transfers; do not filter non-printable
+characters, and do not do translations like \fB\en\fR to \fB\er\fR\&.
+Abbreviated \fBraw\fR. If the \fBrw\fR capability is present, \fBrawftp\fR is
+initially set to \fBon\fR. Otherwise, \fBrawftp\fR is initially set to
+\fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBrecord\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The name of the file in which a session script is recorded; abbreviated
+\fBrec\fR. If the \fBre\fR capability is present, \fBrecord\fR is initially set
+to the value of that capability. Otherwise, \fBrecord\fR is set to
+\fBtip.record\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBremote\fR\fR
+.ad
+.RS 16n
+.rt
+The file in which to find descriptions of remote systems. If the environment
+variable \fBREMOTE\fR is set, \fBremote\fR is set to the value of \fBREMOTE\fR.
+Otherwise, \fBremote\fR is set to \fB/etc/remote\fR. The value of \fBremote\fR
+cannot be changed from within \fBtip\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBscript\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Session scripting mode; abbreviated \fBsc\fR. When \fBscript\fR is
+\fBon\fR, \fBtip\fR will record everything transmitted by the remote machine in
+the script record file specified in \fBrecord\fR. If the \fBbeautify\fR switch
+is on, only printable \fBASCII\fR characters will be included in the script
+file (those characters between 040 and 0177). The variable \fBexceptions\fR is
+used to indicate characters which are an exception to the normal beautification
+rules. If the \fBsc\fR capability is present, \fBscript\fR is initially set to
+\fBon\fR. Otherwise, \fB script\fR is initially set to \fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtabexpand\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Expand \fBTAB\fR characters to \fBSPACE\fR characters during file
+transfers; abbreviated \fBtab\fR. When \fBtabexpand\fR is \fBon\fR, each tab
+is expanded to eight SPACE characters. If the \fBtb\fR capability is present,
+\fBtabexpand\fR is initially set to \fBon\fR. Otherwise, \fBtabexpand\fR is
+initially set to \fBoff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtandem\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Use \fBXON\fR/\fBXOFF\fR flow control to limit the rate that data is
+sent by the remote host; abbreviated \fBta\fR. If the \fBnt\fR capability is
+present, \fBtandem\fR is initially set to \fBoff\fR. Otherwise, \fBtandem\fR is
+initially set to \fBon\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBverbose\fR\fR
+.ad
+.RS 16n
+.rt
+(bool) Verbose mode; abbreviated \fBverb\fR; When verbose mode is enabled,
+\fBtip\fR prints messages while dialing, shows the current number of lines
+transferred during a file transfer operations, and more. If the \fBnv\fR
+capability is present, \fBverbose\fR is initially set to \fBoff\fR. Otherwise,
+\fBverbose\fR is initially set to \fBon\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The name of the shell to use for the \fB~!\fR command; default value is
+\fB/bin/sh\fR, or taken from the environment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.RS 16n
+.rt
+(str) The home directory to use for the \fB~c\fR command. Default value is
+taken from the environment.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the tip command
+.sp
+.LP
+An example of the dialog used to transfer files is given below.
+
+.sp
+.in +2
+.nf
+arpa% \fBtip monet\fR
+[connected]
+\&...(assume we are talking to a UNIX system)...
+ucbmonet login: sam
+Password:
+monet% cat sylvester.c
+~> Filename: sylvester.c
+32 lines transferred in 1 minute 3 seconds
+monet%
+monet% ~< Filename: reply.c
+List command for remote host: cat reply.c
+65 lines transferred in 2 minutes
+monet%
+\&...(or, equivalently)...
+monet% ~p sylvester.c
+\&...(actually echoes as ~[put] sylvester.c)...
+32 lines transferred in 1 minute 3 seconds
+monet%
+monet% ~t reply.c
+\&...(actually echoes as ~[take] reply.c)...
+65 lines transferred in 2 minutes
+monet%
+\&...(to print a file locally)...
+monet% ~|Local command: pr h sylvester.c | lpr
+List command for remote host: cat sylvester.c
+monet% ~^D
+[EOT]
+\&...(back on the local system)...
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+The following environment variables are read by \fBtip\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBREMOTE\fR\fR
+.ad
+.RS 10n
+.rt
+The location of the \fBremote\fR file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPHONES\fR\fR
+.ad
+.RS 10n
+.rt
+The location of the file containing private phone numbers.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOST\fR\fR
+.ad
+.RS 10n
+.rt
+A default host to connect to.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBHOME\fR\fR
+.ad
+.RS 10n
+.rt
+One's log-in directory (for chdirs).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSHELL\fR\fR
+.ad
+.RS 10n
+.rt
+The shell to fork on a `\fB~!\fR' escape.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/phones\fR\fR
+.ad
+.RS 29n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/etc/remote\fR\fR
+.ad
+.RS 29n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/spool/locks/LCK.\|.*\fR\fR
+.ad
+.RS 29n
+.rt
+lock file to avoid conflicts with \fBUUCP\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/aculog\fR\fR
+.ad
+.RS 29n
+.rt
+file in which outgoing calls are logged
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.tiprc\fR\fR
+.ad
+.RS 29n
+.rt
+initialization file
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcu\fR(1C), \fBmail\fR(1), \fBuucp\fR(1C), \fBvi\fR(1), \fBioctl\fR(2),
+\fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+There are two additional variables, \fBchardelay\fR and \fBlinedelay\fR, that
+are currently not implemented.
diff --git a/usr/src/man/man1/tnfdump.1 b/usr/src/man/man1/tnfdump.1
new file mode 100644
index 0000000000..8679dedb0e
--- /dev/null
+++ b/usr/src/man/man1/tnfdump.1
@@ -0,0 +1,358 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tnfdump 1 "22 Jan 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+tnfdump \- convert binary TNF file to ASCII
+.SH SYNOPSIS
+.LP
+.nf
+\fBtnfdump\fR [\fB-r\fR] [\fB-x\fR] \fItnf_file\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtnfdump\fR utility converts the specified binary \fBTNF\fR trace files
+to \fBASCII\fR. The \fBASCII\fR output can be used to do performance analysis.
+The default mode (without the \fB-r\fR option) prints all the event records
+(that were generated by \fBTNF_PROBE\fR(3TNF)) and the event descriptor records
+only. It also orders the events by time.
+.SH OPTIONS
+.sp
+.LP
+The following option is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+Does a raw conversion of \fBTNF\fR to \fBASCII\fR. The output is a literal
+transalation of the binary \fBTNF\fR file and includes all the records in the
+file. This output is useful only if you have a good understanding of
+\fBTNF\fR. A sample output is listed in EXAMPLES below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Prints all \fBTNF\fR unsigned type argument values in hexadecimal format
+instead of decimal format.
+.RE
+
+.SH RETURN VALUES
+.sp
+.LP
+\fBtnfdump\fR returns \fB0\fR on succcessful exit.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRConverting a file into ASCII
+.sp
+.LP
+To convert the file \fB/tmp/trace-2130\fR into \fBASCII\fR, use the
+\fBtnfdump\fR command and the name of the binary trace file. Be aware that the
+\fBtnfdump\fR output goes to \fBstdout\fR by default.
+
+.sp
+.in +2
+.nf
+example% \fBtnfdump /tmp/trace-2130\fR
+.fi
+.in -2
+.sp
+
+.sp
+.in +2
+.nf
+probe tnf_name: "inloop" tnf_string: "keys cookie main loop;\e
+ file cookie2.c;line 50;sunw%debug in the loop"
+probe tnf_name: "end" tnf_string: "keys cookie main end;\e
+ file cookie2.c;line 41;sunw%debug exiting program"
+------------- ----------- ---- ------ --- ---------- ----------------
+Elapsed (ms) Delta (ms) PID LWPID TID CPU Probe Data/
+ Name Description . . .
+------------- ----------- ---- ------ --- ---------- ----------------
+ 0.000000 0.000000 8792 1 0 - inloop loop_count: 0
+ total_iterations: 0
+ 0.339000 0.339000 8792 1 0 - inloop loop_count: 1
+ total_iterations: 1
+ 0.350500 0.011500 8792 1 0 - inloop loop_count: 2
+ total_iterations: 2
+ 0.359500 0.009000 8792 1 0 - inloop loop_count: 3
+ total_iterations: 3
+ 0.369500 0.010000 8792 1 0 - inloop loop_count: 4
+ total_iterations: 4
+7775.969500 7775.600000 8792 1 0 - inloop loop_count: 0
+ total_iterations: 5
+7776.016000 0.046500 8792 1 0 - inloop loop_count: 1
+ total_iterations: 6
+7776.025000 0.009000 8792 1 0 - inloop loop_count: 2
+ total_iterations: 7
+7776.034000 0.009000 8792 1 0 - inloop loop_count: 3
+ total_iterations: 8
+7776.043000 0.009000 8792 1 0 - inloop loop_count: 4
+ total_iterations: 9
+7776.052000 0.009000 8792 1 0 - inloop loop_count: 5
+ total_iterations: 10
+7776.061000 0.009000 8792 1 0 - inloop loop_count: 6
+ total_iterations: 11
+9475.979500 1699.918500 8792 1 0 - end node_struct:
+ { type: node_tnf
+ cur_sum: 9 max_cnt: 12 }
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+All probes that are encountered during execution have a description of it
+printed out. The description is one per line prefixed by the
+keyword '\fBprobe\fR'. The name of the probe is in double quotes after the
+keyword '\fBtnf_name\fR'. The description of this probe is in double quotes after the
+keyword '\fBtnf_string\fR'.
+
+.sp
+.LP
+A heading is printed after all the description of the probes are printed. The
+first column gives the elapsed time in milli-seconds since the first event. The
+second column gives the elapsed time in milli-seconds since the previous event.
+The next four columns are the process id, lwp id, thread id, and cpu number.
+The next column is the name of the probe that generated this event. This can be
+matched to the probe description explained above. The last column is the data
+that the event contains, formatted as \fBarg_name_n\fR \fB(see\fR
+\fBTNF_PROBE\fR(3TNF)) followed by a colon and the value of that argument. The
+format of the value depends on its type. \fBtnf_opaque\fR arguments are printed
+in hexadecimal. All other integers are printed in decimal. Strings are printed
+in double quotes and user-defined records are enclosed in braces `{ }'. The
+first field of a user defined record indicates its \fBTNF\fR type (see
+\fBTNF_DECLARE_RECORD\fR(3TNF)). The rest of the fields are the members of the
+record.
+
+.sp
+.LP
+A `-' in any column indicates that there is no data for that particular column.
+
+.LP
+\fBExample 2 \fRTo do a raw conversion of a file into ASCII
+.sp
+.LP
+To do a raw conversion of the file \fB/tmp/trace-4000\fR into \fBASCII\fR, use:
+
+.sp
+.in +2
+.nf
+example% \fBtnfdump -r /tmp/trace-4000\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The output will look like the following:
+
+.sp
+.in +2
+.nf
+0x10e00 : {
+ tnf_tag 0x109c0 tnf_block_header
+ generation 1
+ bytes_valid 320
+ A_lock 0
+ B_lock 0
+ next_block 0x0
+ }
+0x10e10 : {
+ tnf_tag 0x10010 probe1
+ tnf_tag_arg 0x10e24 <tnf_sched_rec>
+ time_delta 128
+ test_ulong 4294967295
+ test_long -1
+ }
+0x10e24 : {
+ tnf_tag 0x10cf4 tnf_sched_rec
+ tid 0
+ lwpid 1
+ pid 13568
+ time_base 277077875828500
+ }
+0x10e3c : {
+ tnf_tag 0x11010 probe2
+ tnf_tag_arg 0x10e24 <tnf_sched_rec>
+ time_delta 735500
+ test_str 0x10e48 "string1"
+ }
+0x10e48 : {
+ tnf_tag 0x1072c tnf_string
+ tnf_self_size 16
+ chars "string1"
+ }
+0x10e58 : {
+ tnf_tag 0x110ec probe3
+ tnf_tag_arg 0x10e24 <tnf_sched_rec>
+ time_delta 868000
+ test_ulonglong 18446744073709551615
+ test_longlong -1
+ test_float 3.142857
+ }
+\|.\|.\|.
+\|.\|.\|.
+\|.\|.\|.
+0x110ec : {
+ tnf_tag 0x10030 tnf_probe_type
+ tnf_tag_code 42
+ tnf_name 0x1110c "probe3"
+ tnf_properties 0x1111c <tnf_properties>
+ tnf_slot_types 0x11130 <tnf_slot_types>
+ tnf_type_size 32
+ tnf_slot_names 0x111c4 <tnf_slot_names>
+ tnf_string 0x11268 "keys targdebug main;\e
+ file targdebug.c;line 61;"
+ }
+0x1110c : {
+ tnf_tag 0x10068 tnf_name
+ tnf_self_size 16
+ chars "probe3"
+ }
+0x1111c : {
+ tnf_tag 0x100b4 tnf_properties
+ tnf_self_size 20
+ 0 0x101a0 tnf_tagged
+ 1 0x101c4 tnf_struct
+ 2 0x10b84 tnf_tag_arg
+ }
+0x11130 : {
+ tnf_tag 0x10210 tnf_slot_types
+ tnf_self_size 28
+ 0 0x10bd0 tnf_probe_event
+ 1 0x10c20 tnf_time_delta
+ 2 0x1114c tnf_uint64
+ 3 0x10d54 tnf_int64
+ 4 0x11188 tnf_float32
+ }
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The first number is the file offset of the record. The record is enclosed in
+braces `{ }'. The first column in a record is the slot name (for records whose
+fields do not have names, it is the type name). The second column in the record
+is the value of that slot if it is a scalar (only scalars that are of type
+\fBtnf_opaque\fR are printed in hex), or the offset of the record if it is a
+reference to another record.
+
+.sp
+.LP
+The third column in a record is optional. It does not exist for scalar slots of
+records. If it exists, the third column is a type name with or without angle
+brackets, or a string in double quotes. Unadorned names indicate a reference to
+the named metatag record (that is, a reference to a record with that name in
+the \fBtnf_name\fR field). Type names in angled brackets indicate a reference
+to a record that is an instance of that type (that is, a reference to a record
+with that name in the \fBtnf_tag\fR field). The content of strings are printed
+out in double quotes at the reference site.
+
+.sp
+.LP
+Records that are arrays have their array elements follow the header slots, and
+are numbered 0, 1, 2, and so on, except strings where the string is written as
+the 'chars' (pseudo-name) slot.
+
+.sp
+.LP
+Records that are events (generated by \fBTNF_PROBE\fR(3TNF)) will have a slot
+name of \fBtnf_tag_arg\fR as their second field which is a reference to the
+schedule record. Schedule records describe more information about the event
+like the thread-id, process-id, and the \fBtime_base\fR. The \fBtime_delta\fR
+of an event can be added to the \fBtime_base\fR of the schedule record that the
+event references, to give an absolute time. This time is expressed as
+nanoseconds since some arbitrary time in the past (see \fBgethrtime\fR(3C)).
+
+.LP
+\fBExample 3 \fRPrinting TNF unsigned arguments in hexadecimal
+.sp
+.LP
+To print \fBTNF\fR unsigned arguments in hexadecimal for the file
+\fB/tmp/trace-2192\fR, use:
+
+.sp
+.in +2
+.nf
+example% \fBtnfdump -x /tmp/trace-2192\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The output will look like the following:
+
+.sp
+.in +2
+.nf
+probe tnf_name: "start" tnf_string: "keys cookie main;
+file test17.c;line 20;sunw%debug starting main"
+probe tnf_name: "inloop" tnf_string: "keys cookie main
+loop;file test17.c;line 41;sunw%debug in the loop"
+probe tnf_name: "final" tnf_string: "keys cookie main
+final;file test17.c;line 32;sunw%debug in the final"
+------------ ----------- ---- ----- --- --------- ---------------------
+ Elapsed Delta PID LWPID TID CPU Probe Data/Description ...
+ (ms) (ms) Name
+------------ ----------- ---- ----- --- --------- ---------------------
+ 0.000000 0.000000 6280 1 1 - start
+ 2455.211311 2455.211311 6280 1 1 - inloop loop_count: 0x0
+ total_iterations: 0x0
+ 2455.215768 0.004457 6280 1 1 - inloop loop_count: 0x1
+ total_iterations: 0x1
+ 2455.217041 0.001273 6280 1 1 - inloop loop_count: 0x2
+ total_iterations: 0x2
+ 2455.218285 0.001244 6280 1 1 - inloop loop_count: 0x3
+ total_iterations: 0x3
+ 2455.219600 0.001315 6280 1 1 - inloop loop_count: 0x4
+ total_iterations: 0x4
+ 4058.815125 1603.595525 6280 1 1 - inloop loop_count: 0x0
+ total_iterations: 0x5
+ 4058.818699 0.003574 6280 1 1 - inloop loop_count: 0x1
+ total_iterations: 0x6
+ 4058.819931 0.001232 6280 1 1 - inloop loop_count: 0x2
+ total_iterations: 0x7
+ 4058.821264 0.001333 6280 1 1 - inloop loop_count: 0x3
+ total_iterations: 0x8
+ 4058.822520 0.001256 6280 1 1 - inloop loop_count: 0x4
+ total_iterations: 0x9
+ 4058.823781 0.001261 6280 1 1 - inloop loop_count: 0x5
+ total_iterations: 0xa
+ 4058.825037 0.001256 6280 1 1 - inloop loop_count: 0x6
+ total_iterations: 0xb
+13896.655450 9837.830413 6280 1 1 - final loop_count16: 0x258
+ total_iterations8: 0xb0
+::
+::
+::
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that the \fBloop_count\fR and the \fBtotal_iterations\fR are \fBTNF\fR
+unsigned arguments. Their values are printed in hexadecimal when requested by
+option \fB-x\fR.
+
+.SH SEE ALSO
+.sp
+.LP
+\fBprex\fR(1), \fBgethrtime\fR(3C), \fBTNF_DECLARE_RECORD\fR(3TNF),
+\fBTNF_PROBE\fR(3TNF), \fBtnf_process_disable\fR(3TNF), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/tnfxtract.1 b/usr/src/man/man1/tnfxtract.1
new file mode 100644
index 0000000000..107fd6f153
--- /dev/null
+++ b/usr/src/man/man1/tnfxtract.1
@@ -0,0 +1,147 @@
+'\" te
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tnfxtract 1 "19 Aug 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+tnfxtract \- extract kernel probes output into a trace file
+.SH SYNOPSIS
+.LP
+.nf
+\fBtnfxtract\fR [\fB-d\fR \fIdumpfile\fR \fB-n\fR \fInamelist\fR] \fItnf_file\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtnfxtract\fR utility collects kernel trace output from an in-core buffer
+in the Solaris kernel, or from the memory image of a crashed system, and
+generates a binary \fBTNF\fR trace file like those produced directly by user
+programs being traced.
+.sp
+.LP
+Either both or neither of the \fB-d\fR and \fB-n\fR options must be specified.
+If neither is specified, trace output is extracted from the running kernel. If
+both are specified, the \fB-d\fR argument names the file containing the
+(crashed) system memory image, and the \fB-n\fR argument names the file
+containing the symbol table for the system memory image.
+.sp
+.LP
+The \fBTNF\fR trace file \fItnf_file\fR produced is exactly the same size as
+the in-core buffer; it is essentially a snapshot of that buffer. It is legal
+to run \fBtnfxtract\fR while kernel tracing is active, i.e., while the in-core
+buffer is being written. \fBtnfxtract\fR insures that the output file it
+generates is low-level consistent, that is, that only whole probes are written
+out, and that internal data structures in the buffer are not corrupted because
+the buffer is being concurrently written.
+.sp
+.LP
+The \fBTNF\fR trace file generated is suitable as input to \fBtnfdump\fR(1),
+which will generate an \fBASCII\fR file.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdumpfile\fR\fR
+.ad
+.RS 15n
+.rt
+Uses \fIdumpfile\fR as the system memory image, instead of the running kernel.
+The \fIdumpfile\fR is normally the path name of a file generated by the
+\fBsavecore\fR utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInamelist\fR\fR
+.ad
+.RS 15n
+.rt
+Uses \fInamelist\fR as the file containing the symbol table information for the
+given \fIdumpfile\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fItnf_file\fR\fR
+.ad
+.RS 12n
+.rt
+Output file generated by \fBtnfxtract\fR based on kernel trace output from an
+in-core buffer in the Solaris kernel.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRExtracting probes from a running kernel
+.sp
+.LP
+Extract probes from the running kernel into \fBktrace.out\fR:
+
+.sp
+.in +2
+.nf
+example% \fBtnfxtract ktrace.out\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRExtracting probes from a kernel crash dump
+.sp
+.LP
+Extract probes from a kernel crash dump into \fBktrace.out\fR:
+
+.sp
+.in +2
+.nf
+example% \fBtnfxtract -d /var/crash/`uname -n`/vmcore.0 \e
+ -n /var/crash/`uname -n`/unix.0 ktrace.out\fR
+.fi
+.in -2
+.sp
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBprex\fR(1), \fBtnfdump\fR(1), \fBsavecore\fR(1M),
+\fBtnf_kernel_probes\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/touch.1 b/usr/src/man/man1/touch.1
new file mode 100644
index 0000000000..3498cb4b6c
--- /dev/null
+++ b/usr/src/man/man1/touch.1
@@ -0,0 +1,517 @@
+'\" te
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 2009, Sun Mricrosystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH touch 1 "9 Sep 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+touch, settime \- change file access and modification times
+.SH SYNOPSIS
+.LP
+.nf
+\fBtouch\fR [\fB-acm\fR] [\fB-r\fR \fIref_file\fR | \fB-t\fR \fItime\fR | \fB-d\fR \fIdate_time\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBtouch\fR [\fB-acm\fR] [\fItime_spec\fR] \fIfile\fR...
+.fi
+
+.LP
+.nf
+\fBsettime\fR [\fB-f\fR \fIref_file\fR] [\fItime_spec\fR] \fIfile\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtouch\fR utility sets the access and modification times of each file.
+The \fIfile\fR operand is created if it does not already exist.
+.sp
+.LP
+The time used can be specified by \fB-t\fR \fItime\fR, by \fB-d\fR
+\fIdate_time\fR, by the corresponding time fields of the file referenced by
+\fB-r\fR \fIref_file\fR, or by the \fItime_spec\fR operand. If none of these
+are specified, \fBtouch\fR uses the current time.
+.sp
+.LP
+If neither the \fB-a\fR nor \fB-m\fR options are specified, \fBtouch\fR updates
+both the modification and access times.
+.sp
+.LP
+A user with write access to a file, but who is not the owner of the file or a
+super-user, can change the modification and access times of that file only to
+the current time. Attempts to set a specific time with \fBtouch\fR results in
+an error.
+.sp
+.LP
+The \fBsettime\fR utility is equivalent to \fBtouch\fR \fB-c\fR
+[\fItime_spec\fR] \fIfile\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported in the \fBtouch\fR and \fBsettime\fR
+utilities:
+.SS "touch"
+.sp
+.LP
+The following options are supported for the \fBtouch\fR utility:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes the access time of \fIfile\fR. Does not change the modification time
+unless \fB-m\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does not create a specified \fIfile\fR if it does not exist. Does not write any
+diagnostic messages concerning this condition.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdate_time\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the specified date_time instead of the current time. The option-argument
+must be a string of the form:
+.sp
+.in +2
+.nf
+\fIYYYY\fR-\fIMM\fR-\fIDDThh\fR:\fImm\fR:\fISS\fR[.\fIfrac\fR][\fItz\fR]
+.fi
+.in -2
+.sp
+
+or
+.sp
+.in +2
+.nf
+\fIYYYY\fR-\fIMM\fR-\fIDDThh\fR:\fImm\fR:\fISS\fR[,\fIfrac\fR][\fItz\fR]
+.fi
+.in -2
+.sp
+
+where
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIYYYY\fR is at least four decimal digits giving the year
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIMM\fR, \fIDD\fR, \fIhh\fR, \fImm\fR, and \fISS\fR are as with \fB-t\fR
+\fItime\fR
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIT\fR is either the letter \fBT\fR or a single SPACE character
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+[\fI\&.frac\fR] and [\fI,frac\fR] are either empty, or a period (\fB\&.\fR) or
+a comma (\fB,\fR) respectively, followed by one or more decimal digits,
+specifying a fractional second
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+[\fItz\fR] is either empty, signifying local time, or the letter \fBZ\fR,
+signifying UTC. If [\fItz\fR] is empty, the resulting time is affected by the
+value of the \fBTZ\fR environment variable
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.sp .6
+.RS 4n
+Changes the modification time of \fIfile\fR. Does not change the access time
+unless \fB-a\fR is also specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fIref_file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the corresponding times of the file named by \fIref_file\fR instead of the
+current time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fItime\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the specified \fItime\fR instead of the current time. \fItime\fR is a
+decimal number of the form:
+.sp
+.in +2
+.nf
+[[\fICC\fR]\fIYY\fR]\fIMMDDhhmm\fR[\fI\&.SS\fR]
+.fi
+.in -2
+.sp
+
+where each two digits represent the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIMM\fR\fR
+.ad
+.sp .6
+.RS 4n
+The month of the year [01-12].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIDD\fR\fR
+.ad
+.sp .6
+.RS 4n
+The day of the month [01-31].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhh\fR\fR
+.ad
+.sp .6
+.RS 4n
+The hour of the day [00-23].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR\fR
+.ad
+.sp .6
+.RS 4n
+The minute of the hour [00-59].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fICC\fR\fR
+.ad
+.sp .6
+.RS 4n
+The first two digits of the year.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIYY\fR\fR
+.ad
+.sp .6
+.RS 4n
+The second two digits of the year.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fISS\fR\fR
+.ad
+.sp .6
+.RS 4n
+The second of the minute [00-61].
+.RE
+
+Both \fICC\fR and \fIYY\fR are optional. If neither is given, the current year
+is assumed. If \fIYY\fR is specified, but \fICC\fR is not, \fICC\fR is derived
+as follows:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+If YY is:CC becomes:
+_
+69-9919
+00-3820
+39-68ERROR
+.TE
+
+The resulting time is affected by the value of the \fBTZ\fR environment
+variable. If the resulting time value precedes the Epoch, \fBtouch\fR exits
+immediately with an error status. The range of valid times is the Epoch to
+January 18, 2038.
+.sp
+The range for \fISS\fR is [00-61] rather than [00-59] because of leap seconds.
+If \fISS\fR is 60 or 61, and the resulting time, as affected by the \fBTZ\fR
+environment variable, does not refer to a leap second, the resulting time is
+one or two seconds after a time where \fISS\fR is 59. If \fISS\fR is not given,
+it is assumed to be 0.
+.RE
+
+.SS "settime"
+.sp
+.LP
+The following option is supported for the \fBsettime\fR utility:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIref_file\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the corresponding times of the file named by \fIref_file\fR instead of the
+current time.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported for the \fBtouch\fR and \fBsettime\fR
+utilities:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+A path name of a file whose times are to be modified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItime_spec\fR\fR
+.ad
+.sp .6
+.RS 4n
+Uses the specified \fItime_spec\fR instead of the current time. This operand is
+a decimal number of the form:
+.sp
+.in +2
+.nf
+\fIMMDDhhmm\fR[\fIYY\fR]
+.fi
+.in -2
+.sp
+
+where each two digits represent the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIMM\fR\fR
+.ad
+.sp .6
+.RS 4n
+The month of the year [01-12].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIDD\fR\fR
+.ad
+.sp .6
+.RS 4n
+The day of the month [01-31].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIhh\fR\fR
+.ad
+.sp .6
+.RS 4n
+The hour of the day [00-23].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImm\fR\fR
+.ad
+.sp .6
+.RS 4n
+The minute of the hour [00-59].
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIYY\fR\fR
+.ad
+.sp .6
+.RS 4n
+The second two digits of the year.
+.sp
+\fIYY\fR is optional. If it is omitted, the current year is assumed. If
+\fIYY\fR is specified, the year is derived as follows:
+.RE
+
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) cw(2.75i)
+lw(2.75i) lw(2.75i)
+.
+YYCorresponding Year
+69-991969-1999
+00-382000-2038
+39-68ERROR
+.TE
+
+If no \fB-d\fR, \fB-r\fR, or \fB-t\fRoption is specified, at least two operands
+are specified, and the first operand is an eight- or ten-digit decimal integer,
+the first operand is assumed to be a \fItime_spec\fR operand. Otherwise, the
+first operand is assumed to be a \fIfile\fR operand.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBtouch\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtouch\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLANG\fR,
+\fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTZ\fR\fR
+.ad
+.sp .6
+.RS 4n
+Determine the timezone to be used for interpreting the \fItime\fR or
+\fIdate_time\fR option-argument or the \fItime_spec\fR operand.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.sp .6
+.RS 4n
+The \fBtouch\fR utility executed successfully and all requested changes were
+made.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.sp .6
+.RS 4n
+An error occurred. The \fBtouch\fR utility returned the number of files for
+which the times could not be successfully modified.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBfutimens\fR(2), \fBstat\fR(2), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Users familiar with the BSD environment find that for the \fBtouch\fR utility,
+the \fB-f\fR option is accepted but ignored. The \fB-f\fR option is unnecessary
+because \fBtouch\fR succeeds for all files owned by the user regardless of the
+permissions on the files.
diff --git a/usr/src/man/man1/tplot.1 b/usr/src/man/man1/tplot.1
new file mode 100644
index 0000000000..61f82facf9
--- /dev/null
+++ b/usr/src/man/man1/tplot.1
@@ -0,0 +1,158 @@
+'\" te
+.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tplot 1 "14 Jul 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+tplot, t300, t300s, t4014, t450, tek, ver \- graphics filters for various
+plotters
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/tplot\fR [\fB-T\fR \fIterminal\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBtplot\fR reads plotting instructions from the standard input and produces
+plotting instructions suitable for a particular \fIterminal\fR on the standard
+output.
+.sp
+.LP
+If no \fIterminal\fR is specified, the environment variable \fBTERM\fR is used.
+The default \fIterminal\fR is \fBtek\fR.
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+Except for \fBver\fR, the following terminal-types can be used with `\fBlpr
+\fR\fB-g\fR' (see \fBlpr\fR) to produce plotted output:
+.sp
+.ne 2
+.mk
+.na
+\fB300\fR
+.ad
+.RS 15n
+.rt
+\fBDASI\fR 300 or \fBGSI\fR terminal (Diablo\(rg mechanism).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB300s | 300S\fR
+.ad
+.RS 15n
+.rt
+\fBDASI\fR 300s terminal (Diablo mechanism).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB450\fR
+.ad
+.RS 15n
+.rt
+\fBDASI\fR Hyterm 450 terminal (Diablo mechanism).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB4014 | tek\fR
+.ad
+.RS 15n
+.rt
+Tektronix 4014 and 4015 storage scope with Enhanced Graphics Module. (Use 4013
+for Tektronix 4014 or 4015 without the Enhanced Graphics Module).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBver\fR
+.ad
+.RS 15n
+.rt
+Versatec\(rg D1200A printer-plotter. The output is scan-converted and suitable
+input to `\fBlpr \fR\fB-v\fR'.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/t300\fR\fR
+.ad
+.RS 18n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/t300s\fR\fR
+.ad
+.RS 18n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/t4014\fR\fR
+.ad
+.RS 18n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/t450\fR\fR
+.ad
+.RS 18n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/tek\fR\fR
+.ad
+.RS 18n
+.rt
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/vplot\fR\fR
+.ad
+.RS 18n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlp\fR(1), \fBvi\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/tput.1 b/usr/src/man/man1/tput.1
new file mode 100644
index 0000000000..5aed5f8452
--- /dev/null
+++ b/usr/src/man/man1/tput.1
@@ -0,0 +1,568 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tput 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+tput \- initialize a terminal or query terminfo database
+.SH SYNOPSIS
+.LP
+.nf
+\fBtput\fR [\fB-T\fR \fItype\fR] \fIcapname\fR [\fIparm\fR]...
+.fi
+
+.LP
+.nf
+\fBtput\fR \fB-S\fR <<
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtput\fR utility uses the \fBterminfo\fR database to make the values of
+terminal-dependent capabilities and information available to the shell (see
+\fBsh\fR(1)); to clear, initialize or reset the terminal; or to return the long
+name of the requested terminal type. \fBtput\fR outputs a string if the
+capability attribute (\fIcapname\fR) is of type string, or an integer if the
+attribute is of type integer. If the attribute is of type boolean, \fBtput\fR
+simply sets the exit status (\fB0\fR for \fBTRUE\fR if the terminal has the
+capability, \fB1\fR for \fBFALSE\fR if it does not), and produces no output.
+Before using a value returned on standard output, the user should test the exit
+status (\fB$?\fR, see \fBsh\fR(1)) to be sure it is \fB0\fR. See the EXIT
+STATUS section.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fItype\fR \fR
+.ad
+.RS 11n
+.rt
+Indicates the \fItype\fR of terminal. Normally this option is unnecessary,
+because the default is taken from the environment variable \fBTERM\fR. If
+\fB-T\fR is specified, then the shell variables \fBLINES\fR and \fBCOLUMNS\fR
+and the layer size will not be referenced.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fR
+.ad
+.RS 11n
+.rt
+Allows more than one capability per invocation of \fBtput\fR. The capabilities
+must be passed to \fBtput\fR from the standard input instead of from the
+command line (see the example in the EXAMPLES section). Only one \fIcapname\fR
+is allowed per line. The \fB-S\fR option changes the meaning of the \fB0\fR and
+\fB1\fR boolean and string exit statuses (see the EXAMPLES section).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcapname\fR \fR
+.ad
+.RS 12n
+.rt
+Indicates the capability attribute from the \fBterminfo\fR database. See
+\fBterminfo\fR(4) for a complete list of capabilities and the \fIcapname\fR
+associated with each.
+.sp
+The following strings will be supported as operands by the implementation in
+the "C" locale:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBclear\fR \fR
+.ad
+.RS 13n
+.rt
+Display the clear-screen sequence.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinit\fR \fR
+.ad
+.RS 13n
+.rt
+If the \fBterminfo\fR database is present and an entry for the user's terminal
+exists (see \fB-T\fR\fItype\fR, above), the following will occur:
+.RS +4
+.TP
+1.
+if present, the terminal's initialization strings will be output (\fBis1\fR,
+\fBis2\fR, \fBis3\fR, \fBif\fR, \fBiprog\fR),
+.RE
+.RS +4
+.TP
+2.
+any delays (for instance, newline) specified in the entry will be set in the
+tty driver,
+.RE
+.RS +4
+.TP
+3.
+tabs expansion will be turned on or off according to the specification in
+the entry, and
+.RE
+.RS +4
+.TP
+4.
+if tabs are not expanded, standard tabs will be set (every 8 spaces). If an
+entry does not contain the information needed for any of the four above
+activities, that activity will silently be skipped.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBreset\fR \fR
+.ad
+.RS 13n
+.rt
+Instead of putting out initialization strings, the terminal's reset strings
+will be output if present (\fBrs1\fR, \fBrs2\fR, \fBrs3\fR, \fBrf\fR). If the
+reset strings are not present, but initialization strings are, the
+initialization strings will be output. Otherwise, \fBreset\fR acts identically
+to \fBinit\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBlongname\fR \fR
+.ad
+.RS 13n
+.rt
+If the \fBterminfo\fR database is present and an entry for the user's terminal
+exists (see \fB-T\fR\fItype\fR above), then the long name of the terminal will
+be put out. The long name is the last name in the first line of the terminal's
+description in the \fBterminfo\fR database (see \fBterm\fR(5)).
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIparm\fR \fR
+.ad
+.RS 12n
+.rt
+If the attribute is a string that takes parameters, the argument \fIparm\fR
+will be instantiated into the string. An all numeric argument will be passed to
+the attribute as a number.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRInitializing the terminal according to TERM
+.sp
+.LP
+This example initializes the terminal according to the type of terminal in the
+environment variable \fBTERM\fR. This command should be included in
+everyone's .profile after the environment variable \fBTERM\fR has been exported, as
+illustrated on the \fBprofile\fR(4) manual page.
+
+.sp
+.in +2
+.nf
+example% \fBtput init\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRResetting a terminal
+.sp
+.LP
+This example resets an AT&T 5620 terminal, overriding the type of terminal in
+the environment variable \fBTERM\fR:
+
+.sp
+.in +2
+.nf
+example% \fBtput -T5620 reset\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRMoving the cursor
+.sp
+.LP
+The following example sends the sequence to move the cursor to row \fB0\fR,
+column \fB0\fR (the upper left corner of the screen, usually known as the
+"home" cursor position).
+
+.sp
+.in +2
+.nf
+example% \fBtput cup 0 0\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This next example sends the sequence to move the cursor to row \fB23\fR, column
+\fB4\fR.
+
+.sp
+.in +2
+.nf
+example% \fBtput cup 23 4\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 4 \fREchoing the clear-screen sequence
+.sp
+.LP
+This example echos the clear-screen sequence for the current terminal.
+
+.sp
+.in +2
+.nf
+example% \fBtput clear\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRPrinting the number of columns
+.sp
+.LP
+This command prints the number of columns for the current terminal.
+
+.sp
+.in +2
+.nf
+example% \fBtput cols\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command prints the number of columns for the 450 terminal.
+
+.sp
+.in +2
+.nf
+example% \fBtput -T450 cols\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRSetting shell variables
+.sp
+.LP
+This example sets the shell variables \fBbold\fR, to begin stand-out mode
+sequence, and \fBoffbold\fR, to end standout mode sequence, for the current
+terminal. This might be followed by a prompt:
+
+.sp
+.in +2
+.nf
+\fBecho "${bold}Please type in your name: ${offbold}\ec"\fR
+example% \fBbold='tput smso'\fR
+example% \fBoffbold='tput rmso'\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRSetting the exit status
+.sp
+.LP
+This example sets the exit status to indicate if the current terminal is a
+hardcopy terminal.
+
+.sp
+.in +2
+.nf
+example% \fBtput hc\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRPrinting the long name from terminfo
+.sp
+.LP
+This command prints the long name from the \fBterminfo\fR database for the type
+of terminal specified in the environment variable \fBTERM\fR.
+
+.sp
+.in +2
+.nf
+example% \fBtput longname\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRProcessing several capabilities with one invocation
+.sp
+.LP
+This example shows \fBtput\fR processing several capabilities in one
+invocation. This example clears the screen, moves the cursor to position
+\fB10\fR, \fB10\fR and turns on \fBbold\fR (extra bright) mode. The list is
+terminated by an exclamation mark (\fB!\fR) on a line by itself.
+
+.sp
+.in +2
+.nf
+example% \fBtput -S <<!
+> clear
+> cup 10 10
+> bold
+> !\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtput\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTERM\fR \fR
+.ad
+.RS 9n
+.rt
+Determine the terminal type. If this variable is unset or null, and if the
+\fB-T\fR option is not specified, an unspecified default terminal type will be
+used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 10n
+.rt
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIcapname\fR is of type boolean and \fB-S\fR is not specified, indicates
+\fBTRUE\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIcapname\fR is of type string and \fB-S\fR is not specified, indicates
+\fIcapname\fR is defined for this terminal type.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIcapname\fR is of type boolean or string and \fB-S\fR is specified,
+indicates that all lines were successful.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fIcapname\fR is of type integer.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The requested string was written successfully.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR \fR
+.ad
+.RS 10n
+.rt
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIcapname\fR is of type boolean and \fB-S\fR is not specified, indicates
+\fBFALSE\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIcapname\fR is of type string and \fB-S\fR is not specified, indicates
+that \fIcapname\fR is not defined for this terminal type.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB2\fR \fR
+.ad
+.RS 10n
+.rt
+Usage error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB3\fR \fR
+.ad
+.RS 10n
+.rt
+No information is available about the specified terminal type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB4\fR \fR
+.ad
+.RS 10n
+.rt
+The specified operand is invalid.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>4\fR \fR
+.ad
+.RS 10n
+.rt
+An error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi1\fR \fR
+.ad
+.RS 10n
+.rt
+\fIcapname\fR is a numeric variable that is not specified in the \fBterminfo\fR
+database. For instance, \fBtput\fR \fB-T450\fR lines and \fBtput\fR
+\fB-T2621\fR xmc.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/include/curses.h\fR \fR
+.ad
+.sp .6
+.RS 4n
+\fBcurses\fR(3CURSES) header
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/include/term.h\fR \fR
+.ad
+.sp .6
+.RS 4n
+\fBterminfo\fR header
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/tabset/*\fR \fR
+.ad
+.sp .6
+.RS 4n
+Tab settings for some terminals, in a format appropriate to be output to the
+terminal (escape sequences that set margins and tabs). For more information,
+see the "Tabs and Initialization" section of \fBterminfo\fR(4)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/terminfo/?/*\fR \fR
+.ad
+.sp .6
+.RS 4n
+compiled terminal description database
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBclear\fR(1), \fBsh\fR(1), \fBstty\fR(1), \fBtabs\fR(1),
+\fBcurses\fR(3CURSES), \fBprofile\fR(4), \fBterminfo\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5), \fBterm\fR(5)
diff --git a/usr/src/man/man1/tr.1 b/usr/src/man/man1/tr.1
new file mode 100644
index 0000000000..84076272a8
--- /dev/null
+++ b/usr/src/man/man1/tr.1
@@ -0,0 +1,561 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tr 1 "3 Mar 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+tr \- translate characters
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/tr\fR [\fB-cds\fR] [\fIstring1\fR [\fIstring2\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/tr\fR [\fB-cs\fR] \fIstring1\fR \fIstring2\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/tr\fR \fB-s\fR | \fB-d\fR [\fB-c\fR] \fIstring1\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/tr\fR \fB-ds\fR [\fB-c\fR] \fIstring1\fR \fIstring2\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/tr\fR [\fB-c\fR | \fB-C\fR] [\fB-s\fR] \fIstring1\fR \fIstring2\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/tr\fR \fB-s\fR [\fB-c\fR | \fB-C\fR] \fIstring1\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/tr\fR \fB-d\fR [\fB-c\fR | \fB-C\fR] \fIstring1\fR
+.fi
+
+.LP
+.nf
+\fB/usr/xpg6/bin/tr\fR \fB-ds\fR [\fB-c\fR | \fB-C\fR] \fIstring1\fR \fIstring2\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtr\fR utility copies the standard input to the standard output with
+substitution or deletion of selected characters. The options specified and the
+\fIstring1\fR and \fIstring2\fR operands control translations that occur while
+copying characters and single-character collating elements.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Complements the set of values specified by \fIstring1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 6n
+.rt
+Complements the set of characters specified by \fIstring1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Deletes all occurrences of input characters that are specified by
+\fIstring1\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Replaces instances of repeated characters with a single character.
+.RE
+
+.sp
+.LP
+When the \fB-d\fR option is not specified:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Each input character found in the array specified by \fIstring1\fR is replaced
+by the character in the same relative position in the array specified by
+\fIstring2\fR. When the array specified by \fIstring2\fR is shorter than the
+one specified by \fIstring1\fR, the results are unspecified.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the \fB-c\fR option is specified, the complements of the values specified by
+\fIstring1\fR are placed in the array in ascending order by binary value.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the \fB-C\fR option is specified, the complements of the characters
+specified by \fIstring1\fR (the set of all characters in the current character
+set, as defined by the current setting of \fBLC_CTYPE\fR, except for those
+actually specified in the \fIstring1\fR operand) are placed in the array in
+ascending collation sequence, as defined by the current setting of
+\fBLC_COLLATE\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Because the order in which characters specified by character class expressions
+or equivalence class expressions is undefined, such expressions should only be
+used if the intent is to map several characters into one. An exception is case
+conversion, as described previously.
+.RE
+.sp
+.LP
+When the \fB-d\fR option is specified:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Input characters found in the array specified by \fIstring1\fR are deleted.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When the \fB-C\fR option is specified with \fB-d\fR, all values except those
+specified by \fIstring1\fR are deleted. The contents of \fIstring2\fR are
+ignored, unless the \fB-s\fR option is also specified.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If the \fB-c\fR option is specified, the complements of the values specified by
+\fIstring1\fR are placed in the array in ascending order by binary value.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The same string cannot be used for both the \fB-d\fR and the \fB-s\fR option.
+When both options are specified, both \fIstring1\fR (used for deletion) and
+\fIstring2\fR (used for squeezing) are required.
+.RE
+.sp
+.LP
+When the \fB-s\fR option is specified, after any deletions or translations have
+taken place, repeated sequences of the same character is replaced by one
+occurrence of the same character, if the character is found in the array
+specified by the last operand. If the last operand contains a character class,
+such as the following example:
+.sp
+.in +2
+.nf
+\fBtr -s '[:space:]'\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the last operand's array contains all of the characters in that character
+class. However, in a case conversion, as described previously, such as
+.sp
+.in +2
+.nf
+\fBtr -s '[:upper:]' '[:lower:]'\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+the last operand's array contains only those characters defined as the second
+characters in each of the \fBtoupper\fR or \fBtolower\fR character pairs, as
+appropriate. (See \fBtoupper\fR(3C) and \fBtolower\fR(3C)).
+.sp
+.LP
+An empty string used for \fIstring1\fR or \fIstring2\fR produces undefined
+results.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstring1\fR\fR
+.ad
+.br
+.na
+\fB\fIstring2\fR\fR
+.ad
+.RS 11n
+.rt
+Translation control strings. Each string represents a set of characters to be
+converted into an array of characters used for the translation.
+.RE
+
+.sp
+.LP
+The operands \fIstring1\fR and \fIstring2\fR (if specified) define two arrays
+of characters. The constructs in the following list can be used to specify
+characters or single-character collating elements. If any of the constructs
+result in multi-character collating elements, \fBtr\fR excludes, without a
+diagnostic, those multi-character elements from the resulting array.
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcharacter\fR\fR
+.ad
+.RS 15n
+.rt
+Any character not described by one of the conventions below represents itself.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\fR\fIoctal\fR\fR
+.ad
+.RS 15n
+.rt
+Octal sequences can be used to represent characters with specific coded values.
+An octal sequence consists of a backslash followed by the longest sequence of
+one-, two-, or three-octal-digit characters (01234567). The sequence causes the
+character whose encoding is represented by the one-, two- or three-digit octal
+integer to be placed into the array. Multi-byte characters require multiple,
+concatenated escape sequences of this type, including the leading \e for each
+byte.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\e\fR\fIcharacter\fR\fR
+.ad
+.RS 15n
+.rt
+The backslash-escape sequences \fB\ea\fR, \fB\eb\fR, \fB\ef\fR, \fB\en\fR,
+\fB\er\fR, \fB\et\fR, and \fB\ev\fR are supported. The results of using any
+other character, other than an octal digit, following the backslash are
+unspecified.
+.RE
+
+.SS "/usr/xpg4/bin/tr"
+.sp
+.ne 2
+.mk
+.na
+\fB\fIc-c\fR\fR
+.ad
+.RS 7n
+.rt
+
+.RE
+
+.SS "/usr/bin/tr"
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIc-c\fR]\fR
+.ad
+.RS 13n
+.rt
+In the POSIX locale, this construct represents the range of collating elements
+between the range endpoints (as long as neither endpoint is an octal sequence
+of the form \fB\e\fR\fIoctal\fR), inclusively, as defined by the collation
+sequence. The characters or collating elements in the range are placed in the
+array in ascending collation sequence. If the second endpoint precedes the
+starting endpoint in the collation sequence, it is unspecified whether the
+range of collating elements is empty, or this construct is treated as invalid.
+In locales other than the POSIX locale, this construct has unspecified
+behavior.
+.sp
+If either or both of the range endpoints are octal sequences of the form
+\fB\e\fR\fIoctal\fR, represents the range of specific coded binary values
+between two range endpoints, inclusively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[:\fR\fIclass\fR\fB:]\fR\fR
+.ad
+.RS 13n
+.rt
+Represents all characters belonging to the defined character class, as defined
+by the current setting of the \fBLC_CTYPE\fR locale category. The following
+character class names are accepted when specified in \fIstring1\fR:
+.sp
+.in +2
+.nf
+alnum blank digit lower punct upper
+alpha cntrl graph print space xdigit
+.fi
+.in -2
+.sp
+
+In addition, character class expressions of the form \fB[:\fR\fIname\fR\fB:]\fR
+are recognized in those locales where the \fIname\fR keyword has been given a
+\fBcharclass\fR definition in the \fBLC_CTYPE\fR category.
+.sp
+When both the \fB-d\fR and \fB-s\fR options are specified, any of the character
+class names are accepted in \fIstring2\fR. Otherwise, only character class
+names \fBlower\fR or \fBupper\fR are valid in \fIstring2\fR and then only if
+the corresponding character class \fBupper\fR and \fBlower\fR, respectively, is
+specified in the same relative position in \fIstring1\fR. Such a specification
+is interpreted as a request for case conversion. When \fB[:lower:]\fR appears
+in \fIstring1\fR and \fB[:upper:]\fR appears in \fIstring2,\fR the arrays
+contain the characters from the \fBtoupper\fR mapping in the \fBLC_CTYPE\fR
+category of the current locale. When \fB[:upper:]\fR appears in \fIstring1\fR
+and \fB[:lower:]\fR appears in \fIstring2,\fR the arrays contain the characters
+from the \fBtolower\fR mapping in the \fBLC_CTYPE\fR category of the current
+locale. The first character from each mapping pair is in the array for
+\fIstring1\fR and the second character from each mapping pair is in the array
+for \fIstring2\fR in the same relative position.
+.sp
+Except for case conversion, the characters specified by a character class
+expression are placed in the array in an unspecified order.
+.sp
+If the name specified for \fIclass\fR does not define a valid character class
+in the current locale, the behavior is undefined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB[=\fR\fIequiv\fR\fB=]\fR\fR
+.ad
+.RS 13n
+.rt
+Represents all characters or collating elements belonging to the same
+equivalence class as \fIequiv\fR, as defined by the current setting of the
+\fBLC_COLLATE\fR locale category. An equivalence class expression is allowed
+only in \fIstring1\fR, or in \fIstring2\fR when it is being used by the
+combined \fB-d\fR and \fB-s\fR options. The characters belonging to the
+equivalence class are placed in the array in an unspecified order.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB[\fIx*n\fR]\fR
+.ad
+.RS 13n
+.rt
+Represents \fIn\fR repeated occurrences of the character \fIx\fR. Because this
+expression is used to map multiple characters to one, it is only valid when it
+occurs in \fIstring2\fR. If \fIn\fR has a leading \fB0\fR, it is interpreted
+as an octal value. Otherwise, it is interpreted as a decimal value.
+.sp
+If \fIn\fR is omitted or is \fB0\fR, \fB/usr/bin/tr\fR interprets this as huge;
+\fB/usr/xpg4/bin/tr\fR and \fB/usr/xpg6/bin/tr\fR interprets this as large
+enough to extend the\fIstring2\fR-based sequence to the length of the
+\fIstring1\fR-based sequence.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBtr\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRCreating a list of words
+.sp
+.LP
+The following example creates a list of all words in \fIfile1\fR, one per line
+in \fIfile2\fR, where a word is taken to be a maximal string of letters.
+
+.sp
+.in +2
+.nf
+\fBtr \(mics "[:alpha:]" "[\en*]" <file1 >file2\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRTranslating characters
+.sp
+.LP
+This example translates all lower-case characters in \fBfile1\fR to upper-case
+and writes the results to standard output.
+
+.sp
+.in +2
+.nf
+\fBtr "[:lower:]" "[:upper:]" <file1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that the caveat expressed in the corresponding example in XPG3 is no
+longer in effect. This case conversion is now a special case that employs the
+\fBtolower\fR and \fBtoupper\fR classifications, ensuring that proper mapping
+is accomplished (when the locale is correctly defined).
+
+.LP
+\fBExample 3 \fRIdentifying equivalent characters
+.sp
+.LP
+This example uses an equivalence class to identify accented variants of the
+base character \fBe\fR in \fBfile1\fR, which are stripped of diacritical marks
+and written to \fBfile2\fR.
+
+.sp
+.in +2
+.nf
+\fBtr "[=e=]" e <file1 >file2\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtr\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+All input was processed successfully.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/tr"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SS "/usr/xpg4/bin/tr"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "/usr/xpg6/bin/tr"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBed\fR(1), \fBsed\fR(1), \fBsh\fR(1), \fBtolower\fR(3C), \fBtoupper\fR(3C),
+\fBascii\fR(5), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5),
+\fBregex\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Unlike some previous versions, \fB/usr/xpg4/bin/tr\fR correctly processes
+\fBNUL\fR characters in its input stream. \fBNUL\fR characters can be stripped
+by using \fBtr\fR \fB-d\fR \fB\&'\e000'\fR.
diff --git a/usr/src/man/man1/trap.1 b/usr/src/man/man1/trap.1
new file mode 100644
index 0000000000..1ef0702417
--- /dev/null
+++ b/usr/src/man/man1/trap.1
@@ -0,0 +1,277 @@
+'\" te
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Copyright 1989
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH trap 1 "20 Nov 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+trap, onintr \- shell built-in functions to respond to (hardware) signals
+.SH SYNOPSIS
+.SS "sh"
+.LP
+.nf
+\fBtrap\fR [\fIargument\fR \fIn\fR [\fIn2\fR]...]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBonintr\fR [\fB-|\fR \fIlabel\fR]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fB*trap\fR [\fIarg\fR \fIsig\fR [\fIsig2\fR...]]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB+trap\fR [\fB-p\fR] [\fIaction\fR \fIcondition\fR...]
+.fi
+
+.SH DESCRIPTION
+.SS "sh"
+.sp
+.LP
+The \fBtrap\fR command \fIargument\fR is to be read and executed when the shell
+receives numeric or symbolic signal(s) (\fIn\fR). (Note: \fIargument\fR is
+scanned once when the trap is set and once when the trap is taken.) Trap
+commands are executed in order of signal number or corresponding symbolic
+names. Any attempt to set a trap on a signal that was ignored on entry to the
+current shell is ineffective. An attempt to trap on signal 11 (memory fault)
+produces an error. If \fIargument\fR is absent all trap(s) \fIn\fR are reset to
+their original values. If \fIargument\fR is the null string this signal is
+ignored by the shell and by the commands it invokes. If \fIn\fR is \fB0\fR the
+command \fIargument\fR is executed on exit from the shell. The \fBtrap\fR
+command with no arguments prints a list of commands associated with each signal
+number.
+.SS "csh"
+.sp
+.LP
+\fBonintr\fR controls the action of the shell on interrupts. With no arguments,
+\fBonintr\fR restores the default action of the shell on interrupts. (The shell
+terminates shell scripts and returns to the terminal command input level). With
+the \fB\(mi\fR argument, the shell ignores all interrupts. With a \fIlabel\fR
+argument, the shell executes a \fBgoto\fR \fIlabel\fR when an interrupt is
+received or a child process terminates because it was interrupted.
+.SS "ksh"
+.sp
+.LP
+\fBtrap\fR uses \fIarg\fR as a command to be read and executed when the shell
+receives signal(s) \fIsig\fR. \fIarg\fR is scanned once when the trap is set
+and once when the trap is taken. Each \fIsig\fR can be specified as a number or
+as the name of the signal. \fBtrap\fR commands are executed in order of signal
+number. Any attempt to set a trap on a signal that was ignored on entry to the
+current shell is ineffective. If \fIarg\fR is omitted or is \fB\(mi\fR, then
+the trap(s) for each \fIsig\fR are reset to their original values. If \fIarg\fR
+is the null (the empty string, for example, \fB""\fR) string then this signal
+is ignored by the shell and by the commands it invokes. If \fIsig\fR is
+\fBERR\fR then \fIarg\fR are executed whenever a command has a non-zero exit
+status. If \fIsig\fR is \fBDEBUG\fR then \fIarg\fR are executed after each
+command. If \fIsig\fR is \fB0\fR or \fBEXIT\fR for a \fBtrap\fR set outside any
+function then the command \fIarg\fR is executed on exit from the shell. The
+\fBtrap\fR command with no arguments prints a list of commands associated with
+each signal number.
+.sp
+.LP
+On this manual page, \fBksh\fR(1) commands that are preceded by one or two *
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by ** that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+\fBtrap\fR is a special built-in that defines actions to be taken when
+conditions such as receiving a signal occur. \fBtrap\fR can also be used to
+display the current trap settings on standard output.
+.sp
+.LP
+If \fIaction\fR is \fB-\fR, \fBtrap\fR resets each condition to the default
+value. If \fIaction\fR is an empty string, the shell ignores each of the
+conditions if they arise. Otherwise, the argument \fIaction\fR is read and
+executed by the shell as if it were processed by \fBeval\fR when one of the
+corresponding conditions arise. The action of the trap overrides any previous
+action associated with each specified condition. The value of \fB$?\fR is not
+altered by the trap execution.
+.sp
+.LP
+\fIcondition\fR can be the name or number of a signal, or one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBEXIT\fR\fR
+.ad
+.RS 9n
+.rt
+Execute this trap when the shell exits. If defined within a function with the
+\fBfunction\fR reserved word, executes the trap in the caller's environment
+when the function returns. The trap action is restored to the value it had when
+it called the function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 9n
+.rt
+Same as \fBEXIT\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBDEBUG\fR\fR
+.ad
+.RS 9n
+.rt
+Execute before each simple command is executed but after the arguments are
+expanded.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBERR\fR\fR
+.ad
+.RS 9n
+.rt
+Execute whenever \fBset -e\fR would cause the shell to exit.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBKEYBD\fR\fR
+.ad
+.RS 9n
+.rt
+Execute when a key is entered from a terminal device.
+.RE
+
+.sp
+.LP
+Signal names are case insensitive and the \fBsig\fR prefix is optional. Signals
+that were ignored on entry to a non-interactive shell cannot trapped or reset
+although doing so does not report an error. The use of signal numbers other
+than 1, 2, 3, 6, 9, 14, and 15 are not portable.
+.sp
+.LP
+Although trap is a special built-in, specifying a condition that the shell does
+not know about causes trap to exit with a \fBnon-zero\fR exit status, but does
+not terminate the invoking shell.
+.sp
+.LP
+If no action or conditions are specified then all the current trap settings are
+written to standard output.
+.sp
+.LP
+The following options are supported by the \fBtrap\fR built-in command in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the current traps to be output in a format that can be processed as
+input to the shell to recreate the current traps.
+.RE
+
+.sp
+.LP
+The trap built-in in \fBksh93\fR exits with one of the following values:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+On this manual page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR (plus signs) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBeval\fR(1), \fBexit\fR(1), \fBksh\fR(1), \fBksh93\fR(1),
+\fBsh\fR(1), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/troff.1 b/usr/src/man/man1/troff.1
new file mode 100644
index 0000000000..bd3bba6d23
--- /dev/null
+++ b/usr/src/man/man1/troff.1
@@ -0,0 +1,323 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add
+.\" the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH troff 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+troff \- typeset or format documents
+.SH SYNOPSIS
+.LP
+.nf
+\fBtroff\fR [\fB-a\fR] [\fB-f\fR] [\fB-F\fR\fIdir\fR] [\fB-i\fR] [\fB-m\fR\fIname\fR] [\fB-n\fR\fIN\fR] [\fB-o\fR\fIlist\fR] [\fB-r\fR\fIaN\fR]
+ [\fB-s\fR\fIN\fR] [\fB-T\fR\fIdest\fR] [\fB-u\fR\fIN\fR] [\fB-z\fR] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBtroff\fR formats text in the \fIfilename\fRs for typesetting or laser
+printing. Input to \fBtroff\fR is expected to consist of text interspersed with
+formatting requests and macros. If no \fIfilename\fR argument is present,
+\fBtroff\fR reads standard input. A minus sign (\(mi) as a \fIfilename\fR
+indicates that standard input should be read at that point in the list of input
+files.
+.sp
+.LP
+The output of \fBtroff\fR is usually piped through \fBdpost\fR(1) to create a
+printable postscript file (see \fBEXAMPLES\fR).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported. They may appear in any order, but all must
+appear before the first \fIfilename\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 10n
+.rt
+Send an \fBASCII\fR approximation of formatted output to standard output.
+(Note: a rough \fBASCII\fR version can also be printed out on ordinary
+terminals with an old and rarely used command, \fB/usr/bin/ta\fR.)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 10n
+.rt
+Do not print a trailer after the final page of output or cause the
+postprocessor to relinquish control of the device.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR\fIdir\fR\fR
+.ad
+.RS 10n
+.rt
+Search directory \fIdir\fR for font width or terminal tables instead of the
+system default directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 10n
+.rt
+Read standard input after all input files are exhausted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fIname\fR\fR
+.ad
+.RS 10n
+.rt
+Prepend the macro file \fB/usr/share/lib/tmac/\fR\fIname\fR to the input
+\fIfilename\fRs. Note: most references to macro packages include the leading
+\fIm\fR as part of the name; for example, the \fBman\fR(5) macros reside in
+\fB/usr/share/lib/tmac/an\fR. The macro directory can be changed by setting the
+\fBTROFFMACS\fR environment variable to a specific path. Be certain to include
+the trailing '\|/\|' (slash) at the end of the path.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fIN\fR\fR
+.ad
+.RS 10n
+.rt
+Number the first generated page \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR\fIlist\fR\fR
+.ad
+.RS 10n
+.rt
+Print only pages whose page numbers appear in the comma-separated \fIlist\fR of
+numbers and ranges. A range \fIN\fR\fB\(mi\fR\fIM\fR means pages \fIN\fR
+through \fIM\fR; an initial \fB\(mi\fR\fIN\fR means from the beginning to page
+\fIN\fR; and a final \fIN\fR\fB\(mi\fR means from \fIN\fR to the end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.RS 10n
+.rt
+Quiet mode in \fBnroff\fR; ignored in \fBtroff\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fIaN\fR\fR
+.ad
+.RS 10n
+.rt
+Set register \fIa\fR (one-character names only) to \fIN\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fIN\fR\fR
+.ad
+.RS 10n
+.rt
+Stop the phototypesetter every \fIN\fR pages. On some devices, \fBtroff\fR
+produces a trailer so you can change cassettes; resume by pressing the
+typesetter's start button.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR\fIdest\fR\fR
+.ad
+.RS 10n
+.rt
+Prepare output for typesetter \fIdest\fR. The following values can be supplied
+for \fIdest\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpost\fR\fR
+.ad
+.RS 8n
+.rt
+A PostScript printer; this is the default value. The output of the \fB-T\fR
+option must go through \fBdpost\fR(1) before it is sent to a PostScript printer
+to obtain the proper output.
+.RE
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fIN\fR\fR
+.ad
+.RS 10n
+.rt
+Set the emboldening factor for the font mounted in position 3 to \fIN\fR. If
+\fIN\fR is missing, then set the emboldening factor to 0.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-z\fR\fR
+.ad
+.RS 10n
+.rt
+Suppress formatted output. Only diagnostic messages and messages output using
+the \fB\&.tm\fR request are output.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+The file containing text to be processed by \fBtroff\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing \fBtroff\fR
+.sp
+.LP
+The following example shows how to print an input text file \fBmytext\fR, coded
+with formatting requests and macros. The input file contains equations and
+tables and must go through the \fBtbl\fR(1) and \fBeqn\fR(1) preprocessors
+before it is formatted by \fBtroff\fR with \fBms\fR macros, processed by
+\fBdpost\fR(1), and printed by \fBlp\fR(1):
+
+.sp
+.in +2
+.nf
+tbl mytext | eqn | troff -ms | dpost | lp
+.fi
+.in -2
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/trtmp\fR\fR
+.ad
+.RS 26n
+.rt
+temporary file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/*\fR\fR
+.ad
+.RS 26n
+.rt
+standard macro files
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/font/*\fR\fR
+.ad
+.RS 26n
+.rt
+font width tables for alternate mounted \fBtroff\fR fonts
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/nterm/*\fR\fR
+.ad
+.RS 26n
+.rt
+terminal driving tables for \fBnroff\fR
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchecknr\fR(1), \fBcol\fR(1), \fBdpost\fR(1), \fBeqn\fR(1), \fBlp\fR(1),
+\fBman\fR(1), \fBnroff\fR(1), \fBtbl\fR(1), \fBattributes\fR(5), \fBman\fR(5),
+\fBme\fR(5), \fBms\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBtroff\fR is not 8-bit clean because it is by design based on 7-bit
+\fBASCII.\fR
+.sp
+.LP
+Previous documentation incorrectly described the numeric register \fByr\fR as
+being the \fBLast two digits of current year\fR. \fByr\fR is in actuality the
+number of years since 1900. To correctly obtain the last two digits of the
+current year through the year 2099, the definition given below of string
+register \fByy\fR may be included in a document and subsequently used to
+display a two-digit year. Note that any other available one- or two-character
+register name may be substituted for \fByy\fR.
+.sp
+.in +2
+.nf
+\&.\e" definition of new string register yy--last two digits of year
+\&.\e" use yr (# of years since 1900) if it is < 100
+\&.ie \en(yr<100 .ds yy \en(yr
+\&.el \e{ .\e" else, subtract 100 from yr, store in ny
+\&.nr ny \en(yr-100
+\&.ie \en(ny>9 \e{ .\e" use ny if it is two digits
+\&.ds yy \en(ny
+\&.\e" remove temporary number register ny
+\&.rr ny \e}
+\&.el \e{.ds yy 0
+\&.\e" if ny is one digit, append it to 0
+\&.as yy \en(ny
+\&.rr ny \e} \e}
+.fi
+.in -2
+
diff --git a/usr/src/man/man1/true.1 b/usr/src/man/man1/true.1
new file mode 100644
index 0000000000..730bfb4ca8
--- /dev/null
+++ b/usr/src/man/man1/true.1
@@ -0,0 +1,69 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH true 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+true, false \- provide truth values
+.SH SYNOPSIS
+.LP
+.nf
+\fBtrue\fR
+.fi
+
+.LP
+.nf
+\fBfalse\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtrue\fR utility does nothing, successfully. The \fBfalse\fR utility does
+nothing, unsuccessfully. They are typically used in a shell script \fBsh\fR as:
+.sp
+.in +2
+.nf
+while true
+do
+ \fIcommand\fR
+done
+.fi
+.in -2
+
+.sp
+.LP
+which executes \fIcommand\fR forever.
+.SH EXIT STATUS
+.sp
+.LP
+\fBtrue\fR has exit status \fB0\fR.
+.sp
+.LP
+\fBfalse\fR always will exit with a non-zero value.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBsh\fR(1), \fBattributes\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/truss.1 b/usr/src/man/man1/truss.1
new file mode 100644
index 0000000000..d01e4ff74c
--- /dev/null
+++ b/usr/src/man/man1/truss.1
@@ -0,0 +1,698 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH truss 1 "31 Jul 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+truss \- trace system calls and signals
+.SH SYNOPSIS
+.LP
+.nf
+\fBtruss\fR [\fB-fcaeildDE\fR] [\fB-\fR [tTvx] [!] \fIsyscall\fR ,...]
+ [\fB-\fR [sS] [!] \fIsignal\fR ,...] [\fB-\fR [mM] [!] \fIfault\fR ,...]
+ [\fB-\fR [rw] [!] \fIfd\fR ,...]
+ [\fB-\fR [uU] [!] \fIlib\fR ,... : [:] [!] \fIfunc\fR ,...]
+ [\fB-o\fR \fIoutfile\fR] \fIcommand\fR | \fB-p\fR \fIpid\fR[\fI/lwps\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtruss\fR utility executes the specified command and produces a trace of
+the system calls it performs, the signals it receives, and the machine faults
+it incurs. Each line of the trace output reports either the fault or signal
+name or the system call name with its arguments and return value(s). System
+call arguments are displayed symbolically when possible using defines from
+relevant system headers. For any path name pointer argument, the pointed-to
+string is displayed. Error returns are reported using the error code names
+described in \fBIntro\fR(3). If, in the case of an error, the kernel reports a
+missing privilege, a privilege name as described in \fBprivileges\fR(5) is
+reported in square brackets (\fB[ ]\fR) after the error code name.
+.sp
+.LP
+Optionally (see the \fB-u\fR option), \fBtruss\fR also produce an entry/exit
+trace of user-level function calls executed by the traced process, indented to
+indicate nesting.
+.SH OPTIONS
+.sp
+.LP
+For those options that take a list argument, the name \fBall\fR can be used as
+a shorthand to specify all possible members of the list. If the list begins
+with a \fB!\fR, the meaning of the option is negated (for example, exclude
+rather than trace). Multiple occurrences of the same option can be specified.
+For the same name in a list, subsequent options (those to the right) override
+previous ones (those to the left).
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.sp .6
+.RS 4n
+Shows the argument strings that are passed in each \fBexec()\fR system call.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.sp .6
+.RS 4n
+Counts traced system calls, faults, and signals rather than displaying the
+trace line-by-line. A summary report is produced after the traced command
+terminates or when \fBtruss\fR is interrupted. If \fB-f\fR is also specified,
+the counts include all traced system calls, faults, and signals for child
+processes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.sp .6
+.RS 4n
+Includes a time stamp on each line of trace output. The time stamp appears as a
+field containing \fIseconds\fR\|.\|\fIfraction\fR at the start of the line.
+This represents a time in seconds relative to the beginning of the trace. The
+first line of the trace output shows the base time from which the individual
+time stamps are measured, both as seconds since the epoch (see \fBtime\fR(2))
+and as a date string (see \fBctime\fR(3C) and \fBdate\fR(1)). The times that
+are reported are the times that the event in question occurred. For all system
+calls, the event is the completion of the system call, not the start of the
+system call.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.sp .6
+.RS 4n
+Includes a time delta on each line of trace output. The value appears as a
+field containing \fIseconds\fR\|.\|\fIfraction\fR and represents the elapsed
+time for the \fBLWP\fR that incurred the event since the last reported event
+incurred by that \fBLWP.\fR Specifically, for system calls, this is not the
+time spent within the system call.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.sp .6
+.RS 4n
+Shows the environment strings that are passed in each \fBexec()\fR system call.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.sp .6
+.RS 4n
+Includes a time delta on each line of trace output. The value appears as a
+field containing \fIseconds\fR\fB\&.\fR\fIfraction\fR and represents the
+difference in time elapsed between the beginning and end of a system call.
+.sp
+In contrast to the \fB-D\fR option, this is the amount of time spent within
+the system call.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.sp .6
+.RS 4n
+Follows all children created by \fBfork()\fR or \fBvfork()\fR and includes
+their signals, faults, and system calls in the trace output. Normally, only the
+first-level command or process is traced. When \fB-f\fR is specified, the
+process-id is included with each line of trace output to indicate which process
+executed the system call or received the signal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.sp .6
+.RS 4n
+Does not display interruptible sleeping system calls. Certain system calls,
+such as \fBopen()\fR and \fBread()\fR on terminal devices or pipes, can sleep
+for indefinite periods and are interruptible. Normally, \fBtruss\fR reports
+such sleeping system calls if they remain asleep for more than one second. The
+system call is reported again a second time when it completes. The \fB-i\fR
+option causes such system calls to be reported only once, when they complete.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.sp .6
+.RS 4n
+Includes the id of the responsible lightweight process (\fILWP\fR) with each
+line of trace output. If \fB-f\fR is also specified, both the process-id and
+the LWP-id are included.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR [\fB!\fR]\fIfault\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Machine faults to trace or exclude. Those faults specified in the
+comma-separated list are traced. Faults can be specified by name or number (see
+\fB<sys/fault.h>\fR). If the list begins with a \fB!\fR, the specified faults
+are excluded from the trace output. Default is \fB-mall\fR \fB-m\fR
+\fB!fltpage\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR [\fB!\fR]\fIfault\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Machine faults that stop the process. The specified faults are added to the set
+specified by \fB-m\fR. If one of the specified faults is incurred, \fBtruss\fR
+leaves the process stopped and abandoned (see the \fB-T\fR option). Default is
+\fB\fR\fB-M\fR\fB!all\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIoutfile\fR\fR
+.ad
+.sp .6
+.RS 4n
+File to be used for the trace output. By default, the output goes to standard
+error.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.sp .6
+.RS 4n
+Interprets the \fIcommand\fR arguments to \fBtruss\fR as a list of process-ids
+for existing processes (see \fBps\fR(1)) rather than as a command to be
+executed. \fBtruss\fR takes control of each process and begins tracing it
+provided that the userid and groupid of the process match those of the user or
+that the user is a privileged user. Users can trace only selected threads by
+appending \fB/\fR\fIthread-id\fR to the process-id. Mutiple threads can be
+selected using the \fB-\fR and \fB,\fR delimiters. For example \fB/1,2,7-9\fR
+traces threads \fB1\fR, \fB2\fR, \fB7\fR, \fB8\fR, and \fB9\fR. Processes can
+also be specified by their names in the \fB/proc\fR directory, for example,
+\fB/proc/12345\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR [\fB!\fR]\fIfd\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Shows the full contents of the \fBI/O\fR buffer for each \fBread()\fR on any of
+the specified file descriptors. The output is formatted 32 bytes per line and
+shows each byte as an \fBASCII\fR character (preceded by one blank) or as a
+2-character C language escape sequence for control characters such as
+horizontal tab (\|\e\|t) and newline (\|\e\|n). If \fBASCII\fR interpretation
+is not possible, the byte is shown in 2-character hexadecimal representation.
+(The first 12 bytes of the \fBI/O\fR buffer for each traced \fBprint >read()\fR
+are shown even in the absence of \fB-r\fR.) Default is
+\fB\fR\fB-r\fR\fB!all\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR [\fB!\fR]\fIsignal\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Signals to trace or exclude. Those signals specified in the comma-separated
+list are traced. The trace output reports the receipt of each specified signal,
+even if the signal is being ignored (not blocked). (Blocked signals are not
+received until they are unblocked.) Signals can be specified by name or number
+(see \fB<sys/signal.h>\fR). If the list begins with a \fB!\fR, the specified
+signals are excluded from the trace output. Default is \fB-sall\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR [\fB!\fR]\fIsignal\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Signals that stop the process. The specified signals are added to the set
+specified by \fB-s\fR. If one of the specified signals is received, \fBtruss\fR
+leaves the process stopped and abandoned (see the \fB-T\fR option). Default is
+\fB\fR\fB-S\fR\fB!all\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR [\fB!\fR]\fIsyscall\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+System calls to trace or exclude. Those system calls specified in the
+comma-separated list are traced. If the list begins with a \fB!\fR, the
+specified system calls are excluded from the trace output. Default is
+\fB-tall\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR [\fB!\fR]\fIsyscall\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Specifies system calls that stop the process. The specified system calls are
+added to the set specified by \fB-t\fR. If one of the specified system calls is
+encountered, \fBtruss\fR leaves the process stopped and abandoned. That is,
+\fBtruss\fR releases the process and exits but leaves the process in the
+stopped state at completion of the system call in question. A debugger or other
+process inspection tool (see \fBproc\fR(1)) can then be applied to the stopped
+process. \fBtruss\fR can be reapplied to the stopped process with the same or
+different options to continue tracing. Default is \fB\fR\fB-T\fR\fB!all\fR.
+.sp
+A process left stopped in this manner cannot be restarted by the application of
+\fBkill\fR \fB-CONT\fR because it is stopped on an event of interest via
+\fB/proc\fR, not by the default action of a stopping signal (see
+\fBsignal.h\fR(3HEAD)). The \fBprun\fR(1) command described in \fBproc\fR(1)
+can be used to set the stopped process running again.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR
+[\fB!\fR]\fIlib\fR,...\fB:\fR[\fB:\fR][\fB!\fR]\fIfunc\fR,\|.\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+User-level function call tracing. \fIlib\fR,\|.\|.\|. is a comma-separated list
+of dynamic library names, excluding the ``\fB\&.so.\fR\fIn\fR'' suffix.
+\fIfunc\fR,\|.\|.\|. is a comma-separated list of function names. In both cases
+the names can include name-matching metacharacters \fB*\fR,\fB?\fR,\fB[]\fR
+with the same meanings as those of \fBsh\fR(1) but as applied to the
+library/function name spaces, not to files. An empty library or function list
+defaults to \fB*\fR, trace all libraries or functions in a library. A leading
+\fB!\fR on either list specifies an exclusion list, names of libraries or
+functions not to be traced. Excluding a library excludes all functions in that
+library; any function list following a library exclusion list is ignored.
+.sp
+A single \fB:\fR separating the library list from the function list means to
+trace calls into the libraries from outside the libraries, but omit calls made
+to functions in a library from other functions in the same library. A double
+\fB:\|:\fR means to trace all calls, regardless of origin.
+.sp
+Library patterns do not match either the executable file or the dynamic linker
+unless there is an exact match (\fBl*\fR does not match \fBld.so.1\fR). To
+trace functions in either of these objects, the names must be specified
+exactly, as in:
+.sp
+.in +2
+.nf
+\fBtruss -u a.out -u ld ...\fR
+.fi
+.in -2
+.sp
+
+\fBa.out\fR is the literal name to be used for this purpose; it does not stand
+for the name of the executable file. Tracing \fBa.out\fR function calls implies
+all calls (default is \fB::\fR).
+.sp
+Multiple \fB-u\fR options can be specified and they are honored left-to-right.
+The id of the thread that performed the function call is included in the trace
+output for the call. \fBtruss\fR searches the dynamic symbol table in each
+library to find function names and also searches the standard symbol table if
+it has not been stripped.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR
+[\fB!\fR]\fIlib\fR,\|.\|.\|.\|\fB:\fR[\fB:\fR][\fB!\fR]\fIfunc\fR,\|.\|.\|.\fR
+.ad
+.sp .6
+.RS 4n
+User-level function calls that stop the process. The specified functions are
+added to the set specified by \fB-u\fR. If one of the specified functions is
+called, \fBtruss\fR leaves the process stopped and abandoned (see the \fB-T\fR
+option).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR [\fB!\fR]\fIsyscall\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Verbose. Displays the contents of any structures passed by address to the
+specified system calls (if traced by \fB-t\fR). Input values as well as values
+returned by the operating system are shown. For any field used as both input
+and output, only the output value is shown. Default is
+\fB\fR\fB-v\fR\fB!all\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR [\fB!\fR]\fIfd\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Shows the contents of the I/O buffer for each \fBwrite()\fR on any of the
+specified file descriptors (see the \fB-r\fR option). Default is
+\fB\fR\fB-w\fR\fB!all\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR [\fB!\fR]\fIsyscall\fR,...\fR
+.ad
+.sp .6
+.RS 4n
+Displays the arguments to the specified system calls (if traced by \fB-t\fR) in
+raw form, usually hexadecimal, rather than symbolically. This is for unredeemed
+hackers who must see the raw bits to be happy. Default is
+\fB\fR\fB-x\fR\fB!all\fR.
+.RE
+
+.sp
+.LP
+See \fIman pages section 2: System Calls\fR for system call names accepted by
+the \fB-t\fR, \fB-T\fR, \fB-v\fR, and \fB-x\fR options. System call numbers are
+also accepted.
+.sp
+.LP
+If \fBtruss\fR is used to initiate and trace a specified command and if the
+\fB-o\fR option is used or if standard error is redirected to a non-terminal
+file, then \fBtruss\fR runs with hangup, interrupt, and quit signals ignored.
+This facilitates tracing of interactive programs that catch interrupt and quit
+signals from the terminal.
+.sp
+.LP
+If the trace output remains directed to the terminal, or if existing processes
+are traced (the \fB-p\fR option), then \fBtruss\fR responds to hangup,
+interrupt, and quit signals by releasing all traced processes and exiting. This
+enables the user to terminate excessive trace output and to release
+previously-existing processes. Released processes continue normally, as though
+they had never been touched.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRTracing a Command
+.sp
+.LP
+The following example produces a trace of the \fBfind\fR(1) command on the
+terminal:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss find . -print >find.out\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRTracing Common System Calls
+.sp
+.LP
+The following example shows only a trace of the open, close, read, and write
+system calls:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -t open,close,read,write find . -print >find.out\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 3 \fRTracing a Shell Script
+.sp
+.LP
+The following example produces a trace of the \fBspell\fR(1) command on the
+file \fBtruss.out\fR:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -f -o truss.out spell \fIdocument\fR\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBspell\fR is a shell script, so the \fB-f\fR flag is needed to trace not only
+the shell but also the processes created by the shell. (The spell script runs a
+pipeline of eight processes.)
+
+.LP
+\fBExample 4 \fRAbbreviating Output
+.sp
+.LP
+The following example abreviates output:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss nroff -mm \fIdocument\fR >nroff.out\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+because 97% of the output reports \fBlseek()\fR, \fBread()\fR, and
+\fBwrite()\fR system calls. To abbreviate it:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -t !lseek,read,write nroff -mm \fIdocument\fR >nroff.out\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 5 \fRTracing Library Calls From Outside the C Library
+.sp
+.LP
+The following example traces all user-level calls made to any function in the C
+library from outside the C library:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -u libc ...\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 6 \fRTracing library calls from within the C library
+.sp
+.LP
+The following example includes calls made to functions in the C library from
+within the C library itself:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -u libc:: ...\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 7 \fRTracing Library Calls Other Than the C Library
+.sp
+.LP
+The following example traces all user-level calls made to any library other
+than the C library:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -u '*' -u !libc ...\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 8 \fRTracing \fBprintf\fR and \fBscanf\fR Function Calls
+.sp
+.LP
+The following example traces all user-level calls to functions in the printf
+and scanf family contained in the C library:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -u 'libc:*printf,*scanf' ...\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 9 \fRTracing Every User-level Function Call
+.sp
+.LP
+The following example traces every user-level function call from anywhere to
+anywhere:
+
+.sp
+.in +2
+.nf
+example$ \fBtruss -u a.out -u ld:: -u :: ...\fR
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 10 \fRTracing a System Call Verbosely
+.sp
+.LP
+The following example verbosely traces the system call activity of process #1,
+\fBinit\fR(1M) (if you are a privileged user):
+
+.sp
+.in +2
+.nf
+example# \fBtruss -p -v all 1\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Interrupting \fBtruss\fR returns \fBinit\fR to normal operation.
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/proc/*\fR\fR
+.ad
+.RS 11n
+.rt
+Process files
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdate\fR(1), \fBfind\fR(1), \fBproc\fR(1), \fBps\fR(1), \fBsh\fR(1),
+\fBspell\fR(1), \fBinit\fR(1M), \fBIntro\fR(3), \fBexec\fR(2), \fBfork\fR(2),
+\fBlseek\fR(2), \fBopen\fR(2), \fBread\fR(2), \fBtime\fR(2), \fBvfork\fR(2),
+\fBwrite\fR(2), \fBctime\fR(3C), \fBsignal.h\fR(3HEAD), \fBproc\fR(4),
+\fBattributes\fR(5), \fBprivileges\fR(5), \fBthreads\fR(5)
+.sp
+.LP
+\fIman pages section 2: System Calls\fR
+.SH NOTES
+.sp
+.LP
+Some of the system calls described in \fIman pages section 2: System Calls\fR
+differ from the actual operating system interfaces. Do not be surprised by
+minor deviations of the trace output from the descriptions in that document.
+.sp
+.LP
+Every machine fault (except a page fault) results in the posting of a signal to
+the \fBLWP\fR that incurred the fault. A report of a received signal
+immediately follows each report of a machine fault (except a page fault) unless
+that signal is being blocked.
+.sp
+.LP
+The operating system enforces certain security restrictions on the tracing of
+processes. In particular, any command whose object file (\fBa.out\fR) cannot be
+read by a user cannot be traced by that user; set-uid and set-gid commands can
+be traced only by a privileged user. Unless it is run by a privileged user,
+\fBtruss\fR loses control of any process that performs an \fBexec()\fR of a
+set-id or unreadable object file; such processes continue normally, though
+independently of \fBtruss\fR, from the point of the \fBexec()\fR.
+.sp
+.LP
+To avoid collisions with other controlling processes, \fBtruss\fR does not
+trace a process that it detects is being controlled by another process via the
+\fB/proc\fR interface. This allows \fBtruss\fR to be applied to
+\fBproc\fR(4)-based debuggers as well as to another instance of itself.
+.sp
+.LP
+The trace output contains tab characters under the assumption that standard tab
+stops are set (every eight positions).
+.sp
+.LP
+The trace output for multiple processes or for a multithreaded process (one
+that contains more than one \fBLWP)\fR is not produced in strict time order.
+For example, a \fBread()\fR on a pipe can be reported before the corresponding
+\fBwrite()\fR. For any one \fBLWP\fR (a traditional process contains only one),
+the output is strictly time-ordered.
+.sp
+.LP
+When tracing more than one process, \fBtruss\fR runs as one controlling process
+for each process being traced. For the example of the \fBspell\fR command shown
+above, \fBspell\fR itself uses 9 process slots, one for the shell and 8 for the
+8-member pipeline, while \fBtruss\fR adds another 9 processes, for a total of
+18.
+.sp
+.LP
+Not all possible structures passed in all possible system calls are displayed
+under the \fB-v\fR option.
diff --git a/usr/src/man/man1/tsort.1 b/usr/src/man/man1/tsort.1
new file mode 100644
index 0000000000..385543d7bb
--- /dev/null
+++ b/usr/src/man/man1/tsort.1
@@ -0,0 +1,139 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tsort 1 "28 Jun 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+tsort \- topological sort
+.SH SYNOPSIS
+.LP
+.nf
+\fBtsort\fR [\fIfile\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtsort\fR command produces on the standard output a totally ordered list
+of items consistent with a partial ordering of items mentioned in the input
+\fIfile\fR.
+.sp
+.LP
+The input consists of pairs of items (non-empty strings) separated by blanks.
+Pairs of different items indicate ordering. Pairs of identical items indicate
+presence, but not ordering.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a text file to order. If no \fIfile\fR operand is given, the
+standard input is used.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAn example of the tsort command
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% \fBtsort <<EOF
+a b c c d e
+g g
+f g e f
+EOF\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+produces the output:
+
+.sp
+.in +2
+.nf
+a
+b
+c
+d
+e
+f
+g
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtsort\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlorder\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+\fBOdd data:\fR there are an odd number of fields in the input file.
diff --git a/usr/src/man/man1/tty.1 b/usr/src/man/man1/tty.1
new file mode 100644
index 0000000000..eec95949c7
--- /dev/null
+++ b/usr/src/man/man1/tty.1
@@ -0,0 +1,201 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved.
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH tty 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+tty \- return user's terminal name
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/tty\fR [\fB-l\fR] [\fB-s\fR]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBtty\fR [ \fIoptions\fR ]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/tty"
+.sp
+.LP
+The \fBtty\fR utility writes to the standard output the name of the terminal
+that is open as standard input. The name that is used is equivalent to the
+string that would be returned by the \fBttyname\fR(3C) function.
+.SS "ksh93"
+.sp
+.LP
+The \fBksh93\fR \fBtty\fR built-in writes the name of the terminal that is
+connected to standard input onto standard output. If the standard input is not
+a terminal, "not a tty" will be written to standard output.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.SS "/usr/bin/tty"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Prints the synchronous line number to which the user's terminal is connected,
+if it is on an active synchronous line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Inhibits printing of the terminal path name, allowing one to test just the exit
+status.
+.RE
+
+.SS "ksh93"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--line-number\fR\fR
+.ad
+.RS 18n
+.rt
+Write the synchronous line number of the terminal on a separate line following
+the terminal name line. If the standard input is not a synchronous terminal
+then "not on an active synchronous line" is written.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--silent\fR|\fBquiet\fR\fR
+.ad
+.RS 18n
+.rt
+Disable the terminal name line. Portable applications should use [[ -t 0 ]]
+instead.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtty\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Standard input is a terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+Standard input is not a terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+Standard\fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBisatty\fR(3C), \fBttyname\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnot on an active synchronous line\fR\fR
+.ad
+.sp .6
+.RS 4n
+The standard input is not a synchronous terminal and \fB-l\fR is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnot a tty\fR\fR
+.ad
+.sp .6
+.RS 4n
+The standard input is not a terminal and \fB-s\fR is not specified.
+.RE
+
+.SH NOTES
+.sp
+.LP
+The \fB-s\fR option is useful only if the exit status is wanted. It does not
+rely on the ability to form a valid path name. Portable applications should use
+\fBtest\fR \fB-t\fR.
diff --git a/usr/src/man/man1/type.1 b/usr/src/man/man1/type.1
new file mode 100644
index 0000000000..6a23b4f36e
--- /dev/null
+++ b/usr/src/man/man1/type.1
@@ -0,0 +1,108 @@
+'\" te
+.\" Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH type 1 "1 Feb 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+type \- write a description of command type
+.SH SYNOPSIS
+.LP
+.nf
+\fBtype\fR \fIname\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBtype\fR utility indicates how each \fIname\fR operand would be
+interpreted if used as a command. \fBtype\fR displays information about each
+operand identifying the operand as a shell built-in, function, alias, hashed
+command, or keyword, and where applicable, may display the operand's path name.
+.sp
+.LP
+There is also a shell built-in version of \fBtype\fR that is similar to the
+\fBtype\fR utility.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR \fR
+.ad
+.RS 9n
+.rt
+A name to be interpreted.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBtype\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR \fR
+.ad
+.RS 9n
+.rt
+Determine the location of \fIname\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBtypeset\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/typeset.1 b/usr/src/man/man1/typeset.1
new file mode 100644
index 0000000000..bdf977c3fd
--- /dev/null
+++ b/usr/src/man/man1/typeset.1
@@ -0,0 +1,823 @@
+'\" te
+.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T Copyright
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.TH typeset 1 "11 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+typeset, whence \- shell built-in functions to set/get attributes and values
+for shell variables and functions
+.SH SYNOPSIS
+.LP
+.nf
+\fBtypeset\fR [\(+- HLRZfilrtux [\fIn\fR]] [\fIname\fR[=\fIvalue\fR]]...
+.fi
+
+.LP
+.nf
+\fBwhence\fR [\fB-pv\fR] \fIname\fR...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fB++typeset\fR [\(+-AHflbnprtux] [\(+-EFLRZi[\fIn\fR]] [\fIvname\fR[=\fIvalue\fR]]
+.fi
+
+.LP
+.nf
+\fBwhence\fR [\fB-afpv\fR] \fIname\fR...
+.fi
+
+.SH DESCRIPTION
+.SS "ksh"
+.sp
+.LP
+\fBtypeset\fR sets attributes and values for shell variables and functions.
+When \fBtypeset\fR is invoked inside a function, a new instance of the
+variables \fIname\fR is created. The variables \fIvalue\fR and \fBtype\fR are
+restored when the function completes. The following list of attributes can be
+specified:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+The names refer to function names rather than variable names. No assignments
+can be made and the only other valid flags are \fB-t\fR, \fB-u\fR and \fB-x\fR.
+The flag \fB-t\fR turns on execution tracing for this function. The flag
+\fB-u\fR causes this function to be marked undefined. The \fBF\fR\fBPATH\fR
+variable is searched to find the function definition when the function is
+referenced. The flag \fB-x\fR allows the function definition to remain in
+effect across shell procedures invoked by name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 6n
+.rt
+This flag provides UNIX to hostname file mapping on non-UNIX machines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Parameter is an integer. This makes arithmetic faster. If \fIn\fR is
+\fBnon-zero\fR it defines the output arithmetic base; otherwise, the first
+assignment determines the output base.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+All uppercase characters are converted to lowercase. The uppercase flag,
+\fB-u\fR is turned off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.RS 6n
+.rt
+Left justify and remove leading blanks from \fIvalue\fR. If \fIn\fR is
+\fBnon-zero\fR it defines the width of the field; otherwise, it is determined
+by the width of the value of first assignment. When the variable is assigned
+to, it is filled on the right with blanks or truncated, if necessary, to fit
+into the field. Leading zeros are removed if the \fB-Z\fR flag is also set. The
+\fB-R\fR flag is turned off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 6n
+.rt
+The specified \fIname\fRs are marked \fBreadonly\fR and these names cannot be
+changed by subsequent assignment.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR\fR
+.ad
+.RS 6n
+.rt
+Right justify and fill with leading blanks. If \fIn\fR is \fBnon-zero\fR it
+defines the width of the field, otherwise it is determined by the width of the
+value of first assignment. The field is left filled with blanks or truncated
+from the end if the variable is reassigned. The \fB-L\fR flag is turned off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Tags the variables. Tags are user definable and have no special meaning to the
+shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+All lowercase characters are converted to uppercase characters. The lowercase
+flag, \fB-l\fR is turned off.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+The specified \fIname\fRs are marked for automatic export to the
+\fBenvironment\fR of subsequently-executed commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR\fR
+.ad
+.RS 6n
+.rt
+Right justify and fill with leading zeros if the first non-blank character is a
+digit and the \fB-L\fR flag has not been set. If \fIn\fR is \fBnon-zero\fR it
+defines the width of the field. Otherwise, it is determined by the width of the
+value of first assignment.
+.RE
+
+.sp
+.LP
+The \fB-i\fR attribute can not be specified along with \fB-R\fR, \fB-L\fR,
+\fB-Z\fR, or \fB-f\fR.
+.sp
+.LP
+Using \fB+\fR rather than \fB\(mi\fR causes these flags to be turned off. If no
+\fIname\fR arguments are specified but flags are specified, a list of
+\fInames\fR (and optionally the \fIvalues\fR) of the \fIvariables\fR which have
+these flags set is printed. (Using \fB+\fR rather than \fB\(mi\fR keeps the
+values from being printed.) If no \fIname\fRs and flags are specified, the
+\fInames\fR and \fIattributes\fR of all \fIvariables\fR are printed.
+.sp
+.LP
+For each \fIname\fR, \fBwhence\fR indicates how it would be interpreted if used
+as a command name.
+.sp
+.LP
+The \fB-v\fR flag produces a more verbose report.
+.sp
+.LP
+The \fB-p\fR flag does a path search for \fIname\fR even if name is an alias, a
+function, or a reserved word.
+.sp
+.LP
+On this manual page, \fBksh\fR(1) commands that are preceded by one or two *
+(asterisks) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+Words, following a command preceded by \fB**\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SS "ksh93"
+.sp
+.LP
+If the \fB-f\fR option is not specified, \fBtypeset\fR sets, unsets, or
+displays attributes of variables as specified with the options. If the first
+option is specified with a \fB-\fR then the attributes are set for each of the
+specified names. If the first option is specified with a \fB+\fR, then the
+specified attributes are unset. If \fB=\fR\fIvalue\fR is specified, \fIvalue\fR
+is assigned before the attributes are set.
+.sp
+.LP
+When \fBtypeset\fR is called inside a function that is defined with the
+\fBfunction\fR reserved word, and \fIname\fR does not contain a \fB\&.\fR, a
+local variable statically scoped to that function is created.
+.sp
+.LP
+Not all option combinations are possible. For example, the numeric options
+\fB-i\fR, \fB-E\fR, and \fB-F\fR cannot be specified with the justification
+options \fB-L\fR, \fB-R\fR, and \fB-Z\fR.
+.sp
+.LP
+The following preset aliases are set by the shell:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfloat\fR\fR
+.ad
+.RS 13n
+.rt
+\fBtypeset\fR \fB-E\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBfunctions\fR\fR
+.ad
+.RS 13n
+.rt
+\fBtypeset\fR \fB-f\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBinteger\fR\fR
+.ad
+.RS 13n
+.rt
+\fBtypeset\fR \fB-i\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnameref\fR\fR
+.ad
+.RS 13n
+.rt
+\fBtypeset\fR \fB-n\fR
+.RE
+
+.sp
+.LP
+If no \fInames\fR are specified, variables that have the specified options are
+displayed. If the first option is specified with a leading \fB-\fR then the
+name and value of each variable is written to standard output. Otherwise, only
+the names are written. If no options or only the \fB-p\fR option are specified,
+the names and attributes of all variables that have attributes are written to
+standard output. When \fB-f\fR is specified, the names displayed are function
+names.
+.sp
+.LP
+If \fB-f\fR is specified, then each name refers to a function and the only
+valid options are \fB-u\fR and \fB-t\fR. In this case no \fB=\fR\fIvalue\fR can
+be specified.
+.sp
+.LP
+\fBtypeset\fR is built-in to the shell as a declaration command so that field
+splitting and pathname expansion are not performed on the arguments. Tilde
+expansion occurs on \fIvalue\fR.
+.sp
+.LP
+The following options are supported by the \fBtypeset\fR built-in command in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 13n
+.rt
+Indexed array. This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-A\fR\fR
+.ad
+.RS 13n
+.rt
+Associative array. Each \fIname\fR is converted to an associative array. If a
+variable already exists, the current value becomes index \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR\fR
+.ad
+.RS 13n
+.rt
+Each name can contain binary data. Its value is the mime \fBbase64\fR encoding
+of the data. This option can be used with \fB-Z\fR, to specify fixed sized
+fields.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 13n
+.rt
+Reserved for future use.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR [\fIn\fR]\fR
+.ad
+.RS 13n
+.rt
+Floating point number represented in scientific notation. \fIn\fR specifies the
+number of significant figures when the value is expanded. The default value is
+\fB10\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 13n
+.rt
+Each of the options and names refers to a function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-F\fR [\fIn\fR]\fR
+.ad
+.RS 13n
+.rt
+Floating point. \fIn\fR is the number of places after the decimal point when
+the value is expanded. The default value is \fB10\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 13n
+.rt
+Reserved for future use.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR\fR
+.ad
+.RS 13n
+.rt
+Hostname mapping. Each name holds a native pathname. Assigning a UNIX format
+pathname causes it to be converted to a pathname suitable for the current host.
+This has no effect when the native system is UNIX.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR [\fIbase\fR]\fR
+.ad
+.RS 13n
+.rt
+An integer. \fIbase\fR represents the arithmetic base from \fB2\fR to \fB64\fR.
+The option value can be omitted. The default value is \fB10\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 13n
+.rt
+Convert uppercase characters to lowercase characters. Unsets the \fB-u\fR
+option. When used with \fB-i\fR, \fB-E\fR, or \fB-F\fR indicates long variant.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR [\fIn\fR]\fR
+.ad
+.RS 13n
+.rt
+Left justify. If \fIn\fR is specified, it represents the field width. If the
+\fB-Z\fR attribute is also specified, then leading zeros are stripped. The
+option value can be omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 13n
+.rt
+Name reference. The value is the name of a variable that \fIname\fR references.
+\fIname\fR cannot contain a \fB\&.\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 13n
+.rt
+Causes the output to be in a format that can be used as input to the shell to
+recreate the attributes for variables.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 13n
+.rt
+Enables read-only. Once this option is enabled, it cannot be disabled. See
+\fBreadonly\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-R\fR [\fIn\fR]\fR
+.ad
+.RS 13n
+.rt
+Right justify. If \fIn\fR is specified it represents the field width. If the
+\fB-Z\fR option is also specified, zeros are used as the fill character.
+Otherwise, SPACEs are used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+Restricts integer size to short when used with \fB-i\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 13n
+.rt
+When used inside a function defined with the function reserved word, the
+specified variables will have function static scope.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 13n
+.rt
+When used with \fB-f\fR, enables tracing for each of the specified functions.
+Otherwise, \fB-t\fR is a user defined attribute and has no meaning to the
+shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fItname\fR\fR
+.ad
+.RS 13n
+.rt
+\fItname\fR is the name of a type name given to each name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 13n
+.rt
+Without \fB-f\fR or \fB-i\fR, converts lowercase characters to uppercase and
+unsets \fB-l\fR. When used with \fB-f\fR, specifies that \fIname\fR is a
+function that has not yet been loaded. When used with \fB-i\fR specifies that
+the value is displayed as an unsigned integer.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 13n
+.rt
+Puts each name on the export list. See \fBexport\fR(1). \fIname\fR cannot
+contain a \fB\&.\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR [\fIn\fR]\fR
+.ad
+.RS 13n
+.rt
+Floating point number represented in hexadecimal notation. \fIn\fR specifies
+the number of significant figures when the value is expanded. The option value
+may be omitted. The default value is 10.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Z\fR [\fIn\fR]\fR
+.ad
+.RS 13n
+.rt
+Zero fill. If \fIn\fR is specified it represents the field width. The option
+value can be omitted.
+.RE
+
+.sp
+.LP
+The following exit values are returned by \fBtypeset\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+If the \fB-v\fR is not specified, \fBwhence\fR writes on standard output an
+absolute pathname, if any, corresponding to \fIname\fR based on the complete
+search order that the shell uses. If \fIname\fR is not found, no output is
+produced.
+.sp
+.LP
+If the \fB-v\fR is specified, the output from \fBwhence\fR also contains
+information that indicates how the specified name would be interpreted by the
+shell in the current execution environment.
+.sp
+.LP
+The following options are supported by the \fBwhence\fR built-in command in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 6n
+.rt
+Display all uses for each name rather than the first.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 6n
+.rt
+Do not check for functions.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 6n
+.rt
+Do not check to see if name is a reserved word, a built-in, an alias, or a
+function.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 6n
+.rt
+For each name specified, the shell displays a line that indicates if that name
+is one of the following:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Reserved word
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Alias
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Built-in
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Undefined function
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Function
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Tracked alias
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Program
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Not found
+.RE
+.RE
+
+.sp
+.LP
+The following exit values are returned by \fBwhence\fR in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion. Each name was found by the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 6n
+.rt
+One or more names were not found by the shell.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>1\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.sp
+.LP
+On this manual page, \fBksh93\fR(1) commands that are preceded by one or two
+\fB+\fR (plus signs) are treated specially in the following ways:
+.RS +4
+.TP
+1.
+Variable assignment lists preceding the command remain in effect when the
+command completes.
+.RE
+.RS +4
+.TP
+2.
+I/O redirections are processed after variable assignments.
+.RE
+.RS +4
+.TP
+3.
+Errors cause a script that contains them to abort.
+.RE
+.RS +4
+.TP
+4.
+They are not valid function names.
+.RE
+.RS +4
+.TP
+5.
+Words, following a command preceded by \fB++\fR that are in the format of a
+variable assignment, are expanded with the same rules as a variable assignment.
+This means that tilde substitution is performed after the \fB=\fR sign and word
+splitting and file name generation are not performed.
+.RE
+.SH SEE ALSO
+.sp
+.LP
+\fBksh\fR(1), \fBksh93\fR(1), \fBreadonly\fR(1), \fBset\fR(1), \fBsh\fR(1),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ul.1 b/usr/src/man/man1/ul.1
new file mode 100644
index 0000000000..fc2a481914
--- /dev/null
+++ b/usr/src/man/man1/ul.1
@@ -0,0 +1,79 @@
+'\" te
+.\" Copyright (c) 1994, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ul 1 "17 Mar 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+ul \- do underlining
+.SH SYNOPSIS
+.LP
+.nf
+\fBul\fR [\fB-i\fR] [\fB-t\fR \fIterminal\fR] [\fIfilename\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBul\fR reads the named \fIfilename\fRs (or the standard input if none are
+given) and translates occurrences of underscores to the sequence which
+indicates underlining for the terminal in use, as specified by the environment
+variable \fB\fR \fBTERM.\fR \fBul\fR uses the \fB/usr/share/lib/terminfo
+\fRentry to determine the appropriate sequences for underlining. If the
+terminal is incapable of underlining, but is capable of a standout mode then
+that is used instead. If the terminal can overstrike, or handles underlining
+automatically, \fBul\fR degenerates to \fBcat\fR(1). If the terminal cannot
+underline, underlining is ignored.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fI terminal\fR\fR
+.ad
+.RS 15n
+.rt
+Override the terminal kind specified in the environment. If the terminal cannot
+underline, underlining is ignored. If the terminal name is not found, no
+underlining is attempted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 15n
+.rt
+Indicate underlining by a separate line containing appropriate dashes
+`\fB\(mi\fR\&'; this is useful when you want to look at the underlining which
+is present in an \fBnroff\fR(1) output stream on a \fBCRT-terminal.\fR
+.RE
+
+.SH RETURN VALUES
+.sp
+.LP
+\fBul\fR returns exit code 1 if the file specified is not found.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/terminfo/*\fR\fR
+.ad
+.RS 29n
+.rt
+
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcat\fR(1), \fBman\fR(1), \fBnroff\fR(1), \fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+\fBnroff\fR usually generates a series of backspaces and underlines intermixed
+with the text to indicate underlining. \fBul\fR makes attempt to optimize the
+backward motion.
diff --git a/usr/src/man/man1/umask.1 b/usr/src/man/man1/umask.1
new file mode 100644
index 0000000000..9938d992ce
--- /dev/null
+++ b/usr/src/man/man1/umask.1
@@ -0,0 +1,396 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH umask 1 "17 Sep 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+umask \- get or set the file mode creation mask
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/umask\fR [\fB-S\fR] [\fImask\fR]
+.fi
+
+.SS "sh"
+.LP
+.nf
+\fBumask\fR [\fIooo\fR]
+.fi
+
+.SS "csh"
+.LP
+.nf
+\fBumask\fR [\fIooo\fR]
+.fi
+
+.SS "ksh"
+.LP
+.nf
+\fBumask\fR [\fB-S\fR] [\fImask\fR]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBumask\fR [\fB-S\fR] [\fImask\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBumask\fR utility sets the file mode creation mask of the current shell
+execution environment to the value specified by the \fImask\fR operand. This
+mask affects the initial value of the file permission bits of subsequently
+created files. If \fBumask\fR is called in a subshell or separate utility
+execution environment, such as one of the following:
+.sp
+.in +2
+.nf
+(umask 002)
+nohup umask ...
+find . -exec umask ...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+it does not affect the file mode creation mask of the caller's environment. For
+this reason, the \fB/usr/bin/umask\fR utility cannot be used to change the
+umask in an ongoing session. Its usefulness is limited to checking the caller's
+umask. To change the umask of an ongoing session you must use one of the shell
+builtins.
+.sp
+.LP
+If the \fImask\fR operand is not specified, the \fBumask\fR utility writes the
+value of the invoking process's file mode creation mask to standard output.
+.SS "sh"
+.sp
+.LP
+The user file-creation mode mask is set to \fIooo\fR. The three octal digits
+refer to read/write/execute permissions for owner, group, and other,
+respectively (see \fBchmod\fR(1), \fBchmod\fR(2), and \fBumask\fR(2)). The
+value of each specified digit is subtracted from the corresponding ``digit''
+specified by the system for the creation of a file (see \fBcreat\fR(2)). For
+example, \fBumask\fR \fB022\fR removes write permission for group and other.
+Files (and directories) normally created with mode \fB777\fR become mode
+\fB755\fR. Files (and directories) created with mode \fB666\fR become mode
+\fB644\fR).
+.RS +4
+.TP
+.ie t \(bu
+.el o
+If \fIooo\fR is omitted, the current value of the mask is printed.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBumask\fR is recognized and executed by the shell.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+\fBumask\fR can be included in the user's \fB\&.profile\fR (see
+\fBprofile\fR(4)) and invoked at login to automatically set the user's
+permissions on files or directories created.
+.RE
+.SS "csh"
+.sp
+.LP
+See the description above for the Bourne shell (\fBsh\fR)\fBumask\fR built-in.
+.SS "ksh"
+.sp
+.LP
+The user file-creation mask is set to \fImask\fR. \fImask\fR can either be an
+octal number or a symbolic value as described in \fBchmod\fR(1). If a symbolic
+value is given, the new \fBumask\fR value is the complement of the result of
+applying \fImask\fR to the complement of the previous umask value. If
+\fImask\fR is omitted, the current value of the mask is printed.
+.SS "ksh93"
+.sp
+.LP
+\fBumask\fR sets the file creation mask of the current shell execution
+environment to the value specified by the \fBmask\fI\fR\fR operand. This mask
+affects the file permission bits of subsequently created files. \fImask\fR can
+either be an octal number or a symbolic value as described in chmod(1). If a
+symbolic value is specified, the new file creation mask is the complement of
+the result of applying \fImask\fR to the complement of the current file
+creation mask. If \fImask\fR is not specified, \fBumask\fR writes the value of
+the file creation mask for the current process to standard output.
+.SH OPTIONS
+.SS "ksh"
+.sp
+.LP
+The following option is supported for \fB/usr/bin/umask\fR and \fBumask\fR in
+\fBksh\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Produces symbolic output.
+.RE
+
+.sp
+.LP
+The default output style is unspecified, but will be recognized on a subsequent
+invocation of \fBumask\fR on the same system as a \fImask\fR operand to restore
+the previous file mode creation mask.
+.SS "ksh93"
+.sp
+.LP
+The following option is supported in \fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 6n
+.rt
+Causes the file creation mask to be written or treated as a symbolic value
+rather than an octal number.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fImask\fR\fR
+.ad
+.RS 8n
+.rt
+A string specifying the new file mode creation mask. The string is treated in
+the same way as the \fImode\fR operand described in the \fBchmod\fR(1) manual
+page.
+.sp
+For a \fIsymbolic_mode\fR value, the new value of the file mode creation mask
+is the logical complement of the file permission bits portion of the file mode
+specified by the \fIsymbolic_mode\fR string.
+.sp
+In a \fIsymbolic_mode\fR value, the permissions \fIop\fR characters \fB+\fR and
+\fB\(mi\fR are interpreted relative to the current file mode creation mask.
+\fB+\fR causes the bits for the indicated permissions to be cleared in the
+mask. \fB\(mi\fR causes the bits of the indicated permissions to be set in the
+mask.
+.sp
+The interpretation of \fImode\fR values that specify file mode bits other than
+the file permission bits is unspecified.
+.sp
+The file mode creation mask is set to the resulting numeric value.
+.sp
+The default output of a prior invocation of \fBumask\fR on the same system with
+no operand will also be recognized as a \fImask\fR operand. The use of an
+operand obtained in this way is not obsolescent, even if it is an octal number.
+.RE
+
+.SH OUTPUT
+.sp
+.LP
+When the \fImask\fR operand is not specified, the \fBumask\fR utility will
+write a message to standard output that can later be used as a \fBumask\fR
+\fImask\fR operand.
+.sp
+.LP
+If \fB-S\fR is specified, the message will be in the following format:
+.sp
+.in +2
+.nf
+"u=%s,g=%s,o=%s\en", \fIowner permissions\fR, \fIgroup permissions\fR, \e
+ \fIother permissions\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where the three values will be combinations of letters from the set
+\fB{\fRr\fB,\fR \fBw\fR, \fBx\fR}. The presence of a letter will indicate that
+the corresponding bit is clear in the file mode creation mask.
+.sp
+.LP
+If a \fImask\fR operand is specified, there will be no output written to
+standard output.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fBumask\fR Command
+.sp
+.LP
+The examples in this section refer to the \fB/usr/bin/umask\fR utility and the
+\fBksh umask\fR builtin.
+
+.sp
+.LP
+Either of the commands:
+
+.sp
+.in +2
+.nf
+\fBumask a=rx,ug+w
+umask 002\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+sets the mode mask so that subsequently created files have their \fBS_IWOTH\fR
+bit cleared.
+
+.sp
+.LP
+After setting the mode mask with either of the above commands, the \fBumask\fR
+command can be used to write the current value of the mode mask:
+
+.sp
+.in +2
+.nf
+example$ \fBumask\fR
+0002
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The output format is unspecified, but historical implementations use the
+obsolescent octal integer mode format.
+
+.sp
+.in +2
+.nf
+example$ \fBumask -S\fR
+u=rwx,g=rwx,o=rx
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Either of these outputs can be used as the mask operand to a subsequent
+invocation of the \fBumask\fR utility.
+
+.sp
+.LP
+Assuming the mode mask is set as above, the command:
+
+.sp
+.in +2
+.nf
+\fBumask g-w\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+sets the mode mask so that subsequently created files have their \fBS_IWGRP\fR
+and \fBS_IWOTH\fR bits cleared.
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+\fBumask --w\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+sets the mode mask so that subsequently created files have all their write bits
+cleared. Notice that \fImask\fR operands \fBr\fR, \fBw\fR, \fBx\fR, or anything
+beginning with a hyphen (\fB\(mi\fR), must be preceded by \fB-\fR to keep it
+from being interpreted as an option.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBumask\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+The file mode creation mask was successfully changed, or no \fImask\fR operand
+was supplied.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/umask, csh, ksh, sh"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityExternal
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBchmod\fR(1), \fBcsh\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1),
+\fBchmod\fR(2), \fBcreat\fR(2), \fBumask\fR(2), \fBprofile\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/uname.1 b/usr/src/man/man1/uname.1
new file mode 100644
index 0000000000..bde827c4d0
--- /dev/null
+++ b/usr/src/man/man1/uname.1
@@ -0,0 +1,379 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH uname 1 "17 Sep 2003" "SunOS 5.11" "User Commands"
+.SH NAME
+uname \- print name of current system
+.SH SYNOPSIS
+.LP
+.nf
+\fBuname\fR [\fB-aimnprsvX\fR]
+.fi
+
+.LP
+.nf
+\fBuname\fR [\fB-S\fR \fIsystem_name\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBuname\fR utility prints information about the current system on the
+standard output. When options are specified, symbols representing one or more
+system characteristics will be written to the standard output. If no options
+are specified, \fBuname\fR prints the current operating system's name. The
+options print selected information returned by \fBuname\fR(2),
+\fBsysinfo\fR(2), or both.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 18n
+.rt
+Prints basic information currently available from the system.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the name of the platform.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the machine hardware name (class). Use of this option is discouraged.
+Use \fBuname\fR \fB-p\fR instead. See NOTES section below.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the nodename (the nodename is the name by which the system is known to a
+communications network).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the current host's \fBISA\fR or processor type.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the operating system release level.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the name of the operating system. This is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR \fIsystem_name\fR\fR
+.ad
+.RS 18n
+.rt
+The nodename may be changed by specifying a system name argument. The system
+name argument is restricted to \fBSYS_NMLN\fR characters. \fBSYS_NMLN\fR is an
+implementation specific value defined in \fB<sys/utsname.h>\fR\&. Only the
+super-user is allowed this capability. This change does not persist across
+reboots of the system. Use \fBsys-unconfig\fR(1M) to change a host's name
+permanently.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Prints the operating system version.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-X\fR \fR
+.ad
+.RS 18n
+.rt
+Prints expanded system information, one information element per line, as
+expected by SCO UNIX. The displayed information includes:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+system name, node, release, version, machine, and number of CPUs.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+BusType, Serial, and Users (set to "unknown" in Solaris)
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+OEM# and Origin# (set to \fB0\fR and \fB1\fR, respectively)
+.RE
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRPrinting the OS name and release level
+.sp
+.LP
+The following command:
+
+.sp
+.in +2
+.nf
+example% \fBuname \(misr\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+prints the operating system name and release level, separated by one SPACE
+character.
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBuname\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBSYSV3\fR \fR
+.ad
+.RS 10n
+.rt
+This variable is used to override the default behavior of \fBuname\fR. This is
+necessary to make it possible for some INTERACTIVE UNIX Systems and SCO UNIX
+programs and scripts to work properly. Many scripts use \fBuname\fR to
+determine the \fBSYSV3\fR type or the version of the \fBOS\fR to ensure
+software is compatible with that \fBOS\fR. Setting \fBSYSV3\fR to an empty
+string will make \fBuname\fR print the following default values:
+.sp
+.in +2
+.nf
+nodename nodename 3.2 2 i386
+.fi
+.in -2
+.sp
+
+The individual elements that \fBuname\fR displays can also be modified by
+setting \fBSYSV3\fR in the following format:
+.sp
+.in +2
+.nf
+\fIos,sysname,node,rel,ver,mach\fR
+.fi
+.in -2
+.sp
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIos\fR \fR
+.ad
+.RS 12n
+.rt
+Operating system (IUS or SCO).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIsysname\fR \fR
+.ad
+.RS 12n
+.rt
+System name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fInode\fR \fR
+.ad
+.RS 12n
+.rt
+Nodename as displayed by the \fB-n\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIrel\fR \fR
+.ad
+.RS 12n
+.rt
+Release level as displayed by the \fB-r\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIver\fR \fR
+.ad
+.RS 12n
+.rt
+Version number as displayed by the \fB-v\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fImach\fR \fR
+.ad
+.RS 12n
+.rt
+Machine name as displayed by \fB-m\fR option.
+.RE
+
+Do not put spaces between the elements. If an element is omitted, the current
+system value will be used.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBarch\fR(1), \fBisalist\fR(1), \fBsys-unconfig\fR(1M), \fBsysinfo\fR(2),
+\fBuname\fR(2), \fBnodename\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+Independent software vendors (\fBISV\fRs) and others who need to determine
+detailed characteristics of the platform on which their software is either
+being installed or executed should use the \fBuname\fR command.
+.sp
+.LP
+To determine the operating system name and release level, use \fBuname
+\fR\fB-sr\fR. To determine only the operating system release level, use
+\fBuname \fR\fB-r\fR. Notice that operating system release levels are not
+guaranteed to be in \fIx.y\fR format (such as 5.3, 5.4, 5.5, and so forth);
+future releases could be in the \fIx.y.z\fR format (such as 5.3.1, 5.3.2,
+5.4.1, and so forth).
+.sp
+.LP
+In SunOS 4.\fIx\fR releases, the \fBarch\fR(1) command was often used to obtain
+information similar to that obtained by using the \fBuname\fR command. The
+\fBarch\fR(1) command output "sun4" was often incorrectly interpreted to
+signify a SunOS SPARC system. If hardware platform information is desired, use
+\fBuname \fR\fB-sp\fR.
+.sp
+.LP
+The \fBarch\fR \fB-k\fR and \fBuname\fR \fB-m\fR commands return equivalent
+values; however, the use of either of these commands by third party programs is
+discouraged, as is the use of the \fBarch\fR command in general. To determine
+the machine's Instruction Set Architecture (\fBISA\fR or processor type), use
+\fBuname\fR with the \fB-p\fR option.
diff --git a/usr/src/man/man1/unifdef.1 b/usr/src/man/man1/unifdef.1
new file mode 100644
index 0000000000..221929424e
--- /dev/null
+++ b/usr/src/man/man1/unifdef.1
@@ -0,0 +1,170 @@
+'\" te
+.\" Copyright (c) 1994 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH unifdef 1 "14 Jan 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+unifdef \- resolve and remove ifdef'ed lines from C program source
+.SH SYNOPSIS
+.LP
+.nf
+\fBunifdef\fR [\fB-clt\fR] [\fB-D\fR\fIname\fR] [\fB-U\fR\fIname\fR] [\fB-iD\fR\fIname\fR] [\fB-iU\fR\fIname\fR] ...
+ [\fIfilename\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBunifdef\fR removes \fBifdef\fRed lines from a file while otherwise leaving
+the file alone. It is smart enough to deal with the nested \fBifdef\fRs,
+comments, single and double quotes of C syntax, but it does not do any
+including or interpretation of macros. Neither does it strip out comments,
+though it recognizes and ignores them. You specify which symbols you want
+defined with \fB-D\fR options, and which you want undefined with \fB-U\fR
+options. Lines within those \fBifdef\fRs will be copied to the output, or
+removed, as appropriate. Any \fBifdef\fR, \fBifndef\fR, \fBelse\fR, and
+\fBendif\fR lines associated with \fIfilename\fR will also be removed.
+.sp
+.LP
+\fBifdef\fRs involving symbols you do not specify are untouched and copied out
+along with their associated \fBifdef\fR, \fBelse\fR, and \fBendiff1\fR lines.
+.sp
+.LP
+If an \fBifdef\fR\fIX\fR occurs nested inside another \fBifdef\fR\fIX\fR, then
+the inside \fBifdef\fR is treated as if it were an unrecognized symbol. If the
+same symbol appears in more than one argument, only the first occurrence is
+significant.
+.sp
+.LP
+\fBunifdef\fR copies its output to the standard output and will take its input
+from the standard input if no \fIfilename\fR argument is given.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 11n
+.rt
+Complement the normal operation. Lines that would have been removed or blanked
+are retained, and vice versa.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 11n
+.rt
+Replace ``lines removed'' lines with blank lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 11n
+.rt
+Plain text option. \fBunifdef\fR refrains from attempting to recognize comments
+and single and double quotes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fIname\fR\fR
+.ad
+.RS 11n
+.rt
+Lines associated with the defined symbol \fIname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-U\fR\fIname\fR\fR
+.ad
+.RS 11n
+.rt
+Lines associated with the undefined symbol \fIname\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-iD\fR\fIname\fR\fR
+.ad
+.RS 11n
+.rt
+Ignore, but print out, lines associated with the defined symbol \fIname\fR. If
+you use \fBifdef\fRs to delimit non-C lines, such as comments or code which is
+under construction, then you must tell \fBunifdef\fR which symbols are used for
+that purpose so that it will not try to parse for quotes and comments within
+them.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-iU\fR\fIname\fR\fR
+.ad
+.RS 11n
+.rt
+Ignore, but print out, lines associated with the undefined symbol \fIname\fR.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+Operation failed.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdiff\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPremature\fR \fBEOF\fR\fR
+.ad
+.RS 17n
+.rt
+Inappropriate \fBelse\fR or \fBendif\fR.
+.RE
+
diff --git a/usr/src/man/man1/uniq.1 b/usr/src/man/man1/uniq.1
new file mode 100644
index 0000000000..d9c4c1d0c6
--- /dev/null
+++ b/usr/src/man/man1/uniq.1
@@ -0,0 +1,530 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2007 Sun Microsystems, Inc. - All Rights Reserved.
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH uniq 1 "13 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+uniq \- report or filter out repeated lines in a file
+.SH SYNOPSIS
+.SS "/usr/bin/uniq"
+.LP
+.nf
+\fB/usr/bin/uniq\fR [\fB-c\fR | \fB-d\fR | \fB-u\fR] [\fB-f\fR \fIfields\fR] [\fB-s\fR \fIchar\fR]
+ [\fIinput_file\fR [\fIoutput_file\fR]]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/uniq\fR [\fB-c\fR | \fB-d\fR | \fB-u\fR] [\fB-n\fR] [+ \fIm\fR] [\fIinput_file\fR [\fIoutput_file\fR]]
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBuniq\fR [\fB-cdiu\fR] [\fB-D\fR[\fIdelimit\fR]] [\fB-f\fR \fIfields\fR] [\fB-s\fR \fIchars\fR] [\fB-w\fR \fIchars\fR]
+ [\fIinput_file\fR [\fIoutput_file\fR]]
+.fi
+
+.LP
+.nf
+\fBuniq\fR [\fB-cdiu\fR] [\fB-D\fR[\fIdelimit\fR]] [\fB-n\fR] [\fB+m\fR] [\fB-w\fR \fIchars\fR] [\fIinput_file\fR [\fIoutput_file\fR]]
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/uniq"
+.sp
+.LP
+The \fBuniq\fR utility reads an input file comparing adjacent lines and writes
+one copy of each input line on the output. The second and succeeding copies of
+repeated adjacent input lines are not written.
+.sp
+.LP
+Repeated lines in the input are not detected if they are not adjacent.
+.SS "ksh93"
+.sp
+.LP
+The \fBuniq\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR or
+\fB/usr/bin path\fR. It is invoked when \fBuniq\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/uniq\fR or
+\fB/usr/bin/uniq\fR executable.
+.sp
+.LP
+\fBuniq\fR reads an input, comparing adjacent lines, and writing one copy of
+each input line on the output. The second and succeeding copies of the repeated
+adjacent lines are not written.
+.sp
+.LP
+If \fIoutput_file\fR is not specified, \fBuniq\fR writes to standard output. If
+\fIinput_file\fR is not specified, or if \fIinput_file\fR is \fB-\fR,
+\fBuniq\fR reads from standard input, and the start of the file is defined as
+the current offset.
+.SH OPTIONS
+.SS "/usr/bin/uniq"
+.sp
+.LP
+The following options are supported by \fB/usr/bin/uniq\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 13n
+.rt
+Precedes each output line with a count of the number of times the line occurred
+in the input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 13n
+.rt
+Suppresses the writing of lines that are not repeated in the input.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIfields\fR\fR
+.ad
+.RS 13n
+.rt
+Ignores the first \fIfields\fR fields on each input line when doing
+comparisons, where \fIfields\fR is a positive decimal integer. A field is the
+maximal string matched by the basic regular expression:
+.sp
+.in +2
+.nf
+[[:blank:]]*[^[:blank:]]*
+.fi
+.in -2
+.sp
+
+If \fIfields\fR specifies more fields than appear on an input line, a null
+string is used for comparison.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIm\fR\fR
+.ad
+.RS 13n
+.rt
+Equivalent to \fB-s\fR \fIchars\fR with \fIchars\fR set to \fIm\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR\fIn\fR\fR
+.ad
+.RS 13n
+.rt
+Equivalent to \fB-f\fR \fIfields\fR with \fIfields\fR set to \fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIchars\fR\fR
+.ad
+.RS 13n
+.rt
+Ignores the first \fIchars\fR characters when doing comparisons, where
+\fIchars\fR is a positive decimal integer. If specified in conjunction with the
+\fB-f\fR option, the first \fIchars\fR characters after the first \fIfields\fR
+fields is ignored. If \fIchars\fR specifies more characters than remain on an
+input line, a null string is used for comparison.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 13n
+.rt
+Suppresses the writing of lines that are repeated in the input.
+.RE
+
+.SS "ksh93"
+.sp
+.LP
+The following options are supported by the \fBuniq\fR built-in command is
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--count\fR\fR
+.ad
+.RS 28n
+.rt
+Outputs the number of times each line occurred along with the line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.br
+.na
+\fB\fB--repeated | duplicates\fR\fR
+.ad
+.RS 28n
+.rt
+Outputs only duplicate lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-D\fR\fR
+.ad
+.br
+.na
+\fB\fB--all-repeated\fR[\fB=\fR\fIdelimit\fR]\fR
+.ad
+.RS 28n
+.rt
+Outputs all duplicate lines as a group with an empty line delimiter specified
+by \fIdelimit\fR.
+.sp
+Specify \fIdelimit\fR as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnone\fR\fR
+.ad
+.RS 12n
+.rt
+Do not delimit duplicate groups.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBprepend\fR\fR
+.ad
+.RS 12n
+.rt
+Prepend an empty line before each group.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBseparate\fR\fR
+.ad
+.RS 12n
+.rt
+Separate each group with an empty line.
+.RE
+
+The value for \fIdelimit\fR can be omitted. The default value is \fBnone\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.br
+.na
+\fB\fB--skip-fields=\fR\fIfields\fR\fR
+.ad
+.RS 28n
+.rt
+Skips over \fIfields\fR number of fields before checking for uniqueness. A
+field is the minimal string matching the \fBBRE
+[[:\fR\fIblank\fR\fB:]]*[^[:\fR\fIblank\fR\fB:]]*\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.br
+.na
+\fB\fB--ignore-case\fR\fR
+.ad
+.RS 28n
+.rt
+Ignore case in comparisons.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR\fIm\fR\fR
+.ad
+.RS 28n
+.rt
+Equivalent to the \fB-s\fR \fIchars\fR option, with \fIchars\fR set to \fIm\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fIn\fR\fR
+.ad
+.RS 28n
+.rt
+Equivalent to the \fB-f\fR \fIfields\fR option, with \fIfields\fR set to
+\fIn\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.br
+.na
+\fB\fB--skip-chars=\fR\fIchars\fR\fR
+.ad
+.RS 28n
+.rt
+Skips over \fIchars\fR number of characters before checking for uniqueness.
+.sp
+If specified with the \fB-f\fR option, the first \fIchars\fR after the first
+fields are ignored. If the \fIchars\fR specifies more characters than are on
+the line, an empty string is used for comparison.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.br
+.na
+\fB\fB--uniq\fR\fR
+.ad
+.RS 28n
+.rt
+Outputs unique lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.br
+.na
+\fB\fB--check-chars=\fR\fIchars\fR\fR
+.ad
+.RS 28n
+.rt
+Skips over any specified fields and characters, then compares \fIchars\fR
+number of characters.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIinput_file\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of the input file. If \fIinput_file\fR is not specified, or if the
+\fIinput_file\fR is \fB\(mi\fR, the standard input is used.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoutput_file\fR\fR
+.ad
+.RS 15n
+.rt
+A path name of the output file. If \fIoutput_file\fR is not specified, the
+standard output is used. The results are unspecified if the file named by
+\fIoutput_file\fR is the file named by \fIinput_file\fR.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the \fBuniq\fR Command
+.sp
+.LP
+The following example lists the contents of the \fBuniq.test\fR file and
+outputs a copy of the repeated lines.
+
+.sp
+.in +2
+.nf
+example% \fBcat uniq.test\fR
+This is a test.
+This is a test.
+TEST.
+Computer.
+TEST.
+TEST.
+Software.
+
+example% \fBuniq -d uniq.test\fR
+This is a test.
+TEST.
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The next example outputs just those lines that are not repeated in the
+\fBuniq.test\fR file.
+
+.sp
+.in +2
+.nf
+example% \fBuniq -u uniq.test\fR
+TEST.
+Computer.
+Software.
+example%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The last example outputs a report with each line preceded by a count of the
+number of times each line occurred in the file:
+
+.sp
+.in +2
+.nf
+example% \fBuniq -c uniq.test\fR
+ 2 This is a test.
+ 1 TEST.
+ 1 Computer.
+ 2 TEST.
+ 1 Software.
+example%
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBuniq\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/uniq"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBcomm\fR(1), \fBksh93\fR(1), , \fBpcat\fR(1), \fBsort\fR(1),
+\fBuncompress\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/units.1 b/usr/src/man/man1/units.1
new file mode 100644
index 0000000000..7e5c244ce9
--- /dev/null
+++ b/usr/src/man/man1/units.1
@@ -0,0 +1,158 @@
+'\" te
+.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH units 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+units \- converts quantities expressed in standard scales to other scales
+.SH SYNOPSIS
+.LP
+.nf
+\fBunits\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBunits\fR converts quantities expressed in various standard scales to their
+equivalents in other scales. It works interactively in this fashion:
+.sp
+.in +2
+.nf
+You have:~~\fBinch\fR
+You want:~~\fBcm\fR
+ * 2.540000e+00
+/ 3.937008e\(mi01
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+A quantity is specified as a multiplicative combination of units optionally
+preceded by a numeric multiplier. Powers are indicated by suffixed positive
+integers, division by the usual sign:
+.sp
+.in +2
+.nf
+You have:~~\fB15 lbs force/in2\fR
+You want:~~\fBatm\fR
+ * 1.020689e+00
+ / 9.797299e\(mi01
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBunits\fR only does multiplicative scale changes; thus it can convert Kelvin
+to Rankine, but not Celsius to Fahrenheit. Most familiar units, abbreviations,
+and metric prefixes are recognized, together with a generous leavening of
+exotica and a few constants of nature including:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBpi\fR\fR
+.ad
+.RS 9n
+.rt
+ratio of circumference to diameter,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBc\fR\fR
+.ad
+.RS 9n
+.rt
+speed of light,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBe\fR\fR
+.ad
+.RS 9n
+.rt
+charge on an electron,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBg\fR\fR
+.ad
+.RS 9n
+.rt
+acceleration of gravity,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBforce\fR\fR
+.ad
+.RS 9n
+.rt
+same as \fBg\fR,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBmole\fR\fR
+.ad
+.RS 9n
+.rt
+Avogadro's number,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBwater\fR\fR
+.ad
+.RS 9n
+.rt
+pressure head per unit height of water,
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBau\fR\fR
+.ad
+.RS 9n
+.rt
+astronomical unit.
+.RE
+
+.sp
+.LP
+\fBPound\fR is not recognized as a unit of mass; \fBlb\fR is. Compound names
+are run together, (for example, \fBlightyear\fR). British units that differ
+from their U.S. counterparts are prefixed thus: \fBbrgallon\fR. For a complete
+list of units, type:
+.sp
+.LP
+\fBcat /usr/share/lib/unittab\fR
+.SH FILES
+.sp
+.LP
+\fB/usr/share/lib/unittab\fR
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/unix2dos.1 b/usr/src/man/man1/unix2dos.1
new file mode 100644
index 0000000000..234aa23b2f
--- /dev/null
+++ b/usr/src/man/man1/unix2dos.1
@@ -0,0 +1,218 @@
+'\" te
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH unix2dos 1 "14 Sep 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+unix2dos \- convert text file from ISO format to DOS format
+.SH SYNOPSIS
+.LP
+.nf
+\fBunix2dos\fR [\fB-ascii\fR] [\fB-iso\fR] [\fB-7\fR]
+ [\fB-437\fR | \fB-850\fR | \fB-860\fR | \fB-863\fR | \fB-865\fR] \fIoriginalfile\fR \fIconvertedfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBunix2dos\fR utility converts \fBISO\fR standard characters to the
+corresponding characters in the \fBDOS\fR extended character set.
+.sp
+.LP
+This command may be invoked from either \fBDOS\fR or SunOS. However, the
+filenames must conform to the conventions of the environment in which the
+command is invoked.
+.sp
+.LP
+If the original file and the converted file are the same, \fBunix2dos\fR will
+rewrite the original file after converting it.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-ascii\fR\fR
+.ad
+.RS 10n
+.rt
+Adds carriage returns and converts end of file characters in SunOS format text
+files to conform to \fBDOS\fR requirements.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-iso\fR\fR
+.ad
+.RS 10n
+.rt
+This is the default. Converts \fBISO\fR standard characters to the
+corresponding character in the \fBDOS\fR extended character set.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-7\fR\fR
+.ad
+.RS 10n
+.rt
+Converts 8 bit SunOS characters to 7 bit \fBDOS\fR characters.
+.RE
+
+.sp
+.LP
+On non-i386 systems, \fBunix2dos\fR will attempt to obtain the keyboard type to
+determine which code page to use. Otherwise, the default is US. The user may
+override the code page with one of the following options:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-437\fR\fR
+.ad
+.RS 8n
+.rt
+Use US code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-850\fR\fR
+.ad
+.RS 8n
+.rt
+Use multilingual code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-860\fR\fR
+.ad
+.RS 8n
+.rt
+Use Portuguese code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-863\fR\fR
+.ad
+.RS 8n
+.rt
+Use French Canadian code page
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-865\fR\fR
+.ad
+.RS 8n
+.rt
+Use Danish code page
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are required:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIoriginalfile\fR \fR
+.ad
+.RS 18n
+.rt
+The original file in \fBISO\fR format that is being converted to \fBDOS\fR
+format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIconvertedfile\fR \fR
+.ad
+.RS 18n
+.rt
+The new file in \fBDOS\fR format that has been converted from the original
+\fBISO\fR file format.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdos2unix\fR(1), \fBls\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBFile \fIfilename\fR not found, or no read permission\fR\fR
+.ad
+.sp .6
+.RS 4n
+The input file you specified does not exist, or you do not have read
+permission. Check with the SunOS command, \fBls\fR \fB-l\fR (see \fBls\fR(1)).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBBad output filename \fIfilename\fR, or no write permission\fR\fR
+.ad
+.sp .6
+.RS 4n
+The output file you specified is either invalid, or you do not have write
+permission for that file or the directory that contains it. Check also that the
+drive or diskette is not write-protected.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBError while writing to temporary file\fR\fR
+.ad
+.sp .6
+.RS 4n
+An error occurred while converting your file, possibly because there is not
+enough space on the current drive. Check the amount of space on the current
+drive using the \fBDIR\fR command. Also be certain that the default diskette or
+drive is write-enabled (not write-protected). Notice that when this error
+occurs, the original file remains intact.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBTranslated tmpfile name = \fIfilename\fR.\fR\fR
+.ad
+.br
+.na
+\fB\fBCould not rename tmpfile to \fIfilename\fR.\fR\fR
+.ad
+.sp .6
+.RS 4n
+The program could not perform the final step in converting your file. Your
+converted file is stored under the name indicated on the second line of this
+message.
+.RE
+
diff --git a/usr/src/man/man1/uptime.1 b/usr/src/man/man1/uptime.1
new file mode 100644
index 0000000000..ca59456352
--- /dev/null
+++ b/usr/src/man/man1/uptime.1
@@ -0,0 +1,41 @@
+'\" te
+.\" Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH uptime 1 "18 Mar 1994" "SunOS 5.11" "User Commands"
+.SH NAME
+uptime \- show how long the system has been up
+.SH SYNOPSIS
+.LP
+.nf
+\fBuptime\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBuptime\fR command prints the current time, the length of time the system
+has been up, and the average number of jobs in the run queue over the last 1, 5
+and 15 minutes. It is, essentially, the first line of a \fBw\fR(1) command.
+.SH EXAMPLES
+.sp
+.LP
+Below is an example of the output \fBuptime\fR provides:
+.sp
+.in +2
+.nf
+\fBexample% uptime
+10:47am up 27 day(s), 50 mins, 1 user, load average: 0.18, 0.26, 0.20\fR
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBw\fR(1), \fBwho\fR(1), \fBwhodo\fR(1M), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBwho\fR \fB-b\fR gives the time the system was last booted.
diff --git a/usr/src/man/man1/vacation.1 b/usr/src/man/man1/vacation.1
new file mode 100644
index 0000000000..9ea06947f8
--- /dev/null
+++ b/usr/src/man/man1/vacation.1
@@ -0,0 +1,334 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH vacation 1 "20 Aug 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+vacation \- reply to mail automatically
+.SH SYNOPSIS
+.LP
+.nf
+\fBvacation\fR [\fB-I\fR]
+.fi
+
+.LP
+.nf
+\fBvacation\fR [\fB-a\fR \fIalias\fR] [\fB-e\fR \fIfilter_file\fR] [\fB-f\fR \fIdatabase_file\fR]
+ [\fB-j\fR] [\fB-m\fR \fImessage_file\fR] [\fB-s\fR \fIsender\fR] [\fB-t\fR\fIN\fR] \fIusername\fR
+.fi
+
+.LP
+.nf
+\fBvacation\fR [\fB-f database_file\fR] \fB-l\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBvacation\fR utility automatically replies to incoming mail.
+.SS "Installation"
+.sp
+.LP
+The installation consists of an interactive program which sets up
+\fBvacation\fR's basic configuration.
+.sp
+.LP
+To install \fBvacation\fR, type it with no arguments on the command line. The
+program creates a \fB\&.vacation.msg\fR file, which contains the message that
+is automatically sent to all senders when \fBvacation\fR is enabled, and starts
+an editor for you to modify the message. (See USAGE section.) Which editor is
+invoked is determined by the \fBVISUAL\fR or \fBEDITOR\fR environment variable,
+or \fBvi\fR(1) if neither of those environment variables are set.
+.sp
+.LP
+A \fB\&.forward\fR file is also created if one does not exist in your home
+directory. Once created, the \fB\&.forward\fR file will contain a line of the
+form:
+.sp
+.LP
+One copy of an incoming message is sent to the \fIusername\fR and another copy
+is piped into \fBvacation\fR:
+.sp
+.in +2
+.nf
+\e\fIusername\fR, "|/usr/bin/vacation \fIusername\fR"
+.fi
+.in -2
+
+.sp
+.LP
+If a \fB\&.forward\fR file is present in your home directory, it will ask
+whether you want to remove it, which disables \fBvacation\fR and ends the
+installation.
+.sp
+.LP
+The program automatically creates \fB\&.vacation.pag\fR and
+\fB\&.vacation.dir\fR, which contain a list of senders when \fBvacation\fR is
+enabled.
+.SS "Activation and Deactivation"
+.sp
+.LP
+The presence of the \fB\&.forward\fR file determines whether or not
+\fBvacation\fR is disabled or enabled. To disable \fBvacation\fR, remove the
+\fB\&.forward\fR file, or move it to a new name.
+.SS "Initialization"
+.sp
+.LP
+The \fB-I\fR option clears the \fBvacation\fR log files, \fB\&.vacation.pag\fR
+and \fB\&.vacation.dir\fR, erasing the list of senders from a previous
+\fBvacation\fR session. (See OPTIONS section.)
+.SS "Additional Configuration"
+.sp
+.LP
+\fBvacation\fR provides configuration options that are not part of the
+installation, these being \fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-j\fR, \fB-m\fR,
+\fB-s\fR, and \fB-t\fR. (See OPTIONS section.)
+.SS "Reporting"
+.sp
+.LP
+\fBvacation\fR provides a reporting option, \fB-l\fR. See \fBOPTIONS\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR\fR
+.ad
+.RS 6n
+.rt
+Initializes the \fB\&.vacation.pag\fR and \fB\&.vacation.dir\fR files and
+enables \fBvacation\fR. If the \fB-I\fR flag is not specified, and a \fIuser\fR
+argument is given, \fBvacation\fR reads the first line from the standard input
+(for a \fBFrom:\fR line, no colon). If absent, it produces an error message.
+.RE
+
+.sp
+.LP
+Options \fB-a\fR, \fB-e\fR, \fB-f\fR, \fB-j\fR, \fB-m\fR, \fB-s\fR, and
+\fB-t\fR are configuration options to be used in conjunction with
+\fBvacation\fR in the \fB\&.forward\fR file, not on the command line. For
+example,
+.sp
+.in +2
+.nf
+\e\fIusername\fR, "|/usr/bin/vacation \fB-t1m\fR \fIusername\fR"
+.fi
+.in -2
+
+.sp
+.LP
+repeats replies to the sender every minute.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fIalias\fR\fR
+.ad
+.RS 20n
+.rt
+Indicates that \fIalias\fR is one of the valid aliases for the user running
+\fBvacation\fR, so that mail addressed to that alias generates a reply.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIfilter_file\fR\fR
+.ad
+.RS 20n
+.rt
+Uses \fIfilter_file\fR instead of \fB\&.vacation.filter\fR as the source of the
+domain and email address filters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR \fIdatabase_file\fR\fR
+.ad
+.RS 20n
+.rt
+Uses \fIdatabase_file\fR instead of \fB\&.vacation\fR as the base name for the
+database file.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR\fR
+.ad
+.RS 20n
+.rt
+Does not check whether the recipient appears in the \fBTo:\fR or the \fBCc:\fR
+line. Warning: use of this option can result in vacation replies being sent to
+mailing lists and other inappropriate places; its use is therefore strongly
+discouraged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fImessage_file\fR\fR
+.ad
+.RS 20n
+.rt
+Uses \fB~/\fImessage_file\fR\fR as the message to send for the reply instead of
+\fB~/.vacation.msg\fR. \fImessage_file\fR is a relative path to the desired
+vacation message file. To prevent directory/file "not found" errors,
+\fImessage_file\fR should be on the same disk partition as \fB~/.forward\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsender\fR\fR
+.ad
+.RS 20n
+.rt
+Replies to \fIsender\fR instead of the value read from the UNIX \fBFrom\fR line
+of the incoming message.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fIN\fR\fR
+.ad
+.RS 20n
+.rt
+Changes the interval between repeat replies to the same sender. The default is
+1 week. A trailing \fBs\fR, \fBm\fR, \fBh\fR, \fBd\fR, or \fBw\fR scales
+\fIN\fR to seconds, minutes, hours, days, or weeks, respectively.
+.RE
+
+.sp
+.LP
+The \fB-l\fR option is neither for initialization nor configuration., but for
+reporting. The \fB-f\fRoption can also be used in conjunction with the
+\fB-l\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+ Lists the addresses to which a reply has been sent since the last invocation
+of \fBvacation -I\fR, along with a date and time stamp.
+.RE
+
+.SH USAGE
+.sp
+.LP
+\fB\&.vacation.msg\fR should include a header with at least a \fBSubject:\fR
+line (it should not include a \fBTo:\fR line). For example:
+.sp
+.in +2
+.nf
+\fBSubject: I am on vacation
+I am on vacation until July 22. If you have something urgent,
+please contact Joe Jones (jones@fB0).
+ --John\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+If the string \fB$SUBJECT\fR appears in the \fB\&.vacation.msg\fR file, it is
+replaced with the subject of the original message when the reply is sent. Thus,
+a \fB\&.vacation.msg\fR file such as
+.sp
+.in +2
+.nf
+\fBSubject: I am on vacation
+I am on vacation until July 22.
+Your mail regarding "$SUBJECT" will be read when I return.
+If you have something urgent, please contact
+Joe Jones (jones@fB0).
+ --John\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+will include the subject of the message in the reply.
+.sp
+.LP
+No message is sent if the \fBTo:\fR or the \fBCc:\fR line does not list the
+user to whom the original message was sent or one of a number of aliases for
+them, if the initial \fBFrom\fR line includes the string \fB\(miREQUEST@\fR, or
+if a \fBPrecedence:\fR \fBbulk\fR \fBor\fR \fBPrecedence:\fR \fBjunk\fR line is
+included in the header.
+.sp
+.LP
+\fBvacation\fR will also not respond to mail from either \fBpostmaster\fR or
+\fBMailer-Daemon\fR.
+.sp
+.LP
+In addition to the above criteria, if a \fB\&.vacation.filter\fR file exists,
+it is used to constrain further the set of addresses to which a reply is sent.
+Each line in that file should be either a domain name, an email address, a
+negated domain name or a negated email address. A negated line starts with the
+single character \fB!\fR.
+.sp
+.LP
+Each line is compared in the order listed to the sender address. A line
+containing an email address matches if the sender address is exactly the same
+except for case, which is ignored. A line containing a domain name matches if
+the sender address is \fIsomething\fR\fB@\fR\fIdomain-name\fR or
+\fIsomething\fR\fB@\fR\fIsomething.domain-name\fR. A reply is sent if the first
+match is an entry that is not negated. If the first match is a negated entry,
+or if no lines match, then no reply is sent.
+.sp
+.LP
+A sample filter file might look like the following:
+.sp
+.in +2
+.nf
+!host.subdomain.sun.com
+sun.com
+!wife@mydomain.com
+mydomain.com
+onefriend@hisisp.com
+anotherfriend@herisp.com
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Blank lines and lines starting with "\fB#\fR" are ignored.
+.SH FILES
+.sp
+.LP
+\fB~/.forward\fR
+.sp
+.LP
+\fB~/.vacation.filter\fR
+.sp
+.LP
+\fB~/.vacation.msg\fR
+.sp
+.LP
+A list of senders is kept in the \fBdbm\fR format files \fB\&.vacation.pag\fR
+and \fB\&.vacation.dir\fR in your home directory. These files are \fBdbm\fR
+files and cannot be viewed directly with text editors.
+.SH SEE ALSO
+.sp
+.LP
+\fBvi\fR(1), \fBsendmail\fR(1M), \fBdbm\fR(3UCB), \fBgetusershell\fR(3C),
+\fBaliases\fR(4), \fBshells\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/vgrind.1 b/usr/src/man/man1/vgrind.1
new file mode 100644
index 0000000000..30fed75678
--- /dev/null
+++ b/usr/src/man/man1/vgrind.1
@@ -0,0 +1,439 @@
+'\" te
+.\" Copyright (c) 1980 Regents of the University
+.\" of California. All rights reserved. The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 2000, Sun Microsystems, Inc.
+.\" All Rights Reserved
+.TH vgrind 1 "3 Mar 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+vgrind \- grind nice program listings
+.SH SYNOPSIS
+.LP
+.nf
+\fBvgrind\fR [\fB-2fntwx\fR] [\fB-d\fR \fIdefs-file\fR] [\fB-h\fR \fIheader\fR] [\fB-l\fR \fIlanguage\fR]
+ [\fB-s\fR \fIn\fR] [\fB-o\fR \fIpagelist\fR] [\fB-P\fR \fIprinter\fR] [\fB-T\fR \fIoutput-device\fR] \fIfilename\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBvgrind\fR utility formats the program sources named by the
+\fIfilename\fR arguments in a nice style using \fBtroff\fR(1). Comments are
+placed in italics, keywords in bold face, and as each function is encountered
+its name is listed on the page margin.
+.sp
+.LP
+\fBvgrind\fR runs in two basic modes, filter mode or regular mode. In filter
+mode, \fBvgrind\fR acts as a filter in a manner similar to \fBtbl\fR(1). The
+standard input is passed directly to the standard output except for lines
+bracketed by the \fBtroff\fR-like macros:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.vS\fR\fR
+.ad
+.RS 9n
+.rt
+starts processing
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\&.vE\fR\fR
+.ad
+.RS 9n
+.rt
+ends processing
+.RE
+
+.sp
+.LP
+These lines are formatted as described above. The output from this filter can
+be passed to \fBtroff\fR for output. There need be no particular ordering with
+\fBeqn\fR(1) or \fBtbl\fR(1).
+.sp
+.LP
+In regular mode, \fBvgrind\fR accepts input \fIfilename\fRs, processes them,
+and passes them to \fBtroff\fR for output. Use a hyphen (`\fB\(mi\fR\&') to
+specify standard input; otherwise, \fBvgrind\fR will exit without attempting to
+read from the standard input. Filenames must be specified after all other
+option arguments.
+.sp
+.LP
+In regular mode, if the \fB-t\fR or \fB-P\fR option is specified, the output
+is:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+emitted (in \fBtroff\fR format) to stdout if the \fB-t\fR option is specified.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+printed (as PostScript) to the named printer if the \fB-P\fR option is
+specified.
+.RE
+.sp
+.LP
+Otherwise, the output is:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+printed (as PostScript) on the system default printer, if one is defined, and
+the command's stdout is a tty.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+emitted (as PostScript) to stdout if it is not a tty (that is, if stdout is a
+pipe or a redirect to a file).
+.RE
+.sp
+.LP
+In both modes, \fBvgrind\fR passes any lines beginning with a decimal point
+without conversion.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-2\fR\fR
+.ad
+.RS 16n
+.rt
+Produces two-column output. Specifying this option changes the default point
+size to 8 (as if the \fB-s8\fR option were supplied). It also arranges for
+output to appear in landscape mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-f\fR\fR
+.ad
+.RS 16n
+.rt
+Forces filter mode.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 16n
+.rt
+Does not make keywords boldface.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 16n
+.rt
+Considers TAB characters to be spaced four columns apart instead of the usual
+eight.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 16n
+.rt
+Outputs the index file in a "pretty" format. The index file itself is produced
+whenever \fBvgrind\fR is run with a file called \fBindex\fR that is present in
+the current directory. The index of function definitions can then be run off by
+giving \fBvgrind\fR the \fB-x\fR option and the file \fBindex\fR as argument.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdefs-file\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies an alternate language definitions file (default is
+\fB/usr/lib/vgrindefs\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR \fIheader\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies a header to appear in the center of every output page. Use quotes to
+specify headers with embedded spaces.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIlanguage\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies the language to use. Among the \fIlanguage\fRs currently known are:
+Bourne shell (\fB-lsh\fR), C (\fB-lc\fR, the default), C++ (\fB-lc++\fR), C
+shell (\fB-lcsh\fR), emacs MLisp (\fB-lml\fR), FORTRAN (\fB-lf\fR), Icon
+(\fB-lI\fR), ISP (\fB-i\fR), LDL (\fB-lLDL\fR), Model (\fB-lm\fR), Pascal
+(\fB-lp\fR), and RATFOR (\fB-lr\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIprinter\fR\fR
+.ad
+.RS 16n
+.rt
+Sends output to the named \fIprinter\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIn\fR\fR
+.ad
+.RS 16n
+.rt
+Specifies a point size to use on output (exactly the same as the argument of a
+\fBtroff\fR \fB\&.ps\fR point size request).
+.RE
+
+.sp
+.LP
+\fBvgrind\fR passes the following options to the formatter specified by the
+\fBTROFF\fR environment variable. See ENVIRONMENT VARIABLES.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 20n
+.rt
+Similar to the same option in \fBtroff\fR; that is, formatted text goes to the
+standard output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-o\fR \fIpagelist\fR\fR
+.ad
+.RS 20n
+.rt
+Prints only those pages whose page numbers appear in the comma-separated
+\fIpagelist\fR of numbers and ranges. A range \fIN\(miM\fR means pages \fIN\fR
+through \fIM\fR; an initial \fB-N\fR means from the beginning to page \fIN\fR;
+and a final \fIN\fR\(mi means from \fIN\fR to the end.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fIoutput-device\fR\fR
+.ad
+.RS 20n
+.rt
+Formats output for the specified \fIoutput-device\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfilename\fR\fR
+.ad
+.RS 12n
+.rt
+Name of the program source to be processed by \fBvgrind\fR. Use `\fB\(mi\fR\&'
+to specify the standard input.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+In regular mode, \fBvgrind\fR feeds its intermediate output to the text
+formatter given by the value of the \fBTROFF\fR environment variable, or to
+\fB/usr/bin/troff\fR if this variable is not defined in the environment. This
+mechanism allows for local variations in \fBtroff\fR's name.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBindex\fR\fR
+.ad
+.sp .6
+.RS 4n
+file where source for index is created
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/vgrindefs\fR\fR
+.ad
+.sp .6
+.RS 4n
+language descriptions
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/lib/vfontedpr\fR\fR
+.ad
+.sp .6
+.RS 4n
+preprocessor
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/lib/tmac/tmac.vgrind\fR\fR
+.ad
+.sp .6
+.RS 4n
+macro package
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBctags\fR(1), \fBeqn\fR(1), \fBtbl\fR(1), \fBtroff\fR(1),
+\fBattributes\fR(5), \fBvgrindefs\fR(5)
+.SH BUGS
+.sp
+.LP
+\fBvgrind\fR assumes that a certain programming style is followed:
+.sp
+.ne 2
+.mk
+.na
+\fBC\fR
+.ad
+.RS 11n
+.rt
+Function names can be preceded on a line only by SPACE, TAB, or an asterisk
+(\fB*\fR). The parenthesized arguments must also be on the same line.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBFORTRAN\fR
+.ad
+.RS 11n
+.rt
+Function names need to appear on the same line as the keywords \fBfunction\fR
+or \fBsubroutine\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBMLisp\fR
+.ad
+.RS 11n
+.rt
+Function names should not appear on the same line as the preceding \fBdefun\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBModel\fR
+.ad
+.RS 11n
+.rt
+Function names need to appear on the same line as the keywords \fBis
+beginproc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBPascal\fR
+.ad
+.RS 11n
+.rt
+Function names need to appear on the same line as the keywords \fBfunction\fR
+or \fBprocedure\fR.
+.RE
+
+.sp
+.LP
+If these conventions are not followed, the indexing and marginal function name
+comment mechanisms will fail.
+.sp
+.LP
+More generally, arbitrary formatting styles for programs usually give unsightly
+results. To prepare a program for \fBvgrind\fR output, use TAB rather than
+SPACE characters to align source code properly, since \fBvgrind\fR uses
+variable width fonts.
+.sp
+.LP
+The mechanism of \fBctags\fR(1) in recognizing functions should be used here.
+.sp
+.LP
+The \fB-w\fR option is annoying, but there is no other way to achieve the
+desired effect.
+.sp
+.LP
+The macros defined in \fBtmac.vgrind\fR do not coexist gracefully with those of
+other macro packages, making filter mode difficult to use effectively.
+.sp
+.LP
+\fBvgrind\fR does not process certain special characters in \fBcsh\fR(1)
+scripts correctly.
+.sp
+.LP
+The \fBtmac.vgrind\fR formatting macros wire in the page height and width used
+in two-column mode, effectively making two column output useless for paper
+sizes other than the standard American size of 8.5 inches by 11 inches. For
+other paper sizes, it is necessary to edit the size values given in
+\fBtmac.vgrind\fR. A better solution would be to create a \fBtroff\fR output
+device specification intended specifically for landscape output and record size
+information there.
diff --git a/usr/src/man/man1/volcheck.1 b/usr/src/man/man1/volcheck.1
new file mode 100644
index 0000000000..4f47bcaa38
--- /dev/null
+++ b/usr/src/man/man1/volcheck.1
@@ -0,0 +1,139 @@
+'\" te
+.\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH volcheck 1 "28 Feb 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+volcheck \- checks for media in a drive and by default checks all floppy media
+.SH SYNOPSIS
+.LP
+.nf
+\fBvolcheck\fR [\fB-v\fR] [\fB-i\fR \fIsecs\fR] [\fB-t\fR \fIsecs\fR] \fIpathname\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBvolcheck\fR utility tells volume management to look at each
+\fBdev/\fR\fIpathname\fR in sequence and determine if new media has been
+inserted in the drive.
+.sp
+.LP
+The default action is to \fBvolcheck\fR all checkable media managed by volume
+management.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR \fIsecs\fR\fR
+.ad
+.RS 11n
+.rt
+Set the frequency of device checking to \fIsecs\fR seconds. The default is 2
+seconds. The minimum frequency is 1 second.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fI secs\fR\fR
+.ad
+.RS 11n
+.rt
+Check the named device(s) for the next \fIsecs\fR seconds. The maximum number
+of seconds allowed is 28800, which is 8 hours. The frequency of checking is
+specified by \fB-i\fR. There is no default total time.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 11n
+.rt
+Verbose.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpathname\fR\fR
+.ad
+.RS 12n
+.rt
+The path name of a media device.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRA sample of the \fBvolcheck\fR command.
+.sp
+.LP
+The following example
+
+.sp
+.in +2
+.nf
+ example% volcheck \(miv /dev/diskette
+ /dev/diskette has media
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+asks volume management to examine the floppy drive for new media.
+
+.sp
+.LP
+The following example
+
+.sp
+.in +2
+.nf
+ example% volcheck \(mii 2 \(mit 600 /dev/diskette1 &
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+asks volume management if there is a floppy in the floppy drive every 2 seconds
+for 600 seconds (10 minutes).
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/volctl\fR\fR
+.ad
+.RS 15n
+.rt
+volume management control port
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBeject\fR(1), \fBrmmount\fR(1M), \fBattributes\fR(5)
+.SH WARNINGS
+.sp
+.LP
+Due to a hardware limitation in many floppy drives, the act of checking for
+media causes mechanical action in the floppy drive. \fBContinuous polling of
+the floppy drive will cause the drive to wear out.\fR It is recommended that
+polling the drive only be performed during periods of high use.
diff --git a/usr/src/man/man1/volrmmount.1 b/usr/src/man/man1/volrmmount.1
new file mode 100644
index 0000000000..4c9e953666
--- /dev/null
+++ b/usr/src/man/man1/volrmmount.1
@@ -0,0 +1,196 @@
+'\" te
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH volrmmount 1 "28 Feb 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+volrmmount \- call rmmount to mount or unmount media
+.SH SYNOPSIS
+.LP
+.nf
+\fBvolrmmount\fR [\fB-i\fR | \fB-e\fR] [\fIname\fR | \fInickname\fR]
+.fi
+
+.LP
+.nf
+\fBvolrmmount\fR [\fB-d\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBvolrmmount\fR utility calls \fBrmmount\fR(1M) to, in effect, simulate an
+insertion (\fB-i\fR) or an ejection (\fB-e\fR). Simulating an insertion often
+means that \fBrmmount\fR will mount the media. Conversely, simulating an
+ejection often means that \fBrmmount\fR will unmount the media. However, these
+actions can vary depending on the \fBrmmount\fR configuration and media type.
+.sp
+.LP
+For example, using default settings, if you insert a music CD, it might not be
+mounted. However, you can configure \fBrmmount\fR so that it calls
+\fBworkman\fR whenever a music CD is inserted.
+.sp
+.LP
+This command allows you to override volume management's usual handling of media
+(see EXAMPLES below).
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-i\fR\fR
+.ad
+.RS 6n
+.rt
+Simulates an insertion of the specified media by calling \fBrmmount\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR\fR
+.ad
+.RS 6n
+.rt
+Simulates an ejection of the specified media by calling \fBrmmount\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 6n
+.rt
+Displays the name of the default device for \fBvolrmmount\fR to handle. This
+device is used if no \fIname\fR or \fInickname\fR is supplied.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 12n
+.rt
+The name that volume management recognizes as the device's name.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fInickname\fR\fR
+.ad
+.RS 12n
+.rt
+A shortened version of the device's name. Following is the list of recognized
+nicknames:
+.RE
+
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+NicknamePath
+_
+fd/dev/rdiskette
+_
+fd0/dev/rdiskette
+_
+fd1/dev/rdiskette1
+_
+diskette/dev/rdiskette
+_
+diskette0/dev/rdiskette0
+_
+diskette1/dev/rdiskette1
+_
+rdiskette/dev/rdiskette
+_
+rdiskette0/dev/rdiskette0
+_
+rdiskette1/dev/rdiskette1
+_
+floppy/dev/rdiskette
+_
+floppy0/dev/rdiskette0
+_
+floppy1/dev/rdiskette1
+_
+cdrom0/dev/rdsk/cXtYdZ/\fIlabel\fR
+_
+zip0/dev/rdsk/cXtYdZ/\fIlabel\fR
+_
+jaz0/dev/rdsk/cXtYdZ/\fIlabel\fR
+_
+rmdisk0/dev/rdsk/cXtYdZ/\fIlabel\fR
+.TE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the volrmmount command
+.sp
+.LP
+When volume management finds a floppy that contains a filesystem, it calls
+\fBrmmount\fR to mount it. If you wish to run \fBtar\fR(1) or \fBcpio\fR(1) on
+that floppy, it must first be unmounted. To unmount the floppy use:
+
+.sp
+.in +2
+.nf
+example% \fBvolrmmount \(mie floppy0\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+After \fBvolrmmount\fR unmounts the floppy, if you wish to re-mount it (rather
+than ejecting it and reinserting it) use:
+
+.sp
+.in +2
+.nf
+example% \fBvolrmmount \(mii floppy0\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Notice that if you are using a named floppy, you can use its name in place of
+\fBfloppy0\fR.
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/dev/volctl\fR\fR
+.ad
+.RS 15n
+.rt
+volume management control port
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcpio\fR(1), \fBeject\fR(1), \fBtar\fR(1), \fBrmmount\fR(1M),
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/w.1 b/usr/src/man/man1/w.1
new file mode 100644
index 0000000000..f87179450c
--- /dev/null
+++ b/usr/src/man/man1/w.1
@@ -0,0 +1,173 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH w 1 "19 Mar 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+w \- display information about currently logged-in users
+.SH SYNOPSIS
+.LP
+.nf
+\fBw\fR [\fB-hlsuw\fR] [\fIuser\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBw\fR command displays a summary of the current activity on the system,
+including what each user is doing. The heading line shows the current time, the
+length of time the system has been up, the number of users logged into the
+system, and the average number of jobs in the run queue over the last 1, 5 and
+15 minutes.
+.sp
+.LP
+The fields displayed are: the user's login name, the name of the tty the user
+is on, the time of day the user logged on (in \fIhours:minutes\fR), the idle
+time\(emthat is, the number of minutes since the user last typed anything (in
+\fIhours:minutes\fR), the \fBCPU\fR time used by all processes and their
+children on that terminal (in \fIminutes:seconds\fR), the \fBCPU\fR time used
+by the currently active processes (in \fIminutes:seconds\fR), and the name and
+arguments of the current process.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 6n
+.rt
+Suppresses the heading.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Produces a long form of output, which is the default.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 6n
+.rt
+Produces a short form of output. In the short form, the tty is abbreviated, the
+login time and \fBCPU\fR times are left off, as are the arguments to commands.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR\fR
+.ad
+.RS 6n
+.rt
+Produces the heading line which shows the current time, the length of time the
+system has been up, the number of users logged into the system, and the average
+number of jobs in the run queue over the last 1, 5 and 15 minutes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 6n
+.rt
+Produces a long form of output, which is also the same as the default.
+.RE
+
+.SH OPERANDS
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuser\fR\fR
+.ad
+.RS 8n
+.rt
+Name of a particular user for whom login information is displayed. If
+specified, output is restricted to that user.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRSample Output From the \fBw\fR Command
+.sp
+.in +2
+.nf
+example% \fBw\fR
+
+
+10:54am up 27 day(s), 57 mins, 1 user, load average: 0.28, 0.26, 0.22
+User tty login@ idle JCPU PCPU what
+ralph console 7:10am 1 10:05 4:31 w
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBw\fR: \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and
+\fBLC_TIME\fR.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR\fR
+.ad
+.RS 18n
+.rt
+user and accounting information
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBps\fR(1), \fBwho\fR(1), \fBwhodo\fR(1M), \fButmpx\fR(4),
+\fBattributes\fR(5), \fBenviron\fR(5)
+.SH NOTES
+.sp
+.LP
+The notion of the "current process" is unclear. The current algorithm is "the
+highest numbered process on the terminal that is not ignoring interrupts, or,
+if there is none, the highest numbered process on the terminal". This fails,
+for example, in critical sections of programs like the shell and editor, or
+when faulty programs running in the background fork and fail to ignore
+interrupts. In cases where no process can be found, \fBw\fR prints
+\fB\(mi\fR\&.
+.sp
+.LP
+The \fBCPU\fR time is only an estimate, in particular, if someone leaves a
+background process running after logging out, the person currently on that
+terminal is ``charged'' with the time.
+.sp
+.LP
+Background processes are not shown, even though they account for much of the
+load on the system.
+.sp
+.LP
+Sometimes processes, typically those in the background, are printed with null
+or garbaged arguments. In these cases, the name of the command is printed in
+parentheses.
+.sp
+.LP
+\fBw\fR does not know about the conventions for detecting background jobs. It
+will sometimes find a background job instead of the right one.
diff --git a/usr/src/man/man1/wait.1 b/usr/src/man/man1/wait.1
new file mode 100644
index 0000000000..a5dc58c632
--- /dev/null
+++ b/usr/src/man/man1/wait.1
@@ -0,0 +1,359 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1992 X/Open Company Limited
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH wait 1 "13 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+wait \- await process completion
+.SH SYNOPSIS
+.LP
+.nf
+
+.fi
+
+.SS "/bin/sh"
+.LP
+.nf
+\fBwait\fR [\fIpid\fR]...
+.fi
+
+.SS "/bin/jsh /bin/ksh /usr/xpg4/bin/sh"
+.LP
+.nf
+\fBwait\fR [\fIpid\fR]...
+.fi
+
+.LP
+.nf
+\fBwait\fR [% \fIjobid\fR...]
+.fi
+
+.SS "/bin/csh"
+.LP
+.nf
+\fBwait\fR
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBwait\fR [\fIjob...\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The shell itself executes \fBwait\fR, without creating a new process. If you
+get the error message \fBcannot fork,too many processes\fR, try using the
+\fBwait\fR command to clean up your background processes. If this doesn't help,
+the system process table is probably full or you have too many active
+foreground processes. There is a limit to the number of process \fBID\fRs
+associated with your login, and to the number the system can keep track of.
+.sp
+.LP
+Not all the processes of a pipeline with three or more stages are children of
+the shell, and thus cannot be waited for.
+.SS "/bin/sh, /bin/jsh"
+.sp
+.LP
+Wait for your background process whose process \fBID\fR is \fIpid\fR and report
+its termination status. If \fIpid\fR is omitted, all your shell's currently
+active background processes are waited for and the return code is \fB0\fR. The
+\fBwait\fR utility accepts a job identifier, when Job Control is enabled (jsh),
+and the argument, \fIjobid\fR, is preceded by a percent sign (\fB%\fR).
+.sp
+.LP
+If \fIpid\fR is not an active process \fBID,\fR the \fBwait\fR utility returns
+immediately and the return code is \fB0\fR.
+.SS "csh"
+.sp
+.LP
+Wait for your background processes.
+.SS "ksh"
+.sp
+.LP
+When an asynchronous list is started by the shell, the process \fBID\fR of the
+last command in each element of the asynchronous list becomes known in the
+current shell execution environment.
+.sp
+.LP
+If the \fBwait\fR utility is invoked with no operands, it waits until all
+process \fBIDs\fR known to the invoking shell have terminated and exit with an
+exit status of \fB0\fR.
+.sp
+.LP
+If one or more \fIpid\fR or \fIjobid\fR operands are specified that represent
+known process \fBID\fRs (or jobids), the \fBwait\fR utility waits until all of
+them have terminated. If one or more \fIpid\fR or \fIjobid\fR operands are
+specified that represent unknown process \fBID\fRs (or jobids), \fBwait\fR
+treats them as if they were known process \fBID\fRs (or jobids) that exited
+with exit status \fB127\fR. The exit status returned by the \fBwait\fR utility
+is the exit status of the process requested by the last \fIpid\fR or
+\fIjobid\fR operand.
+.sp
+.LP
+The known process \fBID\fRs are applicable only for invocations of \fBwait\fR
+in the current shell execution environment.
+.SS "ksh93"
+.sp
+.LP
+wait with no operands, waits until all jobs known to the invoking shell have
+terminated. If one or more job operands are specified, wait waits until all of
+them have completed. Each job can be specified as one of the following:
+.sp
+.ne 2
+.mk
+.na
+\fB\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+\fInumber\fR refers to a process ID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+\fInumber\fR refers to a process group ID.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fInumber\fR\fR
+.ad
+.RS 12n
+.rt
+\fInumber\fR refers to a job number
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a job whose name begins with \fIstring\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%?\fR\fIstring\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to a job whose name contains \fIstring\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%+\fR\fR
+.ad
+.br
+.na
+\fB\fB%%\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to the current job
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB%-\fR\fR
+.ad
+.RS 12n
+.rt
+Refers to the previous job
+.RE
+
+.sp
+.LP
+If one ore more job operands is a process id or process group id not known by
+the current shell environment, \fBwait\fR treats each of them as if it were a
+process that exited with status 127.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR\fR
+.ad
+.RS 9n
+.rt
+The unsigned decimal integer process \fBID\fR of a command, for which the
+utility is to wait for the termination.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIjobid\fR\fR
+.ad
+.RS 9n
+.rt
+A job control job \fBID\fR that identifies a background process group to be
+waited for. The job control job \fBID\fR notation is applicable only for
+invocations of \fBwait\fR in the current shell execution environment, and only
+on systems supporting the job control option.
+.RE
+
+.SH USAGE
+.sp
+.LP
+On most implementations, \fBwait\fR is a shell built-in. If it is called in a
+subshell or separate utility execution environment, such as one of the
+following,
+.sp
+.in +2
+.nf
+(wait)
+nohup wait ...
+find . -exec wait ... \e;
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+it returns immediately because there is no known process \fBID\fRs to wait for
+in those environments.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing A Script To Identify The Termination Signal
+.sp
+.LP
+Although the exact value used when a process is terminated by a signal is
+unspecified, if it is known that a signal terminated a process, a script can
+still reliably figure out which signal is using \fBkill\fR, as shown by the
+following (\fB/bin/ksh\fR and \fB/usr/xpg4/bin/sh\fR):
+
+.sp
+.in +2
+.nf
+sleep 1000&
+pid=$!
+kill -kill $pid
+wait $pid
+echo $pid was terminated by a SIG$(kill -l $(($?\(mi128))) signal.
+.fi
+.in -2
+.sp
+
+.LP
+\fBExample 2 \fRReturning The Exit Status Of A Process
+.sp
+.LP
+If the following sequence of commands is run in less than 31 seconds
+(\fB/bin/ksh\fR and \fB/usr/xpg4/bin/sh\fR):
+
+.sp
+.in +2
+.nf
+sleep 257 | sleep 31 &
+
+jobs -l %%
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+then either of the following commands returns the exit status of the second
+\fBsleep\fR in the pipeline:
+
+.sp
+.in +2
+.nf
+wait <\fIpid of sleep 31\fR>
+wait %%
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBwait\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.SS "ksh93"
+.sp
+.LP
+The following exit values are returned by the \fBwait\fR built-in in
+\fBksh93\fR:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 7n
+.rt
+\fBwait\fR was invoked with no operands. All processes known by the invoking
+process have terminated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 7n
+.rt
+\fIjob\fR is a process id or process group id that is unknown to the current
+shell environment.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBjobs\fR(1), \fBksh\fR(1), \fBksh93\fR(1), \fBsh\fR(1),
+\fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/wc.1 b/usr/src/man/man1/wc.1
new file mode 100644
index 0000000000..0af015bb29
--- /dev/null
+++ b/usr/src/man/man1/wc.1
@@ -0,0 +1,322 @@
+'\" te
+.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
+.\" Copyright 1989 AT&T
+.\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH wc 1 "13 Mar 2008" "SunOS 5.11" "User Commands"
+.SH NAME
+wc \- display a count of lines, words and characters in a file
+.SH SYNOPSIS
+.SS "/usr/bin/wc"
+.LP
+.nf
+\fBwc\fR [\fB-c\fR | \fB-m\fR | \fB-C\fR] [\fB-lw\fR] [\fIfile\fR]...
+.fi
+
+.SS "ksh93"
+.LP
+.nf
+\fBwc\fR [\fB-c\fR | \fB-m\fR | \fB-C\fR] [\fB-lLqw\fR] [\fIfile\fR]...
+.fi
+
+.SH DESCRIPTION
+.SS "/usr/bin/wc"
+.sp
+.LP
+\fBwc\fR reads one or more input files and, by default, writes the number of
+NEWLINE characters, words and bytes contained in each input file to the
+standard output.
+.sp
+.LP
+\fBwc\fR also writes a total count for all named files, if more than one input
+file is specified.
+.sp
+.LP
+\fBwc\fR considers a \fIword\fR to be a non-zero-length string of characters
+delimited by white space (for example, \fBSPACE\fR, \fBTAB\fR). See
+\fBiswspace\fR(3C) or \fBisspace\fR(3C).
+.SS "ksh93"
+.sp
+.LP
+The \fBwc\fR built-in in \fBksh93\fR is associated with the \fB/bin\fR and
+\fB/usr/bin\fR paths. It is invoked when \fBwc\fR is executed without a
+pathname prefix and the pathname search finds a \fB/bin/wc\fR or
+\fB/usr/bin/wc\fR executable.
+.sp
+.LP
+\fBwc\fR reads one or more input files and, by default, for each file writes a
+line containing the number of NEWLINEs, words, and bytes contained in each file
+followed by the file name to standard output in that order. A word is defined
+to be a \fBnon-zero\fR length string delimited by \fBisspace\fR(3C) characters.
+.sp
+.LP
+If more than one file is specified, \fBwc\fR writes a total count for all of
+the named files with total written instead of the file name.
+.sp
+.LP
+By default, \fBwc\fR writes all three counts. Options can specified so that
+only certain counts are written. The \fB-c\fR, \fB-C\fR, and \fB-m\fR options
+are mutually exclusive.
+.sp
+.LP
+If no file is specified, or if the file is \fB-\fR, \fBwc\fR reads from
+standard input and no filename is written to standard output. The start of the
+file is defined as the current offset.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.br
+.na
+\fB\fB--bytes | chars\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the byte counts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.br
+.na
+\fB\fB--lines\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the line counts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR\fR
+.ad
+.br
+.na
+\fB\fB--longest-line | max-line-length\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the longest line length.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m | C\fR\fR
+.ad
+.br
+.na
+\fB\fB--multibyte-chars\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the character counts.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR\fR
+.ad
+.br
+.na
+\fB\fB--quiet\fR\fR
+.ad
+.sp .6
+.RS 4n
+Suppress invalid multi-byte character warnings.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.br
+.na
+\fB\fB--words\fR\fR
+.ad
+.sp .6
+.RS 4n
+List the word counts.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR\fR
+.ad
+.RS 6n
+.rt
+Counts bytes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 6n
+.rt
+Same as \fB-m\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 6n
+.rt
+Counts lines.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fR
+.ad
+.RS 6n
+.rt
+Counts characters.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-w\fR\fR
+.ad
+.RS 6n
+.rt
+Counts words delimited by white space characters or new line characters.
+Delimiting characters are Extended Unix Code (\fBEUC\fR) characters from any
+code set defined by \fBiswspace()\fR.
+.RE
+
+.sp
+.LP
+If no option is specified, the default is \fB-lwc\fR (counts lines, words, and
+bytes.)
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of an input file. If no \fIfile\fR operands are specified, the
+standard input is used.
+.RE
+
+.SH USAGE
+.sp
+.LP
+See \fBlargefile\fR(5) for the description of the behavior of \fBwc\fR when
+encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBwc\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/bin/wc"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SS "ksh93"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilitySee below.
+.TE
+
+.sp
+.LP
+The \fBksh93\fR built-in binding to \fB/bin\fR and \fB/usr/bin\fR is Volatile.
+The built-in interfaces are Uncommitted.
+.SH SEE ALSO
+.sp
+.LP
+\fBcksum\fR(1), \fBksh93\fR(1), \fBisspace\fR(3C), \fBiswalpha\fR(3C),
+\fBiswspace\fR(3C), \fBsetlocale\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBlargefile\fR(5), \fBstandards\fR(5)
diff --git a/usr/src/man/man1/whatis.1 b/usr/src/man/man1/whatis.1
new file mode 100644
index 0000000000..b5733f2b59
--- /dev/null
+++ b/usr/src/man/man1/whatis.1
@@ -0,0 +1,64 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH whatis 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+whatis \- display a one-line summary about a keyword
+.SH SYNOPSIS
+.LP
+.nf
+\fBwhatis\fR \fIcommand\fR...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBwhatis\fR looks up a given \fIcommand\fR and displays the header line from
+the manual section. You can then run the \fBman\fR(1) command to get more
+information. If the line starts \fBname(\fIsection\fR)\fR.\|.\|. you can do
+\fBman\fR \fB-s\fR\fB\fIsection\fR name\fR to get the documentation for it.
+Try \fBwhatis ed\fR and then you should do \fBman\fR \fB-s\fR \fB1 ed\fR to get
+the manual page for \fBed\fR(1).
+.sp
+.LP
+\fBwhatis\fR is actually just the \fB-f\fR option to the \fBman\fR(1) command.
+.sp
+.LP
+\fBwhatis\fR uses the \fB/usr/share/man/windex\fR database. This database is
+created by \fBcatman\fR(1M). If this database does not exist, \fBwhatis\fR will
+fail.
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/share/man/windex\fR\fR
+.ad
+.RS 25n
+.rt
+Table of contents and keyword database
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBapropos\fR(1), \fBman\fR(1), \fBcatman\fR(1M), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/which.1 b/usr/src/man/man1/which.1
new file mode 100644
index 0000000000..e9a494c6b0
--- /dev/null
+++ b/usr/src/man/man1/which.1
@@ -0,0 +1,98 @@
+'\" te
+.\" Copyright (c) 2005, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH which 1 "30 Mar 2005" "SunOS 5.11" "User Commands"
+.SH NAME
+which \- locate a command and display its pathname or alias
+.SH SYNOPSIS
+.LP
+.nf
+\fBwhich\fR [\fIname\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBwhich\fR takes a list of names and determines which alias or utility would
+be executed had these names been given as commands.
+.sp
+.LP
+For each \fIname\fR operand, if it names an alias the alias is expanded.
+Otherwise the user's path is searched for a utility name matching \fIname\fR.
+Aliases are taken from the user's \fB\&.cshrc\fR file. \fIpath\fR is taken from
+the current shell execution environment.
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR\fR
+.ad
+.RS 8n
+.rt
+The name of a command to be located.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+One or more \fIname\fR operands were not located or an error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~/.cshrc\fR\fR
+.ad
+.RS 12n
+.rt
+source of aliases and path values
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBcsh\fR(1), \fBattributes\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+A diagnostic is given for names which are aliased to more than a single word,
+or if an executable file with the argument name was not found in the path.
+.SH NOTES
+.sp
+.LP
+The \fBwhich\fR utility is not a shell built-in command.
+.SH BUGS
+.sp
+.LP
+To compensate for \fB~/.cshrc\fR files in which aliases depend upon the
+\fBprompt\fR variable being set, \fBwhich\fR sets this variable to \fBNULL.\fR
+If the \fB~/.cshrc\fR produces output or prompts for input when \fBprompt\fR is
+set, \fBwhich\fR can produce some strange results.
diff --git a/usr/src/man/man1/who.1 b/usr/src/man/man1/who.1
new file mode 100644
index 0000000000..35ebe42ee7
--- /dev/null
+++ b/usr/src/man/man1/who.1
@@ -0,0 +1,540 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH who 1 "3 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+who \- who is on the system
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/bin/who\fR [\fB-abdHlmpqrstTu\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/who\fR \fB-q\fR [\fB-n\fR \fIx\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/bin/who\fR am i
+.fi
+
+.LP
+.nf
+\fB/usr/bin/who\fR am I
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/who\fR [\fB-abdHlmpqrtTu\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/who\fR \fB-q\fR [\fB-n\fR \fIx\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/who\fR \fB-s\fR [\fB-bdHlmpqrtu\fR] [\fIfile\fR]
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/who\fR am i
+.fi
+
+.LP
+.nf
+\fB/usr/xpg4/bin/who\fR am I
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBwho\fR utility can list the user's name, terminal line, login time,
+elapsed time since activity occurred on the line, and the process-ID of the
+command interpreter (shell) for each current UNIX system user. It examines the
+\fB/var/adm/utmpx\fR file to obtain its information. If \fIfile\fR is given,
+that file (which must be in \fButmpx\fR(4) format) is examined. Usually,
+\fIfile\fR will be \fB/var/adm/wtmpx\fR, which contains a history of all the
+logins since the file was last created.
+.sp
+.LP
+The general format for output is:
+.sp
+.in +2
+.nf
+\fIname\fR [\fIstate\fR] \fIline time\fR [\fIidle\fR] [\fIpid\fR] [\fIcomment\fR] [\fIexit\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+where:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIname\fR \fR
+.ad
+.RS 12n
+.rt
+User's login name
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIstate\fR \fR
+.ad
+.RS 12n
+.rt
+Capability of writing to the terminal
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIline\fR \fR
+.ad
+.RS 12n
+.rt
+Name of the line found in \fB/dev\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fItime\fR \fR
+.ad
+.RS 12n
+.rt
+Time since user's login
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIidle\fR \fR
+.ad
+.RS 12n
+.rt
+Time elapsed since the user's last activity
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIpid\fR \fR
+.ad
+.RS 12n
+.rt
+User's process id
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIcomment\fR \fR
+.ad
+.RS 12n
+.rt
+Comment line in \fBinittab\fR(4)
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIexit\fR \fR
+.ad
+.RS 12n
+.rt
+Exit status for dead processes
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR \fR
+.ad
+.RS 9n
+.rt
+Processes \fB/var/adm/utmpx\fR or the named \fIfile\fR with \fB-b\fR, \fB-d\fR,
+\fB-l\fR, \fB-p\fR, \fB-r\fR, \fB-t\fR, \fB-T\fR, and \fB-u\fR options turned
+on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fR
+.ad
+.RS 9n
+.rt
+Indicates the time and date of the last reboot.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fR
+.ad
+.RS 9n
+.rt
+Displays all processes that have expired and not been respawned by \fBinit\fR.
+The \fBexit\fR field appears for dead processes and contains the termination
+and exit values (as returned by \fBwait\fR(3UCB)), of the dead process. This
+can be useful in determining why a process terminated.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-H\fR \fR
+.ad
+.RS 9n
+.rt
+Outputs column headings above the regular output.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fR
+.ad
+.RS 9n
+.rt
+Lists only those lines on which the system is waiting for someone to login. The
+\fIname\fR field is \fBLOGIN\fR in such cases. Other fields are the same as for
+user entries except that the \fIstate\fR field does not exist.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fR
+.ad
+.RS 9n
+.rt
+Outputs only information about the current terminal.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fIx\fR \fR
+.ad
+.RS 9n
+.rt
+Takes a numeric argument, \fIx\fR, which specifies the number of users to
+display per line. \fIx\fR must be at least \fB1\fR. The \fB-n\fR option can
+only be used with \fB-q\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fR
+.ad
+.RS 9n
+.rt
+Lists any other process that is currently active and has been previously
+spawned by \fBinit\fR. The \fIname\fR field is the name of the program executed
+by \fBinit\fR as found in \fB/sbin/inittab\fR. The \fIstate\fR, \fIline\fR, and
+\fIidle\fR fields have no meaning. The \fIcomment\fR field shows the \fBid\fR
+field of the line from \fB/sbin/inittab\fR that spawned this process. See
+\fBinittab\fR(4).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-q\fR \fR
+.ad
+.RS 9n
+.rt
+(Quick \fBwho\fR) Displays only the names and the number of users currently
+logged on. When this option is used, all other options are ignored.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-r\fR \fR
+.ad
+.RS 9n
+.rt
+Indicates the current \fIrun-level\fR of the \fBinit\fR process.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fR
+.ad
+.RS 9n
+.rt
+(Default) Lists only the \fIname\fR, \fIline\fR, and \fItime\fR fields.
+.RE
+
+.SS "/usr/bin/who"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fR
+.ad
+.RS 7n
+.rt
+Same as the \fB-s\fR option, except that the \fIstate\fR \fIidle\fR, \fIpid\fR,
+and \fIcomment\fR, fields are also written. \fIstate\fR is one of the following
+characters:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB+\fR \fR
+.ad
+.RS 9n
+.rt
+The terminal allows write access to other users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mi\fR \fR
+.ad
+.RS 9n
+.rt
+The terminal denies write access to other users.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB?\fR \fR
+.ad
+.RS 9n
+.rt
+The terminal write-access state cannot be determined.
+.RE
+
+.RE
+
+.SS "/usr/xpg4/bin/who"
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-T\fR \fR
+.ad
+.RS 7n
+.rt
+Same as the \fB-s\fR option, except that the \fIstate\fR field is also written.
+\fIstate\fR is one of the characters listed under the \fB/usr/bin/who\fR
+version of this option. If the \fB-u\fR option is used with \fB-T\fR, the idle
+time is added to the end of the previous format.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR \fR
+.ad
+.RS 7n
+.rt
+Indicates the last change to the system clock (using the \fBdate\fR utility) by
+\fBroot\fR. See \fBsu\fR(1M) and \fBdate\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-u\fR \fR
+.ad
+.RS 7n
+.rt
+Lists only those users who are currently logged in. The \fIname\fR is the
+user's login name. The \fIline\fR is the name of the line as found in the
+directory \fB/dev\fR. The \fItime\fR is the time that the user logged in. The
+\fIidle\fR column contains the number of hours and minutes since activity last
+occurred on that particular line. A dot (\fB\&.\fR) 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 \fBold\fR. This field is useful when trying to determine
+whether a person is working at the terminal or not. The \fIpid\fR is the
+process-ID of the user's shell. The \fIcomment\fR is the comment field
+associated with this line as found in \fB/sbin/inittab\fR (see
+\fBinittab\fR(4)). This can contain information about where the terminal is
+located, the telephone number of the dataset, type of terminal if hard-wired,
+and so forth.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fBam\fR \fBi\fR \fR
+.ad
+.br
+.na
+\fB\fBam\fR \fBI\fR \fR
+.ad
+.RS 9n
+.rt
+In the "C" locale, limits the output to describing the invoking user,
+equivalent to the \fB-m\fR option. The \fBam\fR and \fBi\fR or \fBI\fR must be
+separate arguments.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR \fR
+.ad
+.RS 9n
+.rt
+Specifies a path name of a file to substitute for the database of logged-on
+users that \fBwho\fR uses by default.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBwho\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR \fR
+.ad
+.RS 7n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR \fR
+.ad
+.RS 7n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/sbin/inittab\fR \fR
+.ad
+.RS 19n
+.rt
+Script for \fBinit\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR \fR
+.ad
+.RS 19n
+.rt
+Current user and accounting information
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/wtmpx\fR \fR
+.ad
+.RS 19n
+.rt
+Historic user and accounting information
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.SS "/usr/xpg4/bin/who"
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBdate\fR(1), \fBlogin\fR(1), \fBmesg\fR(1), \fBinit\fR(1M), \fBsu\fR(1M),
+\fBwait\fR(3UCB), \fBinittab\fR(4), \fButmpx\fR(4), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBSuperuser:\fR After a shutdown to the single-user state, \fBwho\fR returns a
+prompt. Since \fB/var/adm/utmpx\fR is updated at login time and there is no
+login in single-user state, \fBwho\fR cannot report accurately on this state.
+The command, \fBwho\fR \fBam i\fR, however, returns the correct information.
diff --git a/usr/src/man/man1/whocalls.1 b/usr/src/man/man1/whocalls.1
new file mode 100644
index 0000000000..becc546b1b
--- /dev/null
+++ b/usr/src/man/man1/whocalls.1
@@ -0,0 +1,80 @@
+'\" te
+.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH whocalls 1 "3 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+whocalls \- report on the calls to a specific procedure
+.SH SYNOPSIS
+.LP
+.nf
+\fBwhocalls\fR [\fB-l\fR \fIwholib\fR] [\fB-s\fR] \fIfuncname\fR \fIexecutable\fR
+ [\fIarguments\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBwhocalls\fR is a simple example of a utility based on the
+\fILink-Auditing\fR functionality of \fBld.so.1\fR(1) that permits the tracking
+of a given function call. See the \fILinker and Libraries Guide\fR for a
+detailed description of the \fILink-Auditing\fR mechanism. The \fIexecutable\fR
+is run as normal with any associated arguments. Each time the procedure
+\fIfuncname\fR is called, both the arguments to that procedure and a stack
+trace are displayed on standard output.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIwholib\fR\fR
+.ad
+.RS 13n
+.rt
+Specifies an alternate \fBwho.so\fR \fILink-Auditing\fR library to use.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 13n
+.rt
+When available, examines and uses the \fB\&.symtab\fR symbol table for local
+symbols. This is a little more expensive than using the \fB\&.dynsym\fR symbol
+table, but can produce more detailed stack trace information.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRTracking Function Calls
+.sp
+.LP
+The following example tracks the calls to \fBprintf()\fR made by a simple
+\fBhelloworld\fR program:
+
+.sp
+.in +2
+.nf
+example% \fBwhocalls printf helloworld\fR
+printf(0x106e4, 0xef625310, 0xef621ba8)
+ helloworld:main+0x10
+ helloworld:_start+0x5c
+Hello World
+.fi
+.in -2
+.sp
+
+.SH SEE ALSO
+.sp
+.LP
+\fBld.so.1\fR(1), \fBsotruss\fR(1), \fBattributes\fR(5)
+.sp
+.LP
+\fILinker and Libraries Guide\fR
diff --git a/usr/src/man/man1/whois.1 b/usr/src/man/man1/whois.1
new file mode 100644
index 0000000000..b6634211a9
--- /dev/null
+++ b/usr/src/man/man1/whois.1
@@ -0,0 +1,90 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH whois 1 "6 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+whois \- Internet user name directory service
+.SH SYNOPSIS
+.LP
+.nf
+\fBwhois\fR [\fB-h\fR \fIhost\fR] \fIidentifier\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBwhois\fR searches for an \fBInternet\fR directory entry for an
+\fIidentifier\fR which is either a name (such as ``Smith'') or a handle (such
+as ``SRI-NIC''). To force a name-only search, precede the name with a period;
+to force a handle-only search, precede the handle with an exclamation point.
+.sp
+.LP
+To search for a group or organization entry, precede the argument with \fB*\fR
+(an asterisk). The entire membership list of the group will be displayed with
+the record.
+.sp
+.LP
+You may of course use an exclamation point and asterisk, or a period and
+asterisk together.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing The \fBwhois\fR Command
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% whois Smith
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+looks for the name or handle SMITH.
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% whois !SRI-NIC
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+looks for the handle SRI-NIC only.
+
+.sp
+.LP
+The command:
+
+.sp
+.in +2
+.nf
+example% whois .Smith, John
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+looks for the name \fBJOHN SMITH\fR only.
+
+.sp
+.LP
+Adding \fB\&.\|.\|.\fR to the name or handle argument will match anything from
+that point; that is, \fBZU .\|.\|.\fR will match ZUL, ZUM, and so on.
+
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/write.1 b/usr/src/man/man1/write.1
new file mode 100644
index 0000000000..a0674e85d4
--- /dev/null
+++ b/usr/src/man/man1/write.1
@@ -0,0 +1,301 @@
+'\" te
+.\" Copyright 1989 AT&T
+.\" Copyright (c) 2000, Sun Microsystems, Inc. All Rights Reserved
+.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH write 1 "3 Nov 2000" "SunOS 5.11" "User Commands"
+.SH NAME
+write \- write to another user
+.SH SYNOPSIS
+.LP
+.nf
+\fBwrite\fR \fIuser\fR [\fIterminal\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBwrite\fR utility reads lines from the user's standard input and writes
+them to the terminal of another user. When first invoked, it writes the
+message:
+.sp
+.in +2
+.nf
+Message from \fIsender-login-id\fR (\fIsending-terminal\fR) [date]...
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+to \fIuser\fR. When it has successfully completed the connection, the sender's
+terminal will be alerted twice to indicate that what the sender is typing is
+being written to the recipient's terminal.
+.sp
+.LP
+If the recipient wants to reply, this can be accomplished by typing
+.sp
+.in +2
+.nf
+write \fIsender-login-id\fR [\fIsending-terminal\fR]
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+upon receipt of the initial message. Whenever a line of input as delimited by a
+\fBNL\fR, \fBEOF\fR, or \fBEOL\fR special character is accumulated while in
+canonical input mode, the accumulated data will be written on the other user's
+terminal. Characters are processed as follows:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing the alert character will write the alert character to the recipient's
+terminal.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing the erase and kill characters will affect the sender's terminal in the
+manner described by the \fBtermios\fR(3C) interface.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing the interrupt or end-of-file characters will cause \fBwrite\fR to write
+an appropriate message (EOT\en in the C locale) to the recipient's terminal and
+exit.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing characters from \fBLC_CTYPE\fR classifications \fBprint\fR or
+\fBspace\fR will cause those characters to be sent to the recipient's terminal.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+When and only when the \fBstty\fR \fBiexten\fR local mode is enabled,
+additional special control characters and multi-byte or single-byte characters
+are processed as printable characters if their wide character equivalents are
+printable.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+Typing other non-printable characters will cause them to be written to the
+recipient's terminal as follows: control characters will appear as a `\fB^\fR'
+followed by the appropriate \fBASCII\fR character, and characters with the
+high-order bit set will appear in "meta" notation. For example, `\fB\e003\fR\&'
+is displayed as `\fB^C\fR' and `\fB\e372\fR\&' as `\fBM\(miz\fR'.
+.RE
+.sp
+.LP
+To write to a user who is logged in more than once, the \fIterminal\fR argument
+can be used to indicate which terminal to write to. Otherwise, the recipient's
+terminal is the first writable instance of the user found in
+\fB/usr/adm/utmpx\fR, and the following informational message will be written
+to the sender's standard output, indicating which terminal was chosen:
+.sp
+.in +2
+.nf
+\fIuser\fR is logged on more than one place.
+You are connected to \fIterminal\fR.
+Other locations are:\fIterminal\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Permission to be a recipient of a \fBwrite\fR message can be denied or granted
+by use of the \fBmesg\fR utility. However, a user's privilege may further
+constrain the domain of accessibility of other users' terminals. The
+\fBwrite\fR utility will fail when the user lacks the appropriate privileges to
+perform the requested action.
+.sp
+.LP
+If the character \fB!\fR is found at the beginning of a line, \fBwrite\fR calls
+the shell to execute the rest of the line as a command.
+.sp
+.LP
+\fBwrite\fR runs \fBsetgid()\fR (see \fBsetuid\fR(2)) to the group \fBID\fR
+\fBtty\fR, in order to have write permissions on other users' terminals.
+.sp
+.LP
+The following protocol is suggested for using \fBwrite\fR: when you first
+\fBwrite\fR to another user, wait for them to \fBwrite\fR back before starting
+to send. Each person should end a message with a distinctive signal (that is,
+\fB(o)\fR for \fIover\fR) so that the other person knows when to reply. The
+signal \fB(oo)\fR (for \fBover and out\fR) is suggested when conversation is to
+be terminated.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIuser\fR\fR
+.ad
+.RS 12n
+.rt
+User (login) name of the person to whom the message will be written. This
+operand must be of the form returned by the \fBwho\fR(1) utility.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIterminal\fR\fR
+.ad
+.RS 12n
+.rt
+Terminal identification in the same format provided by the \fBwho\fR utility.
+.RE
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBwrite\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+The addressed user is not logged on or the addressed user denies permission.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/var/adm/utmpx\fR\fR
+.ad
+.RS 18n
+.rt
+User and accounting information for \fBwrite\fR
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/usr/bin/sh\fR\fR
+.ad
+.RS 18n
+.rt
+Bourne shell executable file
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmail\fR(1), \fBmesg\fR(1), \fBpr\fR(1), \fBsh\fR(1), \fBtalk\fR(1),
+\fBwho\fR(1), \fBsetuid\fR(2), \fBtermios\fR(3C), \fBattributes\fR(5),
+\fBenviron\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.ne 2
+.mk
+.na
+\fB\fBuser is not logged on\fR\fR
+.ad
+.sp .6
+.RS 4n
+The person you are trying to \fBwrite\fR to is not logged on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPermission denied\fR\fR
+.ad
+.sp .6
+.RS 4n
+The person you are trying to \fBwrite\fR to denies that permission (with
+\fBmesg\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBWarning: cannot respond, set mesg\fR\fB-y\fR\fR
+.ad
+.sp .6
+.RS 4n
+Your terminal is set to \fBmesg\fR \fBn\fR and the recipient cannot respond to
+you.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBCan no longer write to user\fR\fR
+.ad
+.sp .6
+.RS 4n
+The recipient has denied permission (\fBmesg n\fR) after you had started
+writing.
+.RE
+
diff --git a/usr/src/man/man1/xargs.1 b/usr/src/man/man1/xargs.1
new file mode 100644
index 0000000000..12b3f1fd73
--- /dev/null
+++ b/usr/src/man/man1/xargs.1
@@ -0,0 +1,495 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
+.\" http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH xargs 1 "17 Jul 2007" "SunOS 5.11" "User Commands"
+.SH NAME
+xargs \- construct argument lists and invoke utility
+.SH SYNOPSIS
+.LP
+.nf
+\fBxargs\fR [\fB-t\fR] [\fB-p\fR] [\fB-e\fR[\fIeofstr\fR]] [\fB-E\fR \fIeofstr\fR]
+ [\fB-I\fR \fIreplstr\fR] [\fB-i\fR[\fIreplstr\fR]] [\fB-L\fR \fInumber\fR] [\fB-l\fR[\fInumber\fR]]
+ [\fB-n\fR \fInumber\fR [\fB-x\fR]] [\fB-s\fR \fIsize\fR] [\fIutility\fR [\fIargument\fR...]]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBxargs\fR utility constructs a command line consisting of the
+\fIutility\fR and \fIargument\fR operands specified followed by as many
+arguments read in sequence from standard input as fit in length and number
+constraints specified by the options. The \fBxargs\fR utility then invokes the
+constructed command line and waits for its completion. This sequence is
+repeated until an end-of-file condition is detected on standard input or an
+invocation of a constructed command line returns an exit status of \fB255\fR.
+.sp
+.LP
+Arguments in the standard input must be separated by unquoted blank characters,
+or unescaped blank characters or newline characters. A string of zero or more
+non-double-quote (\fB"\fR) and non-newline characters can be quoted by
+enclosing them in double-quotes. A string of zero or more non-apostrophe
+(\fB\&'\fR) and non-newline characters can be quoted by enclosing them in
+apostrophes. Any unquoted character can be escaped by preceding it with a
+backslash (\fB\e\fR). The \fIutility\fR are executed one or more times until
+the end-of-file is reached. The results are unspecified if the utility named by
+\fIutility\fR attempts to read from its standard input.
+.sp
+.LP
+The generated command line length is the sum of the size in bytes of the
+utility name and each argument treated as strings, including a null byte
+terminator for each of these strings. The \fBxargs\fR utility limits the
+command line length such that when the command line is invoked, the combined
+argument and environment lists can not exceed \fB{ARG_MAX}\(mi2048\fR bytes.
+Within this constraint, if neither the \fB-n\fR nor the \fB-s\fR option is
+specified, the default command line length is at least \fB{LINE_MAX}\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-e\fR\fB[\fR\fIeofstr\fR\fB]\fR\fR
+.ad
+.RS 15n
+.rt
+Uses \fIeofstr\fR as the logical end-of-file string. Underscore (\fB_\fR) is
+assumed for the logical \fBEOF\fR string if neither \fB-e\fR nor \fB-E\fR is
+used. When the \fIeofstr\fR option-argument is omitted, the logical \fBEOF\fR
+string capability is disabled and underscores are taken literally. The
+\fBxargs\fR utility reads standard input until either end-of-file or the
+logical \fBEOF\fR string is encountered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR \fIeofstr\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies a logical end-of-file string to replace the default underscore.
+\fBxargs\fR reads standard input until either end-of-file or the logical EOF
+string is encountered. When \fIeofstr\fR is a null string, the logical
+end-of-file string capability is disabled and underscore characters are taken
+literally.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-I\fR \fIreplstr\fR\fR
+.ad
+.RS 15n
+.rt
+Insert mode. \fIutility\fR is executed for each line from standard input,
+taking the entire line as a single argument, inserting it in \fIargument\fR
+\fIs\fR for each occurrence of \fIreplstr\fR. A maximum of five arguments in
+\fIargument\fRs can each contain one or more instances of \fIreplstr\fR. Any
+blank characters at the beginning of each line are ignored. Constructed
+arguments cannot grow larger than 255 bytes. Option \fB-x\fR is forced on. The
+\fB-I\fR and \fB-i\fR options are mutually exclusive; the last one specified
+takes effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\fR\fB-i\fR\fB[\fR\fIreplstr\fR\fB]\fR\fR
+.ad
+.RS 15n
+.rt
+This option is equivalent to \fB-I\fR \fIreplstr\fR. The string \fB{\|}\fR is
+assumed for \fIreplstr\fR if the option-argument is omitted.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-L\fR \fInumber\fR\fR
+.ad
+.RS 15n
+.rt
+The \fIutility\fR is executed for each non-empty \fInumber\fR lines of
+arguments from standard input. The last invocation of \fIutility\fR is with
+fewer lines of arguments if fewer than \fInumber\fR remain. A line is
+considered to end with the first newline character unless the last character of
+the line is a blank character; a trailing blank character signals continuation
+to the next non-empty line, inclusive. The \fB-L\fR, \fB-l\fR, and \fB-n\fR
+options are mutually exclusive; the last one specified takes effect.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l[\fR\fInumber\fR\fB]\fR\fR
+.ad
+.RS 15n
+.rt
+(The letter ell.) This option is equivalent to \fB-L\fR \fInumber\fR. If
+\fInumber\fR is omitted, \fB1\fR is assumed. Option \fB-x\fR is forced on.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR \fInumber\fR\fR
+.ad
+.RS 15n
+.rt
+Invokes \fIutility\fR using as many standard input arguments as possible, up to
+\fInumber\fR (a positive decimal integer) arguments maximum. Fewer arguments
+are used if:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The command line length accumulated exceeds the size specified by the \fB-s\fR
+option (or \fB{LINE_MAX}\fR if there is no \fB-s\fR option), or
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The last iteration has fewer than \fInumber\fR, but not zero, operands
+remaining.
+.RE
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR\fR
+.ad
+.RS 15n
+.rt
+Prompt mode. The user is asked whether to execute \fIutility\fR at each
+invocation. Trace mode (\fB-t\fR) is turned on to write the command instance to
+be executed, followed by a prompt to standard error. An affirmative response
+(specific to the user's locale) read from \fB/dev/tty\fR executes the command;
+otherwise, that particular invocation of \fIutility\fR is skipped.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR \fIsize\fR\fR
+.ad
+.RS 15n
+.rt
+Invokes \fIutility\fR using as many standard input arguments as possible
+yielding a command line length less than \fIsize\fR (a positive decimal
+integer) bytes. Fewer arguments are used if:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The total number of arguments exceeds that specified by the \fB-n\fR option, or
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+The total number of lines exceeds that specified by the \fB-L\fR option, or
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+End of file is encountered on standard input before \fIsize\fR bytes are
+accumulated.
+.RE
+Values of \fIsize\fR up to at least \fB{LINE_MAX}\fR bytes are supported,
+provided that the constraints specified in DESCRIPTION are met. It is not
+considered an error if a value larger than that supported by the implementation
+or exceeding the constraints specified in DESCRIPTION is specified. \fBxargs\fR
+uses the largest value it supports within the constraints.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 6n
+.rt
+Enables trace mode. Each generated command line is written to standard error
+just prior to invocation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 6n
+.rt
+Terminates if a command line containing \fInumber\fR arguments (see the
+\fB-n\fR option above) or \fInumber\fR lines (see the \fB-L\fR option above)
+does not fit in the implied or specified size (see the \fB-s\fR option above).
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIutility\fR\fR
+.ad
+.RS 12n
+.rt
+The name of the utility to be invoked, found by search path using the
+\fBPATH\fR environment variable. (ee \fBenviron\fR(5).) If \fIutility\fR is
+omitted, the default is the \fBecho\fR(1) utility. If the \fIutility\fR operand
+names any of the special built-in utilities in \fBshell_builtins\fR(1), the
+results are undefined.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument\fR\fR
+.ad
+.RS 12n
+.rt
+An initial option or operand for the invocation of \fIutility\fR.
+.RE
+
+.SH USAGE
+.sp
+.LP
+The \fB255\fR exit status allows a utility being used by \fBxargs\fR to tell
+\fBxargs\fR to terminate if it knows no further invocations using the current
+data stream succeeds. Thus, \fIutility\fR should explicitly \fBexit\fR with an
+appropriate value to avoid accidentally returning with \fB255\fR.
+.sp
+.LP
+Notice that input is parsed as lines. Blank characters separate arguments. If
+\fBxargs\fR is used to bundle output of commands like \fBfind\fR \fIdir\fR
+\fB-print\fR or \fBls\fR into commands to be executed, unexpected results are
+likely if any filenames contain any blank characters or newline characters.
+This can be fixed by using \fBfind\fR to call a script that converts each file
+found into a quoted string that is then piped to \fBxargs\fR. Notice that the
+quoting rules used by \fBxargs\fR are not the same as in the shell. They were
+not made consistent here because existing applications depend on the current
+rules and the shell syntax is not fully compatible with it. An easy rule that
+can be used to transform any string into a quoted form that \fBxargs\fR
+interprets correctly is to precede each character in the string with a
+backslash (\fB\e\fR).
+.sp
+.LP
+On implementations with a large value for \fB{ARG_MAX}\fR, \fBxargs\fR can
+produce command lines longer than \fB{LINE_MAX}\fR. For invocation of
+utilities, this is not a problem. If \fBxargs\fR is being used to create a text
+file, users should explicitly set the maximum command line length with the
+\fB-s\fR option.
+.sp
+.LP
+The \fBxargs\fR utility returns exit status \fB127\fR if an error occurs so
+that applications can distinguish "failure to find a utility" from "invoked
+utility exited with an error indication." The value \fB127\fR was chosen
+because it is not commonly used for other meanings; most utilities use small
+values for "normal error conditions" and the values above \fB128\fR can be
+confused with termination due to receipt of a signal. The value \fB126\fR was
+chosen in a similar manner to indicate that the utility could be found, but not
+invoked.
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRUsing the xargs command
+.sp
+.LP
+The following example moves all files from directory \fB$1\fR to directory
+\fB$2\fR, and echo each move command just before doing it:
+
+.sp
+.in +2
+.nf
+example% \fBls $1 | xargs -I {} -t mv $1/{} $2/{}\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command combines the output of the parenthesised commands onto
+one line, which is then written to the end of file \fBlog\fR:
+
+.sp
+.in +2
+.nf
+example% \fB(logname; date; printf "%s\en" "$0 $*") | xargs >>log\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following command invokes \fBdiff\fR with successive pairs of arguments
+originally typed as command line arguments (assuming there are no embedded
+blank characters in the elements of the original argument list):
+
+.sp
+.in +2
+.nf
+example% \fBprintf "%s\en" "$*" | xargs -n 2 -x diff\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The user is asked which files in the current directory are to be archived. The
+files are archived into \fBarch\fR \fB;\fR a, one at a time, or b, many at a
+time:
+
+.sp
+.in +2
+.nf
+example% \fBls | xargs -p -L 1 ar -r arch
+ls | xargs -p -L 1 | xargs ar -r arch\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+The following executes with successive pairs of arguments originally typed as
+command line arguments:
+
+.sp
+.in +2
+.nf
+example% \fBecho $* | xargs -n 2 diff\fR
+.fi
+.in -2
+.sp
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fBxargs\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.ne 2
+.mk
+.na
+\fB\fBPATH\fR\fR
+.ad
+.RS 8n
+.rt
+Determine the location of \fIutility\fR.
+.RE
+
+.sp
+.LP
+Affirmative responses are processed using the extended regular expression
+defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
+user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
+the behavior of ranges, equivalence classes, and multi-character collating
+elements used in the expression defined for \fByesexpr\fR. The locale specified
+in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
+bytes of text data a characters, the behavior of character classes used in the
+expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 12n
+.rt
+All invocations of \fIutility\fR returned exit status \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\(mi125\fR\fR
+.ad
+.RS 12n
+.rt
+A command line meeting the specified requirements could not be assembled, one
+or more of the invocations of \fIutility\fR returned a non-zero exit status, or
+some other error occurred.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB126\fR\fR
+.ad
+.RS 12n
+.rt
+The utility specified by \fIutility\fR was found but could not be invoked.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB127\fR\fR
+.ad
+.RS 12n
+.rt
+The utility specified by \fIutility\fR could not be found.
+.RE
+
+.sp
+.LP
+If a command line meeting the specified requirements cannot be assembled, the
+utility cannot be invoked, an invocation of the utility is terminated by a
+signal, or an invocation of the utility exits with exit status \fB255\fR, the
+\fBxargs\fR utility writes a diagnostic message and exit without processing any
+remaining input.
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+CSIEnabled
+_
+Interface StabilityStandard
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBecho\fR(1), \fBshell_builtins\fR(1), \fBattributes\fR(5), \fBenviron\fR(5),
+\fBstandards\fR(5)
diff --git a/usr/src/man/man1/xgettext.1 b/usr/src/man/man1/xgettext.1
new file mode 100644
index 0000000000..6109d081e6
--- /dev/null
+++ b/usr/src/man/man1/xgettext.1
@@ -0,0 +1,219 @@
+'\" te
+.\" Copyright (c) 1999, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH xgettext 1 "23 Mar 1999" "SunOS 5.11" "User Commands"
+.SH NAME
+xgettext \- extract gettext call strings from C programs
+.SH SYNOPSIS
+.LP
+.nf
+\fBxgettext\fR [\fB-ns\fR] [\fB-a\fR [\fB-x\fR \fIexclude-file\fR]] [\fB-c\fR \fIcomment-tag\fR]
+ [\fB-d\fR \fIdefault-domain\fR] [\fB-j\fR] [\fB-m\fR \fIprefix\fR] [\fB-M\fR \fIsuffix\fR]
+ [\fB-p\fR \fIpathname\fR] \fB-|\fR \fIfilename\fR...
+.fi
+
+.LP
+.nf
+\fBxgettext\fR \fB-h\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBxgettext\fR utility is used to automate the creation of portable message
+files (\fB\&.po\fR). A \fB\&.po\fR file contains copies of "C" strings that are
+found in ANSI C source code in \fIfilename\fR or the standard input if
+`\fB\(mi\fR\&' is specified on the command line. The \fB\&.po\fR file can be
+used as input to the \fBmsgfmt\fR(1) utility, which produces a binary form of
+the message file that can be used by application during run-time.
+.sp
+.LP
+\fBxgettext\fR writes \fImsgid\fR strings from \fBgettext\fR(3C) calls in
+\fIfilename\fR to the default output file \fBmessages.po\fR. The default output
+file name can be changed by \fB-d\fR option. \fImsgid\fR strings in
+\fBdgettext()\fR calls are written to the output file
+\fBdomainname\fR\fB\&.po\fR where \fBdomainname\fR is the first parameter to
+the \fBdgettext()\fR call.
+.sp
+.LP
+By default, \fBxgettext\fR creates a \fB\&.po\fR file in the current working
+directory, and each entry is in the same order that the strings are extracted
+from \fIfilenames\fR. When the \fB-p\fR option is specified, the \fB\&.po\fR
+file is created in the \fIpathname\fR directory. An existing \fB\&.po\fR file
+is overwritten.
+.sp
+.LP
+Duplicate \fImsgid\fRs are written to the \fB\&.po\fR file as comment lines.
+When the \fB-s\fR option is specified, the \fB\&.po\fR is sorted by the
+\fImsgid\fR string, and all duplicated \fImsgid\fRs are removed. All
+\fImsgstr\fR directives in the \fB\&.po\fR file are empty unless the \fB-m\fR
+option is used.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-n\fR\fR
+.ad
+.RS 21n
+.rt
+Add comment lines to the output file indicating file name and line number in
+the source file where each extracted string is encountered. These lines appear
+before each \fImsgid\fR in the following format:
+.sp
+.in +2
+.nf
+# # File: \fIfilename\fR, line: \fIline-number\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-s\fR\fR
+.ad
+.RS 21n
+.rt
+Generate output sorted by \fImsgid\fRs with all duplicate \fImsgid\fRs
+removed.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-a\fR\fR
+.ad
+.RS 21n
+.rt
+Extract all strings, not just those found in \fBgettext\fR(3C), and
+\fBdgettext()\fR () calls. Only one \fB\&.po\fR file is created.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-c\fR \fIcomment-tag\fR\fR
+.ad
+.RS 21n
+.rt
+The comment block beginning with \fIcomment-tag\fR as the first token of the
+comment block is added to the output \fB\&.po\fR file as \fI#\fR delimited
+comments. For multiple domains, \fBxgettext\fR directs comments and messages to
+the prevailing text domain.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR \fIdefault-domain\fR\fR
+.ad
+.RS 21n
+.rt
+Rename default output file from \fBmessages.po\fR to \fIdefault-domain\fR
+\fB\&.po\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-j\fR\fR
+.ad
+.RS 21n
+.rt
+Join messages with existing message files. If a \fB\&.po\fR file does not
+exist, it is created. If a \fB\&.po\fR file does exist, new messages are
+appended. Any duplicate \fBmsgid\fRs are commented out in the resulting
+\fB\&.po\fR file. Domain directives in the existing \fB\&.po\fR file are
+ignored. Results not guaranteed if the existing message file has been edited.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR \fIprefix\fR\fR
+.ad
+.RS 21n
+.rt
+Fill in the \fImsgstr\fR with \fIprefix\fR. This is useful for debugging
+purposes. To make \fImsgstr\fR identical to \fImsgid\fR, use an empty string
+(\fB""\fR) for \fIprefix\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-M\fR \fIsuffix\fR\fR
+.ad
+.RS 21n
+.rt
+Fill in the \fImsgstr\fR with \fIsuffix\fR. This is useful for debugging
+purposes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIpathname\fR\fR
+.ad
+.RS 21n
+.rt
+Specify the directory where the output files will be placed. This option
+overrides the current working directory.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR \fIexclude-file\fR\fR
+.ad
+.RS 21n
+.rt
+Specify a \fB\&.po\fR file that contains a list of \fImsgid\fRs that are not
+to be extracted from the input files. The format of \fIexclude-file\fR is
+identical to the \fB\&.po\fR file. However, only the \fImsgid\fR directive line
+in \fIexclude-file\fR is used. All other lines are simply ignored. The
+\fB-x\fR option can only be used with the \fB-a\fR option.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-h\fR\fR
+.ad
+.RS 21n
+.rt
+Print a help message on the standard output.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmsgfmt\fR(1), \fBgettext\fR(3C), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBxgettext\fR is not able to extract cast strings, for example ANSI C casts of
+literal strings to \fB(const char *)\fR. This is unnecessary anyway, since the
+prototypes in \fB<libintl.h>\fR already specify this type.
+.sp
+.LP
+In messages and translation notes, lines greater than 2048 characters are
+truncated to 2048 characters and a warning message is printed to stderr.
diff --git a/usr/src/man/man1/xstr.1 b/usr/src/man/man1/xstr.1
new file mode 100644
index 0000000000..8e30ef53b7
--- /dev/null
+++ b/usr/src/man/man1/xstr.1
@@ -0,0 +1,236 @@
+'\" te
+.\" Copyright (c) 1992, Sun Microsystems, Inc.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH xstr 1 "14 Sep 1992" "SunOS 5.11" "User Commands"
+.SH NAME
+xstr \- extract strings from C programs to implement shared strings
+.SH SYNOPSIS
+.LP
+.nf
+\fBxstr\fR \fB-c\fR \fIfilename\fR [\fB-v\fR] [\fB-l\fR \fIarray\fR]
+.fi
+
+.LP
+.nf
+\fBxstr\fR [\fB-l\fR \fIarray\fR]
+.fi
+
+.LP
+.nf
+\fBxstr\fR \fIfilename\fR [\fB-v\fR] [\fB-l\fR \fIarray\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBxstr\fR maintains a file called \fBstrings\fR into which strings in
+component parts of a large program are hashed. These strings are replaced with
+references to this common area. This serves to implement shared constant
+strings, which are most useful if they are also read-only.
+.sp
+.LP
+The command:
+.sp
+.in +2
+.nf
+\fBexample% xstr \(mic \fR\fIfilename\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+extracts the strings from the C source in name, replacing string references by
+expressions of the form \fB&xstr[\fR\fInumber\fR\fB]\fR for some number. An
+appropriate declaration of \fBxstr\fR is prepended to the file. The resulting
+C text is placed in the file \fBx.c\fR, to then be compiled. The strings from
+this file are placed in the \fBstrings\fR data base if they are not there
+already. Repeated strings and strings which are suffixes of existing strings do
+not cause changes to the data base.
+.sp
+.LP
+After all components of a large program have been compiled, a file declaring
+the common \fBxstr\fR space called \fBxs.c\fR can be created by a command of
+the form:
+.sp
+.in +2
+.nf
+\fBexample%\fR \fBxstr\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This \fBxs.c\fR file should then be compiled and loaded with the rest of the
+program. If possible, the array can be made read-only (shared) saving space
+and swap overhead.
+.sp
+.LP
+\fBxstr\fR can also be used on a single file. A command:
+.sp
+.LP
+\fBexample% xstr \fR\fIfilename\fR
+.sp
+.LP
+creates files \fBx.c\fR and \fBxs.c\fR as before, without using or affecting
+any \fBstrings\fR file in the same directory.
+.sp
+.LP
+It may be useful to run \fBxstr\fR after the C preprocessor if any macro
+definitions yield strings or if there is conditional code which contains
+strings which may not, in fact, be needed. \fBxstr\fR reads from the standard
+input when the argument `\fB\(mi\fR\&' is given. An appropriate command
+sequence for running \fBxstr\fR after the C preprocessor is:
+.sp
+.in +2
+.nf
+\fBexample% cc \(miE name.c | xstr \(mic \(mi
+example% cc \(mic x.c
+example% mv x.o name.o\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBxstr\fR does not touch the file \fBstrings\fR unless new items are added;
+thus \fBmake\fR(1S) can avoid remaking \fBxs.o\fR unless truly necessary.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mic \fR\fIfilename\fR\fR
+.ad
+.RS 18n
+.rt
+Take C source text from \fIfilename\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Verbose: display a progress report indicating where new or duplicate strings
+were found.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(mil \fR\fIarray\fR\fR
+.ad
+.RS 18n
+.rt
+Specify the named \fIarray\fR in program references to abstracted strings.
+The default array name is \fBxstr\fR.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBstrings\fR\fR
+.ad
+.RS 12n
+.rt
+data base of strings
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBx.c\fR\fR
+.ad
+.RS 12n
+.rt
+massaged C source
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBxs.c\fR\fR
+.ad
+.RS 12n
+.rt
+C source for definition of array "xstr*(rq
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB/tmp/xs*\fR\fR
+.ad
+.RS 12n
+.rt
+temp file when \fBxstr \fR\fIfilename\fR doesn't touch \fBstrings\fR
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBmake\fR(1S), \fBattributes\fR(5)
+.SH BUGS
+.sp
+.LP
+If a string is a suffix of another string in the data base, but the shorter
+string is seen first by \fBxstr\fR both strings will be placed in the data
+base, when just placing the longer one there would do.
+.SH NOTES
+.sp
+.LP
+Be aware that \fBxstr\fR indiscriminately replaces all strings with expressions
+of the form \fB&xstr[\fR\fInumber\fR\fB]\fR regardless of the way the original
+C code might have used the string. For example, you will encounter a problem
+with code that uses \fBsizeof()\fR to determine the length of a literal string
+because \fBxstr\fR will replace the literal string with a pointer that most
+likely will have a different size than the string's. To circumvent this
+problem:
+.RS +4
+.TP
+.ie t \(bu
+.el o
+use \fBstrlen()\fR instead of \fBsizeof()\fR; note that \fBsizeof()\fR
+returns the size of the array (including the null byte at the end), whereas
+\fBstrlen()\fR doesn't count the null byte. The equivalent of
+\fBsizeof("\fR\fIxxx\fR\fB")\fR really is \fB(strlen("\fR\fIxxx\fR\fB"))+1\fR.
+.RE
+.RS +4
+.TP
+.ie t \(bu
+.el o
+use \fB#define\fR for operands of \fBsizeof()\fR and use the \fBdefine\fR'd
+version. \fBxstr\fR ignores \fB#define\fR statements. Make sure you run
+\fBxstr\fR on \fIfilename\fR before you run it on the preprocessor.
+.RE
+.sp
+.LP
+You will also encounter a problem when declaring an initialized character array
+of the form
+.sp
+.in +2
+.nf
+\fBchar x[] = "\fR\fIxxx\fR\fB";\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+\fBxstr\fR will replace \fIxxx\fR with an expression of the form
+\fB&xstr[\fR\fInumber\fR\fB]\fR which will not compile. To circumvent this
+problem, use \fBstatic char *x = "xxx"\fR instead of \fBstatic char x[] =
+"xxx"\fR.
diff --git a/usr/src/man/man1/yacc.1 b/usr/src/man/man1/yacc.1
new file mode 100644
index 0000000000..3d7ce7d18e
--- /dev/null
+++ b/usr/src/man/man1/yacc.1
@@ -0,0 +1,409 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
+.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/.
+.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text
+.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical
+.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
+.\" This notice shall appear on any product containing this material.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
+.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH yacc 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
+.SH NAME
+yacc \- yet another compiler-compiler
+.SH SYNOPSIS
+.LP
+.nf
+\fByacc\fR [\fB-dltVv\fR] [\fB-b\fR \fIfile_prefix\fR] [\fB-Q\fR [y | n]]
+ [\fB-P\fR \fIparser\fR] [\fB-p\fR \fIsym_prefix\fR] \fIfile\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fByacc\fR command converts a context-free grammar into a set of tables for
+a simple automaton that executes an LALR(1) parsing algorithm. The grammar can
+be ambiguous. Specified precedence rules are used to break ambiguities.
+.sp
+.LP
+The output file, \fBy.tab.c\fR, must be compiled by the C compiler to produce a
+function \fByyparse()\fR. This program must be loaded with the lexical analyzer
+program, \fByylex()\fR, as well as \fBmain()\fR and \fByyerror()\fR, an error
+handling routine. These routines must be supplied by the user. The \fBlex\fR(1)
+command is useful for creating lexical analyzers usable by \fByacc\fR.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-b\fR \fIfile_prefix\fR\fR
+.ad
+.RS 18n
+.rt
+Uses \fIfile_prefix\fR instead of \fBy\fR as the prefix for all output files.
+The code file \fBy.tab.c\fR, the header file \fBy.tab.h\fR (created when
+\fB-d\fR is specified), and the description file \fBy.output\fR (created when
+\fB-v\fR is specified), is changed to \fIfile_prefix\fR\fB\&.tab.c\fR,
+\fIfile_prefix\fR\fB\&.tab.h\fR, and \fIfile_prefix\fR\fB\&.output\fR,
+respectively.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fR
+.ad
+.RS 18n
+.rt
+Generates the file \fBy.tab.h\fR with the \fB#define\fR statements that
+associate the \fByacc\fR user-assigned "token codes" with the user-declared
+"token names". This association allows source files other than \fBy.tab.c\fR to
+access the token codes.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR\fR
+.ad
+.RS 18n
+.rt
+Specifies that the code produced in \fBy.tab.c\fR does not contain any
+\fB#line\fR constructs. This option should only be used after the grammar and
+the associated actions are fully debugged.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-p\fR \fIsym_prefix\fR\fR
+.ad
+.RS 18n
+.rt
+Uses \fIsym_prefix\fR instead of \fByy\fR as the prefix for all external names
+produced by \fByacc\fR. The names affected include the functions
+\fByyparse()\fR, \fByylex()\fR and \fByyerror()\fR, and the variables
+\fIyylval\fR, \fIyychar\fR and \fIyydebug\fR. (In the remainder of this
+section, the six symbols cited are referenced using their default names only as
+a notational convenience.) Local names can also be affected by the \fB-p\fR
+option. However, the \fB-p\fR option does not affect \fB#define\fR symbols
+generated by \fByacc\fR.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-P\fR \fIparser\fR\fR
+.ad
+.RS 18n
+.rt
+Allows you to specify the parser of your choice instead of
+\fB/usr/share/lib/ccs/yaccpar\fR. For example, you can specify:
+.sp
+.in +2
+.nf
+example% \fByacc -P ~/myparser parser.y\fR
+.fi
+.in -2
+.sp
+
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-Q\fR[\fBy\fR|\fBn\fR]\fR
+.ad
+.RS 18n
+.rt
+The \fB-Qy\fR option puts the version stamping information in \fBy.tab.c\fR.
+This allows you to know what version of \fByacc\fR built the file. The
+\fB-Qn\fR option (the default) writes no version information.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 18n
+.rt
+Compiles runtime debugging code by default. Runtime debugging code is always
+generated in \fBy.tab.c\fR under conditional compilation control. By default,
+this code is not included when \fBy.tab.c\fR is compiled. Whether or not the
+\fB-t\fR option is used, the runtime debugging code is under the control of
+\fBYYDEBUG\fR , a preprocessor symbol. If \fBYYDEBUG\fR has a non-zero value,
+then the debugging code is included. If its value is \fB0\fR, then the code is
+not included. The size and execution time of a program produced without the
+runtime debugging code is smaller and slightly faster.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-v\fR\fR
+.ad
+.RS 18n
+.rt
+Prepares the file \fBy.output\fR, which contains a description of the parsing
+tables and a report on conflicts generated by ambiguities in the grammar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-V\fR\fR
+.ad
+.RS 18n
+.rt
+Prints on the standard error output the version information for \fByacc\fR.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is required:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIfile\fR\fR
+.ad
+.RS 8n
+.rt
+A path name of a file containing instructions for which a parser is to be
+created.
+.RE
+
+.SH EXAMPLES
+.LP
+\fBExample 1 \fRAccessing the yacc Library
+.sp
+.LP
+Access to the \fByacc\fR library is obtained with library search operands to
+\fBcc\fR. To use the \fByacc\fR library \fBmain\fR:
+
+.sp
+.in +2
+.nf
+example% \fBcc y.tab.c -ly\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+Both the \fBlex\fR library and the \fByacc\fR library contain \fBmain\fR. To
+access the \fByacc\fR \fBmain\fR:
+
+.sp
+.in +2
+.nf
+example% \fBcc y.tab.c lex.yy.c -ly -ll\fR
+.fi
+.in -2
+.sp
+
+.sp
+.LP
+This ensures that the \fByacc\fR library is searched first, so that its
+\fBmain\fR is used.
+
+.sp
+.LP
+The historical \fByacc\fR libraries have contained two simple functions that
+are normally coded by the application programmer. These library functions are
+similar to the following code:
+
+.sp
+.in +2
+.nf
+#include <locale.h>
+int main(void)
+{
+ extern int yyparse();
+
+ setlocale(LC_ALL, "");
+
+ /* If the following parser is one created by lex, the
+ application must be careful to ensure that LC_CTYPE
+ and LC_COLLATE are set to the POSIX locale. */
+ (void) yyparse();
+ return (0);
+}
+
+#include <stdio.h>
+
+int yyerror(const char *msg)
+{
+ (void) fprintf(stderr, "%s\en", msg);
+ return (0);
+}
+.fi
+.in -2
+
+.SH ENVIRONMENT VARIABLES
+.sp
+.LP
+See \fBenviron\fR(5) for descriptions of the following environment variables
+that affect the execution of \fByacc\fR: \fBLANG\fR, \fBLC_ALL\fR,
+\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
+.sp
+.LP
+\fByacc\fR can handle characters from \fBEUC\fR primary and supplementary
+codesets as one-token symbols. \fBEUC\fR codes can only be single character
+quoted terminal symbols. \fByacc\fR expects \fByylex()\fR to return a wide
+character (\fBwchar_t\fR) value for these one-token symbols.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH FILES
+.sp
+.ne 2
+.mk
+.na
+\fB\fBy.output\fR\fR
+.ad
+.RS 14n
+.rt
+state transitions of the generated parser
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBy.tab.c\fR\fR
+.ad
+.RS 14n
+.rt
+source code of the generated parser
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBy.tab.h\fR\fR
+.ad
+.RS 14n
+.rt
+header file for the generated parser
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fByacc.acts\fR\fR
+.ad
+.RS 14n
+.rt
+temporary file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fByacc.debug\fR\fR
+.ad
+.RS 14n
+.rt
+temporary file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fByacc.tmp\fR\fR
+.ad
+.RS 14n
+.rt
+temporary file
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fByaccpar\fR\fR
+.ad
+.RS 14n
+.rt
+parser prototype for C programs
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityCommitted
+_
+StandardSee \fBstandards\fR(5).
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlex\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
+.SH DIAGNOSTICS
+.sp
+.LP
+The number of reduce-reduce and shift-reduce conflicts is reported on the
+standard error output. A more detailed report is found in the \fBy.output\fR
+file. Similarly, if some rules are not reachable from the start symbol, this
+instance is also reported.
+.SH NOTES
+.sp
+.LP
+Because file names are fixed, at most one \fByacc\fR process can be active in a
+given directory at a given time.
+.sp
+.LP
+Users are encouraged to avoid using \fB$\fR as part of any identifier name.
diff --git a/usr/src/man/man1/yes.1 b/usr/src/man/man1/yes.1
new file mode 100644
index 0000000000..15d8a4255a
--- /dev/null
+++ b/usr/src/man/man1/yes.1
@@ -0,0 +1,30 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc., All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH yes 1 "20 Dec 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+yes \- generate repetitive affirmative output
+.SH SYNOPSIS
+.LP
+.nf
+\fByes\fR [\fIterm\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fByes\fR utility repeatedly outputs \fBy\fR, or if \fIterm\fR is
+specified, \fIterm\fR is output repeatedly. In the output, either \fBy\fR or
+\fIterm\fR is followed by a NEWLINE. Multiple arguments are output separated by
+spaces and followed by a NEWLINE. To terminate \fByes\fR, issue an interrupt
+character.
+.sp
+.LP
+\fByes\fR can be used to respond programatically to programs that require an
+interactive response.
+.SH SEE ALSO
+.sp
+.LP
+\fBattributes\fR(5)
diff --git a/usr/src/man/man1/ypcat.1 b/usr/src/man/man1/ypcat.1
new file mode 100644
index 0000000000..b0ea3b5e67
--- /dev/null
+++ b/usr/src/man/man1/ypcat.1
@@ -0,0 +1,63 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ypcat 1 "23 Jan 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+ypcat \- print values in a NIS database
+.SH SYNOPSIS
+.LP
+.nf
+\fBypcat\fR [\fB-kx\fR] [\fB-d\fR \fIypdomain\fR] \fImname\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBypcat\fR command prints out values in the NIS name service map specified
+by \fImname\fR, which may be either a map name or a map nickname. Since
+\fBypcat\fR uses the NIS network services, no NIS server is specified.
+.sp
+.LP
+Refer to \fBypfiles\fR(4) for an overview of the NIS name service.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 15n
+.rt
+Display the keys for those maps in which the values are null or the key is not
+part of the value. None of the maps derived from files that have an ASCII
+version in \fB/etc\fR fall into this class.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI ypdomain\fR\fR
+.ad
+.RS 15n
+.rt
+Specify a domain other than the default domain.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 15n
+.rt
+Display map nicknames.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBypmatch\fR(1), \fBypfiles\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/ypmatch.1 b/usr/src/man/man1/ypmatch.1
new file mode 100644
index 0000000000..711c19c2c2
--- /dev/null
+++ b/usr/src/man/man1/ypmatch.1
@@ -0,0 +1,131 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ypmatch 1 "22 Aug 1997" "SunOS 5.11" "User Commands"
+.SH NAME
+ypmatch \- print the value of one or more keys from a NIS map
+.SH SYNOPSIS
+.LP
+.nf
+\fBypmatch\fR [\fB-k\fR] [\fB-t\fR] [\fB-d\fR \fIdomain\fR] \fIkey\fR [\fIkey\fR]... \fImname\fR
+.fi
+
+.LP
+.nf
+\fBypmatch\fR \fB-x\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBypmatch\fR prints the values associated with one or more keys from the
+\fBNIS's\fR name services map specified by \fImname\fR, which may be either a
+map name or a map nickname.
+.sp
+.LP
+Multiple keys can be specified; all keys will be searched for in the same map.
+The keys must be the same case and length. No pattern matching is available. If
+a key is not matched, a diagnostic message is produced.
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-k\fR\fR
+.ad
+.RS 13n
+.rt
+Before printing the value of a key, print the key itself, followed by a colon
+(\fB:\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 13n
+.rt
+Inhibit map nickname translation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI domain\fR\fR
+.ad
+.RS 13n
+.rt
+Specify a domain other than the default domain.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 13n
+.rt
+Display the map nickname table. This lists the nicknames the command knows of,
+and indicates the map name associated with each nickname.
+.RE
+
+.SH OPERANDS
+.sp
+.LP
+The following operand is supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fImname\fR\fR
+.ad
+.RS 9n
+.rt
+The \fBNIS's\fR name services map
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 5n
+.rt
+Successful operation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 5n
+.rt
+An error occurred.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBypcat\fR(1), \fBypfiles\fR(4), \fBattributes\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBypmatch\fR will fail with an \fBRPC\fR error message on yp operation if
+enough file descriptors are not available. The number of file descriptors
+should be increased if this occurs.
diff --git a/usr/src/man/man1/yppasswd.1 b/usr/src/man/man1/yppasswd.1
new file mode 100644
index 0000000000..fca18bb55b
--- /dev/null
+++ b/usr/src/man/man1/yppasswd.1
@@ -0,0 +1,68 @@
+'\" te
+.\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH yppasswd 1 "28 Nov 2001" "SunOS 5.11" "User Commands"
+.SH NAME
+yppasswd \- change your network password in the NIS database
+.SH SYNOPSIS
+.LP
+.nf
+\fByppasswd\fR [\fIusername\fR]
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fByppasswd\fR utility changes the network password associated with the
+user \fIusername\fR in the Network Information Service (\fBNIS\fR) database. If
+the user has done a \fBkeylogin\fR(1), and a publickey/secretkey pair exists
+for the user in the \fBNIS\fR \fBpublickey.byname\fR map, \fByppasswd\fR also
+re-encrypts the secretkey with the new password. The \fBNIS\fR password may be
+different from the local one on your own machine.
+.sp
+.LP
+\fByppasswd\fR prompts for the old \fBNIS\fR password, and then for the new
+one. You must type in the old password correctly for the change to take effect.
+The new password must be typed twice, to forestall mistakes.
+.sp
+.LP
+New passwords must be at least four characters long, if they use a sufficiently
+rich alphabet, and at least six characters long if monocase. These rules are
+relaxed if you are insistent enough. Only the owner of the name or the
+super-user may change a password; superuser on the root master will not be
+prompted for the old password, and does not need to follow password
+construction requirements.
+.sp
+.LP
+The \fBNIS\fR password daemon, \fBrpc.yppasswdd\fR must be running on your
+\fBNIS\fR server in order for the new password to take effect.
+.SH SEE ALSO
+.sp
+.LP
+\fBkeylogin\fR(1), \fBlogin\fR(1), \fBNIS+\fR(1), \fBnispasswd\fR(1),
+\fBpasswd\fR(1), \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C),
+\fBsecure_rpc\fR(3NSL), \fBnsswitch.conf\fR(4), \fBattributes\fR(5)
+.SH WARNINGS
+.sp
+.LP
+Even after the user has successfully changed his or her password using this
+command, the subsequent \fBlogin\fR(1) using the new password will be
+successful only if the user's password and shadow information is obtained from
+NIS. See \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), and \fBnsswitch.conf\fR(4).
+.SH NOTES
+.sp
+.LP
+The use of \fByppasswd\fR is discouraged, as it is now only a wrapper around
+the \fBpasswd\fR(1) command, which should be used instead. Using
+\fBpasswd\fR(1) with the \fB-r\fR \fBnis\fR option (see \fBNIS+\fR(1)) will
+achieve the same results, and will be consistent across all the different name
+services available.
+.SH BUGS
+.sp
+.LP
+The update protocol passes all the information to the server in one \fBRPC\fR
+call, without ever looking at it. Thus, if you type your old password
+incorrectly, you will not be notified until after you have entered your new
+password.
diff --git a/usr/src/man/man1/ypwhich.1 b/usr/src/man/man1/ypwhich.1
new file mode 100644
index 0000000000..e449f40298
--- /dev/null
+++ b/usr/src/man/man1/ypwhich.1
@@ -0,0 +1,91 @@
+'\" te
+.\" Copyright 1989 AT&T Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. Copyright (c) 1995 Sun Microsystems, Inc. All Rights Reserved.
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH ypwhich 1 "7 Apr 1995" "SunOS 5.11" "User Commands"
+.SH NAME
+ypwhich \- return name of NIS server or map master
+.SH SYNOPSIS
+.LP
+.nf
+\fBypwhich\fR [\fB-d\fR \fIdomain\fR] [ [\fB-t\fR] \fB-m\fR [\fImname\fR] | [\fB-Vn\fR] \fIhostname\fR]
+.fi
+
+.LP
+.nf
+\fBypwhich\fR \fB-x\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBypwhich\fR returns the name of the NIS server that supplies the NIS name
+services to a NIS client, or which is the master for a map. If invoked without
+arguments, it gives the NIS server for the local machine. If \fBhostname\fR is
+specified, that machine is queried to find out which NIS master it is using.
+.sp
+.LP
+Refer to \fBypfiles\fR(4) for an overview of the NIS name services.
+.SH OPTIONS
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-d\fR\fI domain\fR\fR
+.ad
+.RS 13n
+.rt
+Use \fIdomain\fR instead of the default domain.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-t\fR\fR
+.ad
+.RS 13n
+.rt
+This option inhibits map nickname translation.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-m\fR\fI mname\fR\fR
+.ad
+.RS 13n
+.rt
+Find the master NIS server for a map. No \fBhostname\fR can be specified with
+\fB-m\fR. \fImname\fR can be a mapname, or a nickname for a map. When
+\fImname\fR is omitted, produce a list of available maps.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-x\fR\fR
+.ad
+.RS 13n
+.rt
+Display the map nickname translation table.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB\(miVn\fR\fR
+.ad
+.RS 13n
+.rt
+Version of \fBypbind\fR, V3 is default.
+.RE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBypfiles\fR(4), \fBattributes\fR(5)
diff --git a/usr/src/man/man1/zlogin.1 b/usr/src/man/man1/zlogin.1
new file mode 100644
index 0000000000..554522a0f2
--- /dev/null
+++ b/usr/src/man/man1/zlogin.1
@@ -0,0 +1,283 @@
+'\" te
+.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH zlogin 1 "18 Dec 2006" "SunOS 5.11" "User Commands"
+.SH NAME
+zlogin \- enter a zone
+.SH SYNOPSIS
+.LP
+.nf
+\fBzlogin\fR [\fB-CE\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR
+.fi
+
+.LP
+.nf
+\fBzlogin\fR [\fB-ES\fR] [\fB-e\fR \fIc\fR] [\fB-l\fR \fIusername\fR] \fIzonename\fR \fIutility\fR
+ [\fIargument\fR]...
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBzlogin\fR utility is used by the administrator to enter an operating
+system zone. Only a superuser operating in the global system zone can use this
+utility.
+.sp
+.LP
+\fBzlogin\fR operates in one of three modes:
+.sp
+.ne 2
+.mk
+.na
+\fBInteractive Mode\fR
+.ad
+.RS 24n
+.rt
+If no utility argument is given and the stdin file descriptor for the
+\fBzlogin\fR process is a tty device, \fBzlogin\fR operates in \fBinteractive
+mode\fR. In this mode, \fBzlogin\fR creates a new pseudo terminal for use
+within the login session. Programs requiring a tty device, for example,
+\fBvi\fR(1), work properly in this mode. In this mode, \fBzlogin\fR invokes
+\fBlogin\fR(1) to provide a suitable login session.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBNon-Interactive Mode\fR
+.ad
+.RS 24n
+.rt
+If a utility is specified, \fBzlogin\fR operates in \fBnon-interactive mode\fR.
+This mode can be useful for script authors since stdin, stdout, and stderr are
+preserved and the exit status of \fIutility\fR is returned upon termination. In
+this mode, \fBzlogin\fR invokes \fBsu\fR(1M) in order to set up the user's
+environment and to provide a login environment.
+.sp
+The specified command is passed as a string and interpreted by a shell running
+in the non-global zone. See \fBrsh\fR(1).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBConsole Mode\fR
+.ad
+.RS 24n
+.rt
+If the \fB-C\fR option is specified, the user is connected to the zone console
+device and \fBzlogin\fR operates in \fBconsole mode\fR. The zone console is
+available once the zone is in the installed state. Connections to the console
+are persistent across reboot of the zone.
+.RE
+
+.SH OPTIONS
+.sp
+.LP
+The following options are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-C\fR\fR
+.ad
+.RS 15n
+.rt
+Connects to the zone console.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-e\fR \fIc\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies a different escape character, \fIc\fR, for the key sequence used to
+access extended functions and to disconnect from the login. The default escape
+character is the tilde (\fB~\fR).
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-E\fR\fR
+.ad
+.RS 15n
+.rt
+Disables the ability to access extended functions or to disconnect from the
+login by using the escape sequence character.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-l\fR \fIusername\fR\fR
+.ad
+.RS 15n
+.rt
+Specifies a different \fIusername\fR for the zone login. If you do not use this
+option, the zone username used is "root". This option is invalid if the
+\fB-C\fR option is specified.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB-S\fR\fR
+.ad
+.RS 15n
+.rt
+"Safe" login mode. \fBzlogin\fR does minimal processing and does not invoke
+\fBlogin\fR(1) or \fBsu\fR(1M). The \fB-S\fR option can not be used if a
+username is specified through the \fB-l\fR option, and cannot be used with
+console logins. This mode should only be used to recover a damaged zone when
+other forms of login have become impossible.
+.RE
+
+.SS "Escape Sequences"
+.sp
+.LP
+Lines that you type that start with the tilde character (\fB~\fR) are "escape
+sequences". The escape character can be changed using the \fB-e\fR option.
+.sp
+.ne 2
+.mk
+.na
+\fB\fB~.\fR\fR
+.ad
+.RS 6n
+.rt
+Disconnects from the zone. This is not the same as a logout, because the local
+host breaks the connection with no warning to the zone's end.
+.RE
+
+.SH SECURITY
+.sp
+.LP
+Once a process has been placed in a zone other than the global zone, the
+process cannot change zone again, nor can any of its children.
+.SH OPERANDS
+.sp
+.LP
+The following operands are supported:
+.sp
+.ne 2
+.mk
+.na
+\fB\fIzonename\fR\fR
+.ad
+.RS 15n
+.rt
+The name of the zone to be entered.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIutility\fR\fR
+.ad
+.RS 15n
+.rt
+The utility to be run in the specified zone.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fIargument...\fR\fR
+.ad
+.RS 15n
+.rt
+Arguments passed to the utility.
+.RE
+
+.SH EXIT STATUS
+.sp
+.LP
+In interactive and non-interactive modes, the \fBzlogin\fR utility exits when
+the command or shell in the non-global zone exits. In non-interactive mode, the
+exit status of the remote program is returned as the exit status of
+\fBzlogin\fR. In interactive mode and console login mode, the exit status is
+not returned. \fBzlogin\fR returns a \fB0\fR exit status as long as no
+connection-related error occurred.
+.sp
+.LP
+In all modes, in the event that a connection to the zone cannot be established,
+the connection fails unexpectedly, or the user is lacking sufficient privilege
+to perform the requested operation, \fBzlogin\fR exits with status \fB1\fR.
+.sp
+.LP
+To summarize, the following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 7n
+.rt
+Successful entry.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB1\fR\fR
+.ad
+.RS 7n
+.rt
+Permission denied, or failure to enter the zone.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fBAny\fR
+.ad
+.RS 7n
+.rt
+Return code from utility, or from \fBsu\fR(1M) if operating in non-interactive
+mode.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBlogin\fR(1), \fBrsh\fR(1), \fBvi\fR(1), \fBsu\fR(1M), \fBzoneadm\fR(1M),
+\fBzonecfg\fR(1M), \fBattributes\fR(5), \fBzones\fR(5)
+.SH NOTES
+.sp
+.LP
+\fBzlogin\fR fails if its open files or any portion of its address space
+corresponds to an NFS file. This includes the executable itself or the shared
+libraries.
diff --git a/usr/src/man/man1/zonename.1 b/usr/src/man/man1/zonename.1
new file mode 100644
index 0000000000..5f347b04da
--- /dev/null
+++ b/usr/src/man/man1/zonename.1
@@ -0,0 +1,66 @@
+'\" te
+.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH zonename 1 "9 Jan 2004" "SunOS 5.11" "User Commands"
+.SH NAME
+zonename \- print name of current zone
+.SH SYNOPSIS
+.LP
+.nf
+\fBzonename\fR
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+The \fBzonename\fR utility prints the name of the current zone.
+.SH EXIT STATUS
+.sp
+.LP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB0\fR\fR
+.ad
+.RS 6n
+.rt
+Successful completion.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB>0\fR\fR
+.ad
+.RS 6n
+.rt
+An error occurred.
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBzlogin\fR(1), \fBzoneadm\fR(1M), \fBzonecfg\fR(1M), \fBattributes\fR(5),
+\fBzones\fR(5)