neulab/tldr huggingface dataset:
zathura [-e XID] [-c PATH] [-d PATH] [-p PATH] [-w PASSWORD] [-P NUMBER] [--fork] [-l LEVEL] [-s] [-x CMD] [--synctex-forward INPUT] [--synctex-pid PID] [-find STRING] <files>
zathura displays the given files. If a single hyphen-minus (-) is given as file name, the content will be read from the standard input. If no files are given, an empty zathura instance launches.
-e,--reparent=xid Reparents to window specified by xid
-c,--config-dir=path Path to the config directory
-d,--data-dir=path Path to the data directory
-p,--plugins-dir=path Path to the directory containing plugins
-w,--password=password The documents password. If multiple documents are opened at once, the password will be used for the first one and zathura will ask for the passwords of the remaining files if needed.
-P,--page=number Opens the document at the given page number. Pages are numbered starting with 1, and negative numbers indicate page numbers starting from the end of the document, -1 being the last page.
-f,--find=string Opens the document and searches for the given string.
-l,--log-level=level Set log level (debug, info, warning, error)
-x,--synctex-editor-command=command Set the synctex editor command. Overrides the synctex-editor-command setting.
--synctex-forward=input Jump to the given position. The switch expects the same format as specified for synctex's view -i. If no instance is running for the specified document, a new instance will be launched (only if --synctex-pid is not specified).
--synctex-pid=pid Instead of looking for an instance having the correct file opened, try only the instance with the given PID. Note that if the given PID does not have the correct file open or does not exist, no new instance will be spanned.
--mode=mode Start in a non-default mode
--fork Fork into background
--version Display version string and exit
--help Display help and exit
J, PgDn Go to the next page
K, PgUp Go to the previous page
h, k, j, l Scroll to the left, down, up or right direction
Left, Down, Up, Right Scroll to the left, down, up or right direction
^t, ^d, ^u, ^y Scroll a half page left, down, up or right
t, ^f, ^b, space, <S-space>, y Scroll a full page left, down, up or right
gg, G, nG Goto to the first, the last or to the nth page
P      Snaps to the current page
H, L   Goto top or bottom of the current page
^o, ^i Move backward and forward through the jump list
^j, ^k Bisect forward and backward between the last two jump points
^c, Escape Abort
a, s   Adjust window in best-fit or width mode
/, ?   Search for text
n, N   Search for the next or previous result
o, O   Open document
f      Follow links
F      Display link target
c      Copy link target into the clipboard
:      Enter command
r      Rotate by 90 degrees
^r     Recolor (grayscale and invert colors)
R      Reload document
Tab    Show index and switch to Index mode
d      Toggle dual page view
F5     Switch to presentation mode
F11    Switch to fullscreen mode
^m     Toggle inputbar
^n     Toggle statusbar
+, -, = Zoom in, out or to the original size
zI, zO, z0 Zoom in, out or to the original size
n=     Zoom to size n
mX     Set a quickmark to a letter or number X
'X     Goto quickmark saved at letter or number X
q      Quit
J, K   Go to the next or previous page
space, <S-space>, <BackSpace> Scroll a full page down or up
F11    Switch to normal mode
F5     Switch to normal mode
Index mode
k, j   Move to upper or lower entry
l      Expand entry
L      Expand all entries
h      Collapse entry
H      Collapse all entries
space, Return Select and open entry
Scroll Scroll up or down
^Scroll Zoom in or out
Hold Button2 Pan the document
Button1 Follow link
bmark  Save a bookmark
bdelete Delete a bookmark
blist  List bookmarks
close  Close document
exec   Execute an external command
info   Show document information
open   Open a document
offset Set page offset
print  Print document
write(!) Save document (and force overwriting)
export Export attachments
dump   Write values, descriptions, etc. of all current settings to a file.
The default appearance and behaviour of zathura can be overwritten by modifying the zathurarc file (default path: ~/.config/zathura/zathurarc). For a detailed description please consult zathurarc(5).
Both synctex forward and backwards synchronization are supported by zathura, To enable synctex forward synchronization, please look at the --synctex-forward and --synctex-editor options. zathura will also emit a signal via the D-Bus interface. To support synctex backwards synchronization, zathura provides a D-Bus interface that can be called by the editor. For convince zathura also knows how to parse the output of the synctex view command. It is enough to pass the arguments to synctex view's -i option to zathura via --synctex-forward and zathura will pass the information to the correct instance.
For gvim forward and backwards synchronization support can be set up as follows: First add the following to the vim configuration:
function! Synctex() execute "silent !zathura --synctex-forward " . line('.') . ":" . col('.') . ":" . bufname('%') . " " . g:syncpdf redraw! endfunction map <C-enter> :call Synctex()<cr>
Then launch zathura with
zathura -x "gvim --servername vim -c \"let g:syncpdf='$1'\" --remote +%{line} %{input}" $file
Some editors support zathura as viewer out of the box:
• LaTeXTools for SublimeText (‐ https://latextools.readthedocs.io/en/latest/available-viewers/#zathura)
• LaTeX for Atom (https://atom.io/packages/latex)
ZATHURA_PLUGINS_PATH Path to the directory containing plugins. This directory is only considered if no other directory was specified using --plugins-dir.
If GDK_NATIVE_WINDOWS is enabled you will experience problems with large documents. In this case zathura might crash or pages cannot be rendered properly. Disabling GDK_NATIVE_WINDOWS fixes this issue. The same issue may appear, if overlay-scrollbar is enabled in GTK_MODULES.
zathurarc(5)
pwmt.org
2009-2021, pwmt.org
GIT-SHOW-REF(1)                    Git Manual                    GIT-SHOW-REF(1)
git-show-ref - List references in a local repository
git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...] git show-ref --exclude-existing[=<pattern>]
Displays references available in a local repository along with the associated commit IDs. Results can be filtered using a pattern and tags can be dereferenced into object IDs. Additionally, it can be used to test whether a particular ref exists.
By default, shows the tags, heads, and remote refs.
The --exclude-existing form is a filter that does the inverse. It reads refs from stdin, one ref per line, and shows those that don’t exist in the local repository.
Use of this utility is encouraged in favor of directly accessing files under the .git directory.
--head Show the HEAD reference, even if it would normally be filtered out.
--heads, --tags Limit to "refs/heads" and "refs/tags", respectively. These options are not mutually exclusive; when given both, references stored in "refs/heads" and "refs/tags" are displayed.
-d, --dereference Dereference tags into object IDs as well. They will be shown with "^{}" appended.
-s, --hash[=<n>] Only show the SHA-1 hash, not the reference name. When combined with --dereference the dereferenced tag will still be shown after the SHA-1.
--verify Enable stricter reference checking by requiring an exact ref path. Aside from returning an error code of 1, it will also print an error message if --quiet was not specified.
--abbrev[=<n>] Abbreviate the object name. When using --hash, you do not have to say --hash --abbrev; --hash=n would do.
-q, --quiet Do not print any results to stdout. When combined with --verify this can be used to silently check if a reference exists.
--exclude-existing[=<pattern>] Make git show-ref act as a filter that reads refs from stdin of the form "^(?:<anything>\s)?<refname>(?:\^{})?$" and performs the following actions on each: (1) strip "^{}" at the end of line if any; (2) ignore if pattern is provided and does not head-match refname; (3) warn if refname is not a well-formed refname and skip; (4) ignore if refname is a ref that exists in the local repository; (5) otherwise output the line.
<pattern>... Show references matching one or more patterns. Patterns are matched from the end of the full name, and only complete parts are matched, e.g.  master matches refs/heads/master, refs/remotes/origin/master, refs/tags/jedi/master but not refs/heads/mymaster or refs/remotes/master/jedi.
The output is in the format: <SHA-1 ID> <space> <reference name>.
$ git show-ref --head --dereference 832e76a9899f560a90ffd62ae2ce83bbeff58f54 HEAD 832e76a9899f560a90ffd62ae2ce83bbeff58f54 refs/heads/master 832e76a9899f560a90ffd62ae2ce83bbeff58f54 refs/heads/origin 3521017556c5de4159da4615a39fa4d5d2c279b5 refs/tags/v0.99.9c 6ddc0964034342519a87fe013781abf31c6db6ad refs/tags/v0.99.9c^{} 055e4ae3ae6eb344cbabf2a5256a49ea66040131 refs/tags/v1.0rc4 423325a2d24638ddcc82ce47be5e40be550f4507 refs/tags/v1.0rc4^{} ...
When using --hash (and not --dereference) the output format is: <SHA-1 ID>
$ git show-ref --heads --hash 2e3ba0114a1f52b47df29743d6915d056be13278 185008ae97960c8d551adcd9e23565194651b5d1 03adf42c988195b50e1a1935ba5fcbc39b2b029b ...
To show all references called "master", whether tags or heads or anything else, and regardless of how deep in the reference naming hierarchy they are, use:
git show-ref master
This will show "refs/heads/master" but also "refs/remote/other-repo/master", if such references exists.
When using the --verify flag, the command requires an exact path:
git show-ref --verify refs/heads/master
will only match the exact branch called "master".
If nothing matches, git show-ref will return an error code of 1, and in the case of verification, it will show an error message.
For scripting, you can ask it to be quiet with the "--quiet" flag, which allows you to do things like
git show-ref --quiet --verify -- "refs/heads/$headname" || echo "$headname is not a valid branch"
to check whether a particular branch exists or not (notice how we don’t actually want to show any results, and we want to use the full refname for it in order to not trigger the problem with ambiguous partial matches).
To show only tags, or only proper branch heads, use "--tags" and/or "--heads" respectively (using both means that it shows tags and heads, but not other random references under the refs/ subdirectory).
To do automatic tag object dereferencing, use the "-d" or "--dereference" flag, so you can do
git show-ref --tags --dereference
to get a listing of all tags together with what they dereference.
.git/refs/*, .git/packed-refs
git-for-each-ref(1), git-ls-remote(1), git-update-ref(1), gitrepository- layout(5)
SUDO(8)                    BSD System Manager's Manual                   SUDO(8)
sudo, sudoedit — execute a command as another user
sudo -h | -K | -k | -V sudo -v [-ABknS] [-g group] [-h host] [-p prompt] [-u user] sudo -l [-ABknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command] sudo [-ABbEHnPS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i | -s] [command] sudoedit [-ABknS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...
sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.  The invoking user's real (not effective) user-ID is used to determine the user name with which to query the security policy.
sudo supports a plugin architecture for security policies and input/output logging.  Third parties can develop and distribute their own policy and I/O logging plugins to work seamlessly with the sudo front end.  The default security policy is sudoers, which is configured via the file /etc/sudoers, or via LDAP.  See the Plugins section for more information.
The security policy determines what privileges, if any, a user has to run sudo.  The policy may require that users authenticate themselves with a password or another authentication mechanism.  If authentication is required, sudo will exit if the user's password is not entered within a configurable time limit.  This limit is policy-specific; the default password prompt timeout for the sudoers security policy is 5 minutes.
Security policies may support credential caching to allow the user to run sudo again for a period of time without requiring authentication.  By default, the sudoers policy caches credentials on a per-terminal basis for 5 minutes.  See the timestamp_type and timestamp_timeout options in sudoers(5) for more information.  By running sudo with the -v option, a user can update the cached credentials without running a command.
On systems where sudo is the primary method of gaining superuser privileges, it is imperative to avoid syntax errors in the security policy configuration files.  For the default security policy, sudoers(5), changes to the configuration files should be made using the visudo(8) utility which will ensure that no syntax errors are introduced.
When invoked as sudoedit, the -e option (described below), is implied.
Security policies may log successful and failed attempts to use sudo.  If an I/O plugin is configured, the running command's input and output may be logged as well.
-A, --askpass Normally, if sudo requires a password, it will read it from the user's terminal.  If the -A (askpass) option is specified, a (possibly graphical) helper program is executed to read the user's password and output the password to the standard output. If the SUDO_ASKPASS environment variable is set, it specifies the path to the helper program.  Otherwise, if sudo.conf(5) contains a line specifying the askpass program, that value will be used.  For example:
# Path to askpass helper program Path askpass /usr/X11R6/bin/ssh-askpass
If no askpass program is available, sudo will exit with an error.
-B, --bell  Ring the bell as part of the password prompt when a terminal is present.  This option has no effect if an askpass program is used.
-b, --background Run the given command in the background.  Note that it is not possible to use shell job control to manipulate background processes started by sudo.  Most interactive commands will fail to work properly in background mode.
-C num, --close-from=num Close all file descriptors greater than or equal to num before executing a command.  Values less than three are not permitted. By default, sudo will close all open file descriptors other than standard input, standard output and standard error when executing a command.  The security policy may restrict the user's ability to use this option.  The sudoers policy only permits use of the -C option when the administrator has enabled the closefrom_override option.
-D directory, --chdir=directory Run the command in the specified directory instead of the current working directory.  The security policy may return an error if the user does not have permission to specify the working directory.
-E, --preserve-env Indicates to the security policy that the user wishes to preserve their existing environment variables.  The security policy may return an error if the user does not have permission to preserve the environment.
--preserve-env=list Indicates to the security policy that the user wishes to add the comma-separated list of environment variables to those preserved from the user's environment.  The security policy may return an error if the user does not have permission to preserve the environment.  This option may be specified multiple times.
-e, --edit  Edit one or more files instead of running a command.  In lieu of a path name, the string "sudoedit" is used when consulting the security policy.  If the user is authorized by the policy, the following steps are taken:
1.   Temporary copies are made of the files to be edited with the owner set to the invoking user.
2.   The editor specified by the policy is run to edit the temporary files.  The sudoers policy uses the SUDO_EDITOR, VISUAL and EDITOR environment variables (in that order). If none of SUDO_EDITOR, VISUAL or EDITOR are set, the first program listed in the editor sudoers(5) option is used.
3.   If they have been modified, the temporary files are copied back to their original location and the temporary versions are removed.
To help prevent the editing of unauthorized files, the following restrictions are enforced unless explicitly allowed by the security policy:
•  Symbolic links may not be edited (version 1.8.15 and higher).
•  Symbolic links along the path to be edited are not followed when the parent directory is writable by the invoking user unless that user is root (version 1.8.16 and higher).
•  Files located in a directory that is writable by the invoking user may not be edited unless that user is root (version 1.8.16 and higher).
Users are never allowed to edit device special files.
If the specified file does not exist, it will be created.  Note that unlike most commands run by sudo, the editor is run with the invoking user's environment unmodified.  If the temporary file becomes empty after editing, the user will be prompted before it is installed.  If, for some reason, sudo is unable to update a file with its edited version, the user will receive a warning and the edited copy will remain in a temporary file.
-g group, --group=group Run the command with the primary group set to group instead of the primary group specified by the target user's password database entry.  The group may be either a group name or a numeric group-ID (GID) prefixed with the ‘#’ character (e.g., #0 for GID 0).  When running a command as a GID, many shells require that the ‘#’ be escaped with a backslash (‘\’).  If no -u option is specified, the command will be run as the invoking user.  In either case, the primary group will be set to group. The sudoers policy permits any of the target user's groups to be specified via the -g option as long as the -P option is not in use.
-H, --set-home Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database entry.  Depending on the policy, this may be the default behavior.
-h host, --host=host Run the command on the specified host if the security policy plugin supports remote commands.  Note that the sudoers plugin does not currently support running remote commands.  This may also be used in conjunction with the -l option to list a user's privileges for the remote host.
-i, --login Run the shell specified by the target user's password database entry as a login shell.  This means that login-specific resource files such as .profile, .bash_profile or .login will be read by the shell.  If a command is specified, it is passed to the shell for execution via the shell's -c option.  If no command is specified, an interactive shell is executed.  sudo attempts to change to that user's home directory before running the shell.  The command is run with an environment similar to the one a user would receive at log in.  Note that most shells behave differently when a command is specified as compared to an interactive session; consult the shell's manual for details. The Command environment section in the sudoers(5) manual documents how the -i option affects the environment in which a command is run when the sudoers policy is in use.
-K, --remove-timestamp Similar to the -k option, except that it removes the user's cached credentials entirely and may not be used in conjunction with a command or other option.  This option does not require a password.  Not all security policies support credential caching.
-k, --reset-timestamp When used without a command, invalidates the user's cached credentials.  In other words, the next time sudo is run a password will be required.  This option does not require a password and was added to allow a user to revoke sudo permissions from a .logout file.
When used in conjunction with a command or an option that may require a password, this option will cause sudo to ignore the user's cached credentials.  As a result, sudo will prompt for a password (if one is required by the security policy) and will not update the user's cached credentials.
Not all security policies support credential caching.
-l, --list  If no command is specified, list the allowed (and forbidden) commands for the invoking user (or the user specified by the -U option) on the current host.  A longer list format is used if this option is specified multiple times and the security policy supports a verbose output format.
If a command is specified and is permitted by the security policy, the fully-qualified path to the command is displayed along with any command line arguments.  If a command is specified but not allowed by the policy, sudo will exit with a status value of 1.
-n, --non-interactive Avoid prompting the user for input of any kind.  If a password is required for the command to run, sudo will display an error message and exit.
-P, --preserve-groups Preserve the invoking user's group vector unaltered.  By default, the sudoers policy will initialize the group vector to the list of groups the target user is a member of.  The real and effective group-IDs, however, are still set to match the target user.
-p prompt, --prompt=prompt Use a custom password prompt with optional escape sequences. The following percent (‘%’) escape sequences are supported by the sudoers policy:
%H  expanded to the host name including the domain name (on if the machine's host name is fully qualified or the fqdn option is set in sudoers(5))
%h  expanded to the local host name without the domain name
%p  expanded to the name of the user whose password is being requested (respects the rootpw, targetpw, and runaspw flags in sudoers(5))
%U  expanded to the login name of the user the command will be run as (defaults to root unless the -u option is also specified)
%u  expanded to the invoking user's login name
%%  two consecutive ‘%’ characters are collapsed into a single ‘%’ character
The custom prompt will override the default prompt specified by either the security policy or the SUDO_PROMPT environment variable.  On systems that use PAM, the custom prompt will also override the prompt specified by a PAM module unless the passprompt_override flag is disabled in sudoers.
-R directory, --chroot=directory Change to the specified root directory (see chroot(8)) before running the command.  The security policy may return an error if the user does not have permission to specify the root directory.
-S, --stdin Write the prompt to the standard error and read the password from the standard input instead of using the terminal device.
-s, --shell Run the shell specified by the SHELL environment variable if it is set or the shell specified by the invoking user's password database entry.  If a command is specified, it is passed to the shell for execution via the shell's -c option.  If no command is specified, an interactive shell is executed.  Note that most shells behave differently when a command is specified as compared to an interactive session; consult the shell's manual for details.
-U user, --other-user=user Used in conjunction with the -l option to list the privileges for user instead of for the invoking user.  The security policy may restrict listing other users' privileges.  The sudoers policy only allows root or a user with the ALL privilege on the current host to use this option.
-T timeout, --command-timeout=timeout Used to set a timeout for the command.  If the timeout expires before the command has exited, the command will be terminated. The security policy may restrict the ability to set command timeouts.  The sudoers policy requires that user-specified timeouts be explicitly enabled.
-u user, --user=user Run the command as a user other than the default target user (usually root).  The user may be either a user name or a numeric user-ID (UID) prefixed with the ‘#’ character (e.g., #0 for UID 0).  When running commands as a UID, many shells require that the ‘#’ be escaped with a backslash (‘\’).  Some security policies may restrict UIDs to those listed in the password database.  The sudoers policy allows UIDs that are not in the password database as long as the targetpw option is not set.  Other security policies may not support this.
-V, --version Print the sudo version string as well as the version string of the security policy plugin and any I/O plugins.  If the invoking user is already root the -V option will display the arguments passed to configure when sudo was built and plugins may display more verbose information such as default options.
-v, --validate Update the user's cached credentials, authenticating the user if necessary.  For the sudoers plugin, this extends the sudo timeout for another 5 minutes by default, but does not run a command.  Not all security policies support cached credentials.
--          The -- option indicates that sudo should stop processing command line arguments.
Options that take a value may only be specified once unless otherwise indicated in the description.  This is to help guard against problems caused by poorly written scripts that invoke sudo with user-controlled input.
Environment variables to be set for the command may also be passed on the command line in the form of VAR=value, e.g., LD_LIBRARY_PATH=/usr/local/pkg/lib.  Variables passed on the command line are subject to restrictions imposed by the security policy plugin.  The sudoers policy subjects variables passed on the command line to the same restrictions as normal environment variables with one important exception. If the setenv option is set in sudoers, the command to be run has the SETENV tag set or the command matched is ALL, the user may set variables that would otherwise be forbidden.  See sudoers(5) for more information.
When sudo executes a command, the security policy specifies the execution environment for the command.  Typically, the real and effective user and group and IDs are set to match those of the target user, as specified in the password database, and the group vector is initialized based on the group database (unless the -P option was specified).
The following parameters may be specified by security policy:
•  real and effective user-ID
•  real and effective group-ID
•  supplementary group-IDs
•  the environment list
•  current working directory
•  file creation mode mask (umask)
•  scheduling priority (aka nice value)
Process model There are two distinct ways sudo can run a command.
If an I/O logging plugin is configured or if the security policy explicitly requests it, a new pseudo-terminal (“pty”) is allocated and fork(2) is used to create a second sudo process, referred to as the monitor.  The monitor creates a new terminal session with itself as the leader and the pty as its controlling terminal, calls fork(2), sets up the execution environment as described above, and then uses the execve(2) system call to run the command in the child process.  The monitor exists to relay job control signals between the user's existing terminal and the pty the command is being run in.  This makes it possible to suspend and resume the command.  Without the monitor, the command would be in what POSIX terms an “orphaned process group” and it would not receive any job control signals from the kernel. When the command exits or is terminated by a signal, the monitor passes the command's exit status to the main sudo process and exits.  After receiving the command's exit status, the main sudo passes the command's exit status to the security policy's close function and exits.
If no pty is used, sudo calls fork(2), sets up the execution environment as described above, and uses the execve(2) system call to run the command in the child process.  The main sudo process waits until the command has completed, then passes the command's exit status to the security policy's close function and exits.  As a special case, if the policy plugin does not define a close function, sudo will execute the command directly instead of calling fork(2) first.  The sudoers policy plugin will only define a close function when I/O logging is enabled, a pty is required, or the pam_session or pam_setcred options are enabled.  Note that pam_session and pam_setcred are enabled by default on systems using PAM.
On systems that use PAM, the security policy's close function is responsible for closing the PAM session.  It may also log the command's exit status.
Signal handling When the command is run as a child of the sudo process, sudo will relay signals it receives to the command.  The SIGINT and SIGQUIT signals are only relayed when the command is being run in a new pty or when the signal was sent by a user process, not the kernel.  This prevents the command from receiving SIGINT twice each time the user enters control-C.  Some signals, such as SIGSTOP and SIGKILL, cannot be caught and thus will not be relayed to the command.  As a general rule, SIGTSTP should be used instead of SIGSTOP when you wish to suspend a command being run by sudo.
As a special case, sudo will not relay signals that were sent by the command it is running.  This prevents the command from accidentally killing itself.  On some systems, the reboot(8) command sends SIGTERM to all non- system processes other than itself before rebooting the system.  This prevents sudo from relaying the SIGTERM signal it received back to reboot(8), which might then exit before the system was actually rebooted, leaving it in a half-dead state similar to single user mode.  Note, however, that this check only applies to the command run by sudo and not any other processes that the command may create.  As a result, running a script that calls reboot(8) or shutdown(8) via sudo may cause the system to end up in this undefined state unless the reboot(8) or shutdown(8) are run using the exec() family of functions instead of system() (which interposes a shell between the command and the calling process).
If no I/O logging plugins are loaded and the policy plugin has not defined a close() function, set a command timeout or required that the command be run in a new pty, sudo may execute the command directly instead of running it as a child process.
Plugins Plugins may be specified via Plugin directives in the sudo.conf(5) file. They may be loaded as dynamic shared objects (on systems that support them), or compiled directly into the sudo binary.  If no sudo.conf(5) file is present, or if it doesn't contain any Plugin lines, sudo will use sudoers(5) for the policy, auditing and I/O logging plugins.  See the sudo.conf(5) manual for details of the /etc/sudo.conf file and the sudo_plugin(5) manual for more information about the sudo plugin architecture.
Upon successful execution of a command, the exit status from sudo will be the exit status of the program that was executed.  If the command terminated due to receipt of a signal, sudo will send itself the same signal that terminated the command.
If the -l option was specified without a command, sudo will exit with a value of 0 if the user is allowed to run sudo and they authenticated successfully (as required by the security policy).  If a command is specified with the -l option, the exit value will only be 0 if the command is permitted by the security policy, otherwise it will be 1.
If there is an authentication failure, a configuration/permission problem or if the given command cannot be executed, sudo exits with a value of 1. In the latter case, the error string is printed to the standard error.  If sudo cannot stat(2) one or more entries in the user's PATH, an error is printed to the standard error.  (If the directory does not exist or if it is not really a directory, the entry is ignored and no error is printed.) This should not happen under normal circumstances.  The most common reason for stat(2) to return “permission denied” is if you are running an automounter and one of the directories in your PATH is on a machine that is currently unreachable.
sudo tries to be safe when executing external commands.
To prevent command spoofing, sudo checks "." and "" (both denoting current directory) last when searching for a command in the user's PATH (if one or both are in the PATH).  Note, however, that the actual PATH environment variable is not modified and is passed unchanged to the program that sudo executes.
Users should never be granted sudo privileges to execute files that are writable by the user or that reside in a directory that is writable by the user.  If the user can modify or replace the command there is no way to limit what additional commands they can run.
Please note that sudo will normally only log the command it explicitly runs.  If a user runs a command such as sudo su or sudo sh, subsequent commands run from that shell are not subject to sudo's security policy. The same is true for commands that offer shell escapes (including most editors).  If I/O logging is enabled, subsequent commands will have their input and/or output logged, but there will not be traditional logs for those commands.  Because of this, care must be taken when giving users access to commands via sudo to verify that the command does not inadvertently give the user an effective root shell.  For information on ways to address this, please see the Preventing shell escapes section in sudoers(5).
To prevent the disclosure of potentially sensitive information, sudo disables core dumps by default while it is executing (they are re-enabled for the command that is run).  This historical practice dates from a time when most operating systems allowed set-user-ID processes to dump core by default.  To aid in debugging sudo crashes, you may wish to re-enable core dumps by setting “disable_coredump” to false in the sudo.conf(5) file as follows:
Set disable_coredump false
See the sudo.conf(5) manual for more information.
sudo utilizes the following environment variables.  The security policy has control over the actual content of the command's environment.
EDITOR           Default editor to use in -e (sudoedit) mode if neither SUDO_EDITOR nor VISUAL is set.
MAIL             Set to the mail spool of the target user when the -i option is specified or when env_reset is enabled in sudoers (unless MAIL is present in the env_keep list).
HOME             Set to the home directory of the target user when the -i or -H options are specified, when the -s option is specified and set_home is set in sudoers, when always_set_home is enabled in sudoers, or when env_reset is enabled in sudoers and HOME is not present in the env_keep list.
LOGNAME          Set to the login name of the target user when the -i option is specified, when the set_logname option is enabled in sudoers or when the env_reset option is enabled in sudoers (unless LOGNAME is present in the env_keep list).
PATH             May be overridden by the security policy.
SHELL            Used to determine shell to run with -s option.
SUDO_ASKPASS     Specifies the path to a helper program used to read the password if no terminal is available or if the -A option is specified.
SUDO_COMMAND     Set to the command run by sudo, including command line arguments.  The command line arguments are truncated at 4096 characters to prevent a potential execution error.
SUDO_EDITOR      Default editor to use in -e (sudoedit) mode.
SUDO_GID         Set to the group-ID of the user who invoked sudo.
SUDO_PROMPT      Used as the default password prompt unless the -p option was specified.
SUDO_PS1         If set, PS1 will be set to its value for the program being run.
SUDO_UID         Set to the user-ID of the user who invoked sudo.
SUDO_USER        Set to the login name of the user who invoked sudo.
USER             Set to the same value as LOGNAME, described above.
VISUAL           Default editor to use in -e (sudoedit) mode if SUDO_EDITOR is not set.
/etc/sudo.conf            sudo front end configuration
Note: the following examples assume a properly configured security policy.
To get a file listing of an unreadable directory:
$ sudo ls /usr/local/protected
To list the home directory of user yaz on a machine where the file system holding ~yaz is not exported as root:
$ sudo -u yaz ls ~yaz
To edit the index.html file as user www:
$ sudoedit -u www ~www/htdocs/index.html
To view system logs only accessible to root and users in the adm group:
$ sudo -g adm more /var/log/syslog
To run an editor as jim with a different primary group:
$ sudoedit -u jim -g audio ~jim/sound.txt
To shut down a machine:
$ sudo shutdown -r +15 "quick reboot"
To make a usage listing of the directories in the /home partition.  Note that this runs the commands in a sub-shell to make the cd and file redirection work.
$ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
Error messages produced by sudo include:
editing files in a writable directory is not permitted By default, sudoedit does not permit editing a file when any of the parent directories are writable by the invoking user.  This avoids a race condition that could allow the user to overwrite an arbitrary file.  See the sudoedit_checkdir option in sudoers(5) for more information.
editing symbolic links is not permitted By default, sudoedit does not follow symbolic links when opening files.  See the sudoedit_follow option in sudoers(5) for more information.
effective uid is not 0, is sudo installed setuid root? sudo was not run with root privileges.  The sudo binary must be owned by the root user and have the set-user-ID bit set.  Also, it must not be located on a file system mounted with the ‘nosuid’ option or on an NFS file system that maps uid 0 to an unprivileged uid.
effective uid is not 0, is sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges? sudo was not run with root privileges.  The sudo binary has the proper owner and permissions but it still did not run with root privileges.  The most common reason for this is that the file system the sudo binary is located on is mounted with the ‘nosuid’ option or it is an NFS file system that maps uid 0 to an unprivileged uid.
fatal error, unable to load plugins An error occurred while loading or initializing the plugins specified in sudo.conf(5).
invalid environment variable name One or more environment variable names specified via the -E option contained an equal sign (‘=’).  The arguments to the -E option should be environment variable names without an associated value.
no password was provided When sudo tried to read the password, it did not receive any characters.  This may happen if no terminal is available (or the -S option is specified) and the standard input has been redirected from /dev/null.
a terminal is required to read the password sudo needs to read the password but there is no mechanism available for it to do so.  A terminal is not present to read the password from, sudo has not been configured to read from the standard input, the -S option was not used, and no askpass helper has been specified either via the sudo.conf(5) file or the SUDO_ASKPASS environment variable.
no writable temporary directory found sudoedit was unable to find a usable temporary directory in which to store its intermediate files.
sudo must be owned by uid 0 and have the setuid bit set sudo was not run with root privileges.  The sudo binary does not have the correct owner or permissions.  It must be owned by the root user and have the set-user-ID bit set.
sudoedit is not supported on this platform It is only possible to run sudoedit on systems that support setting the effective user-ID.
timed out reading password The user did not enter a password before the password timeout (5 minutes by default) expired.
you may not specify environment variables in edit mode It is only possible to specify environment variables when running a command.  When editing a file, the editor is run with the user's environment unmodified.
su(1), stat(2), login_cap(3), passwd(5), sudo.conf(5), sudo_plugin(5), sudoers(5), sudoers_timestamp(5), sudoreplay(8), visudo(8)
See the HISTORY file in the sudo distribution (https://www.sudo.ws/history.html) for a brief history of sudo.
There is no easy way to prevent a user from gaining a root shell if that user is allowed to run arbitrary commands via sudo.  Also, many programs (such as editors) allow the user to run commands via shell escapes, thus avoiding sudo's checks.  However, on most systems it is possible to prevent shell escapes with the sudoers(5) plugin's noexec functionality.
It is not meaningful to run the cd command directly via sudo, e.g.,
$ sudo cd /usr/local/protected
since when the command exits the parent process (your shell) will still be the same.  Please see the EXAMPLES section for more information.
Running shell scripts via sudo can expose the same kernel bugs that make set-user-ID shell scripts unsafe on some operating systems (if your OS has a /dev/fd/ directory, set-user-ID shell scripts are generally safe).
If you feel you have found a bug in sudo, please submit a bug report at https://bugzilla.sudo.ws/
sudo is provided “AS IS” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed.  See the LICENSE file distributed with sudo or https://www.sudo.ws/license.html for complete details.
COLLECTD(1)                         collectd                         COLLECTD(1)
collectd - System statistics collection daemon
collectd [options]
collectd is a daemon that receives system statistics and makes them available in a number of ways. The main daemon itself doesn't have any real functionality apart from loading, querying and submitting to plugins. For a description of available plugins please see "PLUGINS" below.
Most of collectd's configuration is done using using a configfile. See collectd.conf(5) for an in-depth description of all options.
-C <config-file> Specify an alternative config file. This is the place to go when you wish to change collectd's behavior. The path may be relative to the current working directory.
-t  Test the configuration only. The program immediately exits after parsing the config file. A return code not equal to zero indicates an error.
-T  Test the plugin read callbacks only. The program immediately exits after invoking the read callbacks once. A return code not equal to zero indicates an error.
-P <pid-file> Specify an alternative pid file. This overwrites any settings in the config file. This is thought for init-scripts that require the PID- file in a certain directory to work correctly. For everyday-usage use the PIDFile config-option.
-B  If set, collectd will not try to create its base directory. If the base directory does not exist, it will exit rather than trying to create the directory.
-f  Don't fork to the background. collectd will also not close standard file descriptors, detach from the session nor write a pid file. This is mainly thought for 'supervising' init replacements such as runit. If using upstart or systemd though, starting with version 5.5.0 collectd is able to notify these two init replacements, and does require forking to the background for process supervision. The contrib/ directory has sample upstart and systemd configuration files.
-h  Output usage information and exit.
As noted above, the real power of collectd lies within its plugins. A (hopefully complete) list of plugins and short descriptions can be found in the README file that is distributed with the sourcecode. If you're using a package it's a good bet to search somewhere near /usr/share/doc/collectd.
There are two big groups of plugins, input and output plugins:
•   Input plugins are queried periodically. They somehow acquire the current value of whatever they where designed to work with and submit these values back to the daemon, i. e. they "dispatch" the values. As an example, the "cpu plugin" reads the current cpu-counters of time spent in the various modes (user, system, nice, ...) and dispatches these counters to the daemon.
•   Output plugins get the dispatched values from the daemon and does something with them. Common applications are writing to RRD-files, CSV-files or sending the data over a network link to a remote box.
Of course not all plugins fit neatly into one of the two above categories. The "network plugin", for example, is able to send (i. e. "write") and receive (i. e. "dispatch") values. Also, it opens a socket upon initialization and dispatches the values when it receives them and isn't triggered at the same time the input plugins are being read. You can think of the network receive part as working asynchronous if it helps.
In addition to the above, there are "logging plugins". Right now those are the "logfile plugin" and the "syslog plugin". With these plugins collectd can provide information about issues and significant situations to the user.  Several loglevels let you suppress uninteresting messages.
Starting with version 4.3.0 collectd has support for monitoring. This is done by checking thresholds defined by the user. If a value is out of range, a notification will be dispatched to "notification plugins". See collectd.conf(5) for more detailed information about threshold checking.
Please note that some plugins, that provide other means of communicating with the daemon, have manpages of their own to describe their functionality in more detail. In particular those are collectd-email(5), collectd-exec(5), collectd-perl(5), collectd-snmp(5), and collectd-unixsock(5)
collectd accepts the following signals:
SIGINT, SIGTERM These signals cause collectd to shut down all plugins and terminate.
SIGUSR1 This signal causes collectd to signal all plugins to flush data from internal caches. E. g. the "rrdtool plugin" will write all pending data to the RRD files. This is the same as using the "FLUSH -1" command of the "unixsock plugin".
collectd.conf(5), collectd-email(5), collectd-exec(5), collectd-perl(5), collectd-snmp(5), collectd-unixsock(5), types.db(5), <http://collectd.org/>
Florian Forster <octo@collectd.org>
MULTITAIL(1)                 General Commands Manual                MULTITAIL(1)
MultiTail - browse through several files at once
multitail [options]
options: [-cs|-Cs|-c-] [-s] [-i] inputfile [-i anotherinputfile] [...]
The program MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). It can also monitor wildcards: if another file matching the wildcard has a more recent modification date, it will automatically switch to that file. That way you can, for example, monitor a complete directory of files. Merging of 2 or even more logfiles is possible. It can also use colors while displaying the logfiles (through regular expressions), for faster recognition of what is important and what not. It can also filter lines (again with regular expressions). It has interactive menus for editing given regular expressions and deleting and adding windows. One can also have windows with the output of shell scripts and other software. When viewing the output of external software, MultiTail can mimic the functionality of tools like 'watch' and such. When new mail arrives for the current user, the statuslines will become green. To reset this "mail has arrived"-state, press ' ' (a space). For help at any time, press F1.
-i file Select a file to monitor. You can have multiple -i file parameters.  You only need to add -i file in front of a filename if the filename starts with a dash ('-').
-I file Same as -i file but add the output to the previous window (so the output is merged).
-iw file interval -Iw file interval Like '-i'/'-I' but expects the parameter to be a wildcard and the second(!) an interval.  Initially MultiTail will start monitoring the first file with the most recent modification time. Every interval it will check if any new files were created (or modified) and start tailing that one. *Don't forget* to put quotation marks around the filename as otherwhise the shell will try to substitute them!
-l command Command to execute in a window. Parameter is the command. Do not forget to use "'s if the external command needs parameter! (e.g. -l "ping host").
-L command Same as -l but add the output to the previous window (so the output is merged).
-j     Read from stdin (can be used only once as there is only 1 stdin).
-J     Same as -j but add the output to the previous window (so the output is merged).
--mergeall Merge all of the following files into the same window (see '--no- mergeall').
--no-mergeall Stop merging all files into one window (see '--mergeall');
--no-repeat When the same line is repeated, it will be suppressed while printing a "Last message repeated x times" message.
--mark-interval x Print every 'x' seconds a mark-line when nothing else was printed.