nagios-domain-discovery

package: nagios-domain-discovery

title: nagios-domain-discovery(5)

text:
# nagios-domain-discovery(5)

## NAME
nagios-domain-discovery - domain records to Nagios host list synchronization configuration

## SYNOPSIS
/etc/nagios/domain-discovery/main.conf

## DESCRIPTION
main.conf configures the main nagios-domain-discovery script. The configuration parameters define how the list of hosts should be translated to the Nagios host configuration files and what to do with the Nagios (or another) service after update.

Configuration uses KEY=VALUE shell syntax. The following configuration parameters are supported:

- METHODS Comma-separated list of methods. For the names of availabe methods see /usr/lib/nagios-domain-discovery/methods. Method manual page is named nagios-domain-discovery-<method>.

- DOMAIN Domain name. May be left blank for autodetect.

- OBJECTDIR The maintained directory with Nagios host configuration files. The default is /etc/nagios/objects.

- TEMPLATE The name of the host template to be used in the use directive of the host configuration. The default is linux-server.

- HOSTGROUPS Comma-separated list of default host groups. Some of the methods could assign different hostgroups based on the domain records.

- KEEPLIST Comma-separated list of host names to keep. The default is localhost.

- GONE_HOSTS Defines what to do with a host that has gone from the list:

- none --- do nothing (i.e. leave the active host configuration);

- unregister --- leave the existing configuration file, but do not register the host with Nagios (set register 0);

- delete --- delete the configuration file completely.

- RELOAD_SERVICES Which services should be reloaded after configuration synchronization in precense of changes? A comma-separated list of services. Add the exclamation sign (!) after the name of the service to forcibly reload it.

- RESTART_SERVICES Which services should be restarted after configuration synchronization in precense of changes? A comma-separated list of services. Add the exclamation sign (!) after the name of the service to forcibly restart it.

## SEE ALSO
nagios-domain-discovery(8), nagios-domain-discovery-hostlist(8), nagios-domain-discovery-hostlist(5)


nagios-domain-discovery-hostlist

title: nagios-domain-discovery-hostlist(5)

summary: configuration of the simple domain record list method for nagios\-domain\-discovery tool

text:
# nagios-domain-discovery-hostlist(5)

## NAME
nagios-domain-discovery-hostlist - configuration of the simple domain record list method for nagios-domain-discovery tool

## SYNOPSIS
/etc/nagios/domain-discovery/hostlist.conf

## DESCRIPTION
The hostlist.conf is the place to configure the hostlist method for nagios-domain-discovery(8) tool.

Configuration uses KEY=VALUE shell syntax. The following configuration parameters are supported:

- SKIPLIST Hostnames to skip (separated by commas). For instance, ldap,ns.

- SKIP_SELF Skip all hosts that share local IP. If set to 1 all domain records of the local host are skipped.

## SEE ALSO
nagios-domain-discovery-hostlist(8), nagios-domain-discovery(8), nagios-domain-discovery(5).


nanorc

package: nano

title: nanorc(5)

summary: GNU nano's configuration file

text:
# nanorc(5)

## NAME
nanorc - GNU nano's configuration file

## DESCRIPTION
The nanorc files contain the default settings for nano, a small and friendly editor. During startup, if --rcfile is not given, nano will read two files: first the system-wide settings, from /etc/nanorc (the exact path might be different on your system), and then the user-specific settings, either from ~/.nanorc or from $XDG_CONFIG_HOME/nano/nanorc or from ~/.config/nano/nanorc, whichever is encountered first. If --rcfile is given, nano will read just the specified settings file.

## OPTIONS
The configuration file accepts a series of set and unset commands, which can be used to configure nano on startup without using command-line options. Additionally, there are some commands to define syntax highlighting and to rebind keys -- see the two separate sections on those. nano reads one command per line. All commands and keywords should be written in lowercase.

Options in nanorc files take precedence over nano's defaults, and command-line options override nanorc settings. Also, options that do not take an argument are unset by default. So using the unset command is only needed when wanting to override a setting of the system's nanorc file in your own nanorc. Options that take an argument cannot be unset.

Quotes inside the characters parameters below should not be escaped. The last double quote on the line will be seen as the closing quote.

The supported commands and arguments are:

set afterends

Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.

set allow_insecure_backup

When backing up files, allow the backup to succeed even if its permissions can't be (re)set due to special OS considerations. You should NOT enable this option unless you are sure you need it.

set atblanks

When soft line wrapping is enabled, make it wrap lines at blank characters (tabs and spaces) instead of always at the edge of the screen.

set autoindent

Automatically indent a newly created line to the same number of tabs and/or spaces as the previous line (or as the next line if the previous line is the beginning of a paragraph).

set backup

When saving a file, create a backup file by adding a tilde (~) to the file's name.

set backupdir directory

Make and keep not just one backup file, but make and keep a uniquely numbered one every time a file is saved -- when backups are enabled with set backup or --backup or -B. The uniquely numbered files are stored in the specified directory.

set boldtext

Use bold instead of reverse video for the title bar, status bar, key combos, function tags, line numbers, and selected text. This can be overridden by setting the options titlecolor, statuscolor, keycolor, functioncolor, numbercolor, and selectedcolor.

set bookstyle

When justifying, treat any line that starts with whitespace as the beginning of a paragraph (unless auto-indenting is on).

set brackets "characters"

Set the characters treated as closing brackets when justifying paragraphs. This may not include blank characters. Only closing punctuation (see set punct), optionally followed by the specified closing brackets, can end sentences. The default value is ""')>]}".

set breaklonglines

Automatically hard-wrap the current line when it becomes overlong.

set casesensitive

Do case-sensitive searches by default.

set constantshow

Constantly display the cursor position in the status bar. This overrides the option quickblank.

set cutfromcursor

Use cut-from-cursor-to-end-of-line by default, instead of cutting the whole line.

set emptyline

Do not use the line below the title bar, leaving it entirely blank.

set errorcolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the status bar when an error message is displayed. The default value is bold,white,red. See set titlecolor for valid color names.

set fill number

Set the target width for justifying and automatic hard-wrapping at this number of columns. If the value is 0 or less, wrapping will occur at the width of the screen minus number columns, allowing the wrap point to vary along with the width of the screen if the screen is resized. The default value is -8.

set functioncolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the concise function descriptions in the two help lines at the bottom of the screen. See set titlecolor for more details.

set guidestripe number

Draw a vertical stripe at the given column, to help judge the width of the text. (The color of the stripe can be changed with set stripecolor.)

set historylog

Save the last hundred search strings and replacement strings and executed commands, so they can be easily reused in later sessions.

set indicator

Display a "scrollbar" on the righthand side of the edit window. It shows the position of the viewport in the buffer and how much of the buffer is covered by the viewport.

set jumpyscrolling

Scroll the buffer contents per half-screen instead of per line.

set keycolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the shortcut key combos in the two help lines at the bottom of the screen. See set titlecolor for more details.

set linenumbers

Display line numbers to the left of the text area. (Any line with an anchor additionally gets a mark in the margin.)

set locking

Enable vim-style lock-files for when editing files.

set magic

When neither the file's name nor its first line give a clue, try using libmagic to determine the applicable syntax. (Calling libmagic can be relatively time consuming. It is therefore not done by default.)

set matchbrackets "characters"

Specify the opening and closing brackets that can be found by bracket searches. This may not include blank characters. The opening set must come before the closing set, and the two sets must be in the same order. The default value is "(<[{)>]}".

set minibar

Suppress the title bar and instead show information about the current buffer at the bottom of the screen, in the space for the status bar. In this "minibar" the filename is shown on the left, followed by an asterisk if the buffer has been modified. On the right are displayed the current line and column number, the code of the character under the cursor (in Unicode format: U+xxxx), the same flags as are shown by set stateflags, and a percentage that expresses how far the cursor is into the file (linewise). When a file is loaded or saved, and also when switching between buffers, the number of lines in the buffer is displayed after the filename. This number is cleared upon the next keystroke, or replaced with an [i/n] counter when multiple buffers are open. The line plus column numbers and the character code are displayed only when set constantshow is used, and can be toggled on and off with M-C. The state flags are displayed only when set stateflags is used.

set minicolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the minibar. (When this option is not specified, the colors of the title bar are used.) See set titlecolor for more details.

set mouse

Enable mouse support, if available for your system. When enabled, mouse clicks can be used to place the cursor, set the mark (with a double click), and execute shortcuts. The mouse will work in the X Window System, and on the console when gpm is running. Text can still be selected through dragging by holding down the Shift key.

set multibuffer

When reading in a file with ^R, insert it into a new buffer by default.

set noconvert

Don't convert files from DOS/Mac format.

set nohelp

Don't display the two help lines at the bottom of the screen.

set nonewlines

Don't automatically add a newline when a text does not end with one. (This can cause you to save non-POSIX text files.)

set nowrap

Deprecated option since it has become the default setting. When needed, use unset breaklonglines instead.

set numbercolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for line numbers. See set titlecolor for more details.

set operatingdir directory

nano will only read and write files inside directory and its subdirectories. Also, the current directory is changed to here, so files are inserted from this directory. By default, the operating directory feature is turned off.

set positionlog

Save the cursor position of files between editing sessions. The cursor position is remembered for the 200 most-recently edited files.

set preserve

Preserve the XON and XOFF keys (^Q and ^S).

set promptcolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the prompt bar. (When this option is not specified, the colors of the title bar are used.) See set titlecolor for more details.

set punct "characters"

Set the characters treated as closing punctuation when justifying paragraphs. This may not include blank characters. Only the specfified closing punctuation, optionally followed by closing brackets (see brackets), can end sentences. The default value is "!.?".

set quickblank

Make status-bar messages disappear after 1 keystroke instead of after 20. Note that option constantshow overrides this. When option minibar or zero is in effect, quickblank makes a message disappear after 0.8 seconds instead of after the default 1.5 seconds.

set quotestr "regex"

Set the regular expression for matching the quoting part of a line. The default value is "^([ \t]*([!#%:;>|}]|//))+". (Note that \t stands for an actual Tab character.) This makes it possible to rejustify blocks of quoted text when composing email, and to rewrap blocks of line comments when writing source code.

set rawsequences

Interpret escape sequences directly, instead of asking ncurses to translate them. (If you need this option to get some keys to work properly, it means that the terminfo terminal description that is used does not fully match the actual behavior of your terminal. This can happen when you ssh into a BSD machine, for example.) Using this option disables nano's mouse support.

set rebinddelete

Interpret the Delete and Backspace keys differently so that both Backspace and Delete work properly. You should only use this option when on your system either Backspace acts like Delete or Delete acts like Backspace.

set regexp

Do regular-expression searches by default. Regular expressions in nano are of the extended type (ERE).

set saveonexit

Save a changed buffer automatically on exit (^X); don't prompt.

set scrollercolor fgcolor,bgcolor

Use this color combination for the indicator alias "scrollbar". (On terminal emulators that link to a libvte older than version 0.55, using a background color here does not work correctly.) See set titlecolor for more details.

set selectedcolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for selected text. See set titlecolor for more details.

set showcursor

Put the cursor on the highlighted item in the file browser, and show the cursor in the help viewer, to aid braille users and people with poor vision.

set smarthome

Make the Home key smarter. When Home is pressed anywhere but at the very beginning of non-whitespace characters on a line, the cursor will jump to that beginning (either forwards or backwards). If the cursor is already at that position, it will jump to the true beginning of the line.

set softwrap

Display lines that exceed the screen's width over multiple screen lines. (You can make this soft-wrapping occur at whitespace instead of rudely at the screen's edge, by using also set atblanks.)

set speller "program [argument ...]"

Use the given program to do spell checking and correcting, instead of using the built-in corrector that calls hunspell(1) or spell(1).

set spotlightcolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for highlighting a search match. The default value is black,lightyellow. See set titlecolor for valid color names.

set stateflags

Use the top-right corner of the screen for showing some state flags: I when auto-indenting, M when the mark is on, L when hard-wrapping (breaking long lines), R when recording a macro, and S when soft-wrapping. When the buffer is modified, a star (*) is shown after the filename in the center of the title bar.

set statuscolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the status bar. See set titlecolor for more details.

set stripecolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the vertical guiding stripe. See set titlecolor for more details.

set tabsize number

Use a tab size of number columns. The value of number must be greater than 0. The default value is 8.

set tabstospaces

Convert each typed tab to spaces -- to the number of spaces that a tab at that position would take up.

set titlecolor [bold,][italic,]fgcolor,bgcolor

Use this color combination for the title bar. Valid names for the foreground and background colors are: red, green, blue, magenta, yellow, cyan, white, and black. Each of these eight names may be prefixed with the word light to get a brighter version of that color. The word grey or gray may be used as a synonym for lightblack. On terminal emulators that can do at least 256 colors, other valid (but unprefixable) color names are: pink, purple, mauve, lagoon, mint, lime, peach, orange, latte, rosy, beet, plum, sea, sky, slate, teal, sage, brown, ocher, sand, tawny, brick, crimson, and normal -- where normal means the default foreground or background color. On such emulators, the color may also be specified as a three-digit hexadecimal number prefixed with #, with the digits representing the amounts of red, green, and blue, respectively. This tells nano to select from the available palette the color that approximates the given values. Either "fgcolor" or ",bgcolor" may be left out, and the pair may be preceded by bold and/or italic (separated by commas) to get a bold and/or slanting typeface, if your terminal can do those.

set trimblanks

Remove trailing whitespace from wrapped lines when automatic hard-wrapping occurs or when text is justified.

set unix

Save a file by default in Unix format. This overrides nano's default behavior of saving a file in the format that it had. (This option has no effect when you also use set noconvert.)

set whitespace "characters"

Set the two characters used to indicate the presence of tabs and spaces. They must be single-column characters. The default pair for a UTF-8 locale is "»⋅", and for other locales ">.".

set wordbounds

Detect word boundaries differently by treating punctuation characters as parts of words.

set wordchars "characters"

Specify which other characters (besides the normal alphanumeric ones) should be considered as parts of words. When using this option, you probably want to unset wordbounds.

set zap

Let an unmodified Backspace or Delete erase the marked region (instead of a single character, and without affecting the cutbuffer).

set zero

Hide all elements of the interface (title bar, status bar, and help lines) and use all rows of the terminal for showing the contents of the buffer. The status bar appears only when there is a significant message, and disappears after 1.5 seconds or upon the next keystroke. With M-Z the title bar plus status bar can be toggled. With M-X the help lines.

## NOTES
Option set suspendable has been removed. Suspension is enabled by default, reachable via ^T^Z. (If you want a plain ^Z to suspend nano, add bind ^Z suspend main to your nanorc.)

## SYNTAX HIGHLIGHTING
Coloring the different syntactic elements of a file is done via regular expressions (see the color command below). This is inherently imperfect, because regular expressions are not powerful enough to fully parse a file. Nevertheless, regular expressions can do a lot and are easy to make, so they are a good fit for a small editor like nano.

All regular expressions in nano are POSIX extended regular expressions. This means that ., ?, *, +, ^, $, and several other characters are special. The period . matches any single character, ? means the preceding item is optional, * means the preceding item may be matched zero or more times, + means the preceding item must be matched one or more times, ^ matches the beginning of a line, and $ the end, \< matches the start of a word, and \> the end, and \s matches a blank. It also means that lookahead and lookbehind are not possible. A complete explanation can be found in the manual page of GNU grep: man grep.

Each regular expression in a nanorc file should be wrapped in double quotes (""). Multiple regular expressions can follow each other on a line by separating them with blanks. This means that a regular expression cannot contain a double quote followed by a blank. When you need this combination inside a regular expression, then either the double quote or the blank should be put between square brackets ([]).

For each kind of file a separate syntax can be defined via the following commands:

syntax name ["fileregex" ...]

Start the definition of a syntax with this name. All subsequent color and other such commands will be added to this syntax, until a new syntax command is encountered. When nano is run, this syntax will be automatically activated if the current filename matches the extended regular expression fileregex. Or the syntax can be explicitly activated by using the -Y or --syntax command-line option followed by the name.

The syntax default is special: it takes no fileregex, and applies to files that don't match any syntax's regexes. The syntax none is reserved; specifying it on the command line is the same as not having a syntax at all.

header "regex" ...

If from all defined syntaxes no fileregex matched, then compare this regex (or regexes) against the first line of the current file, to determine whether this syntax should be used for it.

magic "regex" ...

If no fileregex matched and no header regex matched either, then compare this regex (or regexes) against the result of querying the magic database about the current file, to determine whether this syntax should be used for it. (This functionality only works when libmagic is installed on the system and will be silently ignored otherwise.)

formatter program [argument ...]

Run the given program on the full contents of the current buffer.

linter program [argument ...]

Use the given program to run a syntax check on the current buffer.

comment "string"

Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (|), this designates bracket-style comments; for example, "/*|*/" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example, "#" for Python files. If empty double quotes are specified, the comment/uncomment function is disabled; for example, "" for JSON. The default value is "#".

tabgives "string"

Make the <Tab> key produce the given string. Useful for languages like Python that want to see only spaces for indentation. This overrides the setting of the tabstospaces option.

color [bold,][italic,]fgcolor,bgcolor "regex" ...

Paint all pieces of text that match the extended regular expression regex with the given foreground and background colors, at least one of which must be specified. Valid color names are: red, green, blue, magenta, yellow, cyan, white, and black. Each of these eight names may be prefixed with the word light to get a brighter version of that color. The word grey or gray may be used as a synonym for lightblack. On terminal emulators that can do at least 256 colors, other valid (but unprefixable) color names are: pink, purple, mauve, lagoon, mint, lime, peach, orange, latte, rosy, beet, plum, sea, sky, slate, teal, sage, brown, ocher, sand, tawny, brick, crimson, and normal -- where normal means the default foreground or background color. On such emulators, the color may also be specified as a three-digit hexadecimal number prefixed with #, with the digits representing the amounts of red, green, and blue, respectively. This tells nano to select from the available palette the color that approximates the given values. The color pair may be preceded by bold and/or italic (separated by commas) to get a bold and/or slanting typeface, if your terminal can do those.

All coloring commands are applied in the order in which they are specified, which means that later commands can recolor stuff that was colored earlier.

icolor [bold,][italic,]fgcolor,bgcolor "regex" ...

Same as above, except that the matching is case insensitive.

color [bold,][italic,]fgcolor,bgcolor start="fromrx" end="torx"

Paint all pieces of text whose start matches extended regular expression fromrx and whose end matches extended regular expression torx with the given foreground and background colors, at least one of which must be specified. This means that, after an initial instance of fromrx, all text until the first instance of torx will be colored. This allows syntax highlighting to span multiple lines.

icolor [bold,][italic,]fgcolor,bgcolor start="fromrx" end="torx"

Same as above, except that the matching is case insensitive.

include "syntaxfile"

Read in self-contained color syntaxes from syntaxfile. Note that syntaxfile may contain only the above commands, from syntax to icolor.

extendsyntax name command argument ...

Extend the syntax previously defined as name with another command. This allows adding a new color, icolor, header, magic, formatter, linter, comment, or tabgives command to an already defined syntax -- useful when you want to slightly improve a syntax defined in one of the system-installed files (which normally are not writable).

## REBINDING KEYS
Key bindings can be changed via the following three commands:

bind key function menu

Rebinds the given key to the given function in the given menu (or in all menus where the function exists when all is used).

bind key "string" menu

Makes the given key produce the given string in the given menu (or in all menus where the key exists when all is used). Besides literal text and/or control codes, the string may contain function names between braces. These functions will be invoked when the key is typed. To include a literal opening brace, use {{}.

unbind key menu

Unbinds the given key from the given menu (or from all menus where the key exists when all is used).

Note that bind key "{function}" menu is equivalent to bind key function menu, except that for the latter form nano will check the availabilty of the function in the given menu at startup time (and report an error if it does not exist there), whereas for the first form nano will check at execution time that the function exists but not whether it makes any sense in the current menu. The user has to take care that a function name between braces (or any sequence of them) is appropriate. Strange behavior can result when it is not.

The format of key should be one of:

^X

where X is a Latin letter, or one of several ASCII characters (@, ], \, ^, _), or the word "Space". Example: ^C.

M-X

where X is any ASCII character except [, or the word "Space". Example: M-8.

Sh-M-X

where X is a Latin letter. Example: Sh-M-U. By default, each Meta+letter keystroke does the same as the corresponding Shift+Meta+letter. But when any Shift+Meta bind is made, that will no longer be the case, for all letters.

FN

where N is a numeric value from 1 to 24. Example: F10. (Often, F13 to F24 can be typed as F1 to F12 with Shift.)

Ins or Del.

Rebinding ^M (Enter) or ^I (Tab) is probably not a good idea. Rebinding ^[ (Esc) is not possible, because its keycode is the starter byte of Meta keystrokes and escape sequences. Rebinding any of the dedicated cursor-moving keys (the arrows, Home, End, PageUp and PageDown) is not possible. On some terminals it's not possible to rebind ^H (unless --raw is used) because its keycode is identical to that of the Backspace key.

Valid function names to be bound are:

help

Invokes the help viewer.

cancel

Cancels the current command.

exit

Exits from the program (or from the help viewer or file browser).

writeout

Writes the current buffer to disk, asking for a name.

savefile

Writes the current file to disk without prompting.

insert

Inserts a file into the current buffer (at the current cursor position), or into a new buffer when option multibuffer is set.

whereis

Starts a forward search for text in the current buffer -- or for filenames matching a string in the current list in the file browser.

wherewas

Starts a backward search for text in the current buffer -- or for filenames matching a string in the current list in the file browser.

findprevious

Searches the next occurrence in the backward direction.

findnext

Searches the next occurrence in the forward direction.

replace

Interactively replaces text within the current buffer.

cut

Cuts and stores the current line (or the marked region).

copy

Copies the current line (or the marked region) without deleting it.

paste

Pastes the currently stored text into the current buffer at the current cursor position.

zap

Throws away the current line (or the marked region). (This function is bound by default to <Meta+Delete>.)

chopwordleft

Deletes from the cursor position to the beginning of the preceding word. (This function is bound by default to <Shift+Ctrl+Delete>. If your terminal produces ^H for <Ctrl+Backspace>, you can make <Ctrl+Backspace> delete the word to the left of the cursor by rebinding ^H to this function.)

chopwordright

Deletes from the cursor position to the beginning of the next word. (This function is bound by default to <Ctrl+Delete>.)

cutrestoffile

Cuts all text from the cursor position till the end of the buffer.

mark

Sets the mark at the current position, to start selecting text. Or, when it is set, unsets the mark.

location

Reports the current position of the cursor in the buffer: the line, column, and character positions.

wordcount

Counts and reports on the status bar the number of lines, words, and characters in the current buffer (or in the marked region).

execute

Prompts for a program to execute. The program's output will be inserted into the current buffer (or into a new buffer when M-F is toggled).

speller

Invokes a spell-checking program, either the default hunspell(1) or GNU spell(1), or the one defined by --speller or set speller.

formatter

Invokes a full-buffer-processing program (if the active syntax defines one). (The current buffer is written out to a temporary file, the program is run on it, and then the temporary file is read back in, replacing the contents of the buffer.)

linter

Invokes a syntax-checking program (if the active syntax defines one). If this program produces lines of the form "filename:linenum:charnum: some message", then the cursor will be put at the indicated position in the mentioned file while showing "some message" on the status bar. You can move from message to message with <PgUp> and <PgDn>, and leave linting mode with ^C or <Enter>.

justify

Justifies the current paragraph (or the marked region). A paragraph is a group of contiguous lines that, apart from possibly the first line, all have the same indentation. The beginning of a paragraph is detected by either this lone line with a differing indentation or by a preceding blank line.

fulljustify

Justifies the entire current buffer (or the marked region).

indent

Indents (shifts to the right) the current line or the marked lines.

unindent

Unindents (shifts to the left) the current line or the marked lines.

comment

Comments or uncomments the current line or the marked lines, using the comment style specified in the active syntax.

complete

Completes (when possible) the fragment before the cursor to a full word found elsewhere in the current buffer.

left

Goes left one position (in the editor or browser).

right

Goes right one position (in the editor or browser).

up

Goes one line up (in the editor or browser).

down

Goes one line down (in the editor or browser).

scrollup

Scrolls the viewport up one row (meaning that the text slides down) while keeping the cursor in the same text position, if possible. (This function is bound by default to <Alt+Up>. If <Alt+Up> does nothing on your Linux console, see the FAQ: https://nano-editor.org/dist/latest/faq.html#4.1.)

scrolldown

Scrolls the viewport down one row (meaning that the text slides up) while keeping the cursor in the same text position, if possible. (This function is bound by default to <Alt+Down>.)

center

Scrolls the line with the cursor to the middle of the screen.

prevword

Moves the cursor to the beginning of the previous word.

nextword

Moves the cursor to the beginning of the next word.

home

Moves the cursor to the beginning of the current line.

end

Moves the cursor to the end of the current line.

beginpara

Moves the cursor to the beginning of the current paragraph.

endpara

Moves the cursor to the end of the current paragraph.

prevblock

Moves the cursor to the beginning of the current or preceding block of text. (Blocks are separated by one or more blank lines.)

nextblock

Moves the cursor to the beginning of the next block of text.

pageup

Goes up one screenful.

pagedown

Goes down one screenful.

firstline

Goes to the first line of the file.

lastline

Goes to the last line of the file.

gotoline

Goes to a specific line (and column if specified). Negative numbers count from the end of the file (and end of the line).

findbracket

Moves the cursor to the bracket (or brace or parenthesis, etc.) that matches (pairs) with the one under the cursor. See set matchbrackets.

anchor

Places an anchor at the current line, or removes it when already present. (An anchor is visible when line numbers are activated.)

prevanchor

Goes to the first anchor before the current line.

nextanchor

Goes to the first anchor after the current line.

prevbuf

Switches to editing/viewing the previous buffer when multiple buffers are open.

nextbuf

Switches to editing/viewing the next buffer when multiple buffers are open.

verbatim

Inserts the next keystroke verbatim into the file, or begins Unicode input when a hexadecimal digit is typed.

tab

Inserts a tab at the current cursor location.

enter

Inserts a new line below the current one.

delete

Deletes the character under the cursor.

backspace

Deletes the character before the cursor.

recordmacro

Starts the recording of keystrokes -- the keystrokes are stored as a macro. When already recording, the recording is stopped.

runmacro

Replays the keystrokes of the last recorded macro.

undo

Undoes the last performed text action (add text, delete text, etc).

redo

Redoes the last undone action (i.e., it undoes an undo).

refresh

Refreshes the screen.

suspend

Suspends the editor and returns control to the shell (until you tell the process to resume execution with fg).

casesens

Toggles whether searching/replacing ignores or respects the case of the given characters.

regexp

Toggles whether searching/replacing uses literal strings or regular expressions.

backwards

Toggles whether searching/replacing goes forward or backward.

older

Retrieves the previous (earlier) entry at a prompt.

newer

Retrieves the next (later) entry at a prompt.

flipreplace

Toggles between searching for something and replacing something.

flipgoto

Toggles between searching for text and targeting a line number.

flipexecute

Toggles between inserting a file and executing a command.

flippipe

When executing a command, toggles whether the current buffer (or marked region) is piped to the command.

flipnewbuffer

Toggles between inserting into the current buffer and into a new empty buffer.

flipconvert

When reading in a file, toggles between converting and not converting it from DOS/Mac format. Converting is the default.

dosformat

When writing a file, switches to writing a DOS format (CR/LF).

macformat

When writing a file, switches to writing a Mac format.

append

When writing a file, appends to the end instead of overwriting.

prepend

When writing a file, 'prepends' (writes at the beginning) instead of overwriting.

backup

When writing a file, creates a backup of the current file.

discardbuffer

When about to write a file, discard the current buffer without saving. (This function is bound by default only when option --saveonexit is in effect.)

browser

Starts the file browser (in the Read File and Write Out menus), allowing to select a file from a list.

gotodir

Goes to a directory to be specified, allowing to browse anywhere in the filesystem.

firstfile

Goes to the first file in the list when using the file browser.

lastfile

Goes to the last file in the list when using the file browser.

nohelp

Toggles the presence of the two-line list of key bindings at the bottom of the screen. (This toggle is special: it is available in all menus except the help viewer and the linter. All further toggles are available in the main menu only.)

zero

Toggles the presence of title bar and status bar.

constantshow

Toggles the constant display of the current line, column, and character positions.

softwrap

Toggles the displaying of overlong lines on multiple screen lines.

linenumbers

Toggles the display of line numbers in front of the text.

whitespacedisplay

Toggles the showing of whitespace.

nosyntax

Toggles syntax highlighting.

smarthome

Toggles the smartness of the Home key.

autoindent

Toggles whether a newly created line will contain the same amount of leading whitespace as the preceding line -- or as the next line if the preceding line is the beginning of a paragraph.

cutfromcursor

Toggles whether cutting text will cut the whole line or just from the current cursor position to the end of the line.

breaklonglines

Toggles whether long lines will be hard-wrapped to the next line. (The old name of this function, 'nowrap', is deprecated.)

tabstospaces

Toggles whether typed tabs will be converted to spaces.

mouse

Toggles mouse support.

Valid menu sections are:

main

The main editor window where text is entered and edited.

help

The help-viewer menu.

search

The search menu (AKA whereis).

replace

The 'search to replace' menu.

replacewith

The 'replace with' menu, which comes up after 'search to replace'.

yesno

The 'yesno' menu, where the Yes/No/All/Cancel question is asked.

gotoline

The 'goto line (and column)' menu.

writeout

The 'write file' menu.

insert

The 'insert file' menu.

browser

The 'file browser' menu, for selecting a file to be opened or inserted or written to.

whereisfile

The 'search for a file' menu in the file browser.

gotodir

The 'go to directory' menu in the file browser.

execute

The menu for inserting the output from an external command, or for filtering the buffer (or the marked region) through an external command, or for executing one of several tools.

spell

The menu of the integrated spell checker where the user can edit a misspelled word.

linter

The linter menu, which allows jumping through the linting messages.

all

A special name that encompasses all menus. For bind it means all menus where the specified function exists; for unbind it means all menus where the specified key exists.

## FILES
/etc/nanorc

System-wide configuration file.

~/.nanorc or $XDG_CONFIG_HOME/nano/nanorc or ~/.config/nano/nanorc

Per-user configuration file.

/usr/share/nano/*

Syntax definitions for the syntax coloring of common file types (and for less common file types in the extra/ subdirectory).

## SEE ALSO
nano(1)

https://nano-editor.org/cheatsheet.html

An overview of the default key bindings.


nasd.conf

package: nasd

title: nasd.conf(5)

summary: Configuration file for NAS servers.

text:
# nasd.conf(5)

## NAME
nasd.conf - Configuration file for NAS servers.

## DESCRIPTION
nasd.conf Is a file that can be used to configure the behaiviour of the NAS server, including what devices it will attempt to use, the minimum & maximum frequencies used, if the device should be used in 8bit or 16bit mode, what fragment size and number of fragments should be used (useful for tuning the server's latency) and if the server should be verbose when starting or output debugging information. Not all options are supported for all servers, see the /etc/nas/nasd.conf.eg file for information on what options are supported for which servers.

## THE CONFIG FILE SYNTAX
There are up to three section in the config file. The first section deals with global options, some of which just turn on verbose messages when parsing the config file, and setting debug messages on. The remaining two sections will, if present, adjust various parameters of the input and output devices, for those servers that understand them.

verbose Sets a flag telling the server to report what it's trying to do with each setting in the config file. This option is off by default.

debug <number> Sets the debug flag, which will provide a trace of the server's activities on stderr. Set <number> to 0 to disable debug messages, 99 for *alot* of debug messages. This option defaults to 0.

ReleaseDevice YES | NO Set to YES or NO. Defines whether the server should release the audio device when finished playing or recording a sound. This option defaults to YES. (voxware, hpux, sun)

KeepMixer YES | NO Set to YES or NO. Defines whether the server should keep the mixer open when releasing the audio device. Without an open mixer device the server will always report the default gain and line mode and cannot change them either. This option defaults to YES. (voxware)

MixerInit YES | NO Set to YES or NO. Defines whether the server will init the mixer device on startup. Later changes of gain or input mode will change the mixer settings. This option defaults to NO. (voxware)

ReInitMixer YES | NO Set to YES or NO. Defines whether the server will re-init the mixer device on every audio device open. The mixer is re-initialized only if it is initialized at startup (see MixerInit option). This option defaults to NO. (voxware)

OutDevType EXT | INT For HPUX servers, define to EXT to use the external output device (headphone/speakers) or INT for the internal output device (internal speaker). Defaults to EXT.

outputsection Marks the beginning of the output section, which allows various parameters of the output device to be set up.

inputsection Marks the beginning of the input section, which allows various parameters of the input device to be set up.

end Marks the end of the input section or output section.

device <devname> Specifies what device is used. An example is device "/dev/dsp". With the voxware server you can use the empty string "" to disable the device.

mixer <mixername> Specifies what mixer device is used. An example is mixer "/dev/mixer". If <mixername> is set to the empty string "" no mixer is used in this section.

gain <number> Specifies the default volume (0-100). The default is 50.

gainscale <number> This factor (expressed as a percentage) is applied to all volume-setting requests. This lets the server transparently limit the actual maximum volume that can be set by clients. The default is 100.

maxrate <number> The maximum number of samples per second that we'll drive the card at.

minrate <number> The minimum number of samples per second that the card will be driven at.

maxfrags <number> The maximum number of of kernel buffers that will be used for the device. the number is dynamically adjusted as the sampling frequency varies.

minfrags <number> The minimum number of kernel buffers that will be used.

fragsize <number> The size of each buffer - note that the size must be a power of 2.

wordsize <number> The number of bits per sample. Allowable values are 8 and 16.

numchans <number> Used to decide if the card is run in stereo or mono mode. Allowable values are 1 or 2.

forcerate no | yes Forces the output rate to the current rate. The default is no.

autoOpen no | yes Whether to open the device at init time (if ReleaseDevice = no). The default is yes.

readwrite no | yes Whether or not to open the device read-write. The default is no. If set to yes, then the device will be opened read-write. There should be no need to set this to yes, but...

## SEE ALSO
nas(1), nasd(1), auinfo(1), auplay(1), auctl(1)

## BUGS
Absolutely none.

## AUTHORS
Stephen Hocking (sysseh@devetir.qld.gov.au), Jon Trulson (jon@radscan.com)


nbd-server

package: nbd-server

title: nbd-server(5)

summary: configuration file for nbd-server

text:
# nbd-server(5)

## NAME
/etc/nbd-server/config - configuration file for nbd-server

## SYNOPSIS
/etc/nbd-server/config

## DESCRIPTION
This file allows to configure the nbd-server.

While /etc/nbd-server/config is the default configuration file, this can be varied with the -C option to nbd-server(1).

The configuration file consists of section header lines, comment lines, and option lines.

A section header is a unique name that is enclosed in square brackets ("[" and "]"). A section header denotes the beginning of a section; a section continues until the next section or the end of the file, whichever is first. The first section in the configuration file must be called generic, and is used for global options that apply to more than one export. This section must always be present, even if it holds no options. Every other section defines one export; the names of these sections are not important, except that you should take care to make sure that each section name is unique. The section name is used as the name for the export in case the client connects with a name rather than a port to specify an export, and must therefore be unique.

A comment line is a line that starts with optional whitespace, followed by a pound sign ("#"), and continues until the end of the line. Comments may not be used on option lines or section header lines.

An option line is a line that starts with an option name, followed by an equals sign ("="), followed by the option value. An option can be of type string, of type integer, or of type boolean. The value of a boolean option can be denoted with either true or false (so not yes, no, on, off, 1, or 0). All booleans default to false unless specified otherwise. No value may be quoted; always enter it directly. For a string option, leading whitespace is stripped (but trailing whitespace is not).

## OPTIONS FOR SECTION GENERIC
allowlist

Optional; boolean Whether to allow the client to fetch a list of exports from this server. If enabled, the client can run nbd-client -l to get a list of exports on this server.

cacertfile

Optional; string If this option is set, it should contain a path to a PEM format X.509 CA certificate used for validating client certificates supplied by the client. If this option is not set then client certificates will not be checked.

certfile

Optional; string If this option is set, it should contain a path to a PEM format X.509 public certificate used for TLS negotiation with the client. If keyfile is set but certfile is not set, then the server will attempt to read the certificate from the path specified by keyfile.

force_tls

Optional; boolean. Switch the server to FORCEDTLS mode.

Note: this is not the same as enabling the force_tls option for each and every export individually. The latter will allow certain options to be issued during negotiation (e.g., the "list exports" option, even if that would return an empty result set), whereas enabling this option will disallow the use of any option to be issued during negotiation, apart from the STARTTLS option itself (to switch the transport to TLS).

Using FORCEDTLS mode should result in a safer environment, as the server will not allow any communication to take place unless and until TLS has been negotiated. However, it also makes it impossible to set up a nonencrypted export for the benefit of older clients, or for clients that want to swap and not deadlock.

Using this parameter without also specifying a value for the other TLS-related parameters is possible, but silly.

group

Optional; string. The name of the group this server must run as. If this parameter is not specified, then nbd-server will not attempt to change its GID (so the GID it runs as will be the primary group of the user who starts nbd-server). If it is specified, then nbd-server will change its GID after opening ports, but before accepting connections or opening files.

includedir

Optional; string The argument should be a directory containing files with the '.conf' extension; these files will be parsed as if they were part of the configuration file. Note that these extra configuration files cannot contain a [generic] section; any configuration that should go in the generic section must be placed in the main configuration file.

If this argument is not specified, then no directory will be searched. If it is specified but the directory does not exist, then nbd-server will exit with an appropriate error message; if it is specified but the given directory is empty, nbd-server will continue (unless no exports whatsoever have been configured, in which case it will exit with an appropriate error message)

keyfile

Optional; string If this option is set, it should contain a path to a PEM format X.509 private key used for TLS negotiation with the client. This option must be set to enable TLS.

listenaddr

Optional; string If this option is set, it should contain a comma-separated lis of the local IP addresses on which we should listen to nbd-client(8) connections. If it is not set, nbd-server will listen to "::, 0.0.0.0", which causes nbd-server to listen to all local IPv4 and IPv6 addresses. To limit to IPv6, specify the address as "::". To limit to IPv4, specify as "0.0.0.0".

max_threads

Optional; integer; default 4 Since NBD 3.12, nbd-server will read requests in a main thread, but do the handling of these requests, and the sending of the reply, in a number of separate worker threads, which are shared among all exports. With this parameter, you can configure the number of these worker threads.

The default should be reasonable for a dual-core single-disk server. You might want to increase it if you have a powerful server that does little else than serving NBD.

oldstyle

Optional; boolean In versions of nbd-server between 2.9.17 and 3.9.1, when this option was set to true, nbd-server would export all exports on a separate port with the old (pre-2.9.17) handshake protocol. In that case, the 'port' option for individual exports was mandatory.

Since version 3.10 of nbd-server, however, this option is no longer supported, and any attempt to use it will result in nbd-server exiting with an appropriate error message.

port

Optional; string The port on which to listen for new-style nbd-client connections. If not specified, the IANA-assigned port of 10809 is used.

splice

Optional; boolean Allow the server to use the splice() system call to handle read or write calls when possible. Using splice can speed up handling of such calls significantly. Unfortunately, splice cannot be used in combination with TLS or the copyonwrite mode, and will only work for requests smaller than 1MiB.

To handle these situations, the server will exit with an appropriate error message if splice and copyonwrite are both enabled for an export; it will silently ignore the splice option if TLS is enabled, falling back on normal reads and writes; and it will similarly fall back on normal reads when the request size exceeds 1MiB.

user

Optional; string. The name of the user this server must run as. If this parameter is not specified, then nbd-server will not attempt to change its UID (so the UID it runs as will be the user who starts nbd-server). If it is specified, then nbd-server will change its UID after opening ports, but before accepting connections or opening files.

unixsock

Optional; string Path for a UNIX domain socket.

If specified, the server will listen on a UNIX domain socket with the specified name. Only newstyle negotiation is supported on UNIX domain sockets. If a UNIX domain socket is, then the server will not listen for TCP connections.

duallisten

Optional; boolean If true, and unixsock is specified, the the server will listen on both the configured UNIX domain socket and any configured TCP or SDP socket. Defaults to false.

tlsprio

Optional; string; default NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2:%SERVER_PRECEDENCE This option allows to configure the GnuTLS priority string, which is used to select the algorithms which GnuTLS will allow to be negotiated with the client. The NBD STARTTLS specification requires that clients and servers require TLS1.2 or higher by default, so the default string disables all older versions of the TLS protocol.

Not all versions of GnuTLS support the %SERVER_PRECEDENCE flag, which exists to signal that the server should pay no attention to the algorithm preferences selected by the client. If you're using an older version of GnuTLS (e.g., 2.12), it may be necessary to specify a priority string that does not include the %SERVER_PRECEDENCE flag.

For an explanation of the possible values of this option, see the "Priority strings" chapter in the GnuTLS documentation.

## OPTIONS FOR EXPORT SECTIONS
authfile

Optional; string; default empty The name of the authorization file for this export. This file should contain one line per IP-address, or per network (which must be specified in CIDR-style network/masklen). Empty lines are skipped, as is any content behind a hashmark ('#') on any line.

If the file does not exist, everyone is allowed to connect. If the file exists but is empty, nobody is allowed to connect. Otherwise, nbd-server will only allow clients to connect whose IP-adres is listed in this file.

Corresponds to the -l option on the command line. However, note that for the command line, the default is /etc/nbd-server/allow.

copyonwrite

Optional; boolean. Whether this is a copy-on-write export. If it is, then any writes to this export will not be written to the master file, but to a separate file which will be removed upon disconnect. The result of using this option is that nbd-server will be somewhat slower, and that any writes will be lost upon disconnect.

Corresponds to the -c option on the command line

cowdir

Optional; string. Specifies where to write copy-on-write diff files. If this option is absent, copy-on-write files will be written in the same directory as the base export file. Useful for exporting files in copy-on-write mode from a directory that the user running nbd-server has no write access to.

If the copy-on-write mode is not active, this option has no effect.

exportname

Required; string. The name of the file (or block device) that will be exported. This must be a fully-qualified path and filename; relative paths are not allowed. If used in conjunction with the temporary, this specifies a template for the temporary file concerned, and thus can be used to control the directory it is created in. If the file does not exist, but filesize is set, then the file will be created.

Note that nbd-server will only try to find and open the exported file when a client actually connects; as a result, nbd-server must be able to open and read this file after changing to the user and group that have been specified by use of the user and group options; also, nbd-server will only detect errors in this option upon connection of a client.

When specified on the command line, this should be the second argument.

Note: this is not the "exportname" as defined in the protocol document, and which is the name that nbd-client needs to pass to select the correct export; the section name is used for that. The name of the file to be exported is called the exportname in the configuration file for historical reasons, and cannot easily be changed.

filesize

Optional; integer; default autodetected. Disable autodetection of file or block device size, and forcibly specify a size. Sizes must be specified in bytes. If the multifile option is in effect, this option specifies the size of the entire export, not of individual files. If the file is not present, a single file is created of this size.

When specified on the command line, this should be the third argument.

flush

Optional; boolean. When this option is enabled, nbd-server will inform the client that it supports and desires to be sent flush requests when the elevator layer receives them. Receipt of a flush request will cause an fdatasync() (or, if the sync option is set, an fsync()) on the backend storage. This increases reliability in the case of an unclean shutdown at the expense of a degradation of performance. This option will have no effect unless supported by the client.

force_tls

Optional; boolean. Require the use of TLS for this export to be available.

When this option has been enabled for an export, clients that do not negotiate TLS will not see the export when they request a list of exports, and will not be able to connect to it.

Enabling this option when TLS credentials have not been configured in the [generic] section is possible, but silly.

fua

Optional; boolean. When this option is enabled, nbd-server will inform the client that it supports and desires to be sent fua (force unit access) commands when the elevator layer receives them. Receipt of a force unit access command will cause the specified command to be synced to backend storage using sync_file_range() if supported, or fdatasync() otherwise. This increases reliability in the case of an unclean shutdown at the expense of a degradation of performance. This option will have no effect unless supported by the client.

listenaddr

Optional; string Ignored, kept for compatibility with the obsolete 'oldstyle' global parameter.

maxconnections

Optional; integer If specified, then it limits the number of opened connections for this export.

multifile

Optional; boolean. If this option is set to true, then nbd-server will search for files of the form exportname.integer, with exportname being the filename that would otherwise have been used (after name transformation for virtualization, if any, has been performed) and integer an integer number, starting with 0 and ending when no more files can be found.

The size of the individual files will be autodetected, even if the filesize option has been specified.

Corresponds to the -m option on the command line.

treefiles

Optional; boolean. If this option is set to true, then nbd-server will search for files of the form exportname/TREEXXXX/.../FILEXXXX, with exportname being the filename that would otherwise have been used (after name transformation for virtualization, if any, has been performed) and TREEXXXX and FILEXXXX being autogenerated directory and path names for individual block files.

Files and directories are automatically created. Files will be deleted if the corresponding block gets marked as unused. The size of the individual block files is fixed to 4096 bytes. There will be at most 1024 files/subdirectories per folder. An apropriate nesting level of subdirectories will be created to create a filesystem of filesize bytes in total forming a virtual block device.

This feature is useful to provide a virtual block device on an underlying filesystem that does not handle large files well, for example fuse/ftpfs, davfs or other network filesytems.

This feature is mutually exclusive with the -m and will take precedence if both are given. There is no corresponding command line option, since command line control is considered deprecated. You can however specify a custom config file with the -C option. The filesize option must be specified when using this feature!

postrun

Optional; string If specified, then it is assumed to be a command that will be ran when a client has disconnected. This can be useful to clean up whatever prerun has set up, to log something, or similar.

If the literal string '%s' is present in the command, it will be replaced by the file name that has just been closed.

In contrast to the prerun option, the exit state of postrun is ignored.

prerun

Optional; string If specified, then this command will be ran after a client has connected to the server (and has been accepted), but before the server starts serving. If the command contains the literal string '%s', then this string will be replaced by the filename of the file which nbd-server wants to export.

This is useful to create export files on the fly, or to verify that a file can be used for export, to write something to a log file, or similar.

If the command runs with a nonzero exit status, then nbd-server will assume the export will fail, and refuse to serve it.

readonly

Optional; boolean. Disallow writes to the device. If this option is specified, nbd-server will issue an error to any client that tries to write to the device.

Use of this option in conjunction with copyonwrite is possible, but silly.

Corresponds to the -r option on the command line.

rotational

Optional; boolean. When this option is enabled, nbd-server will inform the client that it would prefer it to send requests in elevator (i.e., optimized) order, perhaps because it has a backing store and no local elevator. By default, the client uses QUEUE_FLAG_NONROT, which effectively restricts the function of the elevator to block merges. By specifying this flag on the server, the client will not use QUEUE_FLAG_NONROT, meaning the client elevator will perform normal elevator ordering of I/O requests. Note that even when the backing store is on rotating media, it is not normally necessary to specify this flag, as the server's elevator algorithm will be used. This flag is only required where the server will not be using an elevator algorithm or where the elevator algorithm is effectively neutered (e.g. with the sync option set). This option will have no effect unless supported by the client.

sdp

Optional; boolean. When this option is enabled, nbd-server will use the Socket Direct Protocol (SDP) to serve the export, rather than just IP. This is faster, but requires special hardware (usually something like InfiniBand) and support in the kernel.

Additionally, support for this option must be enabled at compile time, using the --enable-sdp option to the configure script. If this option is found in a configuration file and nbd-server does not have support for SDP, then nbd-server will exit with an error message.

sparse_cow

Optional; boolean. When this option is enabled, nbd-server will use sparse files to implement the copy-on-write option; such files take up less space then they appear to, which allows nbd-server to handle the file as if it was just as large as the block device it's for.

If this option is disabled, nbd-server will map every newly written block to the end of the copy-on-write file, which means that nbd-server will have to lseek(2) to the right position after every 4096-byte block.

Using this option may be faster when much is being written during a connection.

sync

Optional; boolean. When this option is enabled, nbd-server will call an fsync() after every write to the backend storage. Calling fsync() increases reliability in case of an unclean shutdown of nbd-server; but, depending on the file system used on the nbd-server side, may degrade performance. The use of this option isn't always necessary; e.g., on ext3 filesystems, it is recommended that it is not enabled, since it seriously reduces performance on ext3 filesystems while not importantly impacting reliability.

temporary

Optional; boolean. Create a temporary export with a name based on exportname (this can be used to set the directory). A unique filename is created, which is unlinked as soon as it is created, and therefore the export will not persist between invocations of nbd-server. Set the size of the file using the filesize option. This option is incompatible with the multifile option.

When specified on the command line, this should be the third argument.

timeout

Optional; integer; default 0 How many seconds a connection may be idle for this export. When a connection is idle for a longer time, nbd-server will forcibly disconnect the connection. If you specify 0 (the default), then a connection may be idle forever.

Corresponds to the -a option on the command line

transactionlog

Optional; string If specified, then this pathname is used to generate a transaction log. A transaction log is a binary file consisting of the requests sent to and the replies received by the server, but excluding any data (so, for a write command, it records the offset and length of the write but not the data written). It is therefore relatively safe to distribute to a third party. Note that the transaction log does not include the negotiation sequence. Transaction logs are mainly useful for debugging. The program nbd-tester-client distributed with the source to this program can reply a transaction log against a server and perform a data integrity test. Note that the transaction log is written to for every client opened. If it is necessary to maintain separate transaction logs for each client, the prerun script should rename the transaction log (which will just have been opened in order to avoid transaction logs overwriting eachother. This action should be race-free.

trim

Optional; boolean When this option is activated, the server announces it supports the NBD_CMD_TRIM command for the export. This command allows the server to discard the data from the disk, but does not require it to.

virtstyle

Optional; string; default "ipliteral" Defines the style of virtualization. Virtualization allows one to create one export that will serve a different file depending on the IP address that is connecting. When virtualization is active, the exportname parameter needs to contain the string '%s'; this will then be replaced by the IP address of the client connecting, in accordance with the option selected here. The result of this transformation is then used as the filename to be opened.

When a client connects over a UNIX domain socket, the literal string "unix" is used in lieu of a client IP address.

There are four types of virtualization that nbd-server supports:

none

No virtualization. Will attempt to open the filename as it was written, even if it contains '%s' in the name.

ipliteral

The %s is replaced by the IP address of the connecting host is used as-is. For IPv4, this is done in dotted-quad notation; for IPv6, in hexadecimal form with leading zeros omitted. As an example, if a client connects from 192.168.1.100 and exportname is specified as /export/%s, then nbd-server will attempt to serve /export/192.168.1.100. For IPv6, with a client connecting from 2001:6f8:32f::39, the filename would be /export/2001:6f8:32f:0:0:0:0:39

iphash

Same as above, except that nbd-server will replace the dots in the IP address by forward slashes ('/'); in the same example, nbd-server would open /export/192/168/1/100 instead. Since there are no dots in most IPv6 addresses, the effect of using this option when IPv6 is in use is indistinguishable from the ipliteral option. It was thought that having to create an eight-deep directory structure would not be as useful.

cidrhash

This option requires one to add a space and a number after it. nbd-server will use the number as a network mask in CIDR style, and use that as a hash cutoff point. In the above example, if virtstyle has been specified as cidrhash 16, then nbd-server will try to open /export/192.168.0.0/192.168.1.100; if virtstyle were specified as cidrhash 26, then nbd-server will try to open /export/192.168.1.64/192.168.1.100. For IPv6, in the above example, with cidrhash 42, the filename would be /export/2001:32f:6c0:0:0:0:0:0/2001:32f:6f8:0:0:0:0:39.

tlsonly

Optional; boolean. When this option is enabled, nbd-server will only serve the export using the TLS extension. If this option is not supplied, TLS is optional, unless tlsonly is set in the generic section. In order for TLS to work at all, the keyfile option must be specified in the generic section.

waitfile

Optional; string. When this option is set, nbd-server will allow writes to this export, but not reads, until the server is sent a SIGUSR1 command. Any writes to the export will be stored in a diff file with the same algorithm as for the copy-on-write option. In particular, this means that the cowdir option is in effect for this option, too.

The backend file (as per the exportname parameter) need not exist until the SIGUSR1 signal is sent to the server.

Once SIGUSR1 is received, nbd-server will open the main export file, and start merging all outstanding writes into it. Once this operation finishes, the diff file will be removed, and the server will allow normal use of the export.

This allows the out-of-band live migration of an export from one server to another.

Note that this option cannot be combined with the copy-on-write option itself.

## SEE ALSO
nbd-server (1), nbd-client (8), nbd-trdump (8)

## AUTHOR
The NBD kernel module and the NBD tools were originally written by Pavel Machek (pavel@ucw.cz)

The Linux kernel module is now maintained by Paul Clements (Paul.Clements@steeleye.com), while the userland tools are maintained by Wouter Verhelst (<wouter@debian.org>)

On The Hurd there is a regular translator available to perform the client side of the protocol, and the use of nbd-client is not required. Please see the relevant documentation for more information.

This manual page was written by Wouter Verhelst (<wouter@debian.org>) for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

## EXAMPLES
A simple nbd-server configuration file would look like this:

```
      [generic]

      [export]

          exportname = /export/blkdev

```

For increased security, one might want to create an authorization file, and set the UID and GID to run as:

```
      [generic]

          user = nbd

          group = nbd

      [export]

          exportname = /export/blkdev

          authfile = /etc/nbd-server/allow

```

With /etc/nbd-server/allow containing the following:

```
      127.0.0.1

      192.168.0.0/8

      192.168.1.1

```


nbdtab

title: nbdtab(5)

summary: configuration file for nbd-client

text:
# nbdtab(5)

## NAME
/etc/nbdtab - configuration file for nbd-client

## SYNOPSIS
/etc/nbdtab

## DESCRIPTION
This file allows to configure predefined connections for nbd-client. It may contain multiple definitions, one per line, each of which contains four space-separated fields.

To connect a device specified in the nbdtab file, run nbd-client(8) with the short name of that device as the sole argument. It will then look up the required information in nbdtab, and make the connection.

Fields are separated from one another by any number of space or tab characters; records are separated from one another by newline characters. The file may also contain any number of comments, which start with a '#' character and continue until the end of the line or the end of the file, whichever is first.

### FIELDS
The file contains the following fields:

1.

The short name of the device file. That is, it should contain the name of the device without the leading /dev/ part; e.g., it could say nbd0.

2.

The hostname (in case of a TCP socket) or filename (in case of a unix domain socket) on which the server is listening.

3.

The name of the export as exported by nbd-server.

4.

Any extra options. This field is optional (no pun intended), and need not appear in a file if no options are necessary. The options recognized by nbd-client(8) are specified below, in the section "Options". Any unknown options in this field will produce a warning by nbd-client, unless they are prepended by an underscore ('_') character; the underscore is specifically reserved for local use, or for distribution customization.

### OPTIONS
Every command-line nbd-client option which allows to configure specific options for a particular device node has a corresponding option in the nbdtab file, and vice versa; where this isn't the case, that is a bug.

Individual options in this field should be separated from one another by the comma character.

bs=block size

The block size for this export. If this option is not used, the kernel's default will be used instead. Corresponds to the -b option on the command line.

cacertfile=certificate

The CA certificate file for TLS. Corresponds to the -A option on the command line.

certfile=certificate file

The certificate file for TLS. Corresponds to the -F option on the command line.

conns=number

The number of connections to use for this device. Corresponds to the -C option on the command line; see nbd-client(8) for more details on that option.

keyfile=key

The private key file for TLS. Corresponds to the -K option on the command line.

no_optgo

Disable the use of NBD_OPT_GO in the conversation. Corresponds to the -g option on the command line.

port=port number

The port on which to communicate with the nbd-server. Defaults to the IANA-assigned port for NBD, 10809.

timeout=timeout

The timeout. If this option is not specified, no timeout is configured. Corresponds to the -t option on the command line.

persist

Persist the connection, using the semantics of the -p command-line option.

swap

Optimize for swap; -s.

sdp

Use the Socket Direct protocol; -S.

tlshostname=TLS

The hostname for TLS purposes; -H

unix

Use a Unix Domain socket to connect to the server; -u.

## SEE ALSO
nbd-server (1), nbd-client (8), nbd-trdump (8)

## AUTHOR
The NBD kernel module and the NBD tools were originally written by Pavel Machek (pavel@ucw.cz)

The Linux kernel module is now maintained by Paul Clements (Paul.Clements@steeleye.com), while the userland tools are maintained by Wouter Verhelst (<wouter@debian.org>)

On The Hurd there is a regular translator available to perform the client side of the protocol, and the use of nbd-client is not required. Please see the relevant documentation for more information.

This manual page was written by Wouter Verhelst (<wouter@debian.org>). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

## EXAMPLES
A simple nbdtab file could look like this:

```
# swap space, called "swapexport" on the server
# optimize for swap, and try to reconnect upon disconnect.
nbd0 nbdserver.example.com swapexport swap,persist
# other export, called "data" on the server. No options for this one.
nbd1 nbdserver.example.com data
```


ndppd.conf

package: ndppd

title: ndppd.conf(5)

summary: configuration file for ndppd

text:
# ndppd.conf(5)

## NAME
ndppd.conf - configuration file for ndppd

## DESCRIPTION
The syntax is as follows:

```
proxy eth0 {

   rule 1234:5678::/96 {

   }
}
```

The configuration file must contain one or more proxy sections, and each of these section must contain one or more rule sections.

The ndppd daemon listens on the interface specified as an argument to the proxy section. Once a Neighbor Solicitation message arrives, it will try to match the target address against the address specified as the argument of the rule section.

## OPTIONS
proxy <interface>

Adds a proxy and binds it to the specified interface. See below for information about proxy options.

## PROXY OPTIONS
rule <address>

Adds a rule with the specified address to the proxy. It may be a an IP such as 1234::1 or a subnet such as 1111::/96. See below for information about rule options.

ttl <value>

Controls how long ndppd will cache an entry. This is in milliseconds, and the default value is 30000 (30 seconds).

timeout <value>

Controls how long ndppd will wait for a Neighbor Advertisement message after forwarding a Neighbor Solicitation message according to the rule. This is in milliseconds, and the default value is 500 (.5 second).

router <yes|no>

Controls if ndppd should send the router bit when sending Neighbor Advertisement messages. The default value here is yes.

## RULE OPTIONS
Specify a method here. See below.

## METHOD
One of the following options must be specified in the rule section. All of these are mutually exclusive options, and cannot be combined.

iface <interface>

Specify which interface the Neighbor Solicitation message will be sent out through.

auto

(NEW) If this option is specified ndppd will attempt to detect which interface to use in order to forward Neighbor Solicitation Messages, by reading the routing table /proc/net/ipv6_route.

static

(NEW) This option tells ndppd that it should immediately respond to a Neighbor Solicitation Message without querying an internal interface. Note that it's recommended that you use this option sparingly, and with as high prefix length as possible. This is to make sure upstream routers are not polluted with spurious neighbor entries. If no rule option has been specified, it will default to static in order to be compatible with 0.2.1. This will, however, produce a warning, and most likely not work in future versions of ndppd.

## AUTHOR
Daniel Adolfsson <daniel@priv.nu>

## SEE ALSO
ndppd(1)


neard.conf

package: neard

title: neard.conf(5)

summary: neard configuration file

text:
# neard.conf(5)

## NAME
main.conf - neard configuration file

## SYNOPSIS
/etc/neard/main.conf

or

<SYSCONFDIR>/neard/main.conf

where <SYSCONFDIR> depends on your distribution or build.

## DESCRIPTION
main.conf is a configuration file for neard (8). The configuration file is optional but it can be used to set up various aspects of neard's behavior.

## FILE FORMAT
The configuration file format is key file format. It consists of sections (groups) of key-value pairs. Lines beginning with a '#' and blank lines are considered comments. Sections are started by a header line containing the section enclosed in '[' and ']', and ended implicitly by the start of the next section or the end of the file. Each key-value pair must be contained in a section.

Description of sections and available keys follows:

### [General]
This section is the only mandatory section of the configuration file.

ConstantPoll=true|false

Enable constant polling. Default is false. Constant polling will force neard into starting a new polling cycle whenever a target or a device are lost.

DefaultPowered=true|false

Automatically turn an adapter on when being discovered. Default value is false.

ResetOnError=true|false

Power cycle the adapter when getting a driver error from the kernel. Default value is true.

## SEE ALSO
neard(8)


package: neomutt

title: mbox_neomutt(5)

summary: Format for mail message storage.

text:
# mbox_neomutt(5)

## NAME
mbox - Format for mail message storage.

## DESCRIPTION
This document describes the format traditionally used by Unix hosts to store mail messages locally. mbox files typically reside in the system's mail spool, under various names in users' Mail directories, and under the name mbox in users' home directories.

An mbox is a text file containing an arbitrary number of e-mail messages. Each message consists of a postmark, followed by an e-mail message formatted according to RFC822, RFC2822. The file format is line-oriented. Lines are separated by line feed characters (ASCII 10).

A postmark line consists of the four characters "From", followed by a space character, followed by the message's envelope sender address, followed by whitespace, and followed by a time stamp. This line is often called From_ line.

The sender address is expected to be addr-spec as defined in RFC2822 3.4.1. The date is expected to be date-time as output by asctime(3). For compatibility reasons with legacy software, two-digit years greater than or equal to 70 should be interpreted as the years 1970+, while two-digit years less than 70 should be interpreted as the years 2000-2069. Software reading files in this format should also be prepared to accept non-numeric timezone information such as "CET DST" for Central European Time, daylight saving time.

Example:

>From example@example.com Fri Jun 23 02:56:55 2000

In order to avoid misinterpretation of lines in message bodies which begin with the four characters "From", followed by a space character, the mail delivery agent must quote any occurrence of "From " at the start of a body line.

There are two different quoting schemes, the first (MBOXO) only quotes plain "From " lines in the body by prepending a '>' to the line; the second (MBOXRD) also quotes already quoted "From " lines by prepending a '>' (i.e. ">From ", ">>From ", ...). The later has the advantage that lines like

>From the command line you can use the '-p' option

aren't dequoted wrongly as a MBOXRD-MDA would turn the line into

>>From the command line you can use the '-p' option

before storing it. Besides MBOXO and MBOXRD there is also MBOXCL which is MBOXO with a "Content-Length:"-field with the number of bytes in the message body; some MUAs (like neomutt(1)) do automatically transform MBOXO mailboxes into MBOXCL ones when ever they write them back as MBOXCL can be read by any MBOXO-MUA without any problems.

If the modification-time (usually determined via stat(2)) of a nonempty mbox file is greater than the access-time the file has new mail. Many MUAs place a Status: header in each message to indicate which messages have already been read.

## LOCKING
Since mbox files are frequently accessed by multiple programs in parallel, mbox files should generally not be accessed without locking.

Three different locking mechanisms (and combinations thereof) are in general use:

- fcntl(2) locking is mostly used on recent, POSIX-compliant systems. Use of this locking method is, in particular, advisable if mbox files are accessed through the Network File System (NFS), since it seems the only way to reliably invalidate NFS clients' caches.

- flock(2) locking is mostly used on BSD-based systems.

If multiple methods are combined, implementors should make sure to use the non-blocking variants of the fcntl(2) and flock(2) system calls in order to avoid deadlocks.

If multiple methods are combined, an mbox file must not be considered to have been successfully locked before all individual locks were obtained. When one of the individual locking methods fails, an application should release all locks it acquired successfully, and restart the entire locking procedure from the beginning, after a suitable delay.

The locking mechanism used on a particular system is a matter of local policy, and should be consistently used by all applications installed on the system which access mbox files. Failure to do so may result in loss of e-mail data, and in corrupted mbox files.

## FILES
/var/spool/mail/$LOGNAME

$LOGNAME's incoming mail folder.

$HOME/mbox

user's archived mail messages, in his $HOME directory.

$HOME/Mail/

A directory in user's $HOME directory which is commonly used to hold mbox format folders.

## SEE ALSO
neomutt(1), fcntl(2), flock(2), link(2), stat(2), asctime(3), maildir(5), mmdf(5), RFC822, RFC976, RFC2822

## AUTHOR
Thomas Roessler <roessler@does-not-exist.org>, Urs Janssen <urs@tin.org>

## HISTORY
The mbox format occurred in Version 6 AT&T Unix.

A variant of this format was documented in RFC976.


title: mmdf_neomutt(5)

summary: Multi\-channel Memorandum Distribution Facility mailbox format

text:
# mmdf_neomutt(5)

## NAME
MMDF - Multi-channel Memorandum Distribution Facility mailbox format

## DESCRIPTION
This document describes the MMDF mailbox format used by some MTAs and MUAs (i.e. scomail(1)) to store mail messages locally.

An MMDF mailbox is a text file containing an arbitrary number of e-mail messages. Each message consists of a postmark, followed by an e-mail message formatted according to RFC822 / RFC2822, followed by a postmark. The file format is line-oriented. Lines are separated by line feed characters (ASCII 10). A postmark line consists of the four characters "^A^A^A^A" (Control-A; ASCII 1).

Example of a MMDF mailbox holding two mails:

```
^A^A^A^A

From: example@example.com

To: example@example.org

Subject: test

>From what I learned about the MMDF-format:

^A^A^A^A

^A^A^A^A

From: example@example.com

To: example@example.org

Subject: test 2

bar

^A^A^A^A
```

In contrast to most other single file mailbox formats like MBOXO and MBOXRD (see mbox(5)) there is no need to quote/dequote "From "-lines in MMDF mailboxes as such lines have no special meaning in this format.

If the modification-time (usually determined via stat(2)) of a nonempty mailbox file is greater than the access-time the file has new mail. Many MUAs place a Status: header in each message to indicate which messages have already been read.

## LOCKING
Since MMDF files are frequently accessed by multiple programs in parallel, MMDF files should generally not be accessed without locking.

Three different locking mechanisms (and combinations thereof) are in general use:

- fcntl(2) locking is mostly used on recent, POSIX-compliant systems. Use of this locking method is, in particular, advisable if MMDF files are accessed through the Network File System (NFS), since it seems the only way to reliably invalidate NFS clients' caches.

- flock(2) locking is mostly used on BSD-based systems.

If multiple methods are combined, implementors should make sure to use the non-blocking variants of the fcntl(2) and flock(2) system calls in order to avoid deadlocks.

If multiple methods are combined, an MMDF file must not be considered to have been successfully locked before all individual locks were obtained. When one of the individual locking methods fails, an application should release all locks it acquired successfully, and restart the entire locking procedure from the beginning, after a suitable delay.

The locking mechanism used on a particular system is a matter of local policy, and should be consistently used by all applications installed on the system which access MMDF files. Failure to do so may result in loss of e-mail data, and in corrupted MMDF files.

## CONFORMING TO
MMDF is not part of any currently supported standard.

## HISTORY
MMDF was developed at the University of Delaware by Dave Crocker.

## SEE ALSO
scomail(1), fcntl(2), flock(2), link(2), stat(2), mbox(5), RFC822, RFC2822

## AUTHOR
Urs Janssen <urs@tin.org>