JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1: User Commands     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

User Commands

acctcom(1)

adb(1)

addbib(1)

admin(1)

alias(1)

allocate(1)

amt(1)

appcert(1)

apptrace(1)

apropos(1)

ar(1)

arch(1)

as(1)

asa(1)

at(1)

atq(1)

atrm(1)

audioconvert(1)

audioctl(1)

audioplay(1)

audiorecord(1)

audiotest(1)

auths(1)

auto_ef(1)

awk(1)

banner(1)

basename(1)

basename(1B)

batch(1)

bc(1)

bdiff(1)

bfs(1)

bg(1)

biff(1B)

break(1)

builtin(1)

cal(1)

calendar(1)

case(1)

cat(1)

cd(1)

cdc(1)

cdrw(1)

chdir(1)

checkeq(1)

checknr(1)

chgrp(1)

chkey(1)

chmod(1)

chown(1)

chown(1B)

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)

comb(1)

comm(1)

command(1)

compress(1)

continue(1)

cp(1)

cpio(1)

cpp(1)

cputrack(1)

crle(1)

crontab(1)

csh(1)

csplit(1)

ct(1C)

ctags(1)

ctrun(1)

ctstat(1)

ctwatch(1)

cu(1C)

cut(1)

date(1)

dc(1)

deallocate(1)

decrypt(1)

delta(1)

deroff(1)

df(1B)

dhcpinfo(1)

diff(1)

diff3(1)

diffmk(1)

digest(1)

digestp(1)

dircmp(1)

dirname(1)

dirs(1)

dis(1)

disown(1)

dispgid(1)

dispuid(1)

dos2unix(1)

dpost(1)

du(1)

du(1B)

dump(1)

dumpcs(1)

dumpkeys(1)

echo(1)

echo(1B)

ed(1)

edit(1)

egrep(1)

eject(1)

elfdump(1)

elfedit(1)

elffile(1)

elfsign(1)

elfwrap(1)

encrypt(1)

enhance(1)

env(1)

eqn(1)

errange(1)

errdate(1)

errgid(1)

errint(1)

erritem(1)

error(1)

errpath(1)

errstr(1)

errtime(1)

erruid(1)

erryorn(1)

eval(1)

ex(1)

exec(1)

exit(1)

expand(1)

export(1)

exportfs(1B)

expr(1)

expr(1B)

exstr(1)

factor(1)

false(1)

fastboot(1B)

fasthalt(1B)

fc(1)

fg(1)

fgrep(1)

file(1)

file(1B)

filebench(1)

filep(1)

filesync(1)

filofaxp(1)

find(1)

finger(1)

fmt(1)

fmtmsg(1)

fold(1)

for(1)

foreach(1)

franklinp(1)

from(1B)

ftp(1)

function(1)

gcore(1)

gencat(1)

geniconvtbl(1)

genmsg(1)

get(1)

getconf(1)

getfacl(1)

getlabel(1)

getopt(1)

getoptcvt(1)

getopts(1)

gettext(1)

gettxt(1)

getzonepath(1)

glob(1)

goto(1)

gprof(1)

grep(1)

groups(1)

groups(1B)

grpck(1B)

hash(1)

hashcheck(1)

hashmake(1)

hashstat(1)

head(1)

helpdate(1)

helpgid(1)

helpint(1)

helpitem(1)

helppath(1)

helprange(1)

helpstr(1)

helptime(1)

helpuid(1)

helpyorn(1)

hist(1)

history(1)

hostid(1)

hostname(1)

i386(1)

i486(1)

iconv(1)

idnconv(1)

if(1)

indxbib(1)

install(1B)

ipcrm(1)

ipcs(1)

isainfo(1)

isalist(1)

jobs(1)

join(1)

jsh(1)

kbd(1)

kdestroy(1)

keylogin(1)

keylogout(1)

kill(1)

kinit(1)

klist(1)

kmdb(1)

kmfcfg(1)

kpasswd(1)

krb5-config(1)

ksh(1)

ksh88(1)

ksh93(1)

ktutil(1)

lari(1)

last(1)

lastcomm(1)

ld(1)

ldapadd(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)

llc2_autoconfig(1)

llc2_config(1)

llc2_stats(1)

ln(1)

ln(1B)

loadkeys(1)

locale(1)

localedef(1)

logger(1)

logger(1B)

login(1)

logname(1)

logout(1)

look(1)

lookbib(1)

lorder(1)

ls(1)

ls(1B)

m4(1)

mac(1)

mach(1)

machid(1)

madv.so.1(1)

mail(1)

Mail(1B)

mail(1B)

mailcompat(1)

mailp(1)

mailq(1)

mailstats(1)

mailx(1)

make(1S)

makekey(1)

man(1)

mconnect(1)

mcs(1)

mdb(1)

mesg(1)

mkdir(1)

mkmsgs(1)

mkstr(1B)

mktemp(1)

moe(1)

more(1)

mp(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)

ncab2clf(1)

ncakmod(1)

neqn(1)

netcat(1)

newform(1)

newgrp(1)

newsp(1)

newtask(1)

nice(1)

nl(1)

nm(1)

nohup(1)

notify(1)

nroff(1)

od(1)

on(1)

onintr(1)

optisa(1)

pack(1)

page(1)

pagesize(1)

pam_tty_tickets.so(1)

pargs(1)

passwd(1)

paste(1)

patch(1)

pathchk(1)

pax(1)

pcat(1)

pcred(1)

perl(1)

pfbash(1)

pfcsh(1)

pfexec(1)

pfiles(1)

pfksh(1)

pflags(1)

pfsh(1)

pftcsh(1)

pfzsh(1)

pg(1)

pgrep(1)

pkcs11_inspect(1)

pkginfo(1)

pkgmk(1)

pkgparam(1)

pkgproto(1)

pkgtrans(1)

pkill(1)

pklogin_finder(1)

pktool(1)

plabel(1)

pldd(1)

plgrp(1)

plimit(1)

pmadvise(1)

pmap(1)

popd(1)

ppgsz(1)

ppriv(1)

pr(1)

praliases(1)

prctl(1)

preap(1)

print(1)

printenv(1B)

printf(1)

priocntl(1)

proc(1)

prof(1)

profiles(1)

projects(1)

prs(1)

prt(1)

prun(1)

ps(1)

ps(1B)

psig(1)

pstack(1)

pstop(1)

ptime(1)

ptree(1)

pushd(1)

pvs(1)

pwait(1)

pwd(1)

pwdx(1)

ranlib(1)

rcapstat(1)

rcp(1)

read(1)

readonly(1)

red(1)

refer(1)

regcmp(1)

rehash(1)

remote_shell(1)

remsh(1)

renice(1)

repeat(1)

reset(1B)

return(1)

rksh(1)

rksh88(1)

rlogin(1)

rm(1)

rmail(1)

rmdel(1)

rmdir(1)

rmformat(1)

rmmount(1)

rmumount(1)

roffbib(1)

roles(1)

rpcgen(1)

rpm2cpio(1)

rsh(1)

runat(1)

rup(1)

rup(1C)

ruptime(1)

rusage(1B)

rusers(1)

rwho(1)

sact(1)

sar(1)

sccs(1)

sccs-admin(1)

sccs-cdc(1)

sccs-comb(1)

sccs-delta(1)

sccsdiff(1)

sccs-get(1)

sccs-help(1)

sccshelp(1)

sccs-prs(1)

sccs-prt(1)

sccs-rmdel(1)

sccs-sact(1)

sccs-sccsdiff(1)

sccs-unget(1)

sccs-val(1)

scp(1)

script(1)

sdiff(1)

sed(1)

sed(1B)

select(1)

set(1)

setenv(1)

setfacl(1)

setlabel(1)

setpgrp(1)

settime(1)

sftp(1)

sh(1)

shcomp(1)

shell_builtins(1)

shift(1)

shutdown(1B)

size(1)

sleep(1)

soelim(1)

sort(1)

sortbib(1)

sotruss(1)

source(1)

sparc(1)

spell(1)

spellin(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)

stop(1)

strchg(1)

strconf(1)

strings(1)

strip(1)

stty(1)

stty(1B)

sum(1)

sum(1B)

sun(1)

suspend(1)

svcprop(1)

svcs(1)

switch(1)

symorder(1)

sys-suspend(1)

sysV-make(1)

t300(1)

t300s(1)

t4014(1)

t450(1)

tabs(1)

tail(1)

talk(1)

tar(1)

tbl(1)

tcopy(1)

tee(1)

tek(1)

telnet(1)

test(1)

test(1B)

tftp(1)

time(1)

timemanp(1)

times(1)

timesysp(1)

timex(1)

tip(1)

touch(1)

touch(1B)

tplot(1)

tput(1)

tr(1)

tr(1B)

trap(1)

troff(1)

true(1)

truss(1)

tset(1B)

tsort(1)

tty(1)

type(1)

typeset(1)

ul(1)

ulimit(1)

umask(1)

unalias(1)

uname(1)

uncompress(1)

unexpand(1)

unget(1)

unhash(1)

unifdef(1)

uniq(1)

units(1)

unix2dos(1)

unlimit(1)

unpack(1)

unset(1)

unsetenv(1)

until(1)

updatehome(1)

uptime(1)

userattr(1)

users(1B)

uucp(1C)

uudecode(1C)

uuencode(1C)

uuglist(1C)

uulog(1C)

uuname(1C)

uupick(1C)

uustat(1C)

uuto(1C)

uux(1C)

vacation(1)

val(1)

valdate(1)

valgid(1)

valint(1)

valpath(1)

valrange(1)

valstr(1)

valtime(1)

valuid(1)

valyorn(1)

vc(1)

vedit(1)

ver(1)

vgrind(1)

vi(1)

view(1)

vipw(1B)

volcheck(1)

volrmmount(1)

w(1)

wait(1)

wc(1)

what(1)

whatis(1)

whence(1)

whereis(1B)

which(1)

while(1)

who(1)

whoami(1B)

whocalls(1)

whois(1)

write(1)

xargs(1)

xgettext(1)

xstr(1)

yacc(1)

yes(1)

ypcat(1)

ypmatch(1)

yppasswd(1)

ypwhich(1)

zcat(1)

zlogin(1)

zonename(1)

zonestat(1)

man

- find and display reference manual pages

Synopsis

man [-] [-adFlrt] [-M path] [-T macro-package] [-s section] name...
man [-M path] [-s section] -k keyword...
man [-M path] -f file...
man [-M path]  [-s section] -K string...

Description

The man command displays information from the reference manuals. It displays complete manual pages that you select by name, or one-line summaries selected either by keyword or string (-k or -K), or by the name of an associated file (-f). If no manual page is located, man prints an error message.

Source Format

Reference Manual pages are marked up with either nroff (see nroff(1)) or SGML (Standard Generalized Markup Language) tags (see sgml(5)). The man 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.

Location of Manual Pages

The online Reference Manual page directories are conventionally located in /usr/share/man. The nroff sources are located in the /usr/share/man/man* directories. The SGML sources are located in the /usr/share/man/sman* 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 /usr/share/man from a host on which they do reside.

If there are preformatted, up-to-date versions in the corresponding cat* or fmt* directories, man simply displays or prints those versions. If the preformatted version of interest is out of date or missing, man reformats it prior to display and stores the preformatted version if cat* or fmt* is writable. The index files are not updated. See catman(1M). If directories for the preformatted versions are not provided, man reformats a page whenever it is requested. man uses a temporary file to store the formatted text during display.

If the standard output is not a terminal, or if the `-' flag is given, man pipes its output through cat(1). Otherwise, man pipes its output through more(1) to handle paging and underlining on the screen.

Query Strings

Using -k or -K options, manual pages can be searched with keywords or query strings. It supports index file-based full text searching, stemming, and section matching. For information regarding how to generate the index files, refer to catman(1M) and man(5).

Stemming for English, for example, identifies the string cats, catlike, catty, and so forth, based on the root cat. It identifies stemmer, stemming, and stemmed based on stem. A stemming algorithm reduces the words fishing, fished, fish, and fisherto the root word, fish.

Matching is done in case-insensitive manner. Stemming is done for English manual pages only.

Matched manual pages are sorted and presented based on the frequency of the query string matches, and, in the case of multiple matches, the shortest distances between the matches.

Oracle Solaris manual pages are divided into sections such as NAME, SYNOPSIS, DESCRIPTION, and so forth. Users can specify the scope of search into a section as details described in the -K option.

Options

The following options are supported:

-a

Shows all manual pages matching name within the MANPATH search path. Manual pages are displayed in the order found.

-d

Debugs. Displays what a section-specifier evaluates to, method used for searching, and paths searched by man.

-f file ...

man attempts to locate manual pages related to any of the given files. It strips the leading path name components from each file, and then prints one-line summaries containing the resulting basename or names.

This option uses the index files. Refer to catman(1M) and man(5) for details on how index files are generated.

-F

Forces man to search all directories specified by MANPATH or the man.cf file, rather than using the index lookup files. This option is useful if the index files are not up to date and they have been made the default behavior of the man command. The option therefore does not have to be invoked and is documented here for reference only.

-k keyword ...

Prints out one-line summaries from the index files.

See the -K option for information regarding how the index files are generated. If there are no index files, manual page files are directly looked up, therefore yielding slower response time than cases where index files exist.

-K string ...

Search for the specified string from the index files. If there are no index files, search is directly done on the manual page files which cause much slower search.

If you supply a section name ending with a colon (:) at the string option argument as the first text from left, as in "section name: query string", the search for the query string is done on the specified section only. If the specified section name does not exist, it is ignored and the search is done on entire manual pages.

The index files used by -f, -k, or -K are either automatically generated by an SMF service during installation of the man page packages specified with restart_fmli actuator as specified man(5) or manually using catman(1M) with the -w option.

-l

Lists all manual pages found matching name within the search path.

-M path

Specifies an alternate search path for manual pages. path is a colon-separated list of directories that contain manual page directory subtrees. For example, if path is /usr/share/man:/usr/local/man, man searches for name in the standard location, and then /usr/local/man. When used with the -f, -k or -K options, the -M option must appear first. Each directory in the path is assumed to contain subdirectories of the form man* or sman* , one for each section. This option overrides the MANPATH environment variable.

-r

Reformats the manual page, but does not display it. This replaces the man - -t name combination.

-s section ...

Specifies sections of the manual for man to search. The directories searched for name are limited to those specified by section. section can be a numerical digit, perhaps followed by one or more letters to match the desired section of the manual, for example, “3lib”. Also, section can be a word, for example, local, new, old, public. section can also be a letter. To specify multiple sections, separate each section with a comma. This option overrides the MANPATH environment variable and the man.cf file. See Search Path below for an explanation of how man conducts its search.

-t

man arranges for the specified manual pages to be troffed to a suitable raster output device (see troff(1)). If both the - and -t flags are given, man updates the troffed versions of each named name (if necessary), but does not display them.

-T macro-package

Formats manual pages using macro-package rather than the standard -man macros defined in /usr/share/lib/tmac/an. See Search Path under USAGE for a complete explanation of the default search path order.

Operands

The following operand is supported:

name

The name of a standard utility or a keyword.

Usage

The usage of man is described below:

Manual Page Sections

Entries in the reference manuals are organized into sections. 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, “9”, does not act as an abbreviation for the subsections of that name, such as “9e”, “9f”, or “9s”. That is, each subsection must be searched separately by man -s. Each section contains descriptions apropos to a particular reference category, with subsections refining these distinctions. See the intro manual pages for an explanation of the classification used in this release.

The following contains a brief description of each manual page section and the information it references:

Search Path

Before searching for a given name, man constructs a list of candidate directories and sections. man searches for name in the directories specified by the MANPATH environment variable.

In the absence of MANPATH, man constructs its search path based upon the PATH environment variable, primarily by substituting man for the last component of the PATH element. Special provisions are added to account for unique characteristics of directories such as /sbin, /usr/ucb, /usr/xpg4/bin, and others. If the file argument contains a / character, the dirname portion of the argument is used in place of PATH elements to construct the search path.

Within the manual page directories, man confines its search to the sections specified in the following order:

If none of the above exist, man searches each directory in the manual page path, and displays the first matching manual page found.

The man.cf file has the following format:

MANSECTS=section[,section]... 

Lines beginning with `#' and blank lines are considered comments, and are ignored. Each directory specified in MANPATH can contain a manual page configuration file, specifying the default search order for that directory.

Formatting Manual Pages

Manual pages are marked up in nroff(1) or sgml(5). nroff manual pages are processed by nroff(1) or troff(1) with the -man macro package. Please refer to man(5) for information on macro usage. SGML—tagged manual pages are processed by an SGML parser and passed to the formatter.

Preprocessing nroff Manual Pages

When formatting an nroff manual page, man examines the first line to determine whether it requires special processing. If the first line is a string of the form:

'\" X

where X is separated from the `"' by a single SPACE and consists of any combination of characters in the following list, man pipes its input to troff(1) or nroff(1) through the corresponding preprocessors.

e

eqn(1), or neqn for nroff

r

refer(1)

t

tbl(1)

v

vgrind(1)

If eqn or neqn is invoked, it automatically reads the file /usr/pub/eqnchar (see eqnchar(5)). If nroff(1) is invoked, col(1) is automatically used.

Referring to Other nroff Manual Pages

If the first line of the nroff manual page is a reference to another manual page entry fitting the pattern:

.so man*/sourcefile

man 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.

When the second or any subsequent line starts with .so, man ignores it; troff(1) or nroff(1) processes the request in the usual manner.

Processing SGML Manual Pages

Manual pages are identified as being marked up in SGML by the presence of the string <!DOCTYPE. If the file also contains the string SHADOW_PAGE, 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 .so mechanism used in the nroff formatted manual pages.

Environment Variables

See environ(5) for descriptions of the following environment variables that affect the execution of man: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.

MANPATH

A colon-separated list of directories; each directory can be followed by a comma-separated list of sections. If set, its value overrides /usr/share/man as the default directory search path, and the man.cf file as the default section search path. The -M and -s flags, in turn, override these values.)

PAGER

A program to use for interactively delivering man's output to the screen. If not set, `more -s' is used. See more(1).

TCAT

The name of the program to use to display troffed manual pages.

TROFF

The name of the formatter to use when the -t flag is given. If not set, troff(1) is used.

Examples

Example 1 Creating a Text Version of a Manual Page

The following example creates the pipe(2) manual page in ascii text:

man pipe.2 | col -x -b > pipe.text

This is an alternative to using man -t, which sends the manual page to the default printer, if the user wants a text file version of the manual page.

Example 2 Getting a List of Manual Pages that Match string

The following example gets a list of manual pages that match for the string zfs create:

man -K 'zfs create' 

Example 3 Getting a List of Manual Pages that Match the string in section

The following example gets a list of manual pages that have the zfs in the SEE ALSO section:

man -K "SEE ALSO: zfs"

Exit Status

The following exit values are returned:

0

Successful completion.

>0

An error occurred.

Files

/usr/share/man

Root of the standard manual page directory subtree

/usr/share/man/man?/*

Unformatted nroff manual entries

/usr/share/man/man_index/*

Table of Contents and keyword database.

Generated files include:

  • /usr/share/man/man_index/man.idx

  • /usr/share/man/man_index/man.dic

  • /usr/share/man/man_index/man.frq

  • /usr/share/man/man_index/man.pos

/usr/share/man/sman?/*

Unformatted SGML manual entries

/usr/share/man/cat?/*

nroffed manual entries

/usr/share/man/fmt?/*

troffed manual entries

/usr/share/lib/tmac/an

Standard –man macro package

/usr/share/lib/sgml/locale/C/dtd/*

SGML document type definition files

/usr/share/lib/sgml/locale/C/solbook/*

SGML style sheet and entity definitions directories

/usr/share/lib/pub/eqnchar

Standard definitions for eqn and neqn

man.cf

Default search order by section

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
text/doctools
CSI
Enabled, see NOTES.
Interface Stability
Committed
Standard

See Also

apropos(1), cat(1), col(1), eqn(1), more(1), nroff(1), refer(1), tbl(1), troff(1), vgrind(1), whatis(1), catman(1M), attributes(5), environ(5), eqnchar(5), man(5), sgml(5), standards(5)

Notes

The -f, -k, and -K options use the index files which are created by the SMF service as specified in man(5), or by manually using catman(1M) with the -w option.

The windex database file is no longer used. The windex database file has replaced with the new index files.

The man command is CSI-capable. However, some utilities invoked by the man command, namely, troff, eqn, neqn, refer, tbl, and vgrind, are not verified to be CSI-capable. Because of this, the man command with the -t option can not handle non-EUC data. Also, using the man command to display manual pages that require special processing through eqn, neqn, refer, tbl, or vgrind can not be CSI-capable.

Bugs

The manual is supposed to be reproducible either on a phototypesetter or on an ASCII terminal. However, on a terminal some information (indicated by font changes, for instance) is lost.

Some dumb terminals cannot process the vertical motions produced by the e (see eqn(1)) preprocessing flag. To prevent garbled output on these terminals, when you use e, also use t, to invoke col(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 eqn(1) output.