Mandb linux что это

Обновлено: 02.07.2024

The table below shows the section numbers of the manual followed by the types of pages they contain.

1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions, e.g. /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]

A manual page consists of several sections.

The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections.

Exact rendering may vary depending on the output device. For instance, man will usually not be able to render italics when running in a terminal, and will typically use underlined or coloured text instead.

The command or function illustration is a pattern that should match all possible invocations. In some cases it is advisable to illustrate several exclusive invocations as is shown in the SYNOPSIS section of this manual page.

Many options are available to man in order to give as much flexibility as possible to the user. Changes can be made to the search path, section order, output processor, and other behaviours and operations detailed below.

If set, various environment variables are interrogated to determine the operation of man. It is possible to set the "catch-all" variable $MANOPT to any string in command line format, with the exception that any spaces used as part of an option's argument must be escaped (preceded by a backslash). man will parse $MANOPT prior to parsing its own command line. Those options requiring an argument will be overridden by the same options found on the command line. To reset all of the options set in $MANOPT, -D can be specified as the initial command line option. This will allow man to "forget" about the options specified in $MANOPT, although they must still have been valid.

Manual pages are normally stored in nroff(1) format under a directory such as /usr/share/man. In some installations, there may also be preformatted cat pages to improve performance. See manpath(5) for details of where these files are stored.

This package supports manual pages in multiple languages, controlled by your locale. If your system did not set this up for you automatically, then you may need to set $LC_MESSAGES, $LANG, or another system-dependent environment variable to indicate your preferred locale, usually specified in the POSIX format:

<language>[_<territory>[.<character-set>[,<version>]]]

If the desired page is available in your locale, it will be displayed in lieu of the standard (usually American English) page.

If you find that the translations supplied with this package are not available in your native language and you would like to supply them, please contact the maintainer who will be coordinating such activity.

Individual manual pages are normally written and maintained by the maintainers of the program, function, or other topic that they document, and are not included with this package. If you find that a manual page is missing or inadequate, please report that to the maintainers of the package in question.

For information regarding other features and extensions available with this manual pager, please read the documents supplied with the package.

The order of sections to search may be overridden by the environment variable $MANSECT or by the SECTION directive in /etc/man_db.conf. By default it is as follows:

The formatted manual page is displayed using a pager. This can be specified in a number of ways, or else will fall back to a default (see option -P for details).

The filters are deciphered by a number of means. Firstly, the command line option -p or the environment variable $MANROFFSEQ is interrogated. If -p was not used and the environment variable was not set, the initial line of the nroff file is parsed for a preprocessor string. To contain a valid preprocessor string, the first line must resemble

where string can be any combination of letters described by option -p below.

If none of the above methods provide any filter information, a default set is used.

A formatting pipeline is formed from the filters and the primary formatter (nroff or [tg]roff with -t) and executed. Alternatively, if an executable program mandb_nfmt (or mandb_tfmt with -t) exists in the man tree root, it is executed instead. It gets passed the manual source file, the preprocessor string, and optionally the device specified with -T or -E as arguments.

Non-argument options that are duplicated either on the command line, in $MANOPT, or both, are not harmful. For options that require an argument, each duplication will override the previous argument value.

General options

Main modes of operation

Finding manual pages

The system specified can be a combination of comma delimited operating system names. To include a search of the native operating system's manual pages, include the system name man in the argument string. This option will override the $SYSTEM environment variable.

A path specified as a manpath must be the root of a manual page hierarchy structured into sections as described in the man-db manual (under "The manual page system"). To view manual pages outside such hierarchies, see the -l option.

To disable this behaviour, use the --no-subpages option.

Controlling formatted output

The value may be a simple command name or a command with arguments, and may use shell quoting (backslashes, single quotes, or double quotes). It may not use pipes to connect multiple commands; if you need that, use a wrapper script, which may take the file to display either as an argument or on standard input.

Manual page name(sec) line x

where name denotes the manual page name, sec denotes the section it was found under and x the current line number. This is achieved by using the $LESS environment variable.

Supplying -r with a string will override this default. The string may contain the text $MAN_PN which will be expanded to the name of the current manual page and its section name surrounded by "(" and ")". The string used to produce the default could be expressed as

It is broken into three lines here for the sake of readability only. For its meaning see the less(1) manual page. The prompt string is first evaluated by the shell. All double quotes, back-quotes and backslashes in the prompt must be escaped by a preceding backslash. The prompt string may end in an escaped $ which may be followed by further options for less. By default man sets the -ix8 options.

The $MANLESS environment variable described below may be used to set a default prompt string if none is supplied on the command line.

-7, --ascii When viewing a pure ascii(7) manual page on a 7 bit terminal or terminal emulator, some characters may not display correctly when using the latin1(7) device description with GNU nroff. This option allows pure ascii manual pages to be displayed in ascii with the latin1 device. It will not translate any latin1 text. The following table shows the translations performed: some parts of it may only be displayed properly when using GNU nroff's latin1(7) device.

If the latin1 column displays correctly, your terminal may be set up for latin1 characters and this option is not necessary. If the latin1 and ascii columns are identical, you are reading this page using this option or man did not format this page using the latin1 device description. If the latin1 column is missing or corrupt, you may need to view manual pages with this option.

This option is ignored when using options -t, -H, -T, or -Z and may be useless for nroff other than GNU's.

If you are writing a manual page and simply want to prevent nroff from hyphenating a word at an inappropriate point, do not use this option, but consult the nroff documentation instead; for instance, you can put "\%" inside a word to indicate that it may be hyphenated at that point, or put "\%" at the start of a word to prevent it from being hyphenated.

--no-justification, --nj Normally, nroff will automatically justify text to both margins. This option disables full justification, leaving justified only to the left margin, sometimes called "ragged-right" text.

If you are writing a manual page and simply want to prevent nroff from justifying certain paragraphs, do not use this option, but consult the nroff documentation instead; for instance, you can use the ".na", ".nf", ".fi", and ".ad" requests to temporarily disable adjusting and filling.

Getting help

-?, --help Print a help message and exit. --usage Print a short usage message and exit. -V, --version Display version information. 0 Successful program execution. 1 Usage, syntax or configuration file error. 2 Operational error. 3 A child process returned a non-zero exit status. 16 At least one of the pages/files/keywords didn't exist or wasn't matched. MANPATH If $MANPATH is set, its value is used as the path to search for manual pages. MANROFFOPT Every time man invokes the formatter (nroff, troff, or groff), it adds the contents of $MANROFFOPT to the formatter's command line. MANROFFSEQ If $MANROFFSEQ is set, its value is used to determine the set of preprocessors to pass each manual page through. The default preprocessor list is system dependent. MANSECT If $MANSECT is set, its value is a colon-delimited list of sections and it is used to determine which manual sections to search and in what order. The default is "1 n l 8 3 0 2 5 4 9 6 7", unless overridden by the SECTION directive in /etc/man_db.conf. MANPAGER, PAGER If $MANPAGER or $PAGER is set ($MANPAGER is used in preference), its value is used as the name of the program used to display the manual page. By default, less is used, falling back to cat if less is not found or is not executable.

The value may be a simple command name or a command with arguments, and may use shell quoting (backslashes, single quotes, or double quotes). It may not use pipes to connect multiple commands; if you need that, use a wrapper script, which may take the file to display either as an argument or on standard input.

/etc/man_db.conf man-db configuration file. /usr/share/man A global manual page hierarchy. apropos(1), groff(1), less(1), manpath(1), nroff(1), troff(1), whatis(1), zsoelim(1), manpath(5), man(7), catman(8), mandb(8)

Documentation for some packages may be available in other formats, such as info(1) or HTML.

mandb [-dqsucpt?V] [-C file] [manpath]
mandb [-dqsut] [-C file] -f filename .

Description

mandb is used to initialise or manually update index database caches. The caches contain information relevant to the current state of the manual page system and the information stored within them is used by the man-db utilities to enhance their speed and functionality.

When creating or updating an index, mandb will warn of bad ROFF .so requests, bogus manual page filenames and manual pages from which the whatis cannot be parsed.

Supplying mandb with an optional colon-delimited path will override the internal system manual page hierarchy search path, determined from information found within the man-db configuration file.

Database Caches

mandb can be compiled with support for any one of the following database types.

NameAsyncFilename
Berkeley dbYesindex.bt
GNU gdbmYesindex.db
UNIX ndbmNoindex.(dir|pag)

Those database types that support asynchronous updates provide enhanced speed at the cost of possible corruption in the event of unusual termination. In an unusual case where this has occurred, it may be necessary to rerun mandb with the -c option to re-create the databases from scratch.

Options

Print debugging information.

Produce no warnings.

Do not spend time looking for or adding information to the databases regarding stray cats.

Do not spend time checking for deleted manual pages and purging them from the databases.

By default, mandb will try to update any previously created databases. If a database does not exist, it will create it. This option forces mandb to delete previous databases and re-create them from scratch, and implies --no-purge. This may be necessary if a database becomes corrupt or if a new database storage scheme is introduced in the future.

Create user databases only, even with write permissions necessary to create system databases.

Perform correctness checks on manual pages in the hierarchy search path. With this option, mandb will not alter existing databases.

Update only the entries for the given filename. This option is not for general use; it is used internally by man when it has been compiled with the MAN_DB_UPDATES option and finds that a page is out of date. It implies -p and disables -c and -s.

Use this user configuration file rather than the default of

Show the usage message, then exit.

Print a short usage message and exit.

Show the version, then exit.

Exit Status

Successful program execution.

Usage, syntax, or configuration file error.

A child process failed.

Diagnostics

The following warning messages can be emitted during database building.

<filename>: whatis parse for page(sec) failed

An attempt to extract whatis line(s) from the given <filename> failed. This is usually due to a poorly written manual page, but if many such messages are emitted it is likely that the system contains non-standard manual pages which are incompatible with the man-db whatis parser. See the WHATIS PARSING section in lexgrog(1) for more information.

<filename>: is a dangling symlink

<filename> does not exist but is referenced by a symbolic link. Further diagnostics are usually emitted to identify the <filename> of the offending link.

<filename>: bad symlink or ROFF `.so' request

<filename> is either a symbolic link to, or contains a ROFF include request to, a non existent file.

<filename>: ignoring bogus filename

The <filename> may or may not be a valid manual page but its name is invalid. This is usually due to a manual page with sectional extension <x> being put in manual page section <y>.

<filename_mask>: competing extensions

The wildcard <filename_mask> is not unique. This is usually caused by the existence of both a compressed and uncompressed version of the same manual page. All but the most recent are ignored.

Files

man-db configuration file.

An FHS compliant global index database cache.

Older locations for the database cache included:

A traditional global index database cache.

An alternate or FSSTND compliant global index database cache.

See Also

The WHATIS PARSING section formerly in this manual page is now part of lexgrog(1).

Security-Enhanced Linux secures the mandb processes via flexible mandatory access control.

The mandb processes execute with the mandb_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier.

ps -eZ | grep mandb_t

Entrypoints

The mandb_t SELinux type can be entered via the mandb_exec_t file type.

The default entrypoint paths for the mandb_t domain are the following:

Process Types

SELinux defines process types (domains) for each process running on the system

You can see the context of a process using the -Z option to psbP

Policy governs the access confined processes have to files. SELinux mandb policy is very flexible allowing users to setup their mandb processes in as secure a method as possible.

The following process types are defined for mandb:

Note: semanage permissive -a mandb_t can be used to make the process type mandb_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated.

Booleans

SELinux policy is customizable based on least access required. mandb policy is extremely flexible and has several booleans that allow you to manipulate the policy and run mandb with the tightest access possible.

If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.

Managed Files

The SELinux process type mandb_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.

cluster_conf_t

cluster_var_lib_t

/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?

cluster_var_run_t

/var/run/crm(/.*)?
/var/run/cman_.*
/var/run/rsctmp(/.*)?
/var/run/aisexec.*
/var/run/heartbeat(/.*)?
/var/run/pcsd-ruby.socket
/var/run/corosync-qnetd(/.*)?
/var/run/corosync-qdevice(/.*)?
/var/run/corosync.pid
/var/run/cpglockd.pid
/var/run/rgmanager.pid
/var/run/cluster/rgmanager.sk

mandb_lock_t

root_t

File Contexts

SELinux requires files to have an extended attribute to define the file type.

You can see the context of a file using the -Z option to lsbP

Policy governs the access confined processes have to these files. SELinux mandb policy is very flexible allowing users to setup their mandb processes in as secure a method as possible.

STANDARD FILE CONTEXT

SELinux defines the file context types for the mandb, if you wanted to store files with these types in a diffent paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.

semanage fcontext -a -t mandb_lock_t '/srv/mymandb_content(/.*)?'
restorecon -R -v /srv/mymandb_content

Note: SELinux often uses regular expressions to specify labels that match multiple files.

The following file types are defined for mandb:

- Set files with the mandb_cache_t type, if you want to store the files under the /var/cache directory.

- Set files with the mandb_exec_t type, if you want to transition an executable to the mandb_t domain.

- Set files with the mandb_home_t type, if you want to store mandb files in the users home directory.

- Set files with the mandb_lock_t type, if you want to treat the files as mandb lock data, stored under the /var/lock directory

Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels.

Commands

semanage fcontext can also be used to manipulate default file context mappings.

semanage permissive can also be used to manipulate whether or not a process type is permissive.

semanage module can also be used to enable/disable/install/remove policy modules.

semanage boolean can also be used to manipulate the booleans

system-config-selinux is a GUI tool available to customize SELinux policy settings.

Author

This manual page was auto-generated using sepolicy manpage .

Читайте также: